org.norther.tammi.root.realm
Class DefaultRepositoryRealm

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.config.DefaultConfigurable
          extended by org.norther.tammi.core.realm.AbstractRealm
              extended by org.norther.tammi.root.realm.DefaultRepositoryRealm
All Implemented Interfaces:
Serializable, EventListener, NotificationBroadcaster, NotificationEmitter, TraceListener, Manageable, MBeanDelegate, Configurable, Realm, MultiRepositoryClient, RepositoryClient, RepositoryRealm

public class DefaultRepositoryRealm
extends AbstractRealm
implements RepositoryRealm

A default implementation of RepositoryRealm.

Version:
$Id: DefaultRepositoryRealm.java,v 1.33 2009/09/28 15:08:35 cvsimp Exp $
Author:
Marketta Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.norther.tammi.core.config.DefaultConfigurable
DefaultConfigurable.Modified
 
Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.root.realm.RepositoryRealm
CASE_INSENSITIVE_PROPERTY, USER_CLASS_NAME_PROPERTY
 
Fields inherited from interface org.norther.tammi.core.realm.Realm
ANONYMOUS_USER_PROPERTY, CACHED_PASSWORDS_PROPERTY, DEFAULT_DOMAIN_PROPERTY, DEFAULT_ROLE_PROPERTY, DIGEST_ALGORITHM_PROPERTY, MEMBER_PROPERTY, PUBLIC_NAME_PROPERTY, SECRET_KEY_ALGORITHM, SECRET_KEY_PROPERTY
 
Constructor Summary
DefaultRepositoryRealm()
          The default constructor.
 
Method Summary
 Persister acquirePersister()
          Acquires a persister through the default connection.
 Persister acquirePersister(Principal principal)
          Acquires an authenticated persister through the default connection.
 Persister acquirePersister(String alias)
          Acquires a persister through the aliased connection.
 Persister acquirePersister(String alias, Principal principal)
          Acquires an authenticated persister through the aliased connection.
 Persister acquirePersister(String user, String pswd)
          Acquires an authenticated persister through the default connection.
 Persister acquirePersister(String alias, String user, String pswd)
          Acquires an authenticated persister through the aliased connection.
 void clearConnections()
          Clears all connections.
 Set<String> connectionAliasSet()
          Returns a read-only set of defined connection aliases.
 boolean containsConnection(String alias)
          Checks the specified connection.
 DBCriteria<? extends Variable> createPermissionCriteria(String className, Object oid, Object uid, Object[] gids, boolean others, Permission permission, Persister persister)
          Creates the specified permission criteria for a meta element query.
 DBCriteria<? extends Variable> createUserPermissionCriteria(Identity id, String className, String username, String groupName, Permission permission, Persister persister)
          Creates the specified user permission criteria for a variable record query from a meta container.
 DBCriteria<? extends Variable> createUserPermissionCriteria(String className, Permission permission, Persister persister)
          Creates the specified user permission criteria for a meta element query.
 DBCriteria<? extends Variable> createUserPermissionCriteria(String className, String username, String groupName, Permission permission, Persister persister)
          Creates the specified user permission criteria for a variable record query.
 String getAuthenticatedPasswordKey()
          Gets the authenticated password key.
 String getAuthenticatedPasswordKey(String alias)
          Gets the authenticated password key of the specified connection.
 String getAuthenticatedUsernameKey()
          Gets the authenticated username key.
 String getAuthenticatedUsernameKey(String alias)
          Gets the authenticated username key of the specified connection.
 String getAuthenticationConnectionAlias()
          Gets the authentication connection alias.
 String getAuthenticationConnectionAlias(String alias)
          Gets the authentication connection alias of the specified connection.
 RepositoryConnection getConnection()
          Gets the default connection.
 RepositoryConnection getConnection(String alias)
          Gets a connection for the specified alias.
 String getConnectionAlias()
          Gets the default connection alias of the repository this client uses.
 String getConnectionAlias(String alias)
          Gets the specified connection of an alias.
 String getConnectionUsername()
          Gets the user's login name for the default connection.
 String getConnectionUsername(String alias)
          Gets the user's login name of the specified connection.
 String getPersisterClassName()
          Gets the class name of the persister implemention for the default connection.
 String getPersisterClassName(String alias)
          Gets the class name of the persister implementation of the specified connection.
protected  Principal getPrincipal(String domain, String msisdn, String scheme)
          Gets the user principal representing the authenticated user identified by an MSISDN.
protected  Principal getPrincipal(String domain, String username, String password, String scheme)
          Gets the user principal representing the authenticated user identified by a username and password.
 String getUserClassName()
          Gets the user class name.
 boolean isCaseInsensitive()
          Checks whether usernames and role names are case-insensitive.
 boolean isConnectionAuthenticated()
          Checks whether authentication is configured for the default connection.
 boolean isConnectionAuthenticated(String alias)
          Checks whether authentication is configured for the specified connection.
 void removeConnection(String alias)
          Removes the specified connection.
 void setAuthenticationConnection(String auth, String userKey, String pswdKey)
          Sets the authentication connection.
 void setAuthenticationConnection(String alias, String auth, String userKey, String pswdKey)
          Sets authentication connection of the specified connection.
 void setCaseInsensitive(boolean flag)
          Sets whether usernames and role names are case-insensitive.
 void setConnectionAlias(String alias)
          Sets the default connection alias of the repository this client uses.
 void setConnectionAlias(String key, String alias)
          Sets an alias for the specified connection.
 void setConnectionAuthenticated(boolean authenticated)
          Sets whether authentication is configured for the default connection.
 void setConnectionAuthenticated(String alias, boolean authenticated)
          Sets whether authentication is configured for the specified connection.
 void setConnectionPassword(String password)
          Sets the user's credentials for the default connection.
 void setConnectionPassword(String alias, String password)
          Sets the user's credentials of the specified connection.
 void setConnectionUsername(String username)
          Sets the user's login name for the default connection.
 void setConnectionUsername(String alias, String username)
          Sets the user's login name of the specified connection.
 void setPersisterClassName(String className)
          Sets the class name of the persister implementation for the default connection.
 void setPersisterClassName(String alias, String className)
          Sets the class name of the persister implementation of the specified connection.
 void setUserClassName(String className)
          Sets the user class name.
protected  void validateConfiguration(Configuration config)
          Validates the configuration.
 
Methods inherited from class org.norther.tammi.core.realm.AbstractRealm
addRoles, authenticate, authenticate, authenticate, authenticate, authenticate, createPrincipal, createPrincipal, digest, getAnonymousUser, getChallenge, getDefaultDomain, getDefaultRole, getDigestAlgorithm, getMemberMap, getMessageDigest, getPublicName, handshake, identify, identify, identify, isAuthenticated, isAuthenticated, isCachedPasswords, isUserInRole, release, setAnonymousUser, setCachedPasswords, setDefaultDomain, setDefaultRole, setDigestAlgorithm, setPublicName, setSecretKey
 
Methods inherited from class org.norther.tammi.core.config.DefaultConfigurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, checkConfiguration, clearProperties, containsProperty, getConfigKey, getConfiguration, getModifiedState, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, loadConfiguration, loadConfiguration, loadConfiguration, modified, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setModifiedState, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.core.realm.Realm
authenticate, authenticate, authenticate, authenticate, authenticate, digest, getAnonymousUser, getChallenge, getDefaultDomain, getDefaultRole, getDigestAlgorithm, getPublicName, handshake, identify, identify, identify, isAuthenticated, isAuthenticated, isCachedPasswords, isUserInRole, release, setAnonymousUser, setCachedPasswords, setDefaultDomain, setDefaultRole, setDigestAlgorithm, setPublicName, setSecretKey
 
Methods inherited from interface org.norther.tammi.core.config.Configurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties
 

Constructor Detail

DefaultRepositoryRealm

public DefaultRepositoryRealm()
The default constructor.

Method Detail

getConnectionAlias

public String getConnectionAlias()
Description copied from interface: RepositoryClient
Gets the default connection alias of the repository this client uses.

Specified by:
getConnectionAlias in interface RepositoryClient
Returns:
the connection alias.

setConnectionAlias

public void setConnectionAlias(String alias)
Description copied from interface: RepositoryClient
Sets the default connection alias of the repository this client uses.

Specified by:
setConnectionAlias in interface RepositoryClient
Parameters:
alias - the connection alias.

getPersisterClassName

public String getPersisterClassName()
Description copied from interface: RepositoryClient
Gets the class name of the persister implemention for the default connection.

Specified by:
getPersisterClassName in interface RepositoryClient
Returns:
the persister class name.

setPersisterClassName

public void setPersisterClassName(String className)
Description copied from interface: RepositoryClient
Sets the class name of the persister implementation for the default connection.

Specified by:
setPersisterClassName in interface RepositoryClient
Parameters:
className - the persister class name.

getConnectionUsername

public String getConnectionUsername()
Description copied from interface: RepositoryClient
Gets the user's login name for the default connection.

Specified by:
getConnectionUsername in interface RepositoryClient
Returns:
the user's repository connection login name.

setConnectionUsername

public void setConnectionUsername(String username)
Description copied from interface: RepositoryClient
Sets the user's login name for the default connection.

Specified by:
setConnectionUsername in interface RepositoryClient
Parameters:
username - the user's repository connection login name.

setConnectionPassword

public void setConnectionPassword(String password)
Description copied from interface: RepositoryClient
Sets the user's credentials for the default connection.

Specified by:
setConnectionPassword in interface RepositoryClient
Parameters:
password - the user's repository connection credentials.

isConnectionAuthenticated

public boolean isConnectionAuthenticated()
Description copied from interface: RepositoryClient
Checks whether authentication is configured for the default connection. If username and password are not configured separately, the values passed to the client are used for the connection.

Specified by:
isConnectionAuthenticated in interface RepositoryClient
Returns:
true for an authenticated connection, false otherwise.

setConnectionAuthenticated

public void setConnectionAuthenticated(boolean authenticated)
Description copied from interface: RepositoryClient
Sets whether authentication is configured for the default connection. If username and password are not configured separately, the values passed to the client are used for the connection.

Specified by:
setConnectionAuthenticated in interface RepositoryClient
Parameters:
authenticated - true for an authenticated connection, false otherwise.

getAuthenticationConnectionAlias

public String getAuthenticationConnectionAlias()
Description copied from interface: RepositoryClient
Gets the authentication connection alias.

Specified by:
getAuthenticationConnectionAlias in interface RepositoryClient
Returns:
the authentication connection alias or null.

getAuthenticatedUsernameKey

public String getAuthenticatedUsernameKey()
Description copied from interface: RepositoryClient
Gets the authenticated username key.

Specified by:
getAuthenticatedUsernameKey in interface RepositoryClient
Returns:
the authenticated username key or null.

getAuthenticatedPasswordKey

public String getAuthenticatedPasswordKey()
Description copied from interface: RepositoryClient
Gets the authenticated password key.

Specified by:
getAuthenticatedPasswordKey in interface RepositoryClient
Returns:
the authenticated password key or null.

setAuthenticationConnection

public void setAuthenticationConnection(String auth,
                                        String userKey,
                                        String pswdKey)
Description copied from interface: RepositoryClient
Sets the authentication connection.

Specified by:
setAuthenticationConnection in interface RepositoryClient
Parameters:
auth - the authentication alias.
userKey - the username key.
pswdKey - the password key.

getConnection

public RepositoryConnection getConnection()
Description copied from interface: RepositoryClient
Gets the default connection.

Specified by:
getConnection in interface RepositoryClient
Returns:
the default connection.

getConnection

public RepositoryConnection getConnection(String alias)
Description copied from interface: RepositoryClient
Gets a connection for the specified alias.

Specified by:
getConnection in interface RepositoryClient
Parameters:
alias - the alias to use.
Returns:
the specified connection.

acquirePersister

public Persister acquirePersister()
                           throws ConstructionException
Description copied from interface: RepositoryClient
Acquires a persister through the default connection. If the connection is defined to be an authenticated one, the username and password specified for the connection are applied to authentication.

Specified by:
acquirePersister in interface RepositoryClient
Returns:
the default persister.
Throws:
ConstructionException - if construction fails.

acquirePersister

public Persister acquirePersister(String user,
                                  String pswd)
                           throws ConstructionException
Description copied from interface: RepositoryClient
Acquires an authenticated persister through the default connection. If the connection is not defined to be an authenticated one or a connection specific identity is defined, the username and password are ignored.

Specified by:
acquirePersister in interface RepositoryClient
Parameters:
user - the username of the connection.
pswd - the password of the connection.
Returns:
the authenticated persister.
Throws:
ConstructionException - if construction fails.

acquirePersister

public Persister acquirePersister(Principal principal)
                           throws ConstructionException
Description copied from interface: RepositoryClient
Acquires an authenticated persister through the default connection. If the connection is not defined to be an authenticated one or a connection specific identity is defined, the principal is ignored.

Specified by:
acquirePersister in interface RepositoryClient
Parameters:
principal - an authenticated principal.
Returns:
the authenticated persister.
Throws:
ConstructionException - if construction fails.

getConnectionAlias

public String getConnectionAlias(String alias)
Description copied from interface: MultiRepositoryClient
Gets the specified connection of an alias.

Specified by:
getConnectionAlias in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
the specified connection alias.

setConnectionAlias

public void setConnectionAlias(String key,
                               String alias)
Description copied from interface: MultiRepositoryClient
Sets an alias for the specified connection.

Specified by:
setConnectionAlias in interface MultiRepositoryClient
Parameters:
key - the connection alias.
alias - the specified connection alias.

getPersisterClassName

public String getPersisterClassName(String alias)
Description copied from interface: MultiRepositoryClient
Gets the class name of the persister implementation of the specified connection.

Specified by:
getPersisterClassName in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
the class name.

setPersisterClassName

public void setPersisterClassName(String alias,
                                  String className)
Description copied from interface: MultiRepositoryClient
Sets the class name of the persister implementation of the specified connection.

Specified by:
setPersisterClassName in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
className - the class name.

getConnectionUsername

public String getConnectionUsername(String alias)
Description copied from interface: MultiRepositoryClient
Gets the user's login name of the specified connection.

Specified by:
getConnectionUsername in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
the user's repository connection login name.

setConnectionUsername

public void setConnectionUsername(String alias,
                                  String username)
Description copied from interface: MultiRepositoryClient
Sets the user's login name of the specified connection.

Specified by:
setConnectionUsername in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
username - the user's repository connection login name.

setConnectionPassword

public void setConnectionPassword(String alias,
                                  String password)
Description copied from interface: MultiRepositoryClient
Sets the user's credentials of the specified connection.

Specified by:
setConnectionPassword in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
password - the user's repository connection credentials.

isConnectionAuthenticated

public boolean isConnectionAuthenticated(String alias)
Description copied from interface: MultiRepositoryClient
Checks whether authentication is configured for the specified connection. If username and password are not configured separately, the values passed to the client are used for the connection.

Specified by:
isConnectionAuthenticated in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
the class name.

setConnectionAuthenticated

public void setConnectionAuthenticated(String alias,
                                       boolean authenticated)
Description copied from interface: MultiRepositoryClient
Sets whether authentication is configured for the specified connection. If username and password are not configured separately, the values passed to the client are used for the connection.

Specified by:
setConnectionAuthenticated in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
authenticated - true if the connection is to be authenticated.

getAuthenticationConnectionAlias

public String getAuthenticationConnectionAlias(String alias)
Description copied from interface: MultiRepositoryClient
Gets the authentication connection alias of the specified connection.

Specified by:
getAuthenticationConnectionAlias in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
the authentication connection alias or null.

getAuthenticatedUsernameKey

public String getAuthenticatedUsernameKey(String alias)
Description copied from interface: MultiRepositoryClient
Gets the authenticated username key of the specified connection.

Specified by:
getAuthenticatedUsernameKey in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
the authenticated username key or null.

getAuthenticatedPasswordKey

public String getAuthenticatedPasswordKey(String alias)
Description copied from interface: MultiRepositoryClient
Gets the authenticated password key of the specified connection.

Specified by:
getAuthenticatedPasswordKey in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
the authenticated password key or null.

setAuthenticationConnection

public void setAuthenticationConnection(String alias,
                                        String auth,
                                        String userKey,
                                        String pswdKey)
Description copied from interface: MultiRepositoryClient
Sets authentication connection of the specified connection.

Specified by:
setAuthenticationConnection in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
auth - the authentication alias.
userKey - the username key.
pswdKey - the password key.

containsConnection

public boolean containsConnection(String alias)
Description copied from interface: MultiRepositoryClient
Checks the specified connection.

Specified by:
containsConnection in interface MultiRepositoryClient
Parameters:
alias - the connection alias.
Returns:
true if available, false otherwise.

removeConnection

public void removeConnection(String alias)
Description copied from interface: MultiRepositoryClient
Removes the specified connection.

Specified by:
removeConnection in interface MultiRepositoryClient
Parameters:
alias - the connection alias.

clearConnections

public void clearConnections()
Description copied from interface: MultiRepositoryClient
Clears all connections.

Specified by:
clearConnections in interface MultiRepositoryClient

connectionAliasSet

public Set<String> connectionAliasSet()
Description copied from interface: MultiRepositoryClient
Returns a read-only set of defined connection aliases.

Specified by:
connectionAliasSet in interface MultiRepositoryClient
Returns:
a set of connections aliases.

acquirePersister

public Persister acquirePersister(String alias)
                           throws ConstructionException
Description copied from interface: RepositoryClient
Acquires a persister through the aliased connection. If the connection is defined to be an authenticated one, the username and password specified for the connection are applied to authentication.

Specified by:
acquirePersister in interface RepositoryClient
Parameters:
alias - the alias to use.
Returns:
the default persister.
Throws:
ConstructionException - if construction fails.

acquirePersister

public Persister acquirePersister(String alias,
                                  String user,
                                  String pswd)
                           throws ConstructionException
Description copied from interface: RepositoryClient
Acquires an authenticated persister through the aliased connection. If the connection is not defined to be an authenticated one or a connection specific identity is defined, the username and password are ignored.

Specified by:
acquirePersister in interface RepositoryClient
Parameters:
alias - the alias to use.
user - the username of the connection.
pswd - the password of the connection.
Returns:
the authenticated persister.
Throws:
ConstructionException - if construction fails.

acquirePersister

public Persister acquirePersister(String alias,
                                  Principal principal)
                           throws ConstructionException
Description copied from interface: RepositoryClient
Acquires an authenticated persister through the aliased connection. If the connection is not defined to be an authenticated one or a connection specific identity is defined, the principal is ignored.

Specified by:
acquirePersister in interface RepositoryClient
Parameters:
alias - the alias to use.
principal - an authenticated principal.
Returns:
the authenticated persister.
Throws:
ConstructionException - if construction fails.

createPermissionCriteria

public DBCriteria<? extends Variable> createPermissionCriteria(String className,
                                                               Object oid,
                                                               Object uid,
                                                               Object[] gids,
                                                               boolean others,
                                                               Permission permission,
                                                               Persister persister)
Description copied from interface: RepositoryClient
Creates the specified permission criteria for a meta element query.

Specified by:
createPermissionCriteria in interface RepositoryClient
Parameters:
className - the variable class name.
oid - the owner id.
uid - the user id.
gids - the group ids.
others - the others option.
permission - the reuqested permission.
persister - the persister.
Returns:
the created criteria.

createUserPermissionCriteria

public DBCriteria<? extends Variable> createUserPermissionCriteria(String className,
                                                                   Permission permission,
                                                                   Persister persister)
                                                            throws AttributeNotFoundException,
                                                                   PersistenceException
Description copied from interface: RepositoryClient
Creates the specified user permission criteria for a meta element query.

Specified by:
createUserPermissionCriteria in interface RepositoryClient
Parameters:
className - the element class name.
permission - the permission.
persister - the persister.
Returns:
the search criteria.
Throws:
AttributeNotFoundException - for missing attributes.
PersistenceException - for persister errors.

createUserPermissionCriteria

public DBCriteria<? extends Variable> createUserPermissionCriteria(String className,
                                                                   String username,
                                                                   String groupName,
                                                                   Permission permission,
                                                                   Persister persister)
                                                            throws AttributeNotFoundException,
                                                                   AccessDeniedException,
                                                                   PersistenceException
Description copied from interface: RepositoryClient
Creates the specified user permission criteria for a variable record query.

Specified by:
createUserPermissionCriteria in interface RepositoryClient
Parameters:
className - the variable class name.
username - an optional owner of variable content.
groupName - an optional group of owners of variable content.
permission - the requested permission.
persister - the persister.
Returns:
the created criteria.
Throws:
AttributeNotFoundException - for missing attributes.
AccessDeniedException - for missing rights.
PersistenceException - for persister errors.

createUserPermissionCriteria

public DBCriteria<? extends Variable> createUserPermissionCriteria(Identity id,
                                                                   String className,
                                                                   String username,
                                                                   String groupName,
                                                                   Permission permission,
                                                                   Persister persister)
                                                            throws AttributeNotFoundException,
                                                                   AccessDeniedException,
                                                                   PersistenceException
Description copied from interface: RepositoryClient
Creates the specified user permission criteria for a variable record query from a meta container.

Specified by:
createUserPermissionCriteria in interface RepositoryClient
Parameters:
id - the container identity.
className - the variable class name.
username - an optional owner of variable content.
groupName - an optional group of owners of variable content.
permission - the requested permission.
persister - the persister.
Returns:
the created criteria.
Throws:
AttributeNotFoundException - for missing attributes.
AccessDeniedException - for missing rights.
PersistenceException - for persister errors.

isCaseInsensitive

public boolean isCaseInsensitive()
Description copied from interface: RepositoryRealm
Checks whether usernames and role names are case-insensitive.

Specified by:
isCaseInsensitive in interface RepositoryRealm
Returns:
true if case-insensitive, false otherwise.

setCaseInsensitive

public void setCaseInsensitive(boolean flag)
Description copied from interface: RepositoryRealm
Sets whether usernames and role names are case-insensitive.

Specified by:
setCaseInsensitive in interface RepositoryRealm
Parameters:
flag - true if case-insensitive, false otherwise.

getUserClassName

public String getUserClassName()
Description copied from interface: RepositoryRealm
Gets the user class name.

Specified by:
getUserClassName in interface RepositoryRealm
Returns:
the user class name or null.

setUserClassName

public void setUserClassName(String className)
Description copied from interface: RepositoryRealm
Sets the user class name.

Specified by:
setUserClassName in interface RepositoryRealm
Parameters:
className - the user class name.

getPrincipal

protected Principal getPrincipal(String domain,
                                 String msisdn,
                                 String scheme)
Description copied from class: AbstractRealm
Gets the user principal representing the authenticated user identified by an MSISDN. Subclasses may implement this method only and rely on authentication operations provided by this class.

Specified by:
getPrincipal in class AbstractRealm
Parameters:
domain - the domain.
msisdn - the MSISDN.
scheme - the authentication scheme.
Returns:
the principal or null.

getPrincipal

protected Principal getPrincipal(String domain,
                                 String username,
                                 String password,
                                 String scheme)
Description copied from class: AbstractRealm
Gets the user principal representing the authenticated user identified by a username and password. Subclasses may implement this method only and rely on authentication operations provided by this class.

Specified by:
getPrincipal in class AbstractRealm
Parameters:
domain - the domain.
username - the username.
password - the user password.
scheme - the authentication scheme.
Returns:
the principal or null.

validateConfiguration

protected void validateConfiguration(Configuration config)
Description copied from class: DefaultConfigurable
Validates the configuration.

Overrides:
validateConfiguration in class AbstractRealm
Parameters:
config - the configuration.


Copyright © 2004 The Norther Organization. All rights reserved.