com.atlassian.crowd.manager.application
Interface ApplicationManager

All Known Implementing Classes:
ApplicationManagerGeneric

public interface ApplicationManager

Application management API.


Method Summary
 Application add(Application application)
          Will add the given Application to Crowd
 java.util.List<Application> findAuthorisedApplications(RemotePrincipal principal)
          Returns a list of applications the principal is authorised to authenticate with.
 Application findByID(long ID)
          Find an application by its ID.
 Application findByName(java.lang.String name)
          Find an application by its name.
 void remove(Application application)
           
 void removeAllGroupMappings(long directoryID, java.lang.String groupName)
          Will remove all Group mappings from the Applications that are associated to the given directoryId with the given groupName
 void removeDirectoryFromAllApplications(Directory directory)
          Will remove a given directory and its associated mapped objects, such as: ApplicationDirectoryPermission's GroupMapping's and it's DirectoryMapping From all applications
 void removeDirectoryFromApplication(Directory directory, Application application)
          Will remove a directory from an application.
 java.util.List search(SearchContext searchContext)
          Search applications.
 Application update(Application application)
          Updates an application's details.
 Application updateCredentials(Application application)
          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
 

Method Detail

add

Application add(Application application)
                throws ApplicationManagerException,
                       InvalidCredentialException
Will add the given Application to Crowd

Parameters:
application - the Application to add.
Returns:
the added Application
Throws:
InvalidCredentialException - if there was an error encrypting the Applications password
ApplicationManagerException

findByID

Application findByID(long ID)
                     throws ObjectNotFoundException
Find an application by its ID.

Parameters:
ID - database ID.
Returns:
application object.
Throws:
ObjectNotFoundException - application with requested ID does not exist.

findByName

Application findByName(java.lang.String name)
                       throws ObjectNotFoundException
Find an application by its name.

Parameters:
name - name of application.
Returns:
application object.
Throws:
ObjectNotFoundException - application with requested name does not exist.

remove

void remove(Application application)
            throws ApplicationManagerException
Throws:
ApplicationManagerException

removeAllGroupMappings

void removeAllGroupMappings(long directoryID,
                            java.lang.String groupName)
                            throws ObjectNotFoundException
Will remove all Group mappings from the Applications that are associated to the given directoryId with the given groupName

Parameters:
directoryID - the directory associated to Application's
groupName - the name of the group to remove
Throws:
ObjectNotFoundException - if the given Directory cannot be found.

removeDirectoryFromApplication

void removeDirectoryFromApplication(Directory directory,
                                    Application application)
                                    throws ApplicationManagerException
Will remove a directory from an application. This will also remove all other mapped objects, such as: ApplicationDirectoryPermission's GroupMapping's and it's DirectoryMapping

Parameters:
directory - the directory you wish to disociate
application - the application you wish to apply this dissociation too
Throws:
ApplicationManagerException - thrown if anything goes bad, updating the application

removeDirectoryFromAllApplications

void removeDirectoryFromAllApplications(Directory directory)
                                        throws ApplicationManagerException
Will remove a given directory and its associated mapped objects, such as: ApplicationDirectoryPermission's GroupMapping's and it's DirectoryMapping From all applications

Parameters:
directory - the directory to remove from all applications
Throws:
ApplicationManagerException - thrown if anything goes bad updating an application

update

Application update(Application application)
                   throws ApplicationManagerException
Updates an application's details.

Parameters:
application - modified application.
Returns:
modified application.
Throws:
ApplicationManagerException - error updating application.

updateCredentials

Application updateCredentials(Application application)
                              throws ApplicationManagerException,
                                     InvalidCredentialException
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

Parameters:
application - an application with unencrypted password credentials
Returns:
the updated application with encrypted credentials
Throws:
ApplicationManagerException
InvalidCredentialException

search

java.util.List search(SearchContext searchContext)
Search applications.

Parameters:
searchContext - search criteria.
Returns:
list of Applications.

findAuthorisedApplications

java.util.List<Application> findAuthorisedApplications(RemotePrincipal principal)
Returns a list of applications the principal is authorised to authenticate with. This method iteratively calls ApplicationManagerGeneric.hasAccess(Application, RemotePrincipal) on all applications.

Parameters:
principal - principal to search for.
Returns:
list of applications.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.