|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ApplicationManager
Application management API.
Method Summary | |
---|---|
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. |
Method Detail |
---|
Application add(Application application) throws InvalidCredentialException
application
- the Application to add.
InvalidCredentialException
- if there was an error encrypting the Applications passwordApplication 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 too
ApplicationManagerException
- 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 mapping
ApplicationNotFoundException
- if the application could not be found
DirectoryNotFoundException
- 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 shift
ApplicationNotFoundException
- if the application could not be found
DirectoryNotFoundException
- 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 flag
ApplicationNotFoundException
- if the application could not be found
DirectoryNotFoundException
- 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 mapping
ApplicationNotFoundException
- if the application could not be found
DirectoryNotFoundException
- if the directory could not be foundvoid addRemoteAddress(Application application, RemoteAddress remoteAddress) throws ApplicationNotFoundException
application
- the application to updateremoteAddress
- the remote address to add
ApplicationNotFoundException
- if the application could not be foundvoid removeRemoteAddress(Application application, RemoteAddress remoteAddress) throws ApplicationNotFoundException
application
- the application to updateremoteAddress
- the remote address to remove
ApplicationNotFoundException
- 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 add
ApplicationNotFoundException
- 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 remove
ApplicationNotFoundException
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |