@Path(value="application") @Consumes(value={"application/xml","application/json"}) @Produces(value={"application/xml","application/json"}) public class ApplicationResource extends Object
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_NAME_QUERY_PARAM |
protected javax.servlet.http.HttpServletRequest |
request |
protected javax.ws.rs.core.UriInfo |
uriInfo |
Constructor and Description |
---|
ApplicationResource(ApplicationController applicationController) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addApplication(boolean includeRequestAddress,
ApplicationEntity applicationEntity)
Adds a new application.
|
javax.ws.rs.core.Response |
addRemoteAddress(long applicationId,
RemoteAddressEntity remoteAddressEntity)
Adds the remote address to the specified application.
|
javax.ws.rs.core.Response |
getApplicationById(long applicationId)
Returns the specified application.
|
javax.ws.rs.core.Response |
getApplications(String applicationName)
Returns all the applications or a specific application by name
|
javax.ws.rs.core.Response |
getRemoteAddresses(long applicationId)
Returns the remote addresses of the specified application.
|
javax.ws.rs.core.Response |
removeApplication(long applicationId)
Removes the specified application.
|
javax.ws.rs.core.Response |
removeRemoteAddress(long applicationId,
String remoteAddress)
Removes the remote address of the specified application.
|
javax.ws.rs.core.Response |
updateApplication(long applicationId,
ApplicationEntity applicationEntity)
Updates the specified application.
|
public static final String APPLICATION_NAME_QUERY_PARAM
@Context protected javax.ws.rs.core.UriInfo uriInfo
@Context protected javax.servlet.http.HttpServletRequest request
public ApplicationResource(ApplicationController applicationController)
@GET public javax.ws.rs.core.Response getApplications(@QueryParam(value="name") String applicationName) throws ApplicationNotFoundException
ApplicationNotFoundException
@GET @Path(value="{applicationId}") public javax.ws.rs.core.Response getApplicationById(@PathParam(value="applicationId") long applicationId) throws ApplicationNotFoundException
applicationId
- ID of the applicationApplicationNotFoundException
@POST public javax.ws.rs.core.Response addApplication(@DefaultValue(value="false") @QueryParam(value="include-request-address") boolean includeRequestAddress, ApplicationEntity applicationEntity) throws DirectoryNotFoundException, InvalidCredentialException, ApplicationAlreadyExistsException
applicationEntity
- new application entityDirectoryNotFoundException
InvalidCredentialException
ApplicationAlreadyExistsException
@DELETE @Path(value="{applicationId}") public javax.ws.rs.core.Response removeApplication(@PathParam(value="applicationId") long applicationId) throws ApplicationManagerException
applicationId
- ID of the applicationApplicationManagerException
@PUT @Path(value="{applicationId}") public javax.ws.rs.core.Response updateApplication(@PathParam(value="applicationId") long applicationId, ApplicationEntity applicationEntity) throws ApplicationNotFoundException, DirectoryNotFoundException, ApplicationManagerException
applicationId
- ID of the applicationApplicationNotFoundException
DirectoryNotFoundException
ApplicationManagerException
@GET @Path(value="{applicationId}/remote_address") public javax.ws.rs.core.Response getRemoteAddresses(@PathParam(value="applicationId") long applicationId) throws ApplicationNotFoundException
applicationId
- ID of the applicationApplicationNotFoundException
@POST @Path(value="{applicationId}/remote_address") public javax.ws.rs.core.Response addRemoteAddress(@PathParam(value="applicationId") long applicationId, RemoteAddressEntity remoteAddressEntity) throws ApplicationNotFoundException, DirectoryNotFoundException, ApplicationManagerException
applicationId
- ID of the applicationremoteAddressEntity
- remote address entityApplicationNotFoundException
DirectoryNotFoundException
ApplicationManagerException
@DELETE @Path(value="{applicationId}/remote_address") public javax.ws.rs.core.Response removeRemoteAddress(@PathParam(value="applicationId") long applicationId, @QueryParam(value="address") String remoteAddress) throws ApplicationNotFoundException, DirectoryNotFoundException, ApplicationManagerException
applicationId
- ID of the applicationremoteAddress
- remote address to removeApplicationNotFoundException
DirectoryNotFoundException
ApplicationManagerException
Copyright © 2021 Atlassian. All rights reserved.