com.atlassian.crowd.manager.application
Interface ApplicationManager

All Known Implementing Classes:
ApplicationManagerGeneric

public interface ApplicationManager


Method Summary
 Application add(Application application)
          Will add the given Application to Crowd
 RemoteGroup addGroup(Application application, RemoteGroup remoteGroup)
          Adds a group to ALL possible directories assigned to the application.
 RemotePrincipal addPrincipal(Application application, RemotePrincipal principal)
          Adds the principal to ALL the permissible directories.
 void addPrincipalAttribute(Application application, java.lang.String principal, java.lang.String attribute, AttributeValues values)
          Adds/sets the principal's attribute values.
 void addPrincipalToGroup(Application application, java.lang.String principal, java.lang.String group)
          Makes principals matching the given name members of the group across ALL directories.
 void addPrincipalToRole(Application application, java.lang.String principal, java.lang.String role)
          Makes principals matching the given name members of the role across ALL directories.
 RemoteRole addRole(Application application, RemoteRole role)
          Adds a role to ALL possible directories assigned to the application.
 Token authenticate(ApplicationAuthenticationContext authenticationContext)
           
 Token authenticate(PrincipalAuthenticationContext authenticateContext)
           
 Token authenticate(PrincipalAuthenticationContext authenticateContext, boolean validatePassword)
          Authenticates a principal and creates a token for the authentication.
 Token authenticateIgnoreCache(PrincipalAuthenticationContext authenticateContext)
          Authenticates a principal, bypassing any credential caching.
 Application findByID(long ID)
           
 Application findByName(java.lang.String name)
           
 RemoteGroup findGroupByName(Application application, java.lang.String name)
          This will form a RemoteGroup based on it's group name.
 java.util.List findGroupMemberships(Application application, java.lang.String principalName)
          For each principal matching the given name across assigned directories, build a list of group names in which the principals are members.
 RemotePrincipal findPrincipalByName(Application application, java.lang.String name)
          Returns the first principal with the matching username from all the directories assigned to the application.
 RemoteRole findRoleByName(Application application, java.lang.String name)
          This will form a RemoteRole based on it's role name.
 java.util.List findRoleMemberships(Application application, java.lang.String principalName)
          For each principal matching the given name across assigned directories, build a list of role names in which the principals are members.
 boolean isGroupMember(Application application, java.lang.String principal, java.lang.String group)
          Determines group membership across directories assigned to an application.
 boolean isRoleMember(Application application, java.lang.String principal, java.lang.String role)
          Determines role membership across directories assigned to an application.
 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.
 void removeGroup(Application application, java.lang.String group)
          Removes ALL groups matching the supplied name from each of the application's assigned directories.
 void removePrincipal(Application application, java.lang.String principal)
          Removes ALL principals from each of the application's assigned directories.
 void removePrincipalAttribute(Application application, java.lang.String principal, java.lang.String attribute)
          Removes the attribute from principal.
 void removePrincipalFromGroup(Application application, java.lang.String principal, java.lang.String group)
          Makes principals matching the given name not members of the group across ALL directories.
 void removePrincipalFromRole(Application application, java.lang.String principal, java.lang.String role)
          Makes principals matching the given name not members of the role across ALL directories.
 void removeRole(Application application, java.lang.String role)
          Removes ALL roles matching the supplied name from each of the application's assigned directories.
 void resetPrincipalCredential(Application application, java.lang.String principal)
          Resets the credentials of the first matching principal in the application's directories.
 java.util.List search(SearchContext searchContext)
           
 java.util.Collection searchGroups(Application application, SearchContext searchContext)
          Returns a List matching the search criteria defined in SearchContext.
 java.util.Collection searchPrincipals(Application application, SearchContext searchContext)
          Returns a List matching the search criteria defined in SearchContext.
 java.util.Collection searchRoles(Application application, SearchContext searchContext)
          Returns a List matching the search criteria defined in SearchContext.
 Application update(Application application)
           
 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
 void updateGroup(Application application, java.lang.String name, java.lang.String description, boolean active)
          Updates the ALL groups located from the list of directories assigned to an application Currently available fields that can be updated are description and active
 void updatePrincipalAttribute(Application application, java.lang.String name, java.lang.String attribute, AttributeValues values)
          Adds/sets the principal's attribute values.
 void updatePrincipalCredential(Application application, java.lang.String principal, PasswordCredential credential)
          Updates the credentials of the first matching principal in the application's directories.
 void updateRole(Application application, java.lang.String name, java.lang.String description, boolean active)
          Updates the ALL roles located from the list of directories assigned to an application Currently available fields that can be updated are description and active
 Token validateToken(java.lang.String token, ValidationFactor[] clientValidationFactors)
           
 Token validateToken(java.lang.String principalToken, ValidationFactor[] validationFactors, java.lang.String application)
           
 

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

addGroup

RemoteGroup addGroup(Application application,
                     RemoteGroup remoteGroup)
                     throws ApplicationManagerException,
                            java.rmi.RemoteException,
                            InvalidGroupException,
                            ApplicationPermissionException
Adds a group to ALL possible directories assigned to the application.

Group is added to a directory if it doesn't exist in the directory.

Parameters:
application - add to application's assigned directories.
remoteGroup - the group to add.
Returns:
findGroupByName(application,principal.getName()) after adding the principal.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ApplicationManagerException - internal error, operation unsuccessful.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation AND the group does not already exist in ANY assigned directory.
InvalidGroupException - should never be thrown. If the group already exists or is invalid in a directory, this directory is skipped.

addPrincipal

RemotePrincipal addPrincipal(Application application,
                             RemotePrincipal principal)
                             throws InvalidPrincipalException,
                                    java.rmi.RemoteException,
                                    InvalidCredentialException,
                                    ApplicationPermissionException
Adds the principal to ALL the permissible directories.

If the principal exists in ANY of the application's assigned directories, then an InvalidPrincipalException will be thrown.

If the add operation fails on a directory because of permissioning restrictions, an INFO message is logged. If ALL directories permissions fail, a ApplicationPermissionException is thrown.

If the add operation fails on a directory for any other reason, such as directory failure, update failure, etc., an Exception is thrown immediately.

Returns the principal from the first directory containing the principal.

Parameters:
application - add to application's assigned directories.
principal - the principal to add.
Returns:
findPrincipalByName(application,principal.getName()) after adding the principal.
Throws:
InvalidPrincipalException - principal already exists in ANY assigned directory.
java.rmi.RemoteException - error thrown by directory implementation.
InvalidCredentialException - principal credential validation error.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

addPrincipalAttribute

void addPrincipalAttribute(Application application,
                           java.lang.String principal,
                           java.lang.String attribute,
                           AttributeValues values)
                           throws java.rmi.RemoteException,
                                  ObjectNotFoundException,
                                  ApplicationPermissionException
Adds/sets the principal's attribute values.

Applies the change to ALL permissible directories assigned to application.

Parameters:
application - update in application's assigned directories.
principal - name of principal.
attribute - attribute name.
values - attribute values.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if principal with given name does not exist in ANY assigned directory, or the underlying directory does not exist
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

addPrincipalToGroup

void addPrincipalToGroup(Application application,
                         java.lang.String principal,
                         java.lang.String group)
                         throws java.rmi.RemoteException,
                                ObjectNotFoundException,
                                ApplicationPermissionException
Makes principals matching the given name members of the group across ALL directories.

Parameters:
application - modify groups in application's assigned directories.
principal - principal name.
group - group name.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - when the principal cannot be found in ANY directory OR when ALL principals are in directories which don't have the requested group.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

addPrincipalToRole

void addPrincipalToRole(Application application,
                        java.lang.String principal,
                        java.lang.String role)
                        throws java.rmi.RemoteException,
                               ObjectNotFoundException,
                               ApplicationPermissionException
Makes principals matching the given name members of the role across ALL directories.

Parameters:
application - modify roles in application's assigned directories.
principal - principal name.
role - role name.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - when the principal cannot be found in ANY directory OR when ALL principals are in directories which don't have the requested role.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

addRole

RemoteRole addRole(Application application,
                   RemoteRole role)
                   throws java.rmi.RemoteException,
                          InvalidRoleException,
                          ApplicationPermissionException
Adds a role to ALL possible directories assigned to the application.

Role is added to a directory if it doesn't exist in the directory.

Parameters:
application - add to application's assigned directories.
role - the role to add.
Returns:
findRoleByName(application,principal.getName()) after adding the principal.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.
InvalidRoleException - should never be thrown. If the role already exists or is invalid in a directory, this directory is skipped.

authenticate

Token authenticate(ApplicationAuthenticationContext authenticationContext)
                   throws ApplicationManagerException,
                          InvalidAuthenticationException
Throws:
ApplicationManagerException
InvalidAuthenticationException

authenticate

Token authenticate(PrincipalAuthenticationContext authenticateContext)
                   throws ApplicationManagerException,
                          InvalidAuthenticationException,
                          java.rmi.RemoteException,
                          InactiveAccountException
Throws:
ApplicationManagerException
InvalidAuthenticationException
java.rmi.RemoteException
InactiveAccountException
See Also:
authenticate(com.atlassian.crowd.integration.authentication.PrincipalAuthenticationContext,boolean)

authenticate

Token authenticate(PrincipalAuthenticationContext authenticateContext,
                   boolean validatePassword)
                   throws ApplicationManagerException,
                          InvalidAuthenticationException,
                          java.rmi.RemoteException,
                          InactiveAccountException
Authenticates a principal and creates a token for the authentication.

Parameters:
authenticateContext - The authentication details for the principal.
validatePassword - If the password should be validated before generating a token.
Returns:
The authenticated token for the principal.
Throws:
ApplicationManagerException - internal error, operation unsuccessful.
InvalidAuthenticationException - The authentication was not successful.
java.rmi.RemoteException - Error thrown by directory implementation.
InactiveAccountException - The account attempting to authenticate is inactive.

authenticateIgnoreCache

Token authenticateIgnoreCache(PrincipalAuthenticationContext authenticateContext)
                              throws ApplicationManagerException,
                                     InvalidAuthenticationException,
                                     java.rmi.RemoteException,
                                     InactiveAccountException
Authenticates a principal, bypassing any credential caching.

Throws:
ApplicationManagerException
InvalidAuthenticationException
java.rmi.RemoteException
InactiveAccountException
See Also:
authenticate(com.atlassian.crowd.integration.authentication.PrincipalAuthenticationContext,boolean)

findByID

Application findByID(long ID)
                     throws ObjectNotFoundException
Throws:
ObjectNotFoundException

findByName

Application findByName(java.lang.String name)
                       throws ObjectNotFoundException
Throws:
ObjectNotFoundException

findGroupByName

RemoteGroup findGroupByName(Application application,
                            java.lang.String name)
                            throws ObjectNotFoundException,
                                   java.rmi.RemoteException
This will form a RemoteGroup based on it's group name.

If the group only spans one of the directories configured for the application, then the group is returned with it's associated directory.

If the group spans multiple directories, a unified view of the groups in each directory is returned, where the members are amalgamated. The associated directory is the FIRST directory found that matches the group. The actual directory should be regarded as meaningless because the members span multiple directories.

The behaviour of asoociating a directory to the group has been maintained so that users currently relying on this feature (ie. in the use case where a group spans exactly one directory) are catered for.

Parameters:
application - application with associated directories to search.
name - name of the group to find.
Returns:
unified RemoteGroup
Throws:
ObjectNotFoundException - group does not exist in ANY of the application's assigned directories.
java.rmi.RemoteException - error thrown by directory implementation.

findGroupMemberships

java.util.List findGroupMemberships(Application application,
                                    java.lang.String principalName)
                                    throws java.rmi.RemoteException,
                                           ObjectNotFoundException
For each principal matching the given name across assigned directories, build a list of group names in which the principals are members.

Parameters:
application - application's directories to search.
principalName - name of the principal to find memberships for.
Returns:
List of group names the principal is a member of.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if the given cannot be found in any assoicated Application directories

findPrincipalByName

RemotePrincipal findPrincipalByName(Application application,
                                    java.lang.String name)
                                    throws ApplicationManagerException,
                                           ObjectNotFoundException,
                                           java.rmi.RemoteException
Returns the first principal with the matching username from all the directories assigned to the application.

The directories are searched in the order they are assigned to the application.

Parameters:
application - search application's assigned directories.
name - the username of the principal to find.
Returns:
first matching principal.
Throws:
ObjectNotFoundException - principal not found in any of the directories.
java.rmi.RemoteException - error thrown by directory implementation.
ApplicationManagerException - internal error, operation unsuccessful.

findRoleByName

RemoteRole findRoleByName(Application application,
                          java.lang.String name)
                          throws ObjectNotFoundException,
                                 java.rmi.RemoteException
This will form a RemoteRole based on it's role name.

If the role only spans one of the directories configured for the application, then the role is returned with it's associated directory.

If the role spans multiple directories, a unified view of the roles in each directory is returned, where the members are amalgamated. The associated directory is the FIRST directory found that matches the role. The actual directory should be regarded as meaningless because the members span multiple directories.

The behaviour of asoociating a directory to the role has been maintained so that users currently relying on this feature (ie. in the use case where a role spans exactly one directory) are catered for.

Parameters:
application - application with associated directories to search.
name - name of the role to find.
Returns:
unified RemoteRole
Throws:
ObjectNotFoundException - role does not exist in ANY of the application's assigned directories.
java.rmi.RemoteException - error thrown by directory implementation.

findRoleMemberships

java.util.List findRoleMemberships(Application application,
                                   java.lang.String principalName)
                                   throws java.rmi.RemoteException,
                                          ObjectNotFoundException
For each principal matching the given name across assigned directories, build a list of role names in which the principals are members.

Parameters:
application - application's directories to search.
principalName - name of the principal to find memberships for.
Returns:
List of role names the principal is a member of.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if the given cannot be found in any assoicated Application directories

isGroupMember

boolean isGroupMember(Application application,
                      java.lang.String principal,
                      java.lang.String group)
                      throws java.rmi.RemoteException
Determines group membership across directories assigned to an application.

Returns true if a principal matching the name belongs to a group matching the name in ANY assigned directory.

Otherwise returns false.

Parameters:
application - search application's assigned directories.
group - group name to check for membership.
principal - principal name to check for membership.
Returns:
true if a principal matching the name belongs to a group matching the name in ANY assigned directory
Throws:
java.rmi.RemoteException - error thrown by directory implementation.

isRoleMember

boolean isRoleMember(Application application,
                     java.lang.String principal,
                     java.lang.String role)
                     throws java.rmi.RemoteException
Determines role membership across directories assigned to an application.

Returns true if a principal matching the name belongs to a role matching the name in ANY assigned directory.

Otherwise returns false.

Parameters:
application - search application's assigned directories.
role - role name to check for membership.
principal - principal name to check for membership.
Returns:
true if a principal matching the name belongs to a role matching the name in ANY assigned directory
Throws:
java.rmi.RemoteException - error thrown by directory implementation.

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

removeGroup

void removeGroup(Application application,
                 java.lang.String group)
                 throws java.rmi.RemoteException,
                        ObjectNotFoundException,
                        ApplicationPermissionException
Removes ALL groups matching the supplied name from each of the application's assigned directories.

If the group doesn't exist in ANY of the application's assigned directories, then an ObjectNotFoundException will be thrown.

If the remove operation fails on a directory because of permissioning restrictions, an INFO message is logged. If ALL directories permissions fail, a ApplicationPermissionException is thrown.

If the remove operation fails on a directory for any other reason, such as directory failure, update failure, etc., an Exception is thrown immediately.

Parameters:
application - remove from application's assigned directories.
group - the name of the principal to remove.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if group with given name does not exist in ANY assigned directory.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

removePrincipal

void removePrincipal(Application application,
                     java.lang.String principal)
                     throws java.rmi.RemoteException,
                            ObjectNotFoundException,
                            ApplicationPermissionException
Removes ALL principals from each of the application's assigned directories.

If the principal doesn't exist in ANY of the application's assigned directories, then an ObjectNotFoundException will be thrown.

If the remove operation fails on a directory because of permissioning restrictions, an INFO message is logged. If ALL directories permissions fail, a ApplicationPermissionException is thrown.

If the remove operation fails on a directory for any other reason, such as directory failure, update failure, etc., an Exception is thrown immediately.

Parameters:
application - remove from application's assigned directories.
principal - the name of the principal to remove.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if principal with given name does not exist in ANY assigned directory.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

removePrincipalAttribute

void removePrincipalAttribute(Application application,
                              java.lang.String principal,
                              java.lang.String attribute)
                              throws java.rmi.RemoteException,
                                     ObjectNotFoundException,
                                     ApplicationPermissionException
Removes the attribute from principal.

Applies the change to ALL permissible directories assigned to application.

Parameters:
application - update in application's assigned directories.
principal - name of principal.
attribute - attribute name.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if principal with given name does not exist in ANY assigned directory.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

removePrincipalFromGroup

void removePrincipalFromGroup(Application application,
                              java.lang.String principal,
                              java.lang.String group)
                              throws java.rmi.RemoteException,
                                     ObjectNotFoundException,
                                     ApplicationPermissionException
Makes principals matching the given name not members of the group across ALL directories.

If the group does not exist in ANY of the directories with the matching principals

Parameters:
application - modify groups in application's assigned directories.
principal - principal name.
group - group name.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - when the principal cannot be found in ANY directory OR when ALL principals are in directories which don't have the requested group.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

removePrincipalFromRole

void removePrincipalFromRole(Application application,
                             java.lang.String principal,
                             java.lang.String role)
                             throws java.rmi.RemoteException,
                                    ObjectNotFoundException,
                                    ApplicationPermissionException
Makes principals matching the given name not members of the role across ALL directories.

If the role does not exist in ANY of the directories with the matching principals

Parameters:
application - modify roles in application's assigned directories.
principal - principal name.
role - role name.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - when the principal cannot be found in ANY directory OR when ALL principals are in directories which don't have the requested role.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

removeRole

void removeRole(Application application,
                java.lang.String role)
                throws java.rmi.RemoteException,
                       ObjectNotFoundException,
                       ApplicationPermissionException
Removes ALL roles matching the supplied name from each of the application's assigned directories.

If the role doesn't exist in ANY of the application's assigned directories, then an ObjectNotFoundException will be thrown.

If the remove operation fails on a directory because of permissioning restrictions, an INFO message is logged. If ALL directories permissions fail, a ApplicationPermissionException is thrown.

If the remove operation fails on a directory for any other reason, such as directory failure, update failure, etc., an Exception is thrown immediately.

Parameters:
application - remove from application's assigned directories.
role - the name of the principal to remove.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if role with given name does not exist in ANY assigned directory.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

resetPrincipalCredential

void resetPrincipalCredential(Application application,
                              java.lang.String principal)
                              throws java.rmi.RemoteException,
                                     ObjectNotFoundException,
                                     InvalidCredentialException,
                                     ApplicationPermissionException
Resets the credentials of the first matching principal in the application's directories.

Thus, the method only operates on the same principal returned from a call to findPrincipalByName.

This method will onyl function correctly if the Principal has an email address, otherwise no email can be sent to the user.

Parameters:
application - update in application's assigned directories.
principal - name of principal.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
InvalidCredentialException - principal credential validation error.
ApplicationPermissionException - the first directory in which the principal is found doesn't have the permission to modify principals.
ObjectNotFoundException - if no principal with the given name exists in ANY assigned directory, or the associated directory does not exist

search

java.util.List search(SearchContext searchContext)

searchGroups

java.util.Collection searchGroups(Application application,
                                  SearchContext searchContext)
                                  throws java.rmi.RemoteException
Returns a List matching the search criteria defined in SearchContext.

Parameters:
application - search application's assigned directories.
searchContext - search criteria.
Returns:
Collection results. Each RemoteGroup is a conceptual RemoteGroup with members which can span multiple directories.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.

searchPrincipals

java.util.Collection searchPrincipals(Application application,
                                      SearchContext searchContext)
                                      throws java.rmi.RemoteException
Returns a List matching the search criteria defined in SearchContext.

Parameters:
application - search application's assigned directories.
searchContext - search criteria.
Returns:
Collection results.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.

searchRoles

java.util.Collection searchRoles(Application application,
                                 SearchContext searchContext)
                                 throws java.rmi.RemoteException
Returns a List matching the search criteria defined in SearchContext.

Parameters:
application - search application's assigned directories.
searchContext - search criteria.
Returns:
Collection results. Each RemoteRole is a conceptual RemoteRole with members which can span multiple directories.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.

update

Application update(Application application)
                   throws ApplicationManagerException
Throws:
ApplicationManagerException

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

updateGroup

void updateGroup(Application application,
                 java.lang.String name,
                 java.lang.String description,
                 boolean active)
                 throws java.rmi.RemoteException,
                        ApplicationPermissionException,
                        ObjectNotFoundException
Updates the ALL groups located from the list of directories assigned to an application Currently available fields that can be updated are description and active

Parameters:
application - update in application's assigned directories.
name - the name of the group to update.
description - the new description of the group.
active - the new boolean active flag of the group.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if group with given name does not exist in ANY assigned directory.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

updatePrincipalAttribute

void updatePrincipalAttribute(Application application,
                              java.lang.String name,
                              java.lang.String attribute,
                              AttributeValues values)
                              throws java.rmi.RemoteException,
                                     ObjectNotFoundException,
                                     ApplicationPermissionException
Adds/sets the principal's attribute values.

Applies the change to ALL permissible directories assigned to application.

Parameters:
application - update in application's assigned directories.
name - name of principal.
attribute - attribute name.
values - List attribute values.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if principal with given name does not exist in ANY assigned directory.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

updatePrincipalCredential

void updatePrincipalCredential(Application application,
                               java.lang.String principal,
                               PasswordCredential credential)
                               throws java.rmi.RemoteException,
                                      ObjectNotFoundException,
                                      InvalidCredentialException,
                                      ApplicationPermissionException
Updates the credentials of the first matching principal in the application's directories.

Thus, the method only operates on the same principal returned from a call to findPrincipalByName.

Parameters:
application - update in application's assigned directories.
principal - name of principal.
credential - new credentials.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
InvalidCredentialException - principal credential validation error.
ApplicationPermissionException - the first directory in which the principal is found doesn't have the permission to modify principals.
ObjectNotFoundException - if no principal with the given name exists in ANY assigned directory.

updateRole

void updateRole(Application application,
                java.lang.String name,
                java.lang.String description,
                boolean active)
                throws java.rmi.RemoteException,
                       ApplicationPermissionException,
                       ObjectNotFoundException
Updates the ALL roles located from the list of directories assigned to an application Currently available fields that can be updated are description and active

Parameters:
application - update in application's assigned directories.
name - the name of the role to update.
description - the new description of the role.
active - the new boolean active flag of the grop.
Throws:
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if role with given name does not exist in ANY assigned directory.
ApplicationPermissionException - none of the application's associated directories have the correct permission to perform the operation.

validateToken

Token validateToken(java.lang.String token,
                    ValidationFactor[] clientValidationFactors)
                    throws ApplicationManagerException,
                           InvalidTokenException
Throws:
ApplicationManagerException
InvalidTokenException

validateToken

Token validateToken(java.lang.String principalToken,
                    ValidationFactor[] validationFactors,
                    java.lang.String application)
                    throws ApplicationManagerException,
                           InvalidTokenException,
                           java.rmi.RemoteException
Throws:
ApplicationManagerException
InvalidTokenException
java.rmi.RemoteException


Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.