com.atlassian.crowd.embedded.api.CrowdService |
![]() |
Provides the interface for performing User and Group operations in Crowd for applications embedding Crowd.
getDirectoryId()
is ignored in all methods having User
in the parameter list. Null parameters
for methods may throw NullPointerException or IllegalArgumentException.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a
group to the directory store. | |||||||||||
Adds a group as a member of a parent group.
| |||||||||||
Adds a
user to the directory store. | |||||||||||
Adds a user as a member of a group.
| |||||||||||
Authenticates a
user with the given credential. | |||||||||||
Finds the
group that matches the supplied name . | |||||||||||
Finds the
group that matches the supplied name . | |||||||||||
Returns the
user that matches the supplied name . | |||||||||||
Returns the
user that matches the supplied name . | |||||||||||
Determines if a group is a direct member of another group.
| |||||||||||
Returns
true if childGroupName is a direct or indirect (nested) member of parentGroupName . | |||||||||||
Returns
true if the childGroup is a direct or indirect (nested) member of the parentGroup . | |||||||||||
Determines if a user is a direct member of a group.
| |||||||||||
Returns
true if the user is a direct or indirect (nested) member of the group. | |||||||||||
Returns
true if the user is a direct or indirect (nested) member of the group. | |||||||||||
Removes all group attributes.
| |||||||||||
Remove all attributes for a user.
| |||||||||||
Removes the
group that matches the supplied name . | |||||||||||
Removes all the values for a single attribute key for a group.
| |||||||||||
Removes a group as a member of a parent group.
| |||||||||||
Removes the
user that matches the supplied name . | |||||||||||
Removes all the values for a single attribute key for a user.
| |||||||||||
Removes a user as a member of a group.
| |||||||||||
Searches for entities (e.g.
| |||||||||||
Searches for
User entities that match the supplied search query. | |||||||||||
Adds or updates a group's attributes with the new
attributes . | |||||||||||
Adds or updates a group's attributes with the new attributes.
| |||||||||||
Adds or updates a user's attribute with the new attribute value.
| |||||||||||
Adds or updates a user's attribute with the new attribute values.
| |||||||||||
Updates the
group . | |||||||||||
Updates the
User . | |||||||||||
Adds a group
to the directory store.
group | template of the group to add. |
---|
InvalidGroupException | if the group already exists in ANY associated directory or the group template does not have the required properties populated. |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Adds a group as a member of a parent group. Cyclic group membership are allowed (mainly because LDAP allows it) but not recommended. I.e. group A can have group B as its member and group B can have group A as its member at the same time.
childGroup | The group that will become a member of parentGroup |
---|---|
parentGroup | The group that will gain a new member |
GroupNotFoundException | if any of the group could not be found. Use getGroupName()
to find out which group wasn't found |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
InvalidMembershipException | If the relationship would cause a circular reference. |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Adds a user
to the directory store. The user must have non-null names and email address.
user | template of the user to add. |
---|---|
credential | password. May not be null or blank. |
InvalidUserException | The supplied user's details are invalid and/or incomplete. |
---|---|
InvalidCredentialException | The supplied credential is invalid, this may be due the credential not matching required directory constraints. |
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | if the operation failed for any other reason |
Adds a user as a member of a group. This means that all user members of childGroup
will
appear as members of parentGroup
to querying applications.
user | The user that will become a member of the group |
---|---|
group | The group that will gain a new member. |
UserNotFoundException | if the user could not be found |
---|---|
GroupNotFoundException | if the group could not be found |
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Authenticates a user
with the given credential.
name | The name of the user (username). |
---|---|
credential | The supplied credential to authenticate with |
FailedAuthenticationException | Authentication with the provided credentials failed. It may indicate that the user does not exist or the user's account is inactive or the credentials are incorrect |
---|---|
InactiveAccountException | The supplied user is inactive. |
ExpiredCredentialException | The user's credentials have expired. The user must change their credentials in order to successfully authenticate. |
AccountNotFoundException | User with the given name could not be found |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Finds the group
that matches the supplied name
.
name | the name of the group. |
---|
null
if not found.
Finds the group
that matches the supplied name
.
name | the name of the group. |
---|
null
if not found.
Returns the user
that matches the supplied name
.
name | the name of the user (username). Does not allow null, blank or empty strings. |
---|
null
if the user is not found
Returns the user
that matches the supplied name
.
name | the name of the user (username). |
---|
null
if the user is not found
Determines if a group is a direct member of another group.
childGroup | the group for which to check the parentGroup membership |
---|---|
parentGroup | the group the childGroup is believed to belong to |
true
if the childGroup
is a direct member of the parentGroup
, false
otherwise
(including if neither group could be found)OperationFailedException | underlying directory implementation failed to execute the operation. |
---|
Returns true
if childGroupName
is a direct or indirect (nested) member of parentGroupName
.
childGroupName | name of child group to inspect. |
---|---|
parentGroupName | name of parent group to inspect. |
true
if and only if the childGroupName
is a direct or indirect (nested) member of the parentGroupName
.
If any of the groups cannot found, then false
is returned.
Returns true
if the childGroup
is a direct or indirect (nested) member of the parentGroup
.
childGroup | group to inspect. |
---|---|
parentGroup | group to inspect. |
true
if and only if the childGroup
is a direct or indirect (nested) member of the parentGroup
.
If any of the groups cannot found, then false
is returned.
Determines if a user is a direct member of a group.
user | the user for whom to check the group membership |
---|---|
group | the group the user is believed to belong to |
true
if the user is a direct member of the group, false
otherwise
(including if the user and/or group could not be found)OperationFailedException | underlying directory implementation failed to execute the operation. |
---|
Returns true
if the user is a direct or indirect (nested) member of the group.
userName | user to inspect. |
---|---|
groupName | group to inspect. |
true
if and only if the user is a direct or indirect (nested) member of the group.
If the user or group cannot found, then false
is returned.Returns true
if the user is a direct or indirect (nested) member of the group.
user | user to inspect. |
---|---|
group | group to inspect. |
true
if and only if the user is a direct or indirect (nested) member of the group, otherwise false.
If the user or group cannot found, then false
is returned.Removes all group attributes.
group | to update. |
---|
GroupNotFoundException | if the group could not be found |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Remove all attributes for a user.
user | user to update. |
---|
UserNotFoundException | user with supplied username does not exist. |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Removes the group
that matches the supplied name
.
group | to remove |
---|
OperationNotPermittedException | if the directory does not allow removal of this group |
---|---|
OperationFailedException | underlying directory implementation failed to execute the operation. |
Removes all the values for a single attribute key for a group.
group | to update. |
---|---|
attributeName | name of attribute to remove. |
GroupNotFoundException | if the group could not be found |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Removes a group as a member of a parent group.
childGroup | The group that will be removed from parentGroup |
---|---|
parentGroup | The group that will lose the member. |
GroupNotFoundException | if any of the groups could not be found. Use getGroupName()
to find out which group wasn't found |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | if the operation failed for any other reason |
Removes the user
that matches the supplied name
.
user | user to remove. |
---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
---|---|
OperationFailedException | underlying directory implementation failed to execute the operation. |
Removes all the values for a single attribute key for a user.
user | user to update. |
---|---|
attributeName | name of attribute to remove. |
UserNotFoundException | user with supplied username does not exist. |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Removes a user as a member of a group.
user | The user that will be removed from the group |
---|---|
group | The group that will lose the member. |
UserNotFoundException | if the user could not be found |
---|---|
GroupNotFoundException | if the group could not be found |
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | if the operation failed for any other reason |
Adds or updates a group's attributes with the new attributes
. The attributes represents new or
updated attributes and does not replace existing attributes unless the key of an attribute matches the key of an
existing. This will not remove any attributes.
group | name of group to update. |
---|---|
attributeName | the name up the attribute to add or update |
attributeValues | a set of values to update |
GroupNotFoundException | if the group could not be found |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Adds or updates a group's attributes with the new attributes. The attributes represents new or updated attributes and does not replace existing attributes unless the key of an attribute matches the key of an existing. This will not remove any attributes.
group | name of group to update. |
---|---|
attributeName | the name up the attribute to add or update |
attributeValue | the value of the attribute |
GroupNotFoundException | if the group could not be found |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Adds or updates a user's attribute with the new attribute value. The attributes represents new or updated attributes and does not replace existing attributes unless the key of an attribute matches the key of an existing attribute. This will not remove any attributes.
user | user to update. |
---|---|
attributeName | the name of the attribute |
attributeValue | the new value of the attribute; any existing values will be replaced |
UserNotFoundException | the supplied user does not exist. |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Adds or updates a user's attribute with the new attribute values. The attributes represents new or updated attributes and does not replace existing attributes unless the key of an attribute matches the key of an existing. This will not remove any attributes.
user | user to update. |
---|---|
attributeName | the name of the attribute |
attributeValues | the new set of values; any existing values will be replaced |
UserNotFoundException | the supplied user does not exist. |
---|---|
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Updates the group
.
group | The group to update. |
---|
GroupNotFoundException | if group with given name does not exist in ANY assigned directory. |
---|---|
InvalidGroupException | the supplied group is invalid. |
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
Updates the User
. The user must have non-null names and email address.
user | The user to update. |
---|
Directory
UserNotFoundException | if the supplied user does not exist in the directory . |
---|---|
InvalidUserException | The supplied user's details are invalid and/or incomplete. |
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |
user | The name of the user (username). |
---|---|
credential | The new credential (password). May not be null or blank. |
InvalidCredentialException | The supplied credential is invalid, this may be due the credential not matching required directory constraints. |
---|---|
UserNotFoundException | if the supplied user does not exist in the directory . |
OperationNotPermittedException | if the directory has been configured to not allow the operation to be performed |
OperationFailedException | underlying directory implementation failed to execute the operation. |