|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.
| Field Summary | |
|---|---|
static String |
DEFAULT_ACCOUNT_ID_ATTIBUTE
The default account id attribute. |
| Fields inherited from class org.norther.tammi.core.config.DefaultConfigurable |
|---|
MODIFIED, SYNCHRONIZED, UNMODIFIED |
| 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 |
|---|
ACCOUNT_CLASS_NAME_PROPERTY, CASE_INSENSITIVE_PROPERTY, USER_CLASS_NAME_PROPERTY |
| Fields inherited from interface org.norther.tammi.core.realm.Realm |
|---|
ANONYMOUS_USER_PROPERTY, CACHED_PASSWORDS_PROPERTY, DEFAULT_ROLE_PROPERTY, DIGEST_ALGORITHM_PROPERTY, MEMBER_PROPERTY, PUBLIC_NAME_PROPERTY |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| 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 key)
Acquires a persister through the specified connection. |
Persister |
acquirePersister(String key,
Principal principal)
Acquires an authenticated persister through the specified connection. |
Persister |
acquirePersister(String user,
String pswd)
Acquires an authenticated persister through the default connection. |
Persister |
acquirePersister(String key,
String user,
String pswd)
Acquires an authenticated persister through the specified connection. |
void |
clearConnections()
Clears all connections. |
Set |
connectionKeySet()
Returns a read-only set of available connection aliases. |
boolean |
containsConnection(String key)
Checks the specified connection. |
String |
getAccountClassName()
Gets the account class name. |
String |
getAccountClassName(String domain)
Gets the account class name in the specified domain. |
String |
getAuthenticatedPasswordKey()
Gets the authenticated password key. |
String |
getAuthenticatedPasswordKey(String key)
Gets the authenticated password key of the specified connection. |
String |
getAuthenticatedUsernameKey()
Gets the authenticated username key. |
String |
getAuthenticatedUsernameKey(String key)
Gets the authenticated username key of the specified connection. |
String |
getAuthenticationConnectionKey()
Gets the authentication connection key. |
String |
getAuthenticationConnectionKey(String key)
Gets the authentication connection key of the specified connection. |
String |
getConnectionAlias(String key)
Gets the alias of the specified connection. |
String |
getConnectionKey()
Gets the default connection key of the repository this client uses. |
String |
getConnectionUsername()
Gets the user's login name for the default connection. |
String |
getConnectionUsername(String key)
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 key)
Gets the class name of the persister implementation of the specified connection. |
protected Principal |
getPrincipal(String domain,
String username,
String password)
Gets the user principal representing the authenticated user. |
String |
getResourceKey()
Gets the resource connection key of the repository this client uses. |
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 key)
Checks whether authentication is configured for the specified connection. |
void |
removeConnection(String key)
Removes the specified connection. |
void |
setAccountClassName(String className)
Sets the account class name. |
void |
setAccountClassName(String domain,
String className)
Sets the account class name in the specified domain. |
void |
setAuthenticationConnection(String alias,
String userKey,
String pswdKey)
Sets authentication connection. |
void |
setAuthenticationConnection(String key,
String alias,
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 key,
String alias)
Sets the alias of the specified connection. |
void |
setConnectionAuthenticated(boolean authenticated)
Sets whether authentication is configured for the default connection. |
void |
setConnectionAuthenticated(String key,
boolean authenticated)
Sets whether authentication is configured for the specified connection. |
void |
setConnectionKey(String key)
Sets the default connection key of the repository this client uses. |
void |
setConnectionPassword(String password)
Sets the user's credentials for the default connection. |
void |
setConnectionPassword(String key,
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 key,
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 key,
String className)
Sets the class name of the persister implementation of the specified connection. |
void |
setResourceKey(String key)
Sets the resource connection key of the repository this client uses. |
void |
setUserClassName(String className)
Sets the user class name. |
protected void |
updateProperties()
Updates properties. |
| Methods inherited from class org.norther.tammi.core.realm.AbstractRealm |
|---|
addRoles, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, checkProperties, createPrincipal, createPrincipal, digest, generateAuthenticate, getAnonymousUser, getAuthType, getDefaultRole, getDigestAlgorithm, getMemberMap, getMessageDigest, getPublicName, identify, identify, isAuthenticated, isAuthenticated, isCachedPasswords, isUserInRole, setAnonymousUser, setCachedPasswords, setDefaultRole, setDigestAlgorithm, setPublicName |
| Methods inherited from class org.norther.tammi.core.config.DefaultConfigurable |
|---|
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getConfiguration, getModifiedState, getProperties, getProperty, getPropertyFilePath, indexOfProperty, loadConfiguration, loadConfiguration, loadConfiguration, modified, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setModifiedState, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, 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, authenticate, authenticate, authenticate, digest, generateAuthenticate, getAnonymousUser, getAuthType, getDefaultRole, getDigestAlgorithm, getPublicName, identify, identify, isAuthenticated, isAuthenticated, isCachedPasswords, isUserInRole, setAnonymousUser, setCachedPasswords, setDefaultRole, setDigestAlgorithm, setPublicName |
| Methods inherited from interface org.norther.tammi.core.config.Configurable |
|---|
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, storeProperties |
| Field Detail |
|---|
public static final String DEFAULT_ACCOUNT_ID_ATTIBUTE
| Constructor Detail |
|---|
public DefaultRepositoryRealm()
| Method Detail |
|---|
public String getConnectionKey()
RepositoryClient
getConnectionKey in interface RepositoryClientpublic void setConnectionKey(String key)
RepositoryClient
setConnectionKey in interface RepositoryClientkey - the connection key.public String getPersisterClassName()
RepositoryClient
getPersisterClassName in interface RepositoryClientpublic void setPersisterClassName(String className)
RepositoryClient
setPersisterClassName in interface RepositoryClientclassName - the persister class name.public String getConnectionUsername()
RepositoryClient
getConnectionUsername in interface RepositoryClientpublic void setConnectionUsername(String username)
RepositoryClient
setConnectionUsername in interface RepositoryClientusername - the user's repository connection login name.public void setConnectionPassword(String password)
RepositoryClient
setConnectionPassword in interface RepositoryClientpassword - the user's repository connection credentials.public boolean isConnectionAuthenticated()
RepositoryClient
isConnectionAuthenticated in interface RepositoryClientpublic void setConnectionAuthenticated(boolean authenticated)
RepositoryClient
setConnectionAuthenticated in interface RepositoryClientauthenticated - true for an authenticated connection, false otherwise.public String getAuthenticationConnectionKey()
RepositoryClient
getAuthenticationConnectionKey in interface RepositoryClientpublic String getAuthenticatedUsernameKey()
RepositoryClient
getAuthenticatedUsernameKey in interface RepositoryClientpublic String getAuthenticatedPasswordKey()
RepositoryClient
getAuthenticatedPasswordKey in interface RepositoryClient
public void setAuthenticationConnection(String alias,
String userKey,
String pswdKey)
RepositoryClient
setAuthenticationConnection in interface RepositoryClientalias - the authentication key.userKey - the username key.pswdKey - the password key.
public Persister acquirePersister()
throws ConstructionException
RepositoryClient
acquirePersister in interface RepositoryClientConstructionException - if construction fails.
public Persister acquirePersister(String user,
String pswd)
throws ConstructionException
RepositoryClient
acquirePersister in interface RepositoryClientuser - 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 RepositoryClientprincipal - an authenticated principal.
ConstructionException - if construction fails.public String getResourceKey()
MultiRepositoryClient
getResourceKey in interface MultiRepositoryClientpublic void setResourceKey(String key)
MultiRepositoryClient
setResourceKey in interface MultiRepositoryClientkey - the resource key.public String getConnectionAlias(String key)
MultiRepositoryClient
getConnectionAlias in interface MultiRepositoryClientkey - the connection key.
public void setConnectionAlias(String key,
String alias)
MultiRepositoryClient
setConnectionAlias in interface MultiRepositoryClientkey - the connection key.alias - the connection alias.public String getPersisterClassName(String key)
MultiRepositoryClient
getPersisterClassName in interface MultiRepositoryClientkey - the connection key.
public void setPersisterClassName(String key,
String className)
MultiRepositoryClient
setPersisterClassName in interface MultiRepositoryClientkey - the connection key.className - the class name.public String getConnectionUsername(String key)
MultiRepositoryClient
getConnectionUsername in interface MultiRepositoryClientkey - the connection key.
public void setConnectionUsername(String key,
String username)
MultiRepositoryClient
setConnectionUsername in interface MultiRepositoryClientkey - the connection key.username - the user's repository connection login name.
public void setConnectionPassword(String key,
String password)
MultiRepositoryClient
setConnectionPassword in interface MultiRepositoryClientkey - the connection key.password - the user's repository connection credentials.public boolean isConnectionAuthenticated(String key)
MultiRepositoryClient
isConnectionAuthenticated in interface MultiRepositoryClientkey - the connection key.
public void setConnectionAuthenticated(String key,
boolean authenticated)
MultiRepositoryClient
setConnectionAuthenticated in interface MultiRepositoryClientkey - the connection key.authenticated - true if the connection is to be authenticated.public String getAuthenticationConnectionKey(String key)
MultiRepositoryClient
getAuthenticationConnectionKey in interface MultiRepositoryClientkey - the connection key.
public String getAuthenticatedUsernameKey(String key)
MultiRepositoryClient
getAuthenticatedUsernameKey in interface MultiRepositoryClientkey - the connection key.
public String getAuthenticatedPasswordKey(String key)
MultiRepositoryClient
getAuthenticatedPasswordKey in interface MultiRepositoryClientkey - the connection key.
public void setAuthenticationConnection(String key,
String alias,
String userKey,
String pswdKey)
MultiRepositoryClient
setAuthenticationConnection in interface MultiRepositoryClientkey - the connection key.alias - the authentication key.userKey - the username key.pswdKey - the password key.public boolean containsConnection(String key)
MultiRepositoryClient
containsConnection in interface MultiRepositoryClientkey - the connection key.
public void removeConnection(String key)
MultiRepositoryClient
removeConnection in interface MultiRepositoryClientkey - the connection key.public void clearConnections()
MultiRepositoryClient
clearConnections in interface MultiRepositoryClientpublic Set connectionKeySet()
MultiRepositoryClient
connectionKeySet in interface MultiRepositoryClient
public Persister acquirePersister(String key)
throws ConstructionException
MultiRepositoryClient
acquirePersister in interface MultiRepositoryClientkey - the connection key.
ConstructionException - if construction fails.
public Persister acquirePersister(String key,
String user,
String pswd)
throws ConstructionException
MultiRepositoryClient
acquirePersister in interface MultiRepositoryClientkey - the connection key.user - the username of the connection.pswd - the password of the connection.
ConstructionException - if construction fails.
public Persister acquirePersister(String key,
Principal principal)
throws ConstructionException
MultiRepositoryClient
acquirePersister in interface MultiRepositoryClientkey - the connection key.principal - an authenticated principal.
ConstructionException - if construction fails.public boolean isCaseInsensitive()
RepositoryRealm
isCaseInsensitive in interface RepositoryRealmpublic void setCaseInsensitive(boolean flag)
RepositoryRealm
setCaseInsensitive in interface RepositoryRealmflag - true if case-insensitive, false otherwise.public String getUserClassName()
RepositoryRealm
getUserClassName in interface RepositoryRealmpublic void setUserClassName(String className)
RepositoryRealm
setUserClassName in interface RepositoryRealmclassName - the user class name.public String getAccountClassName()
RepositoryRealm
getAccountClassName in interface RepositoryRealmpublic void setAccountClassName(String className)
RepositoryRealm
The primary key field of the account class should be UserId
and it should contain the FirstName and
LastName fields to provide the real name for authenticated
principals.
setAccountClassName in interface RepositoryRealmclassName - the account class name.public String getAccountClassName(String domain)
RepositoryRealm
getAccountClassName in interface RepositoryRealmdomain - the user domain.
public void setAccountClassName(String domain,
String className)
RepositoryRealm
The primary key field of the account class should be UserId
and it should contain the FirstName and
LastName fields to provide the real name for authenticated
principals.
setAccountClassName in interface RepositoryRealmdomain - the user domain.className - the account class name.
protected Principal getPrincipal(String domain,
String username,
String password)
AbstractRealm
getPrincipal in class AbstractRealmdomain - the domain.username - the username.password - the user password.
protected void updateProperties()
AbstractRealm
updateProperties in class AbstractRealm
|
||||||||||
| PREV CLASS NEXT CLASS | ||||||||||