|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.atlassian.crowd.util.persistence.hibernate.HibernateDao
com.atlassian.crowd.dao.application.ApplicationDAOHibernate
public class ApplicationDAOHibernate
| Field Summary |
|---|
| Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao |
|---|
batchFinder, batchProcessor, logger |
| Constructor Summary | |
|---|---|
ApplicationDAOHibernate()
|
|
| Method Summary | |
|---|---|
ApplicationImpl |
add(Application application,
PasswordCredential passwordCredential)
Will only create the core attributes to an application, i.e. |
void |
addDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate,
OperationType... operationTypes)
Adds a mapping between application and directory. |
void |
addGroupMapping(long applicationId,
long directoryId,
java.lang.String groupName)
Adds a group mapping. |
void |
addRemoteAddress(long applicationId,
RemoteAddress remoteAddress)
Associates a remote address to the given application. |
java.util.List<Application> |
findAuthorisedApplications(long directoryId,
java.util.List<java.lang.String> groupNames)
Finds all applications that are authorised for authentication given the directory id and group memberships of a user. |
ApplicationImpl |
findById(long id)
Finds application by application id. |
ApplicationImpl |
findByName(java.lang.String name)
Finds application by application name, in a case-insensitive way. |
java.lang.Class |
getPersistentClass()
All subclasses of HibernateDAO must implement this method for HibernateDao.load(long) to
work correctly |
void |
remove(Application application)
Removes the application. |
void |
removeDirectoryMapping(long applicationId,
long directoryId)
Removes a mapping between application and directory. |
void |
removeDirectoryMappings(long directoryId)
Removes all the mappings associated with the given directory identified by directory id. |
void |
removeGroupMapping(long applicationId,
long directoryId,
java.lang.String groupName)
Removes a group mapping. |
void |
removeGroupMappings(long directoryId,
java.lang.String groupName)
Removes group mappings. |
void |
removeRemoteAddress(long applicationId,
RemoteAddress remoteAddress)
Dissociates the given remote address from the given application. |
void |
renameGroupMappings(long directoryId,
java.lang.String oldGroupName,
java.lang.String newGroupName)
Renames group mappings. |
java.util.List<Application> |
search(EntityQuery<Application> query)
Will search for all the applications which qualify for the given EntityQuery. |
void |
setAliasDAO(AliasDAO aliasDAO)
|
void |
setDirectoryDao(DirectoryDAOHibernate directoryDao)
|
void |
setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
|
ApplicationImpl |
update(Application application)
Will only update the core attributes to an application, i.e. |
void |
updateCredential(Application application,
PasswordCredential passwordCredential)
Updates credential of the given application. |
void |
updateDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate)
Updates a directory mapping. |
void |
updateDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate,
java.util.Set<OperationType> operationTypes)
Updates a directory mapping. |
void |
updateDirectoryMapping(long applicationId,
long directoryId,
int position)
Updates the ordering of directory mappings for an application. |
| Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao |
|---|
load, loadReference, remove, save, saveOrUpdate, setBatchFinder, setBatchProcessor, update |
| Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
|---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApplicationDAOHibernate()
| Method Detail |
|---|
public java.lang.Class getPersistentClass()
HibernateDaoHibernateDao.load(long) to
work correctly
getPersistentClass in class HibernateDao
public ApplicationImpl findById(long id)
throws ApplicationNotFoundException
ApplicationDAO
findById in interface ApplicationDAOid - Application id.
ApplicationNotFoundException - If application of the specified id does not exist.
public ApplicationImpl findByName(java.lang.String name)
throws ApplicationNotFoundException
ApplicationDAO
findByName in interface ApplicationDAOname - Application name.
ApplicationNotFoundException - If application of the specified name does not exist.
public ApplicationImpl add(Application application,
PasswordCredential passwordCredential)
ApplicationDAO
add in interface ApplicationDAOapplication - The application.passwordCredential - Credential.
public ApplicationImpl update(Application application)
throws ApplicationNotFoundException
ApplicationDAO
update in interface ApplicationDAOapplication - The application.
ApplicationNotFoundException - If the application could not be found.
public void updateCredential(Application application,
PasswordCredential passwordCredential)
throws ApplicationNotFoundException
ApplicationDAO
updateCredential in interface ApplicationDAOapplication - The application.passwordCredential - The new credential.
ApplicationNotFoundException - If the application could not be found.public void remove(Application application)
ApplicationDAO
remove in interface ApplicationDAOapplication - The application.public java.util.List<Application> search(EntityQuery<Application> query)
ApplicationDAOEntityQuery.
search in interface ApplicationDAOquery - Entity query of type EntityDescriptor.application().
public void addDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate,
OperationType... operationTypes)
throws DirectoryNotFoundException,
ApplicationNotFoundException
ApplicationDAO
addDirectoryMapping in interface ApplicationDAOapplicationId - Application id.directoryId - Directory id.allowAllToAuthenticate - True if all users in the directory are allowed to authenticate against the application.operationTypes - The collection of permissible operation types.
DirectoryNotFoundException - if the directory specified by the directoryId does not exist.
ApplicationNotFoundException - if the application specified by the applicationId does not exist.
public void addRemoteAddress(long applicationId,
RemoteAddress remoteAddress)
throws ApplicationNotFoundException
ApplicationDAO
addRemoteAddress in interface ApplicationDAOapplicationId - Application id.remoteAddress - Remote address.
ApplicationNotFoundException - If the application cannot be found.
public void removeRemoteAddress(long applicationId,
RemoteAddress remoteAddress)
throws ApplicationNotFoundException
ApplicationDAO
removeRemoteAddress in interface ApplicationDAOapplicationId - Application id.remoteAddress - Remote address, not null.
ApplicationNotFoundException - If the application cannot be found.
public void removeDirectoryMapping(long applicationId,
long directoryId)
throws ApplicationNotFoundException
ApplicationDAO
removeDirectoryMapping in interface ApplicationDAOapplicationId - Application id.directoryId - Directory id.
ApplicationNotFoundException - If the application cannot be found.public void removeDirectoryMappings(long directoryId)
ApplicationDAO
removeDirectoryMappings in interface ApplicationDAOdirectoryId - Directory id.
public void addGroupMapping(long applicationId,
long directoryId,
java.lang.String groupName)
throws ApplicationNotFoundException
ApplicationDAO
addGroupMapping in interface ApplicationDAOapplicationId - Application id.directoryId - Directory id.groupName - Group name.
ApplicationNotFoundException - If the application cannot be found.
public void removeGroupMapping(long applicationId,
long directoryId,
java.lang.String groupName)
ApplicationDAO
removeGroupMapping in interface ApplicationDAOapplicationId - Application id.directoryId - Directory id.groupName - Group name.
public void removeGroupMappings(long directoryId,
java.lang.String groupName)
ApplicationDAO
removeGroupMappings in interface ApplicationDAOdirectoryId - Directory id.groupName - Group name.
public void renameGroupMappings(long directoryId,
java.lang.String oldGroupName,
java.lang.String newGroupName)
ApplicationDAO
renameGroupMappings in interface ApplicationDAOdirectoryId - Directory id.oldGroupName - old group name.newGroupName - new group name.
public java.util.List<Application> findAuthorisedApplications(long directoryId,
java.util.List<java.lang.String> groupNames)
ApplicationDAO
findAuthorisedApplications in interface ApplicationDAOdirectoryId - directory id of the user.groupNames - group memberships of the user in the particular directory.
public void updateDirectoryMapping(long applicationId,
long directoryId,
int position)
throws ApplicationNotFoundException,
DirectoryNotFoundException
ApplicationDAO
updateDirectoryMapping in interface ApplicationDAOapplicationId - Application iddirectoryId - Directory idposition - New position in the order of directories for this given directory.
Positions in the list of directories are absolute and zero based.
ApplicationNotFoundException - if the application could not be found
DirectoryNotFoundException - if the directory could not be found
public void updateDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate)
throws ApplicationNotFoundException,
DirectoryNotFoundException
ApplicationDAO
updateDirectoryMapping in interface ApplicationDAOapplicationId - Application iddirectoryId - Directory id.allowAllToAuthenticate - True, if all users are allowed to authenticate.
ApplicationNotFoundException - If the application cannot be found.
DirectoryNotFoundException - If the directory cannot be found.
public void updateDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate,
java.util.Set<OperationType> operationTypes)
throws ApplicationNotFoundException,
DirectoryNotFoundException
ApplicationDAO
updateDirectoryMapping in interface ApplicationDAOapplicationId - Application iddirectoryId - Directory id.allowAllToAuthenticate - True, if all users are allowed to authenticate.operationTypes - the set of permissible operation types.
ApplicationNotFoundException - If the application cannot be found.
DirectoryNotFoundException - If the directory cannot be found.public void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
public void setAliasDAO(AliasDAO aliasDAO)
public void setDirectoryDao(DirectoryDAOHibernate directoryDao)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||