@Path(value="aliases") public class AliasResource extends Object
| Constructor and Description | 
|---|
AliasResource(ApplicationController applicationController)  | 
| Modifier and Type | Method and Description | 
|---|---|
javax.ws.rs.core.Response | 
deleteAlias(long applicationId,
           String username)
Removes user's alias in a specified application. 
 | 
javax.ws.rs.core.Response | 
deleteAllAliasesForUser(String username)
Removes all aliases of the specified user from all applications, even from applications where aliasing is disabled. 
 | 
String | 
getAlias(long applicationId,
        String username)
Returns the user's alias in the specified application. 
 | 
Map<Long,String> | 
getAllAliasesForUserAsJson(String username)
Returns all aliases of the specified user from all alias-enabled applications. 
 | 
String | 
getUsernameForAlias(long applicationId,
                   String alias)
Returns user's username in a specified application. 
 | 
javax.ws.rs.core.Response | 
setAlias(long applicationId,
        String username,
        String alias)
Sets the user's alias in the specified application. 
 | 
javax.ws.rs.core.Response | 
setAllAliasesForUser(String username,
                    Map<Long,String> aliasByApplication)
Sets the alias for the given username in all the applications, replacing the previous alias set for the same
 username, if they exist. 
 | 
public AliasResource(ApplicationController applicationController)
@GET
 @Path(value="{applicationId}/alias")
 @Produces(value="text/plain; charset=utf-8")
public String getAlias(@PathParam(value="applicationId")
                                                                                                                long applicationId,
                                                                                                                @QueryParam(value="user")
                                                                                                                String username)
                                                                                                         throws ApplicationNotFoundException,
                                                                                                                com.sun.jersey.api.NotFoundException
username - username in CrowdApplicationNotFoundExceptioncom.sun.jersey.api.NotFoundException@PUT
 @Path(value="{applicationId}/alias")
 @XsrfProtectionExcluded
 @Consumes(value="text/plain")
public javax.ws.rs.core.Response setAlias(@PathParam(value="applicationId")
                                                                                                                                             long applicationId,
                                                                                                                                             @QueryParam(value="user")
                                                                                                                                             String username,
                                                                                                                                             String alias)
                                                                                                                                      throws ApplicationNotFoundException,
                                                                                                                                             AliasAlreadyInUseException
username - username in CrowdApplicationNotFoundExceptionAliasAlreadyInUseException@DELETE
 @Path(value="{applicationId}/alias")
 @XsrfProtectionExcluded
public javax.ws.rs.core.Response deleteAlias(@PathParam(value="applicationId")
                                                                                                                    long applicationId,
                                                                                                                    @QueryParam(value="user")
                                                                                                                    String username)
                                                                                                             throws ApplicationNotFoundException,
                                                                                                                    AliasAlreadyInUseException
username - username in Crowd (does not need to exist)ApplicationNotFoundExceptionAliasAlreadyInUseException@GET
 @Path(value="{applicationId}/username")
 @Produces(value="text/plain; charset=utf-8")
public String getUsernameForAlias(@PathParam(value="applicationId")
                                                                                                                              long applicationId,
                                                                                                                              @QueryParam(value="alias")
                                                                                                                              String alias)
                                                                                                                       throws ApplicationNotFoundException
alias - user's aliasApplicationNotFoundException@GET @Produces(value="application/json") public Map<Long,String> getAllAliasesForUserAsJson(@QueryParam(value="user") String username)
username - username in Crowd (does not need to exist)@PUT
 @Consumes(value="application/json")
public javax.ws.rs.core.Response setAllAliasesForUser(@QueryParam(value="user")
                                                                                                String username,
                                                                                                Map<Long,String> aliasByApplication)
                                                                                         throws AliasAlreadyInUseException
username - username in Crowd (does not need to exist)aliasByApplication - map of aliases keyed by application IDAliasAlreadyInUseException@DELETE
public javax.ws.rs.core.Response deleteAllAliasesForUser(@QueryParam(value="user")
                                                                 String username)
username - username in Crowd (does not need to exist)Copyright © 2023 Atlassian. All rights reserved.