|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.core.config.DefaultConfigurable org.norther.tammi.core.realm.AbstractRealm org.norther.tammi.root.realm.DefaultRepositoryRealm
public class DefaultRepositoryRealm
A default implementation of RepositoryRealm.
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.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 |
---|
public DefaultRepositoryRealm()
Method Detail |
---|
public String getConnectionAlias()
RepositoryClient
getConnectionAlias
in interface RepositoryClient
public void setConnectionAlias(String alias)
RepositoryClient
setConnectionAlias
in interface RepositoryClient
alias
- the connection alias.public String getPersisterClassName()
RepositoryClient
getPersisterClassName
in interface RepositoryClient
public void setPersisterClassName(String className)
RepositoryClient
setPersisterClassName
in interface RepositoryClient
className
- the persister class name.public String getConnectionUsername()
RepositoryClient
getConnectionUsername
in interface RepositoryClient
public void setConnectionUsername(String username)
RepositoryClient
setConnectionUsername
in interface RepositoryClient
username
- the user's repository connection login name.public void setConnectionPassword(String password)
RepositoryClient
setConnectionPassword
in interface RepositoryClient
password
- the user's repository connection credentials.public boolean isConnectionAuthenticated()
RepositoryClient
isConnectionAuthenticated
in interface RepositoryClient
public void setConnectionAuthenticated(boolean authenticated)
RepositoryClient
setConnectionAuthenticated
in interface RepositoryClient
authenticated
- true for an authenticated connection, false otherwise.public String getAuthenticationConnectionAlias()
RepositoryClient
getAuthenticationConnectionAlias
in interface RepositoryClient
public String getAuthenticatedUsernameKey()
RepositoryClient
getAuthenticatedUsernameKey
in interface RepositoryClient
public String getAuthenticatedPasswordKey()
RepositoryClient
getAuthenticatedPasswordKey
in interface RepositoryClient
public void setAuthenticationConnection(String auth, String userKey, String pswdKey)
RepositoryClient
setAuthenticationConnection
in interface RepositoryClient
auth
- the authentication alias.userKey
- the username key.pswdKey
- the password key.public RepositoryConnection getConnection()
RepositoryClient
getConnection
in interface RepositoryClient
public RepositoryConnection getConnection(String alias)
RepositoryClient
getConnection
in interface RepositoryClient
alias
- the alias to use.
public Persister acquirePersister() throws ConstructionException
RepositoryClient
acquirePersister
in interface RepositoryClient
ConstructionException
- if construction fails.public Persister acquirePersister(String user, String pswd) throws ConstructionException
RepositoryClient
acquirePersister
in interface RepositoryClient
user
- the username of the connection.pswd
- the password of the connection.
ConstructionException
- if construction fails.public Persister acquirePersister(Principal principal) throws ConstructionException
RepositoryClient
acquirePersister
in interface RepositoryClient
principal
- an authenticated principal.
ConstructionException
- if construction fails.public String getConnectionAlias(String alias)
MultiRepositoryClient
getConnectionAlias
in interface MultiRepositoryClient
alias
- the connection alias.
public void setConnectionAlias(String key, String alias)
MultiRepositoryClient
setConnectionAlias
in interface MultiRepositoryClient
key
- the connection alias.alias
- the specified connection alias.public String getPersisterClassName(String alias)
MultiRepositoryClient
getPersisterClassName
in interface MultiRepositoryClient
alias
- the connection alias.
public void setPersisterClassName(String alias, String className)
MultiRepositoryClient
setPersisterClassName
in interface MultiRepositoryClient
alias
- the connection alias.className
- the class name.public String getConnectionUsername(String alias)
MultiRepositoryClient
getConnectionUsername
in interface MultiRepositoryClient
alias
- the connection alias.
public void setConnectionUsername(String alias, String username)
MultiRepositoryClient
setConnectionUsername
in interface MultiRepositoryClient
alias
- the connection alias.username
- the user's repository connection login name.public void setConnectionPassword(String alias, String password)
MultiRepositoryClient
setConnectionPassword
in interface MultiRepositoryClient
alias
- the connection alias.password
- the user's repository connection credentials.public boolean isConnectionAuthenticated(String alias)
MultiRepositoryClient
isConnectionAuthenticated
in interface MultiRepositoryClient
alias
- the connection alias.
public void setConnectionAuthenticated(String alias, boolean authenticated)
MultiRepositoryClient
setConnectionAuthenticated
in interface MultiRepositoryClient
alias
- the connection alias.authenticated
- true if the connection is to be authenticated.public String getAuthenticationConnectionAlias(String alias)
MultiRepositoryClient
getAuthenticationConnectionAlias
in interface MultiRepositoryClient
alias
- the connection alias.
public String getAuthenticatedUsernameKey(String alias)
MultiRepositoryClient
getAuthenticatedUsernameKey
in interface MultiRepositoryClient
alias
- the connection alias.
public String getAuthenticatedPasswordKey(String alias)
MultiRepositoryClient
getAuthenticatedPasswordKey
in interface MultiRepositoryClient
alias
- the connection alias.
public void setAuthenticationConnection(String alias, String auth, String userKey, String pswdKey)
MultiRepositoryClient
setAuthenticationConnection
in interface MultiRepositoryClient
alias
- the connection alias.auth
- the authentication alias.userKey
- the username key.pswdKey
- the password key.public boolean containsConnection(String alias)
MultiRepositoryClient
containsConnection
in interface MultiRepositoryClient
alias
- the connection alias.
public void removeConnection(String alias)
MultiRepositoryClient
removeConnection
in interface MultiRepositoryClient
alias
- the connection alias.public void clearConnections()
MultiRepositoryClient
clearConnections
in interface MultiRepositoryClient
public Set<String> connectionAliasSet()
MultiRepositoryClient
connectionAliasSet
in interface MultiRepositoryClient
public Persister acquirePersister(String alias) throws ConstructionException
RepositoryClient
acquirePersister
in interface RepositoryClient
alias
- the alias to use.
ConstructionException
- if construction fails.public Persister acquirePersister(String alias, String user, String pswd) throws ConstructionException
RepositoryClient
acquirePersister
in interface RepositoryClient
alias
- the alias to use.user
- the username of the connection.pswd
- the password of the connection.
ConstructionException
- if construction fails.public Persister acquirePersister(String alias, Principal principal) throws ConstructionException
RepositoryClient
acquirePersister
in interface RepositoryClient
alias
- the alias to use.principal
- an authenticated principal.
ConstructionException
- if construction fails.public DBCriteria<? extends Variable> createPermissionCriteria(String className, Object oid, Object uid, Object[] gids, boolean others, Permission permission, Persister persister)
RepositoryClient
createPermissionCriteria
in interface RepositoryClient
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.
public DBCriteria<? extends Variable> createUserPermissionCriteria(String className, Permission permission, Persister persister) throws AttributeNotFoundException, PersistenceException
RepositoryClient
createUserPermissionCriteria
in interface RepositoryClient
className
- the element class name.permission
- the permission.persister
- the persister.
AttributeNotFoundException
- for missing attributes.
PersistenceException
- for persister errors.public DBCriteria<? extends Variable> createUserPermissionCriteria(String className, String username, String groupName, Permission permission, Persister persister) throws AttributeNotFoundException, AccessDeniedException, PersistenceException
RepositoryClient
createUserPermissionCriteria
in interface RepositoryClient
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.
AttributeNotFoundException
- for missing attributes.
AccessDeniedException
- for missing rights.
PersistenceException
- for persister errors.public DBCriteria<? extends Variable> createUserPermissionCriteria(Identity id, String className, String username, String groupName, Permission permission, Persister persister) throws AttributeNotFoundException, AccessDeniedException, PersistenceException
RepositoryClient
createUserPermissionCriteria
in interface RepositoryClient
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.
AttributeNotFoundException
- for missing attributes.
AccessDeniedException
- for missing rights.
PersistenceException
- for persister errors.public boolean isCaseInsensitive()
RepositoryRealm
isCaseInsensitive
in interface RepositoryRealm
public void setCaseInsensitive(boolean flag)
RepositoryRealm
setCaseInsensitive
in interface RepositoryRealm
flag
- true if case-insensitive, false otherwise.public String getUserClassName()
RepositoryRealm
getUserClassName
in interface RepositoryRealm
public void setUserClassName(String className)
RepositoryRealm
setUserClassName
in interface RepositoryRealm
className
- the user class name.protected Principal getPrincipal(String domain, String msisdn, String scheme)
AbstractRealm
getPrincipal
in class AbstractRealm
domain
- the domain.msisdn
- the MSISDN.scheme
- the authentication scheme.
protected Principal getPrincipal(String domain, String username, String password, String scheme)
AbstractRealm
getPrincipal
in class AbstractRealm
domain
- the domain.username
- the username.password
- the user password.scheme
- the authentication scheme.
protected void validateConfiguration(Configuration config)
DefaultConfigurable
validateConfiguration
in class AbstractRealm
config
- the configuration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |