com.atlassian.crowd.manager
Class GenericManager
java.lang.Object
com.atlassian.crowd.manager.GenericManager
- Direct Known Subclasses:
- ApplicationManagerGeneric, DirectoryManagerGeneric
public abstract class GenericManager
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.log4j.Logger logger
tokenDAO
protected TokenDAO tokenDAO
propertyManager
protected PropertyManager propertyManager
i18nHelper
protected I18nHelper i18nHelper
cacheManager
protected CacheManager cacheManager
GenericManager
public GenericManager()
generateToken
protected Token generateToken(long directoryID,
AuthenticationContext authenticationContext)
throws InvalidTokenException
- This method will return a
Token based on the passed in parameters.
If a token already exists in the datastore, this token will be returned with an updated lastAccessed time.
If a token is not found based on the passed in parameters a new Token
will be generated an stored in the datastore.
- Parameters:
directoryID - the directoryID you wish to generate a Token forauthenticationContext - holder for the required attributes to authenticate against the Crowd server
- Returns:
- a
Token
- Throws:
InvalidTokenException - if there was an issue generating the key for a token.
genericValidateToken
protected Token genericValidateToken(java.lang.String token,
ValidationFactor[] validationFactors)
throws InvalidTokenException,
PersistenceException,
PropertyManagerException
- Will validate a token key with the given
ValidationFactor's
against one (if it exists) in the datastore.
- Parameters:
token - the key of a TokenvalidationFactors - the ValidationFactor's that are being used for authentication
- Returns:
- the existing token if there is a match (with an updated lastAccessed time)
- Throws:
InvalidTokenException - thrown if the token keys are not equal, or the token has expired, or the token does not exist
PersistenceException - if there is an issue finding, updating or removing the token.
PropertyManagerException - if there is an issue finding the session time.
hasAccess
protected boolean hasAccess(Application application,
Token token)
throws PropertyManagerException,
CacheManagerException,
DirectoryInstantiationException,
java.rmi.RemoteException
- Throws:
PropertyManagerException
CacheManagerException
DirectoryInstantiationException
java.rmi.RemoteException
hasAccess
protected boolean hasAccess(Application application,
Token token,
boolean ignoreCache)
throws PropertyManagerException,
CacheManagerException,
DirectoryInstantiationException,
java.rmi.RemoteException
- Throws:
PropertyManagerException
CacheManagerException
DirectoryInstantiationException
java.rmi.RemoteException
setI18nHelper
public void setI18nHelper(I18nHelper i18nHelper)
- Autowire internationalized resource bundle helper.
- Parameters:
i18nHelper - resource bundle helper.
getTokenDAO
public TokenDAO getTokenDAO()
setTokenDAO
public void setTokenDAO(TokenDAO tokenDAO)
getPropertyManager
public PropertyManager getPropertyManager()
setPropertyManager
public void setPropertyManager(PropertyManager propertyManager)
setCacheManager
public void setCacheManager(CacheManager cacheManager)
Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.