Class AliasResource
java.lang.Object
com.atlassian.crowd.plugin.rest.service.resource.application.AliasResource
Resource for managing aliases.
- Since:
- 2.5.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
deleteAlias
(long applicationId, String username) javax.ws.rs.core.Response
deleteAllAliasesForUser
(String username) getAllAliasesForUserAsJson
(String username) getUsernameForAlias
(long applicationId, String alias) javax.ws.rs.core.Response
javax.ws.rs.core.Response
setAllAliasesForUser
(String username, Map<Long, String> aliasByApplication)
-
Constructor Details
-
AliasResource
-
-
Method Details
-
getAlias
@GET @Path("{applicationId}/alias") @Produces("text/plain; charset=utf-8") public String getAlias(@PathParam("applicationId") long applicationId, @QueryParam("user") String username) throws ApplicationNotFoundException, javax.ws.rs.NotFoundException - Throws:
ApplicationNotFoundException
javax.ws.rs.NotFoundException
-
setAlias
@PUT @Path("{applicationId}/alias") @XsrfProtectionExcluded @Consumes("text/plain") public javax.ws.rs.core.Response setAlias(@PathParam("applicationId") long applicationId, @QueryParam("user") String username, String alias) throws ApplicationNotFoundException, AliasAlreadyInUseException -
deleteAlias
@DELETE @Path("{applicationId}/alias") @XsrfProtectionExcluded public javax.ws.rs.core.Response deleteAlias(@PathParam("applicationId") long applicationId, @QueryParam("user") String username) throws ApplicationNotFoundException, AliasAlreadyInUseException -
getUsernameForAlias
@GET @Path("{applicationId}/username") @Produces("text/plain; charset=utf-8") public String getUsernameForAlias(@PathParam("applicationId") long applicationId, @QueryParam("alias") String alias) throws ApplicationNotFoundException - Throws:
ApplicationNotFoundException
-
getAllAliasesForUserAsJson
-
setAllAliasesForUser
@PUT @Consumes("application/json") public javax.ws.rs.core.Response setAllAliasesForUser(@QueryParam("user") String username, Map<Long, String> aliasByApplication) throws AliasAlreadyInUseException- Throws:
AliasAlreadyInUseException
-
deleteAllAliasesForUser
@DELETE public javax.ws.rs.core.Response deleteAllAliasesForUser(@QueryParam("user") String username)
-