|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RemoteDirectory
Gateway to perform operations on the physical remote directory.
Implementations will be provided an directoryId and Map of attributes.
| Method Summary | |
|---|---|
Group |
addGroup(GroupTemplate group)
Adds a group to the directory store. |
void |
addGroupToGroup(java.lang.String childGroup,
java.lang.String parentGroup)
Adds a group as a member of a parent group. |
User |
addUser(UserTemplate user,
PasswordCredential credential)
Adds a user to the directory store. |
void |
addUserToGroup(java.lang.String username,
java.lang.String groupName)
Adds a user as a member of a group. |
User |
authenticate(java.lang.String name,
PasswordCredential credential)
Authenticates a user with the directory store. |
Group |
findGroupByName(java.lang.String name)
Finds the group that matches the supplied name. |
GroupWithAttributes |
findGroupWithAttributesByName(java.lang.String name)
Finds the group that matches the supplied name. |
User |
findUserByName(java.lang.String name)
Finds the user that matches the supplied name. |
UserWithAttributes |
findUserWithAttributesByName(java.lang.String name)
Finds the user that matches the supplied name. |
java.lang.String |
getDescriptiveName()
Returns a descriptive name for the type of directory. |
long |
getDirectoryId()
Gets the internal unique directoryId of the directory store. |
boolean |
isGroupDirectGroupMember(java.lang.String childGroup,
java.lang.String parentGroup)
Determines if a group is a direct member of another group. |
boolean |
isUserDirectGroupMember(java.lang.String username,
java.lang.String groupName)
Determines if a user is a direct member of a group. |
void |
removeGroup(java.lang.String name)
Removes the group that matches the supplied name. |
void |
removeGroupAttributes(java.lang.String groupName,
java.lang.String attributeName)
Removes all the values for a single attribute key for a group. |
void |
removeGroupFromGroup(java.lang.String childGroup,
java.lang.String parentGroup)
Removes a group as a member of a parent group. |
void |
removeUser(java.lang.String name)
Removes the user that matches the supplied name. |
void |
removeUserAttributes(java.lang.String username,
java.lang.String attributeName)
Removes all the values for a single attribute key for a user. |
void |
removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
Removes a user as a member of a group. |
Group |
renameGroup(java.lang.String oldName,
java.lang.String newName)
Renames a group. |
User |
renameUser(java.lang.String oldName,
java.lang.String newName)
Renames a user. |
java.util.List |
searchGroupRelationships(MembershipQuery query)
Searches for membership information. |
java.util.List |
searchGroups(EntityQuery query)
Searches for groups that match the supplied query criteria. |
java.util.List |
searchUsers(EntityQuery query)
Searches for users that match the supplied query criteria. |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
When a directory store is loaded, the attributes map will be set by the Crowd framework. |
void |
setDirectoryId(long directoryId)
When a directory store is loaded, the directoryId will be set by the
crowd framework. |
void |
storeGroupAttributes(java.lang.String groupName,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributes)
Adds or updates a group's attributes with the new Map of attribute values in the directory specified by the passed in directoryId. |
void |
storeUserAttributes(java.lang.String username,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributes)
Adds or updates a user's attributes with the new Map of attribute values in the directory specified by the passed in directoryId. |
boolean |
supportsNestedGroups()
Allows us to only display nested-group related UI for directories that support it. |
void |
testConnection()
Test if a connection to the directory server can be established. |
Group |
updateGroup(GroupTemplate group)
Updates the group. |
User |
updateUser(UserTemplate user)
Updates the user. |
void |
updateUserCredential(java.lang.String username,
PasswordCredential credential)
Updates the password for a user. |
| Methods inherited from interface com.atlassian.crowd.integration.model.AttributeAware |
|---|
getAttribute, getAttributeNames, getAttributes, hasAttribute |
| Method Detail |
|---|
long getDirectoryId()
directoryId of the directory store.
directoryId.void setDirectoryId(long directoryId)
directoryId will be set by the
crowd framework.
directoryId - The unique directoryId of the Directory stored in the database.java.lang.String getDescriptiveName()
void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes - attributes map.
User findUserByName(java.lang.String name)
throws ObjectNotFoundException
user that matches the supplied name.
name - the name of the user (username).
ObjectNotFoundException - a user with the supplied name does not exist.
UserWithAttributes findUserWithAttributesByName(java.lang.String name)
throws ObjectNotFoundException
user that matches the supplied name.
name - the name of the user (username).
ObjectNotFoundException - a user with the supplied name does not exist.
User authenticate(java.lang.String name,
PasswordCredential credential)
throws ObjectNotFoundException,
InactiveAccountException,
InvalidAuthenticationException
user with the directory store.
name - The name of the user (username).credential - The supplied credentials (password).
InactiveAccountException - The supplied user is inactive.
InvalidAuthenticationException - Authentication with the provided credentials failed.
ObjectNotFoundException - The user wth the supplied name does not exist.
User addUser(UserTemplate user,
PasswordCredential credential)
throws InvalidUserException,
ObjectNotFoundException,
InvalidCredentialException
user to the directory store.
user - template of the user to add.credential - password. May be null, since JIRA creates a user in two steps (user THEN password)
InvalidUserException - The supplied user is invalid.
ObjectNotFoundException - The user could not be looked up after creation or the directory with the ID of user.directoryId does not exist.
InvalidCredentialException - The supplied credential is invalid.
User updateUser(UserTemplate user)
throws InvalidUserException,
ObjectNotFoundException
user.
user - The user to update.
ObjectNotFoundException - the user does not exist in the directory store.
InvalidUserException - the supplied user is invalid.
void updateUserCredential(java.lang.String username,
PasswordCredential credential)
throws ObjectNotFoundException,
InvalidCredentialException
password for a user.
username - The name of the user (username).credential - The new credential (password).
ObjectNotFoundException - The user does not exist.
InvalidCredentialException - The supplied credential is invalid.
User renameUser(java.lang.String oldName,
java.lang.String newName)
throws ObjectNotFoundException,
InvalidUserException
user.
oldName - name of existing user.newName - desired name of user.
ObjectNotFoundException - if the user with the existing name does not exist.
InvalidUserException - if the new username is invalid or already exists in the directory.
void storeUserAttributes(java.lang.String username,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributes)
throws ObjectNotFoundException
directoryId.
The attributes map represents new or updated attributes and does not replace existing attributes unless the key of an attribute
matches the key of an existing
username - name of user to update.attributes - new or updated attributes (attributes that don't need changing should not appear in this Map).
ObjectNotFoundException - user with supplied username does not exist.
void removeUserAttributes(java.lang.String username,
java.lang.String attributeName)
throws ObjectNotFoundException
username - name of the user to update.attributeName - name of attribute to remove.
ObjectNotFoundException - user with supplied username does not exist.
void removeUser(java.lang.String name)
throws ObjectNotFoundException
user that matches the supplied name.
name - The name of the user (username).
ObjectNotFoundException - The user does not exist.java.util.List searchUsers(EntityQuery query)
users that match the supplied query criteria.
query - EntityQuery for Entity.USER.
List<User> or List<String> of users/usernames
matching the search criteria. An empty List will be returned
if no users matching the criteria are found.
Group findGroupByName(java.lang.String name)
throws ObjectNotFoundException
group that matches the supplied name.
name - the name of the group.
ObjectNotFoundException - a group with the supplied name does not exist.
GroupWithAttributes findGroupWithAttributesByName(java.lang.String name)
throws ObjectNotFoundException
group that matches the supplied name.
name - the name of the group.
ObjectNotFoundException - a group with the supplied name does not exist.
Group addGroup(GroupTemplate group)
throws InvalidGroupException,
ObjectNotFoundException
group to the directory store.
group - template of the group to add.
InvalidGroupException - The supplied group is invalid.
ObjectNotFoundException - The group could not be looked up after creation or the directory with the ID of group.directoryId does not exist.
Group updateGroup(GroupTemplate group)
throws InvalidGroupException,
ObjectNotFoundException
group.
group - The group to update.
ObjectNotFoundException - the group does not exist in the directory store.
InvalidGroupException - the supplied group is invalid.
Group renameGroup(java.lang.String oldName,
java.lang.String newName)
throws ObjectNotFoundException,
InvalidGroupException
group.
oldName - name of existing group.newName - desired name of group.
ObjectNotFoundException - if the group with the existing name does not exist.
InvalidGroupException - if the new groupname is invalid or already exists in the directory.
void storeGroupAttributes(java.lang.String groupName,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributes)
throws ObjectNotFoundException
directoryId.
The attributes map represents new or updated attributes and does not replace existing attributes unless the key of an attribute
matches the key of an existing
groupName - name of group to update.attributes - new or updated attributes (attributes that don't need changing should not appear in this Map).
ObjectNotFoundException - group with supplied groupName does not exist.
void removeGroupAttributes(java.lang.String groupName,
java.lang.String attributeName)
throws ObjectNotFoundException
groupName - name of the group to update.attributeName - name of attribute to remove.
ObjectNotFoundException - group with supplied groupName does not exist.
void removeGroup(java.lang.String name)
throws ObjectNotFoundException
group that matches the supplied name.
name - The name of the group.
ObjectNotFoundException - The group does not exist.java.util.List searchGroups(EntityQuery query)
groups that match the supplied query criteria.
query - EntityQuery for Entity.GROUP.
List or List of groups/groupnames
matching the search criteria. An empty List will be returned
if no groups matching the criteria are found.
boolean isUserDirectGroupMember(java.lang.String username,
java.lang.String groupName)
username - name of user.groupName - name of group.
true iff the user is a direct member of the group.
boolean isGroupDirectGroupMember(java.lang.String childGroup,
java.lang.String parentGroup)
childGroup - name of child group.parentGroup - name of parent group.
true iff the childGroup is a direct member of the parentGroup.
void addUserToGroup(java.lang.String username,
java.lang.String groupName)
throws ObjectNotFoundException
childGroup will
appear as members of parentGroup to querying applications.
username - The user that will become a member of groupNamegroupName - The group that will gain a new member.
ObjectNotFoundException - If the user or group cannot be found.
void addGroupToGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws ObjectNotFoundException,
InvalidMembershipException
parentGroup - The group that will gain a new memberchildGroup - The group that will become a member of parentGroup
ObjectNotFoundException - One or both of the groups cannot be found.
InvalidMembershipException - if the childGroup and parentGroup exist but are of different GroupTypes.
void removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
throws ObjectNotFoundException,
MembershipNotFoundException
groupName - The group that will lose the member.username - The user that will be removed from parentGroup
ObjectNotFoundException - If either the user or group cannot be found.
MembershipNotFoundException - if the user is not a direct member of the group.
void removeGroupFromGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws ObjectNotFoundException,
InvalidMembershipException,
MembershipNotFoundException
parentGroup - The group that will lose the member.childGroup - The group that will be removed from parentGroup
ObjectNotFoundException - One or both of the groups cannot be found.
InvalidMembershipException - if the childGroup and parentGroup exist but are of different GroupTypes.
MembershipNotFoundException - if the childGroup is not a direct member of the parentGroup.java.util.List searchGroupRelationships(MembershipQuery query)
query - query for memberships.
void testConnection()
throws DirectoryAccessException
DirectoryAccessException - An unknown wire exception occurred.boolean supportsNestedGroups()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||