|
||||||||||
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.root.db.DefaultRepositoryClient
public class DefaultRepositoryClient
A default implementation of RepositoryClient.
Field Summary | |
---|---|
protected static String[] |
AUTHENTICATED_SIGNATURE
The authenticated signature. |
protected static String |
DEFAULT_PERSISTER
The default persister implementation. |
protected static String[] |
KEY_SIGNATURE
The key signature. |
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Constructor Summary | |
---|---|
DefaultRepositoryClient()
Constructs a new repository client. |
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. |
DBCriteria<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 |
getAuthenticatedUsernameKey()
Gets the authenticated username key. |
String |
getAuthenticationConnectionAlias()
Gets the authentication connection alias. |
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 |
getConnectionUsername()
Gets the user's login name for the default connection. |
protected RepositoryConnection |
getInternalConnection(boolean cloned)
Gets the optionally cloned internal connection. |
String |
getPersisterClassName()
Gets the class name of the persister implemention for the default connection. |
protected MBeanReference<? extends RepositoryClient> |
getRepositoryClientMBean()
Gets the reference to this repository client. |
boolean |
isConnectionAuthenticated()
Checks whether authentication is configured for the default connection. |
void |
setAuthenticationConnection(String auth,
String userKey,
String pswdKey)
Sets the authentication connection. |
void |
setConnectionAlias(String key)
Sets the default connection alias of the repository this client uses. |
void |
setConnectionAuthenticated(boolean authenticated)
Sets whether authentication is configured for the default connection. |
void |
setConnectionPassword(String password)
Sets the user's credentials for the default connection. |
void |
setConnectionUsername(String username)
Sets the user's login name for the default connection. |
protected void |
setInternalConnection(RepositoryConnection c)
Sets the internal connection. |
void |
setPersisterClassName(String className)
Sets the class name of the persister implementation for the default connection. |
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 |
Field Detail |
---|
protected static final String[] KEY_SIGNATURE
protected static final String[] AUTHENTICATED_SIGNATURE
protected static final String DEFAULT_PERSISTER
Constructor Detail |
---|
public DefaultRepositoryClient()
Method Detail |
---|
public String getConnectionAlias()
RepositoryClient
getConnectionAlias
in interface RepositoryClient
public void setConnectionAlias(String key)
RepositoryClient
setConnectionAlias
in interface RepositoryClient
key
- 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 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<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.protected RepositoryConnection getInternalConnection(boolean cloned)
cloned
- true for a cloned connection, false otherwise.
protected void setInternalConnection(RepositoryConnection c)
c
- the connection.protected MBeanReference<? extends RepositoryClient> getRepositoryClientMBean()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |