Class UserAdminResource
- java.lang.Object
-
- com.atlassian.bamboo.plugins.rest.user.UserAdminResource
-
public class UserAdminResource extends Object
REST resource to manage users in Bamboo.- Since:
- 6.6
-
-
Constructor Summary
Constructors Constructor Description UserAdminResource(BambooAuthenticationContext bambooAuthenticationContext, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService, com.atlassian.crowd.embedded.api.CrowdService crowdService, PaginationService paginationService, RestUserAccessTokenService restUserAccessTokenService, com.atlassian.struts.TextProvider textProvider, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, UserRenameService userRenameService, ExtendedAuthorManager extendedAuthorManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
assignGroups(String userName, List<String> groupsToAssign)
javax.ws.rs.core.Response
changeUserPassword(RestUserPasswordUpdate passwordChangeRequest)
javax.ws.rs.core.Response
createUser(RestNewUser newUser)
javax.ws.rs.core.Response
createUserRepositoryAlias(String userName, List<String> userAliases)
javax.ws.rs.core.Response
deleteUser(String userName)
RestPageModel<RestGroup>
findAssignedGroups(String userName, String filter, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
RestPageModel<RestGroup>
findUnassignedGroups(String userName, String filter, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
RestPageModel<RestUserAlias>
findUnassignedUserRepositoryAliases(String filter, String userName, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
RestPageModel<RestAccessToken>
getUserAccessTokens(String userName, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
RestPageModel<RestUserAlias>
getUserRepositoryAliases(String userName, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
RestPageModel<RestUserDetails>
getUsers(String filter, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
javax.ws.rs.core.Response
renameUser(RestUserRenameRequest userRenameRequest)
javax.ws.rs.core.Response
revokeUserToken(String userName, String tokenId)
javax.ws.rs.core.Response
unassignGroups(String userName, List<String> groupsToRemove)
javax.ws.rs.core.Response
unlinkUserRepositoryAlias(String userName, RestUserAlias alias)
-
-
-
Constructor Detail
-
UserAdminResource
@Inject public UserAdminResource(BambooAuthenticationContext bambooAuthenticationContext, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService, com.atlassian.crowd.embedded.api.CrowdService crowdService, PaginationService paginationService, RestUserAccessTokenService restUserAccessTokenService, com.atlassian.struts.TextProvider textProvider, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, UserRenameService userRenameService, ExtendedAuthorManager extendedAuthorManager)
-
-
Method Detail
-
getUsers
public RestPageModel<RestUserDetails> getUsers(String filter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
-
createUser
public javax.ws.rs.core.Response createUser(RestNewUser newUser) throws WebValidationException
- Throws:
WebValidationException
-
deleteUser
public javax.ws.rs.core.Response deleteUser(String userName) throws WebValidationException
- Throws:
WebValidationException
-
renameUser
public javax.ws.rs.core.Response renameUser(RestUserRenameRequest userRenameRequest) throws UserRenameException, WebValidationException
-
changeUserPassword
public javax.ws.rs.core.Response changeUserPassword(RestUserPasswordUpdate passwordChangeRequest) throws WebValidationException, com.atlassian.user.EntityException
- Throws:
WebValidationException
com.atlassian.user.EntityException
-
assignGroups
public javax.ws.rs.core.Response assignGroups(String userName, List<String> groupsToAssign) throws WebValidationException
- Throws:
WebValidationException
-
unassignGroups
public javax.ws.rs.core.Response unassignGroups(String userName, List<String> groupsToRemove) throws WebValidationException
- Throws:
WebValidationException
-
findAssignedGroups
public RestPageModel<RestGroup> findAssignedGroups(String userName, String filter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
-
findUnassignedGroups
public RestPageModel<RestGroup> findUnassignedGroups(String userName, String filter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo) throws com.atlassian.user.EntityException
- Throws:
com.atlassian.user.EntityException
-
findUnassignedUserRepositoryAliases
public RestPageModel<RestUserAlias> findUnassignedUserRepositoryAliases(String filter, String userName, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
-
getUserRepositoryAliases
public RestPageModel<RestUserAlias> getUserRepositoryAliases(String userName, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
-
createUserRepositoryAlias
public javax.ws.rs.core.Response createUserRepositoryAlias(String userName, List<String> userAliases)
-
unlinkUserRepositoryAlias
public javax.ws.rs.core.Response unlinkUserRepositoryAlias(String userName, RestUserAlias alias)
-
getUserAccessTokens
public RestPageModel<RestAccessToken> getUserAccessTokens(String userName, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
-
revokeUserToken
public javax.ws.rs.core.Response revokeUserToken(String userName, String tokenId) throws WebValidationException
- Throws:
WebValidationException
-
-