Class UsersResource
java.lang.Object
com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
com.atlassian.crowd.plugin.rest.service.resource.usermanagement.UsersResource
@Path("user")
@Consumes({"application/xml","application/json"})
@Produces({"application/xml","application/json"})
public class UsersResource
extends AbstractResource
-
Field Summary
Fields inherited from class com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
request, uriInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
addUser
(UserEntity userEntity) javax.ws.rs.core.Response
addUserToGroup
(String userName, GroupEntity parentGroup) javax.ws.rs.core.Response
deleteUserPassword
(String userName) javax.ws.rs.core.Response
expireAllPasswords
(boolean confirm) javax.ws.rs.core.Response
getAvatarForUser
(String username, int size) javax.ws.rs.core.Response
getDirectGroups
(String userName, String groupName, int maxResults, int startIndex) javax.ws.rs.core.Response
getNestedGroups
(String userName, String groupName, int maxResults, int startIndex) javax.ws.rs.core.Response
javax.ws.rs.core.Response
getUserAttributes
(String userName) javax.ws.rs.core.Response
removeUser
(String userName) javax.ws.rs.core.Response
removeUserAttribute
(String userName, String attributeName) javax.ws.rs.core.Response
removeUserFromGroup
(String userName, String groupName) javax.ws.rs.core.Response
renameUser
(String userName, RenameEntity newUserName) javax.ws.rs.core.Response
requestPasswordReset
(String userName) javax.ws.rs.core.Response
requestUsernamesReminder
(String email) javax.ws.rs.core.Response
storeUserAttributes
(String userName, MultiValuedAttributeEntityList attributes) javax.ws.rs.core.Response
updateUser
(String userName, UserEntity userEntity) javax.ws.rs.core.Response
updateUserPassword
(String userName, PasswordEntity password) Methods inherited from class com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
getApplicationName, getBaseUri, setApplicationName, setRequest, setUriInfo
-
Constructor Details
-
UsersResource
-
-
Method Details
-
getUser
@GET public javax.ws.rs.core.Response getUser(@QueryParam("username") String userName, @QueryParam("key") String key) throws UserNotFoundException - Throws:
UserNotFoundException
-
addUser
@POST public javax.ws.rs.core.Response addUser(UserEntity userEntity) throws InvalidUserException, InvalidCredentialException, ApplicationPermissionException, OperationFailedException -
updateUser
@PUT public javax.ws.rs.core.Response updateUser(@QueryParam("username") String userName, UserEntity userEntity) throws InvalidUserException, UserNotFoundException, ApplicationPermissionException, OperationFailedException -
removeUser
@DELETE public javax.ws.rs.core.Response removeUser(@QueryParam("username") String userName) throws UserNotFoundException, ApplicationPermissionException, OperationFailedException -
renameUser
@POST @Path("rename") public javax.ws.rs.core.Response renameUser(@QueryParam("username") String userName, RenameEntity newUserName) throws InvalidUserException, UserNotFoundException, ApplicationPermissionException, OperationFailedException -
getUserAttributes
@GET @Path("attribute") public javax.ws.rs.core.Response getUserAttributes(@QueryParam("username") String userName) throws UserNotFoundException - Throws:
UserNotFoundException
-
storeUserAttributes
@POST @Path("attribute") public javax.ws.rs.core.Response storeUserAttributes(@QueryParam("username") String userName, MultiValuedAttributeEntityList attributes) throws UserNotFoundException, ApplicationPermissionException, OperationFailedException -
removeUserAttribute
@DELETE @Path("attribute") public javax.ws.rs.core.Response removeUserAttribute(@QueryParam("username") String userName, @QueryParam("attributename") String attributeName) throws UserNotFoundException, ApplicationPermissionException, OperationFailedException -
updateUserPassword
@PUT @Path("password") public javax.ws.rs.core.Response updateUserPassword(@QueryParam("username") String userName, PasswordEntity password) throws InvalidCredentialException, UserNotFoundException, ApplicationPermissionException, OperationFailedException -
deleteUserPassword
@DELETE @Path("password") public javax.ws.rs.core.Response deleteUserPassword(@QueryParam("username") String userName) throws InvalidCredentialException, UserNotFoundException, ApplicationPermissionException, OperationFailedException -
requestPasswordReset
@POST @Path("mail/password") public javax.ws.rs.core.Response requestPasswordReset(@QueryParam("username") String userName) throws InvalidEmailAddressException, UserNotFoundException, ApplicationPermissionException, OperationFailedException -
expireAllPasswords
@POST @Path("expire-all-passwords") public javax.ws.rs.core.Response expireAllPasswords(@QueryParam("confirm") boolean confirm) throws OperationFailedException - Throws:
OperationFailedException
-
requestUsernamesReminder
@POST @Path("mail/usernames") public javax.ws.rs.core.Response requestUsernamesReminder(@QueryParam("email") String email) throws InvalidEmailAddressException - Throws:
InvalidEmailAddressException
-
getDirectGroups
@GET @Path("group/direct") public javax.ws.rs.core.Response getDirectGroups(@QueryParam("username") String userName, @QueryParam("groupname") String groupName, @DefaultValue("1000") @QueryParam("max-results") int maxResults, @DefaultValue("0") @QueryParam("start-index") int startIndex) throws MembershipNotFoundException, UserNotFoundException -
addUserToGroup
@POST @Path("group/direct") public javax.ws.rs.core.Response addUserToGroup(@QueryParam("username") String userName, GroupEntity parentGroup) throws UserNotFoundException, ApplicationPermissionException, OperationFailedException, MembershipAlreadyExistsException -
removeUserFromGroup
@DELETE @Path("group/direct") public javax.ws.rs.core.Response removeUserFromGroup(@QueryParam("username") String userName, @QueryParam("groupname") String groupName) throws GroupNotFoundException, MembershipNotFoundException, UserNotFoundException, ApplicationPermissionException, OperationFailedException -
getNestedGroups
@GET @Path("group/nested") public javax.ws.rs.core.Response getNestedGroups(@QueryParam("username") String userName, @QueryParam("groupname") String groupName, @DefaultValue("1000") @QueryParam("max-results") int maxResults, @DefaultValue("0") @QueryParam("start-index") int startIndex) throws MembershipNotFoundException, UserNotFoundException -
getAvatarForUser
@GET @Path("avatar") public javax.ws.rs.core.Response getAvatarForUser(@QueryParam("username") String username, @QueryParam("s") @DefaultValue("128") int size) throws UserNotFoundException, DirectoryNotFoundException, OperationFailedException
-