|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DirectoryManager
Method Summary | |
---|---|
BulkAddResult<RemoteGroup> |
addAllGroups(long directoryID,
java.util.Collection<RemoteGroup> groups,
boolean overwrite)
Will add a collection of RemoteGroup to the directory specified by the passed in directoryId param. |
BulkAddResult<RemotePrincipal> |
addAllPrincipals(long directoryID,
java.util.Collection<RemotePrincipal> principals,
boolean overwrite)
Will add a collection of RemotePrincipal to the directory specified by the passed in directoryId param. |
BulkAddResult<java.lang.String> |
addAllPrincipalsToGroup(long directoryID,
java.util.Collection<java.lang.String> principalNames,
java.lang.String groupName)
A bulk version of addPrincipalToGroup . |
BulkAddResult<java.lang.String> |
addAllPrincipalsToRole(long directoryID,
java.util.Collection<java.lang.String> principalNames,
java.lang.String roleName)
A bulk version of addPrincipalToRole . |
BulkAddResult<RemoteRole> |
addAllRoles(long directoryID,
java.util.Collection<RemoteRole> roles,
boolean overwrite)
Will add a collection of RemoteRole to the directory specified by the passed in directoryId param. |
Directory |
addDirectory(Directory directory)
Will add the given directory |
RemoteGroup |
addGroup(long directoryID,
RemoteGroup group)
Will add a RemoteGroup to the directory specified by the passed in directoryId param. |
RemotePrincipal |
addPrincipal(long directoryID,
RemotePrincipal principal)
Will add a RemotePrincipal to the directory specified by the passed in directoryId param. |
void |
addPrincipalAttribute(long directoryID,
RemotePrincipal principal,
java.lang.String attribute,
AttributeValues values)
Will add a given attribute and its values to a given principal, in the specified directory. |
void |
addPrincipalToGroup(long directoryID,
java.lang.String name,
java.lang.String groupName)
|
void |
addPrincipalToRole(long directoryID,
java.lang.String name,
java.lang.String unsubscribedRole)
|
RemoteRole |
addRole(long directoryID,
RemoteRole role)
Will add a RemoteRole to the given directory |
void |
expireToken(java.lang.String key)
|
Directory |
findDirectoryByID(long directoryID)
Will return a Directory based on the passed in directoryId |
Directory |
findDirectoryByName(java.lang.String name)
Will find a directory given the supplied name |
RemoteGroup |
findGroupByName(long directoryID,
java.lang.String name)
Will return a RemoteGroup, with all members populated. |
RemoteGroup |
findGroupByName(long directoryID,
java.lang.String name,
boolean onlyFetchDirectMembers)
Will return a RemoteGroup with members populated. |
java.util.List<RemoteGroup> |
findGroupMemberships(long directoryID,
java.lang.String principal)
Finds all of the group memberships for a given principal. |
RemotePrincipal |
findPrincipalByName(long directoryID,
java.lang.String username)
|
RemotePrincipal |
findPrincipalByToken(java.lang.String key)
Will find a principal via the passed in token key |
RemoteRole |
findRoleByName(long directoryID,
java.lang.String name)
|
java.util.List<RemoteRole> |
findRoleMemberships(long directoryID,
java.lang.String principal)
Finds all of the role memberships for a given principal. |
void |
invalidateToken(java.lang.String token)
Will attempt to invalidate a Token based on the passed in Token key |
boolean |
isGroupMember(long directoryID,
java.lang.String group,
java.lang.String username)
|
boolean |
isRoleMember(long directoryID,
java.lang.String role,
java.lang.String username)
|
void |
removeDirectory(Directory directory)
Will remove a given directory and all its associated entities, groups, roles, principals and mappings |
void |
removeExpiredTokens()
|
void |
removeGroup(long directoryID,
java.lang.String name)
|
void |
removePrincipal(long directoryID,
java.lang.String name)
|
void |
removePrincipalAttribute(long directoryID,
RemotePrincipal principal,
java.lang.String attribute)
Will remove the given attribute from the given RemotePrincipal, in the specified directory |
void |
removePrincipalFromGroup(long directoryID,
java.lang.String name,
java.lang.String unsubscribedGroup)
|
void |
removePrincipalFromRole(long directoryID,
java.lang.String name,
java.lang.String removeRole)
|
void |
removeRole(long directoryID,
java.lang.String name)
|
void |
resetPassword(long directoryID,
java.lang.String name)
|
java.util.List<Directory> |
searchDirectories(SearchContext searchContext)
Will return a List of Directories for the given SearchContext |
java.util.List<RemoteGroup> |
searchGroups(SearchContext searchContext)
|
java.util.List<RemotePrincipal> |
searchPrincipals(SearchContext searchContext)
|
java.util.List<RemoteRole> |
searchRoles(SearchContext searchContext)
|
java.util.List<Token> |
searchTokens(SearchContext searchContext)
|
Directory |
updateDirectory(Directory directory)
Will update the passed in directory |
RemoteGroup |
updateGroup(long directoryID,
RemoteGroup group)
|
RemotePrincipal |
updatePrincipal(long directoryID,
RemotePrincipal principal)
|
void |
updatePrincipalCredential(long directoryID,
java.lang.String principal,
PasswordCredential credential)
This will update the Principals credentials in the given directory |
RemoteRole |
updateRole(long directoryID,
RemoteRole role)
|
Method Detail |
---|
Directory addDirectory(Directory directory) throws java.rmi.RemoteException
directory
- the Directory to add
java.rmi.RemoteException
- if there was an error instantiating the directoryRemotePrincipal addPrincipal(long directoryID, RemotePrincipal principal) throws InvalidCredentialException, InvalidPrincipalException, java.rmi.RemoteException, DirectoryPermissionException, ObjectNotFoundException
directoryId
param.
directoryID
- the directory to add the RemotePrincipal too.principal
- the RemotePrincipal to add.
InvalidCredentialException
- if the Principal's credential does not meet the validation requirements for the given directory
InvalidPrincipalException
- if the Principal already exists in the given Directory
java.rmi.RemoteException
- if there was an error adding the RemotePrincipal or instantiating the Directory
DirectoryPermissionException
- if there is no ADD_PRINCIPAL permission for the given directory
ObjectNotFoundException
- if the directory with the given directoryId cannot be foundRemoteGroup addGroup(long directoryID, RemoteGroup group) throws InvalidGroupException, java.rmi.RemoteException, DirectoryPermissionException, ObjectNotFoundException
directoryId
param.
directoryID
- the directory to add the RemoteGroup too.group
- the RemoteGroup to add.
InvalidGroupException
- if the group with the given name already exists.
java.rmi.RemoteException
- if there was an error adding the RemoteGroup or instantiating the Directory
DirectoryPermissionException
- if there is no ADD_GROUP permission for the given directory
ObjectNotFoundException
- if the directory with the given id cannot be found.Directory findDirectoryByID(long directoryID) throws ObjectNotFoundException
directoryId
directoryID
- the id of the directory to find
ObjectNotFoundException
- is thrown if the Directory cannot be found.void invalidateToken(java.lang.String token)
token
- the token key to invalidatejava.util.List<Directory> searchDirectories(SearchContext searchContext)
searchContext
- the context to search on
Directory findDirectoryByName(java.lang.String name) throws ObjectNotFoundException
name
name
- the name of the directory
name
ObjectNotFoundException
- if no Directory is foundDirectory updateDirectory(Directory directory) throws ObjectNotFoundException
directory
- the directory with updated attrbutes
ObjectNotFoundException
- if no Directory is foundvoid removeDirectory(Directory directory) throws DirectoryManagerException, ObjectNotFoundException
directory
- the directory to remove
DirectoryManagerException
- if there was a generic error removing the directory
ObjectNotFoundException
- if the directory cannot be foundjava.util.List<RemoteGroup> searchGroups(SearchContext searchContext) throws DirectoryManagerException, java.rmi.RemoteException
DirectoryManagerException
java.rmi.RemoteException
java.util.List<RemoteRole> searchRoles(SearchContext searchContext) throws DirectoryManagerException, java.rmi.RemoteException
DirectoryManagerException
java.rmi.RemoteException
java.util.List<RemotePrincipal> searchPrincipals(SearchContext searchContext) throws DirectoryManagerException, java.rmi.RemoteException
DirectoryManagerException
java.rmi.RemoteException
RemoteGroup findGroupByName(long directoryID, java.lang.String name) throws ObjectNotFoundException, java.rmi.RemoteException
directoryID
- The ID of the directory to searchname
- The name of the group whose details we're after
RemoteGroup
containing details and members.
ObjectNotFoundException
java.rmi.RemoteException
RemoteGroup findGroupByName(long directoryID, java.lang.String name, boolean onlyFetchDirectMembers) throws ObjectNotFoundException, java.rmi.RemoteException
onlyFetchDirectMembers
is true, the members
will be those objects that are direct members of the group. This means that you could see RemoteGroup
s
in the response. If onlyFetchDirectMembers
is false, it behaves identically to its overloaded cousin.
directoryID
- name
- onlyFetchDirectMembers
-
ObjectNotFoundException
java.rmi.RemoteException
RemoteRole findRoleByName(long directoryID, java.lang.String name) throws ObjectNotFoundException, java.rmi.RemoteException
ObjectNotFoundException
java.rmi.RemoteException
RemoteGroup updateGroup(long directoryID, RemoteGroup group) throws ObjectNotFoundException, java.rmi.RemoteException, DirectoryPermissionException
ObjectNotFoundException
java.rmi.RemoteException
DirectoryPermissionException
RemoteRole addRole(long directoryID, RemoteRole role) throws InvalidRoleException, java.rmi.RemoteException, DirectoryPermissionException, ObjectNotFoundException
directoryID
- the directory to add the role too.role
- the RemoteRole to add
InvalidRoleException
- thrown if the role already exists
java.rmi.RemoteException
- if there is an error instansiating the directory or adding the RemoteRole
DirectoryPermissionException
- if there is no ADD_ROLE permission for the given directory
ObjectNotFoundException
- if the diretory with the given id cannot be found.RemoteRole updateRole(long directoryID, RemoteRole role) throws ObjectNotFoundException, java.rmi.RemoteException, DirectoryPermissionException
ObjectNotFoundException
java.rmi.RemoteException
DirectoryPermissionException
void removeGroup(long directoryID, java.lang.String name) throws ObjectNotFoundException, DirectoryPermissionException, java.rmi.RemoteException
ObjectNotFoundException
DirectoryPermissionException
java.rmi.RemoteException
void removeRole(long directoryID, java.lang.String name) throws ObjectNotFoundException, DirectoryPermissionException, java.rmi.RemoteException
ObjectNotFoundException
DirectoryPermissionException
java.rmi.RemoteException
void removePrincipalFromGroup(long directoryID, java.lang.String name, java.lang.String unsubscribedGroup) throws ObjectNotFoundException, java.rmi.RemoteException, DirectoryPermissionException
ObjectNotFoundException
java.rmi.RemoteException
DirectoryPermissionException
void removePrincipalFromRole(long directoryID, java.lang.String name, java.lang.String removeRole) throws ObjectNotFoundException, java.rmi.RemoteException, DirectoryPermissionException
ObjectNotFoundException
java.rmi.RemoteException
DirectoryPermissionException
void removePrincipal(long directoryID, java.lang.String name) throws ObjectNotFoundException, DirectoryPermissionException, java.rmi.RemoteException
ObjectNotFoundException
DirectoryPermissionException
java.rmi.RemoteException
RemotePrincipal findPrincipalByName(long directoryID, java.lang.String username) throws ObjectNotFoundException, java.rmi.RemoteException
ObjectNotFoundException
java.rmi.RemoteException
RemotePrincipal updatePrincipal(long directoryID, RemotePrincipal principal) throws ObjectNotFoundException, java.rmi.RemoteException, DirectoryPermissionException
ObjectNotFoundException
java.rmi.RemoteException
DirectoryPermissionException
void addPrincipalToGroup(long directoryID, java.lang.String name, java.lang.String groupName) throws ObjectNotFoundException, java.rmi.RemoteException, DirectoryPermissionException
ObjectNotFoundException
java.rmi.RemoteException
DirectoryPermissionException
void addPrincipalToRole(long directoryID, java.lang.String name, java.lang.String unsubscribedRole) throws ObjectNotFoundException, java.rmi.RemoteException, DirectoryPermissionException
ObjectNotFoundException
java.rmi.RemoteException
DirectoryPermissionException
java.util.List<Token> searchTokens(SearchContext searchContext) throws DirectoryManagerException
DirectoryManagerException
void expireToken(java.lang.String key) throws ObjectNotFoundException, DirectoryManagerException
ObjectNotFoundException
DirectoryManagerException
void removeExpiredTokens() throws DirectoryManagerException
DirectoryManagerException
void resetPassword(long directoryID, java.lang.String name) throws ObjectNotFoundException, java.rmi.RemoteException, InvalidEmailAddressException, DirectoryPermissionException, InvalidCredentialException
ObjectNotFoundException
java.rmi.RemoteException
InvalidEmailAddressException
DirectoryPermissionException
InvalidCredentialException
boolean isRoleMember(long directoryID, java.lang.String role, java.lang.String username) throws java.rmi.RemoteException
java.rmi.RemoteException
boolean isGroupMember(long directoryID, java.lang.String group, java.lang.String username) throws java.rmi.RemoteException
java.rmi.RemoteException
RemotePrincipal findPrincipalByToken(java.lang.String key) throws InvalidTokenException, java.rmi.RemoteException
key
- the token key
InvalidTokenException
- if the RemotePrincipal or Directory cannot be found that relates to the given token,
or the token is associated to an Application and not a RemotePrincipal
java.rmi.RemoteException
- if there was an issue accessing the underlying directoryvoid updatePrincipalCredential(long directoryID, java.lang.String principal, PasswordCredential credential) throws java.rmi.RemoteException, DirectoryPermissionException, InvalidCredentialException, ObjectNotFoundException
directoryID
- the directory the principal belongs tooprincipal
- the principals usernamecredential
- the updated password credential for the principal
java.rmi.RemoteException
- if there was an error instansiating or accessing the underlying directory
DirectoryPermissionException
- if there is no MODIFY_PRINCIPAL permission for the given directory
InvalidCredentialException
- if the Principal's credential does not meet the validation requirements for the given directory
ObjectNotFoundException
- if the directory of principal cannot be foundjava.util.List<RemoteGroup> findGroupMemberships(long directoryID, java.lang.String principal) throws ObjectNotFoundException, java.rmi.RemoteException
directoryID
- The directory to search.principal
- The principal name.
groups
the principal is a member of.
ObjectNotFoundException
- Unable to find the principal in the specified diretory.
java.rmi.RemoteException
- generic exception on the remote directory.java.util.List<RemoteRole> findRoleMemberships(long directoryID, java.lang.String principal) throws ObjectNotFoundException, java.rmi.RemoteException
directoryID
- The directory to search.principal
- The principal name.
roles
the principal is a member of.
ObjectNotFoundException
- Unable to find the principal in the specified diretory.
java.rmi.RemoteException
- generic exception on the remote directory.void addPrincipalAttribute(long directoryID, RemotePrincipal principal, java.lang.String attribute, AttributeValues values) throws java.rmi.RemoteException, DirectoryPermissionException, ObjectNotFoundException
directoryID
- the directory id that the principal should belong tooprincipal
- the RemotePrincipal to associate the attribute and its values too.attribute
- the attribute that you are addingvalues
- the values of the given attribute
java.rmi.RemoteException
- if there was an error instansitating the directory or updating the principal
DirectoryPermissionException
- if the directory doesn't have the PermissionType.MODIFY_PRINCIPAL permission
ObjectNotFoundException
- if the directory or RemotePrincipal cannot be foundvoid removePrincipalAttribute(long directoryID, RemotePrincipal principal, java.lang.String attribute) throws java.rmi.RemoteException, DirectoryPermissionException, ObjectNotFoundException
directoryID
- the directory id that the principal should belong tooprincipal
- the RemotePrincipal to remote the attribute fromattribute
- the attribute to remove
java.rmi.RemoteException
- if there was an error instansitating the directory or updating the principal
DirectoryPermissionException
- if the directory doesn't have the PermissionType.MODIFY_PRINCIPAL permission
ObjectNotFoundException
- if the directory or RemotePrincipal cannot be foundBulkAddResult<RemotePrincipal> addAllPrincipals(long directoryID, java.util.Collection<RemotePrincipal> principals, boolean overwrite) throws DirectoryPermissionException, java.rmi.RemoteException, ObjectNotFoundException
directoryId
param.
If adding a principal fails then this principal will be skipped
and the error will be reported in the logs.
directoryID
- the directory to add the RemotePrincipal too.principals
- the RemotePrincipals to add.overwrite
- true
if you want to remove any existing principal matching a username in the principals to add prior to adding the user.
false
if you want to skip over principals that already exist (same username exists).
java.rmi.RemoteException
- if there was an error adding the RemotePrincipal or instantiating the Directory
DirectoryPermissionException
- if there is no ADD_PRINCIPAL permission for the given directory
ObjectNotFoundException
- if the directory with the given directoryId cannot be foundBulkAddResult<RemoteGroup> addAllGroups(long directoryID, java.util.Collection<RemoteGroup> groups, boolean overwrite) throws DirectoryPermissionException, java.rmi.RemoteException, ObjectNotFoundException
directoryId
param.
If adding a group fails then this principal will be skipped
and the error will be reported in the logs.
directoryID
- the directory to add the RemoteGroup too.groups
- the RemoteGroups to add.overwrite
- true
if you want to remove any existing group matching a username in the groups to add prior to adding the group.
false
if you want to skip over groups that already exist (same group name exists).
java.rmi.RemoteException
- if there was an error adding the RemoteGroup or instantiating the Directory
DirectoryPermissionException
- if there is no ADD_GROUP permission for the given directory
ObjectNotFoundException
- if the directory with the given directoryId cannot be foundBulkAddResult<RemoteRole> addAllRoles(long directoryID, java.util.Collection<RemoteRole> roles, boolean overwrite) throws DirectoryPermissionException, java.rmi.RemoteException, ObjectNotFoundException
directoryId
param.
If adding a role fails then this principal will be skipped
and the error will be reported in the logs.
directoryID
- the directory to add the RemoteRole too.roles
- the RemoteRoles to add.overwrite
- true
if you want to remove any existing role matching a username in the roles to add prior to adding the role.
false
if you want to skip over roles that already exist (same role name exists).
java.rmi.RemoteException
- if there was an error adding the RemoteRole or instantiating the Directory
DirectoryPermissionException
- if there is no ADD_ROLE permission for the given directory
ObjectNotFoundException
- if the directory with the given directoryId cannot be foundBulkAddResult<java.lang.String> addAllPrincipalsToGroup(long directoryID, java.util.Collection<java.lang.String> principalNames, java.lang.String groupName) throws DirectoryPermissionException, java.rmi.RemoteException, ObjectNotFoundException
addPrincipalToGroup
.
If creating a particular membership fails, it will be
skipped and the error will be reported in the logs.
directoryID
- the directory to add the membership to.principalNames
- usernames of users to add membership to.groupName
- name of group to add users to.
java.rmi.RemoteException
- if there was an error adding the RemoteRole or instantiating the Directory
DirectoryPermissionException
- if there is no ADD_ROLE permission for the given directory
ObjectNotFoundException
- if the directory with the given directoryId cannot be foundBulkAddResult<java.lang.String> addAllPrincipalsToRole(long directoryID, java.util.Collection<java.lang.String> principalNames, java.lang.String roleName) throws DirectoryPermissionException, java.rmi.RemoteException, ObjectNotFoundException
addPrincipalToRole
.
If creating a particular membership fails, it will be
skipped and the error will be reported in the logs.
directoryID
- the directory to add the membership to.principalNames
- usernames of users to add membership to.roleName
- name of role to add users to.
java.rmi.RemoteException
- if there was an error adding the RemoteRole or instantiating the Directory
DirectoryPermissionException
- if there is no ADD_ROLE permission for the given directory
ObjectNotFoundException
- if the directory with the given directoryId cannot be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |