com.atlassian.crowd.manager.application
Class ApplicationManagerGeneric

java.lang.Object
  extended by com.atlassian.crowd.manager.application.ApplicationManagerGeneric
All Implemented Interfaces:
ApplicationManager

public class ApplicationManagerGeneric
extends java.lang.Object
implements ApplicationManager


Constructor Summary
ApplicationManagerGeneric()
           
 
Method Summary
 Application add(Application application)
          Will add the given Application to Crowd
 java.util.List<Application> findAll()
          Retrieves all the applications in the Crowd system.
 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)
          Remove an application.
 void removeDirectoryFromApplication(Directory directory, Application application)
          Will remove a directory from an application.
 java.util.List<Application> search(EntityQuery query)
          Search applications.
 void setApplicationDAO(ApplicationDAO applicationDAO)
           
 void setI18nHelper(I18nHelper i18nHelper)
           
 void setPasswordEncoderFactory(PasswordEncoderFactory passwordEncoderFactory)
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationManagerGeneric

public ApplicationManagerGeneric()
Method Detail

add

public Application add(Application application)
                throws InvalidCredentialException
Description copied from interface: ApplicationManager
Will add the given Application to Crowd

Specified by:
add in interface ApplicationManager
Parameters:
application - the Application to add.
Returns:
the added Application
Throws:
InvalidCredentialException - if there was an error encrypting the Applications password

findById

public Application findById(long id)
                     throws ObjectNotFoundException
Description copied from interface: ApplicationManager
Find an application by its ID.

Specified by:
findById in interface ApplicationManager
Parameters:
id - database ID.
Returns:
application object.
Throws:
ObjectNotFoundException - application with requested ID does not exist.

findByName

public Application findByName(java.lang.String name)
                       throws ObjectNotFoundException
Description copied from interface: ApplicationManager
Find an application by its name.

Specified by:
findByName in interface ApplicationManager
Parameters:
name - name of application.
Returns:
application object.
Throws:
ObjectNotFoundException - application with requested name does not exist.

remove

public void remove(Application application)
            throws ApplicationManagerException
Description copied from interface: ApplicationManager
Remove an application.

Specified by:
remove in interface ApplicationManager
Parameters:
application - application to remove.
Throws:
ApplicationManagerException - if the remove operation is not permitted on the given application.

removeDirectoryFromApplication

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

Specified by:
removeDirectoryFromApplication in interface ApplicationManager
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

search

public java.util.List<Application> search(EntityQuery query)
Description copied from interface: ApplicationManager
Search applications.

Specified by:
search in interface ApplicationManager
Parameters:
query - Application entity query.
Returns:
list of Applications.

findAll

public java.util.List<Application> findAll()
Description copied from interface: ApplicationManager
Retrieves all the applications in the Crowd system.

Specified by:
findAll in interface ApplicationManager
Returns:
List of all Applications.

update

public Application update(Application application)
                   throws ApplicationManagerException
Description copied from interface: ApplicationManager
Updates an application's details.

Specified by:
update in interface ApplicationManager
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

public Application updateCredential(Application application,
                                    PasswordCredential passwordCredential)
                             throws ApplicationManagerException,
                                    InvalidCredentialException
Description copied from interface: ApplicationManager
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

Specified by:
updateCredential in interface ApplicationManager
Parameters:
application - an application with unencrypted password credentials
passwordCredential - unencrypted password.
Returns:
the updated application with encrypted credentials
Throws:
ApplicationManagerException - not allowed to update.
InvalidCredentialException - credential not valid.

setApplicationDAO

public void setApplicationDAO(ApplicationDAO applicationDAO)

setPasswordEncoderFactory

public void setPasswordEncoderFactory(PasswordEncoderFactory passwordEncoderFactory)

setI18nHelper

public void setI18nHelper(I18nHelper i18nHelper)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.