|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 |
java.util.Collection |
searchPrincipals(Application application,
SearchContext searchContext)
Returns a List |
java.util.Collection |
searchRoles(Application application,
SearchContext searchContext)
Returns a List |
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 |
|---|
Application add(Application application)
throws ApplicationManagerException,
InvalidCredentialException
application - the Application to add.
InvalidCredentialException - if there was an error encrypting the Applications password
ApplicationManagerException
RemoteGroup addGroup(Application application,
RemoteGroup remoteGroup)
throws ApplicationManagerException,
java.rmi.RemoteException,
InvalidGroupException,
ApplicationPermissionException
application - add to application's assigned directories.remoteGroup - the group to add.
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.
RemotePrincipal addPrincipal(Application application,
RemotePrincipal principal)
throws InvalidPrincipalException,
java.rmi.RemoteException,
InvalidCredentialException,
ApplicationPermissionException
application - add to application's assigned directories.principal - the principal to add.
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.
void addPrincipalAttribute(Application application,
java.lang.String principal,
java.lang.String attribute,
AttributeValues values)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - update in application's assigned directories.principal - name of principal.attribute - attribute name.values - attribute values.
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.
void addPrincipalToGroup(Application application,
java.lang.String principal,
java.lang.String group)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - modify groups in application's assigned directories.principal - principal name.group - group name.
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.
void addPrincipalToRole(Application application,
java.lang.String principal,
java.lang.String role)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - modify roles in application's assigned directories.principal - principal name.role - role name.
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.
RemoteRole addRole(Application application,
RemoteRole role)
throws java.rmi.RemoteException,
InvalidRoleException,
ApplicationPermissionException
application - add to application's assigned directories.role - the role to add.
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.
Token authenticate(ApplicationAuthenticationContext authenticationContext)
throws ApplicationManagerException,
InvalidAuthenticationException
ApplicationManagerException
InvalidAuthenticationException
Token authenticate(PrincipalAuthenticationContext authenticateContext)
throws ApplicationManagerException,
InvalidAuthenticationException,
java.rmi.RemoteException,
InactiveAccountException
ApplicationManagerException
InvalidAuthenticationException
java.rmi.RemoteException
InactiveAccountExceptionauthenticate(com.atlassian.crowd.integration.authentication.PrincipalAuthenticationContext,boolean)
Token authenticate(PrincipalAuthenticationContext authenticateContext,
boolean validatePassword)
throws ApplicationManagerException,
InvalidAuthenticationException,
java.rmi.RemoteException,
InactiveAccountException
authenticateContext - The authentication details for the principal.validatePassword - If the password should be validated before generating a token.
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.
Token authenticateIgnoreCache(PrincipalAuthenticationContext authenticateContext)
throws ApplicationManagerException,
InvalidAuthenticationException,
java.rmi.RemoteException,
InactiveAccountException
ApplicationManagerException
InvalidAuthenticationException
java.rmi.RemoteException
InactiveAccountExceptionauthenticate(com.atlassian.crowd.integration.authentication.PrincipalAuthenticationContext,boolean)
Application findByID(long ID)
throws ObjectNotFoundException
ObjectNotFoundException
Application findByName(java.lang.String name)
throws ObjectNotFoundException
ObjectNotFoundException
RemoteGroup findGroupByName(Application application,
java.lang.String name)
throws ObjectNotFoundException,
java.rmi.RemoteException
application - application with associated directories to search.name - name of the group to find.
ObjectNotFoundException - group does not exist in ANY of the application's assigned directories.
java.rmi.RemoteException - error thrown by directory implementation.
java.util.List findGroupMemberships(Application application,
java.lang.String principalName)
throws java.rmi.RemoteException,
ObjectNotFoundException
application - application's directories to search.principalName - name of the principal to find memberships for.
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if the given cannot be found in any assoicated Application directories
RemotePrincipal findPrincipalByName(Application application,
java.lang.String name)
throws ApplicationManagerException,
ObjectNotFoundException,
java.rmi.RemoteException
application - search application's assigned directories.name - the username of the principal to find.
ObjectNotFoundException - principal not found in any of the directories.
java.rmi.RemoteException - error thrown by directory implementation.
ApplicationManagerException - internal error, operation unsuccessful.
RemoteRole findRoleByName(Application application,
java.lang.String name)
throws ObjectNotFoundException,
java.rmi.RemoteException
application - application with associated directories to search.name - name of the role to find.
ObjectNotFoundException - role does not exist in ANY of the application's assigned directories.
java.rmi.RemoteException - error thrown by directory implementation.
java.util.List findRoleMemberships(Application application,
java.lang.String principalName)
throws java.rmi.RemoteException,
ObjectNotFoundException
application - application's directories to search.principalName - name of the principal to find memberships for.
java.rmi.RemoteException - error thrown by directory implementation.
ObjectNotFoundException - if the given cannot be found in any assoicated Application directories
boolean isGroupMember(Application application,
java.lang.String principal,
java.lang.String group)
throws java.rmi.RemoteException
application - search application's assigned directories.group - group name to check for membership.principal - principal name to check for membership.
java.rmi.RemoteException - error thrown by directory implementation.
boolean isRoleMember(Application application,
java.lang.String principal,
java.lang.String role)
throws java.rmi.RemoteException
application - search application's assigned directories.role - role name to check for membership.principal - principal name to check for membership.
java.rmi.RemoteException - error thrown by directory implementation.
void remove(Application application)
throws ApplicationManagerException
ApplicationManagerException
void removeAllGroupMappings(long directoryID,
java.lang.String groupName)
throws ObjectNotFoundException
directoryID - the directory associated to Application'sgroupName - the name of the group to remove
ObjectNotFoundException - if the given Directory cannot be found.
void removeDirectoryFromApplication(Directory directory,
Application application)
throws ApplicationManagerException
ApplicationDirectoryPermission's
GroupMapping's and it's
DirectoryMapping
directory - the directory you wish to disociateapplication - the application you wish to apply this dissociation too
ApplicationManagerException - thrown if anything goes bad, updating the application
void removeDirectoryFromAllApplications(Directory directory)
throws ApplicationManagerException
ApplicationDirectoryPermission's
GroupMapping's and it's
DirectoryMapping
From all applications
directory - the directory to remove from all applications
ApplicationManagerException - thrown if anything goes bad updating an application
void removeGroup(Application application,
java.lang.String group)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - remove from application's assigned directories.group - the name of the principal to remove.
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.
void removePrincipal(Application application,
java.lang.String principal)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - remove from application's assigned directories.principal - the name of the principal to remove.
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.
void removePrincipalAttribute(Application application,
java.lang.String principal,
java.lang.String attribute)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - update in application's assigned directories.principal - name of principal.attribute - attribute name.
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.
void removePrincipalFromGroup(Application application,
java.lang.String principal,
java.lang.String group)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - modify groups in application's assigned directories.principal - principal name.group - group name.
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.
void removePrincipalFromRole(Application application,
java.lang.String principal,
java.lang.String role)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - modify roles in application's assigned directories.principal - principal name.role - role name.
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.
void removeRole(Application application,
java.lang.String role)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - remove from application's assigned directories.role - the name of the principal to remove.
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.
void resetPrincipalCredential(Application application,
java.lang.String principal)
throws java.rmi.RemoteException,
ObjectNotFoundException,
InvalidCredentialException,
ApplicationPermissionException
application - update in application's assigned directories.principal - name of principal.
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 existjava.util.List search(SearchContext searchContext)
java.util.Collection searchGroups(Application application,
SearchContext searchContext)
throws java.rmi.RemoteException
application - search application's assigned directories.searchContext - search criteria.
java.rmi.RemoteException - error thrown by directory implementation.
java.util.Collection searchPrincipals(Application application,
SearchContext searchContext)
throws java.rmi.RemoteException
application - search application's assigned directories.searchContext - search criteria.
java.rmi.RemoteException - error thrown by directory implementation.
java.util.Collection searchRoles(Application application,
SearchContext searchContext)
throws java.rmi.RemoteException
application - search application's assigned directories.searchContext - search criteria.
java.rmi.RemoteException - error thrown by directory implementation.
Application update(Application application)
throws ApplicationManagerException
ApplicationManagerException
Application updateCredentials(Application application)
throws ApplicationManagerException,
InvalidCredentialException
application - an application with unencrypted password credentials
ApplicationManagerException
InvalidCredentialException
void updateGroup(Application application,
java.lang.String name,
java.lang.String description,
boolean active)
throws java.rmi.RemoteException,
ApplicationPermissionException,
ObjectNotFoundException
description and active
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.
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.
void updatePrincipalAttribute(Application application,
java.lang.String name,
java.lang.String attribute,
AttributeValues values)
throws java.rmi.RemoteException,
ObjectNotFoundException,
ApplicationPermissionException
application - update in application's assigned directories.name - name of principal.attribute - attribute name.values - Listjava.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.
void updatePrincipalCredential(Application application,
java.lang.String principal,
PasswordCredential credential)
throws java.rmi.RemoteException,
ObjectNotFoundException,
InvalidCredentialException,
ApplicationPermissionException
application - update in application's assigned directories.principal - name of principal.credential - new credentials.
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.
void updateRole(Application application,
java.lang.String name,
java.lang.String description,
boolean active)
throws java.rmi.RemoteException,
ApplicationPermissionException,
ObjectNotFoundException
description and active
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.
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.
Token validateToken(java.lang.String token,
ValidationFactor[] clientValidationFactors)
throws ApplicationManagerException,
InvalidTokenException
ApplicationManagerException
InvalidTokenException
Token validateToken(java.lang.String principalToken,
ValidationFactor[] validationFactors,
java.lang.String application)
throws ApplicationManagerException,
InvalidTokenException,
java.rmi.RemoteException
ApplicationManagerException
InvalidTokenException
java.rmi.RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||