|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.plugin.rest.service.controller.ApplicationController
public class ApplicationController
Controller for the Application resource.
Constructor Summary | |
---|---|
ApplicationController(ApplicationManager applicationManager,
DirectoryManager directoryManager,
TrustedProxyManager trustedProxyManager,
AliasManager aliasManager)
|
Method Summary | |
---|---|
com.atlassian.plugins.rest.common.Link |
addApplication(ApplicationEntity applicationEntity,
URI baseUri)
Adds a new application. |
com.atlassian.plugins.rest.common.Link |
addApplicationWithRequestAddress(ApplicationEntity applicationEntity,
javax.servlet.http.HttpServletRequest request,
URI baseUri)
Adds a new application with the request address. |
void |
addRemoteAddress(long applicationId,
RemoteAddressEntity remoteAddressEntity)
Adds a remote address to the list of allowed addresses for the application. |
void |
deleteAlias(long applicationId,
String username)
|
String |
getAlias(long applicationId,
String username)
|
Map<Long,String> |
getAliasesForUser(String username)
|
ApplicationEntityList |
getAllApplications(URI baseUri)
Finds all applications. |
ApplicationEntity |
getApplicationById(long id,
URI baseUri)
Finds an application by ID. |
ApplicationEntity |
getApplicationByName(String name,
URI baseUri)
Finds an application by name. |
Set<String> |
getRequestAddresses(javax.servlet.http.HttpServletRequest request)
Retrieves the list of request addresses. |
String |
getUsernameForAlias(long applicationId,
String alias)
|
void |
removeApplication(long applicationId)
Removes an application. |
void |
removeRemoteAddress(long applicationId,
String remoteAddress)
Removes a remote address from the list of allowed addresses for the application. |
void |
setAlias(long applicationId,
String username,
String alias)
|
void |
updateApplication(ApplicationEntity applicationEntity)
Updates an existing application. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApplicationController(ApplicationManager applicationManager, DirectoryManager directoryManager, TrustedProxyManager trustedProxyManager, AliasManager aliasManager)
Method Detail |
---|
public ApplicationEntity getApplicationByName(String name, URI baseUri) throws ApplicationNotFoundException
name
- name of the applicationbaseUri
- base URI of the REST service
ApplicationNotFoundException
- if the application could not be foundpublic ApplicationEntity getApplicationById(long id, URI baseUri) throws ApplicationNotFoundException
id
- ID of the applicationbaseUri
- baseURI of the applications resource
ApplicationNotFoundException
- if the application could not be foundpublic ApplicationEntityList getAllApplications(URI baseUri) throws ApplicationNotFoundException
baseUri
- base URI of the REST service
ApplicationNotFoundException
- if the application could not be foundpublic com.atlassian.plugins.rest.common.Link addApplicationWithRequestAddress(ApplicationEntity applicationEntity, javax.servlet.http.HttpServletRequest request, URI baseUri) throws InvalidCredentialException, DirectoryNotFoundException
applicationEntity
- new application to addrequest
- HTTP requestbaseUri
- base URI of the REST service
InvalidCredentialException
- if the given credentials are not valid
DirectoryNotFoundException
- if the directory being mapped could not be foundpublic com.atlassian.plugins.rest.common.Link addApplication(ApplicationEntity applicationEntity, URI baseUri) throws InvalidCredentialException, DirectoryNotFoundException
applicationEntity
- new application to addbaseUri
- base URI of the REST service
InvalidCredentialException
- if the given credentials are not valid
DirectoryNotFoundException
- if the directory being mapped could not be foundpublic void removeApplication(long applicationId) throws ApplicationManagerException
applicationId
- ID of the application
ApplicationManagerException
- if the remove operation is not permitted on the given applicationpublic void updateApplication(ApplicationEntity applicationEntity) throws ApplicationNotFoundException, ApplicationManagerException, DirectoryNotFoundException
applicationEntity
- application entity with the new details
ApplicationNotFoundException
- if the application could not be found
ApplicationManagerException
- if there was an error updating the application
DirectoryNotFoundException
- if a directory referenced by a directory mapping could not be foundpublic void addRemoteAddress(long applicationId, RemoteAddressEntity remoteAddressEntity) throws ApplicationNotFoundException
applicationId
- ID of the applicationremoteAddressEntity
- remote address entity to add
ApplicationNotFoundException
- if the application could not be foundpublic void removeRemoteAddress(long applicationId, String remoteAddress) throws ApplicationNotFoundException
applicationId
- ID of the applicationremoteAddress
- remote address to remove
ApplicationNotFoundException
- if the application could not be foundpublic Set<String> getRequestAddresses(javax.servlet.http.HttpServletRequest request)
request
- HTTP request
public String getAlias(long applicationId, String username) throws ApplicationNotFoundException, com.sun.jersey.api.NotFoundException
ApplicationNotFoundException
com.sun.jersey.api.NotFoundException
public void setAlias(long applicationId, String username, String alias) throws ApplicationNotFoundException, AliasAlreadyInUseException
ApplicationNotFoundException
AliasAlreadyInUseException
public void deleteAlias(long applicationId, String username) throws ApplicationNotFoundException, AliasAlreadyInUseException
ApplicationNotFoundException
AliasAlreadyInUseException
public String getUsernameForAlias(long applicationId, String alias) throws ApplicationNotFoundException
ApplicationNotFoundException
public Map<Long,String> getAliasesForUser(String username)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |