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
 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.
 List<Application> search(EntityQuery query)
          Search applications.
 Application update(Application application)
          Updates an application's details.
 Application 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
 

Method Detail

add

Application add(Application application)
                throws 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

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(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
Remove an application.

Parameters:
application - application to remove.
Throws:
ApplicationManagerException - if the remove operation is not permitted on the given application.

removeDirectoryFromApplication

void removeDirectoryFromApplication(Directory directory,
                                    Application application)
                                    throws ApplicationManagerException
Will remove a directory from an application. This will also remove all other mapped objects.

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

update

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

Parameters:
application - modified application.
Returns:
modified application.
Throws:
ApplicationManagerException - error updating application, ie. if you try to rename a permanent application or try to deactivate the CROWD application.

updateCredential

Application updateCredential(Application application,
                             PasswordCredential passwordCredential)
                             throws ApplicationManagerException
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
passwordCredential - unencrypted password.
Returns:
the updated application with encrypted credentials
Throws:
ApplicationManagerException - not allowed to update.

search

List<Application> search(EntityQuery query)
Search applications.

Parameters:
query - Application entity query.
Returns:
list of Applications.

findAll

List<Application> findAll()
Retrieves all the applications in the Crowd system.

Returns:
List of all Applications.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.