public interface ApplicationManager
Modifier and Type | Method and Description |
---|---|
Application |
add(Application application)
Will add the given Application to Crowd
|
void |
addDirectoryMapping(Application application,
Directory directory,
boolean allowAllToAuthenticate,
OperationType... operationTypes)
Will add a DirectoryMapping between the passed in Application and Directory.
|
void |
addGroupMapping(Application application,
Directory directory,
String groupName)
Will add a group mapping for the given application + directory mapping.
|
void |
addRemoteAddress(Application application,
RemoteAddress remoteAddress)
Will add a remote address to the current application
|
boolean |
authenticate(Application application,
PasswordCredential testCredential)
Takes an application, which contains a hashed credential, and compares that
to a hash of the supplied testCredential.
|
List<Application> |
findAll()
Retrieves all the applications in the Crowd system.
|
Application |
findById(long id)
Find an application by its ID.
|
Application |
findByName(String name)
Find an application by its name.
|
void |
remove(Application application)
Remove an application.
|
void |
removeDirectoryFromApplication(Directory directory,
Application application)
Will remove a directory from an application.
|
void |
removeGroupMapping(Application application,
Directory directory,
String groupName)
Will remove a group mapping for the given application + directory mapping.
|
void |
removeRemoteAddress(Application application,
RemoteAddress remoteAddress)
Will remove the passed in RemoteAddress from the application
|
List<Application> |
search(EntityQuery query)
Search applications.
|
Application |
update(Application application)
Updates an application's details.
|
void |
updateCredential(Application application,
PasswordCredential passwordCredential)
Takes an application with a List of credentials that are unencrypted, encrypts them
and then updates the application in the database with the encrypted credentials
|
void |
updateDirectoryMapping(Application application,
Directory directory,
boolean allowAllToAuthenticate)
Will update the Directory Mapping, setting to enable/disable allowing all users to authenticate for the given mapping (not taking group membership into consideration)
|
void |
updateDirectoryMapping(Application application,
Directory directory,
boolean allowAllToAuthenticate,
Set<OperationType> operationTypes)
Will update a directory mapping against the Application moving it to the selected position in the list of DirectoryMappings.
|
void |
updateDirectoryMapping(Application application,
Directory directory,
int position)
Will update a directory mapping against the Application moving it to the selected position in the list of DirectoryMappings.
|
Application add(Application application) throws InvalidCredentialException, ApplicationAlreadyExistsException
application
- the Application to add.InvalidCredentialException
- if there was an error encrypting the Applications passwordApplicationAlreadyExistsException
- if an application with the same name already existsApplication findById(long id) throws ApplicationNotFoundException
id
- database ID.ApplicationNotFoundException
- application with requested ID does not exist.Application findByName(String name) throws ApplicationNotFoundException
name
- name of application.ApplicationNotFoundException
- application with requested name does not exist.void remove(Application application) throws ApplicationManagerException
application
- application to remove.ApplicationManagerException
- if the remove operation is not permitted on the given application.void removeDirectoryFromApplication(Directory directory, Application application) throws ApplicationManagerException
directory
- the directory you wish to disociateapplication
- the application you wish to apply this dissociation tooApplicationManagerException
- thrown if anything goes bad, updating the applicationvoid addDirectoryMapping(Application application, Directory directory, boolean allowAllToAuthenticate, OperationType... operationTypes) throws ApplicationNotFoundException, DirectoryNotFoundException
application
- the application in questiondirectory
- the directory associated to the applicationallowAllToAuthenticate
- to enable/disable the allow all to authenticate flagoperationTypes
- The set of allowed operations for the given directory/application mappingApplicationNotFoundException
- if the application could not be foundDirectoryNotFoundException
- if the directory could not be foundvoid updateDirectoryMapping(Application application, Directory directory, int position) throws ApplicationNotFoundException, DirectoryNotFoundException
application
- the application in questiondirectory
- the directory associated to the applicationposition
- This will recognise the need to shift a mapping either up or down in the. A -ve value will not result in an index shiftApplicationNotFoundException
- if the application could not be foundDirectoryNotFoundException
- if the directory could not be foundvoid updateDirectoryMapping(Application application, Directory directory, boolean allowAllToAuthenticate) throws ApplicationNotFoundException, DirectoryNotFoundException
application
- the application in questiondirectory
- the directory associated to the applicationallowAllToAuthenticate
- to enable/disable the allow all to authenticate flagApplicationNotFoundException
- if the application could not be foundDirectoryNotFoundException
- if the directory could not be foundvoid updateDirectoryMapping(Application application, Directory directory, boolean allowAllToAuthenticate, Set<OperationType> operationTypes) throws ApplicationNotFoundException, DirectoryNotFoundException
application
- the application in questiondirectory
- the directory associated to the applicationallowAllToAuthenticate
- to enable/disable the allow all to authenticate flagoperationTypes
- The set of allowed operations for the given directory/application mappingApplicationNotFoundException
- if the application could not be foundDirectoryNotFoundException
- if the directory could not be foundvoid addRemoteAddress(Application application, RemoteAddress remoteAddress) throws ApplicationNotFoundException
application
- the application to updateremoteAddress
- the remote address to addApplicationNotFoundException
- if the application could not be foundvoid removeRemoteAddress(Application application, RemoteAddress remoteAddress) throws ApplicationNotFoundException
application
- the application to updateremoteAddress
- the remote address to removeApplicationNotFoundException
- if the application could not be foundvoid addGroupMapping(Application application, Directory directory, String groupName) throws ApplicationNotFoundException
application
- the application to updatedirectory
- the directory associated to the applicationgroupName
- the group name to addApplicationNotFoundException
- if the application could not be foundvoid removeGroupMapping(Application application, Directory directory, String groupName) throws ApplicationNotFoundException
application
- the application to updatedirectory
- the directory associated to the applicationgroupName
- the group name to removeApplicationNotFoundException
Application update(Application application) throws ApplicationManagerException, ApplicationNotFoundException
application
- modified application.ApplicationManagerException
- error updating application, ie. if you try to rename a permanent application or try to deactivate the CROWD application.ApplicationNotFoundException
- if the application could not be foundvoid updateCredential(Application application, PasswordCredential passwordCredential) throws ApplicationManagerException, ApplicationNotFoundException
application
- an application with unencrypted password credentialspasswordCredential
- unencrypted password.ApplicationManagerException
- not allowed to update.ApplicationNotFoundException
- if the application could not be foundboolean authenticate(Application application, PasswordCredential testCredential) throws ApplicationNotFoundException
application
- application to authenticate as.testCredential
- credentials to authenticate with.true
iff the testCredential matches the actual application credential.ApplicationNotFoundException
- if the application could not be foundList<Application> search(EntityQuery query)
query
- Application entity query.List<Application> findAll()
Copyright © 2020 Atlassian. All rights reserved.