com.atlassian.crowd.plugin.rest.service.resource
Class ApplicationResource

java.lang.Object
  extended by com.atlassian.crowd.plugin.rest.service.resource.ApplicationResource

public class ApplicationResource
extends Object

Represents an Application resource.

Since:
2.2

Field Summary
static String APPLICATION_NAME_QUERY_PARAM
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  javax.ws.rs.core.UriInfo uriInfo
           
 
Constructor Summary
ApplicationResource(ApplicationController applicationController)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_NAME_QUERY_PARAM

public static final String APPLICATION_NAME_QUERY_PARAM
See Also:
Constant Field Values

uriInfo

@Context
protected javax.ws.rs.core.UriInfo uriInfo

request

@Context
protected javax.servlet.http.HttpServletRequest request
Constructor Detail

ApplicationResource

public ApplicationResource(ApplicationController applicationController)
Method Detail

getApplications

public javax.ws.rs.core.Response getApplications(String applicationName)
                                          throws ApplicationNotFoundException
Returns all the applications or a specific application by name

Throws:
ApplicationNotFoundException

getApplicationById

public javax.ws.rs.core.Response getApplicationById(long applicationId)
                                             throws ApplicationNotFoundException
Returns the specified application.

Parameters:
applicationId - ID of the application
Throws:
ApplicationNotFoundException

addApplication

public javax.ws.rs.core.Response addApplication(boolean includeRequestAddress,
                                                ApplicationEntity applicationEntity)
                                         throws DirectoryNotFoundException,
                                                InvalidCredentialException
Adds a new application.

Parameters:
applicationEntity - new application entity
Throws:
DirectoryNotFoundException
InvalidCredentialException

removeApplication

public javax.ws.rs.core.Response removeApplication(long applicationId)
                                            throws ApplicationManagerException
Removes the specified application.

Parameters:
applicationId - ID of the application
Throws:
ApplicationManagerException

updateApplication

public javax.ws.rs.core.Response updateApplication(long applicationId,
                                                   ApplicationEntity applicationEntity)
                                            throws ApplicationNotFoundException,
                                                   DirectoryNotFoundException,
                                                   ApplicationManagerException
Updates the specified application.

Parameters:
applicationId - ID of the application
Throws:
ApplicationNotFoundException
DirectoryNotFoundException
ApplicationManagerException

getRemoteAddresses

public javax.ws.rs.core.Response getRemoteAddresses(long applicationId)
                                             throws ApplicationNotFoundException
Returns the remote addresses of the specified application.

Parameters:
applicationId - ID of the application
Throws:
ApplicationNotFoundException

addRemoteAddress

public javax.ws.rs.core.Response addRemoteAddress(long applicationId,
                                                  RemoteAddressEntity remoteAddressEntity)
                                           throws ApplicationNotFoundException,
                                                  DirectoryNotFoundException,
                                                  ApplicationManagerException
Adds the remote address to the specified application.

Parameters:
applicationId - ID of the application
remoteAddressEntity - remote address entity
Throws:
ApplicationNotFoundException
DirectoryNotFoundException
ApplicationManagerException

removeRemoteAddress

public javax.ws.rs.core.Response removeRemoteAddress(long applicationId,
                                                     String remoteAddress)
                                              throws ApplicationNotFoundException,
                                                     DirectoryNotFoundException,
                                                     ApplicationManagerException
Removes the remote address of the specified application.

Parameters:
applicationId - ID of the application
remoteAddress - remote address to remove
Throws:
ApplicationNotFoundException
DirectoryNotFoundException
ApplicationManagerException


Copyright © 2013 Atlassian. All Rights Reserved.