|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.plugin.rest.service.controller.AbstractResourceController
com.atlassian.crowd.plugin.rest.service.controller.UsersController
public class UsersController
Controller responsible for user management.
| Field Summary |
|---|
| Fields inherited from class com.atlassian.crowd.plugin.rest.service.controller.AbstractResourceController |
|---|
applicationManager, applicationService |
| Constructor Summary | |
|---|---|
UsersController(ApplicationService applicationService,
ApplicationManager applicationManager,
ForgottenLoginManager forgottenLoginManager)
|
|
| Method Summary | |
|---|---|
java.lang.String |
addUser(java.lang.String applicationName,
UserEntity userEntity)
Adds a new user. |
void |
addUserToGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName)
Adds a user to a group. |
UserEntity |
findUserByName(java.lang.String applicationName,
java.lang.String name,
com.atlassian.plugins.rest.common.Link userLink,
boolean expandAttributes)
Returns a UserEntity specified by the name. |
GroupEntity |
getDirectGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName,
java.net.URI baseUri)
Returns the specified group that the user is a direct member of. |
GroupEntityList |
getDirectGroups(java.lang.String applicationName,
java.lang.String userName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
Returns the groups that the user is a direct member of. |
GroupEntity |
getNestedGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName,
java.net.URI baseUri)
Returns the specified group that the user is a nested member of. |
GroupEntityList |
getNestedGroups(java.lang.String applicationName,
java.lang.String userName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
Returns the groups that the user is a nested member of. |
void |
removeUser(java.lang.String applicationName,
java.lang.String username)
Removes the user. |
void |
removeUserAttribute(java.lang.String applicationName,
java.lang.String username,
java.lang.String attributeName)
Removes the user attribute. |
void |
removeUserFromGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName)
Removes a user from a group. |
void |
requestPasswordReset(java.lang.String applicationName,
java.lang.String username)
Requests a password reset. |
void |
requestUsernames(java.lang.String applicationName,
java.lang.String email)
Requests an email to be sent containing usernames associated with the given email address. |
void |
storeUserAttributes(java.lang.String applicationName,
java.lang.String username,
MultiValuedAttributeEntityList attributes)
Stores (add/replace) the user attributes. |
java.lang.String |
updateUser(java.lang.String applicationName,
UserEntity userEntity)
Updates a user. |
void |
updateUserPassword(java.lang.String applicationName,
java.lang.String username,
java.lang.String password)
Updates a user's password. |
| Methods inherited from class com.atlassian.crowd.plugin.rest.service.controller.AbstractResourceController |
|---|
getApplication |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UsersController(ApplicationService applicationService,
ApplicationManager applicationManager,
ForgottenLoginManager forgottenLoginManager)
| Method Detail |
|---|
public UserEntity findUserByName(java.lang.String applicationName,
java.lang.String name,
com.atlassian.plugins.rest.common.Link userLink,
boolean expandAttributes)
throws UserNotFoundException
applicationName - name of the applicationname - name of the user to retrieveuserLink - link to the user resourceexpandAttributes - set to true if the attributes field should be expanded
UserNotFoundException - if the user could not be found
public java.lang.String addUser(java.lang.String applicationName,
UserEntity userEntity)
throws ApplicationPermissionException,
InvalidUserException,
InvalidCredentialException,
OperationFailedException
applicationName - name of the applicationuserEntity - new user to add
ApplicationPermissionException - if none of the application's underlying directories are allowed to perform this operation
OperationFailedException - if the operation failed for any other reason
InvalidCredentialException - if the password is not valid
InvalidUserException - if the user is not valid
public java.lang.String updateUser(java.lang.String applicationName,
UserEntity userEntity)
throws ApplicationPermissionException,
InvalidUserException,
UserNotFoundException,
OperationFailedException
applicationName - name of the applicationuserEntity - updated user information
ApplicationPermissionException - if none of the application's underlying directories are allowed to perform this operation
InvalidUserException - if the user template does not have the required properties populated.
UserNotFoundException - if the user was not found
OperationFailedException - if the operation failed for any other reason
public void storeUserAttributes(java.lang.String applicationName,
java.lang.String username,
MultiValuedAttributeEntityList attributes)
throws ApplicationPermissionException,
UserNotFoundException,
OperationFailedException
applicationName - name of the applicationusername - name of the userattributes - attributes of the user
ApplicationPermissionException - if none of the application's underlying directories are allowed to perform this operation
OperationFailedException - if the operation failed for any other reason
UserNotFoundException - if the user could not be found
public void removeUserAttribute(java.lang.String applicationName,
java.lang.String username,
java.lang.String attributeName)
throws ApplicationPermissionException,
UserNotFoundException,
OperationFailedException
applicationName - name of the applicationusername - name of the userattributeName - name of attribute to remove
ApplicationPermissionException - if none of the application's underlying directories have permission to perform the operation
OperationFailedException - if the operation failed for any other reason
UserNotFoundException - if the user could not be found
public void requestPasswordReset(java.lang.String applicationName,
java.lang.String username)
throws InvalidEmailAddressException,
ApplicationPermissionException,
ApplicationNotFoundException,
UserNotFoundException
applicationName - name of the applicationusername - name of the user
UserNotFoundException - if the user could not be found
InvalidEmailAddressException - if the user does not have a valid email to send the reset password link to
ApplicationPermissionException - if none of the application's underlying directories can update the user's password
ApplicationNotFoundException - if the application could not be found
public void requestUsernames(java.lang.String applicationName,
java.lang.String email)
throws InvalidEmailAddressException,
ApplicationNotFoundException
applicationName - name of the applicationemail - email address of the user
InvalidEmailAddressException - if the email is not valid
ApplicationNotFoundException - if the application could not be found
public void removeUser(java.lang.String applicationName,
java.lang.String username)
throws ApplicationPermissionException,
UserNotFoundException,
OperationFailedException
applicationName - name of the applicationusername - name of the user
ApplicationPermissionException - if none of the application's underlying directories can update the user's password
OperationFailedException - if the operation failed for any other reason
UserNotFoundException - if the user could not be found
public void updateUserPassword(java.lang.String applicationName,
java.lang.String username,
java.lang.String password)
throws ApplicationPermissionException,
UserNotFoundException,
InvalidCredentialException,
OperationFailedException
applicationName - name of the applicationusername - name of the userpassword - new password
ApplicationPermissionException - if none of the application's underlying directories are allowed to perform this operation
UserNotFoundException - if the user was not found
OperationFailedException - if the operation failed for any other reason
InvalidCredentialException - if the new password is not valid
public GroupEntityList getDirectGroups(java.lang.String applicationName,
java.lang.String userName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
applicationName - name of the applicationuserName - name of the userexpandGroups - should groups be expandedmaxResults - maximum number of results returned. If -1, then all the results are returned.startIndex - starting index of the resultsbaseUri - base URI of the REST service
public GroupEntity getDirectGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName,
java.net.URI baseUri)
throws MembershipNotFoundException
applicationName - name of the applicationuserName - name of the usergroupName - name of the group the user is a member ofbaseUri - base URI of the REST service
MembershipNotFoundException - if the membership was not found
public void addUserToGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName)
throws ApplicationPermissionException,
UserNotFoundException,
GroupNotFoundException,
OperationFailedException
applicationName - name of the applicationuserName - name of the usergroupName - name of the group
ApplicationPermissionException - if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP.
UserNotFoundException - if the user could not be found
GroupNotFoundException - if the group could not be found
OperationFailedException - if the operation failed for any other reason
public void removeUserFromGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName)
throws ApplicationPermissionException,
MembershipNotFoundException,
UserNotFoundException,
GroupNotFoundException,
OperationFailedException
applicationName - name of the applicationuserName - name of the usergroupName - name of the group
ApplicationPermissionException - if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP.
GroupNotFoundException - if the group could not be found
MembershipNotFoundException - if the membership does not exist
UserNotFoundException - if the user could not be found
OperationFailedException - if the operation failed for any other reason
public GroupEntityList getNestedGroups(java.lang.String applicationName,
java.lang.String userName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
applicationName - name of the applicationuserName - name of the userexpandGroups - should groups be expandedmaxResults - maximum number of results returned. If -1, then all the results are returned.startIndex - starting index of the resultsbaseUri - base URI of the REST service
public GroupEntity getNestedGroup(java.lang.String applicationName,
java.lang.String userName,
java.lang.String groupName,
java.net.URI baseUri)
throws MembershipNotFoundException
applicationName - name of the applicationuserName - name of the usergroupName - name of the group the user is a member ofbaseUri - base URI of the REST service
MembershipNotFoundException - if the membership was not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||