public interface ApplicationDAO
Application
.Modifier and Type | Method and Description |
---|---|
Application |
add(Application application,
PasswordCredential passwordCredential)
Will only create the core attributes to an application, i.e.
|
void |
addDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate,
OperationType... operationTypes)
Adds a mapping between application and directory.
|
void |
addGroupMapping(long applicationId,
long directoryId,
String groupName)
Adds a group mapping.
|
void |
addRemoteAddress(long applicationId,
RemoteAddress remoteAddress)
Associates a remote address to the given application.
|
List<Application> |
findAuthorisedApplications(long directoryId,
List<String> groupNames)
Finds all applications that a user from a given directory belonging to the specified groups can authenticate to.
|
Application |
findById(long id)
Finds application by application id.
|
Application |
findByName(String name)
Finds application by application name, in a case-insensitive way.
|
DirectoryMapping |
findDirectoryMapping(long applicationId,
long directoryId)
Finds the directory mapping for a given application and directory combination
|
void |
remove(Application application)
Removes the application.
|
void |
removeDirectoryMapping(long applicationId,
long directoryId)
Removes a mapping between application and directory.
|
void |
removeDirectoryMappings(long directoryId)
Removes all the mappings associated with the given directory identified by directory id.
|
void |
removeGroupMapping(long applicationId,
long directoryId,
String groupName)
Removes a group mapping.
|
void |
removeGroupMappings(long directoryId,
String groupName)
Removes group mappings.
|
void |
removeRemoteAddress(long applicationId,
RemoteAddress remoteAddress)
Dissociates the given remote address from the given application.
|
List<Application> |
search(EntityQuery<Application> query)
Will search for all the applications which qualify for the given
EntityQuery . |
Application |
update(Application application)
Will only update the core attributes to an application, i.e.
|
void |
updateCredential(Application application,
PasswordCredential passwordCredential)
Updates credential of the given application.
|
void |
updateDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate)
Updates a directory mapping.
|
void |
updateDirectoryMapping(long applicationId,
long directoryId,
boolean allowAllToAuthenticate,
Set<OperationType> operationTypes)
Updates a directory mapping.
|
void |
updateDirectoryMapping(long applicationId,
long directoryId,
int position)
Updates the ordering of directory mappings for an application.
|
Application findById(long id) throws ApplicationNotFoundException
id
- Application id.ApplicationNotFoundException
- If application of the specified id does not exist.Application findByName(String name) throws ApplicationNotFoundException
name
- Application name.ApplicationNotFoundException
- If application of the specified name does not exist.Application add(Application application, PasswordCredential passwordCredential)
application
- The application.passwordCredential
- Credential.Application update(Application application) throws ApplicationNotFoundException
application
- The application.ApplicationNotFoundException
- If the application could not be found.void updateCredential(Application application, PasswordCredential passwordCredential) throws ApplicationNotFoundException
application
- The application.passwordCredential
- The new credential.ApplicationNotFoundException
- If the application could not be found.void remove(Application application)
application
- The application.List<Application> search(EntityQuery<Application> query)
EntityQuery
.query
- Entity query of type EntityDescriptor.application()
.void addDirectoryMapping(long applicationId, long directoryId, boolean allowAllToAuthenticate, OperationType... operationTypes) throws DirectoryNotFoundException, ApplicationNotFoundException
applicationId
- Application id.directoryId
- Directory id.allowAllToAuthenticate
- True if all users in the directory are allowed to authenticate against the application.operationTypes
- The collection of permissible operation types.DirectoryNotFoundException
- if the directory specified by the directoryId does not exist.ApplicationNotFoundException
- if the application specified by the applicationId does not exist.void addRemoteAddress(long applicationId, RemoteAddress remoteAddress) throws ApplicationNotFoundException
applicationId
- Application id.remoteAddress
- Remote address.ApplicationNotFoundException
- If the application cannot be found.void removeRemoteAddress(long applicationId, RemoteAddress remoteAddress) throws ApplicationNotFoundException
applicationId
- Application id.remoteAddress
- Remote address, not null.ApplicationNotFoundException
- If the application cannot be found.void removeDirectoryMapping(long applicationId, long directoryId) throws ApplicationNotFoundException
applicationId
- Application id.directoryId
- Directory id.ApplicationNotFoundException
- If the application cannot be found.void removeDirectoryMappings(long directoryId)
directoryId
- Directory id.void addGroupMapping(long applicationId, long directoryId, String groupName) throws ApplicationNotFoundException
applicationId
- Application id.directoryId
- Directory id.groupName
- Group name.ApplicationNotFoundException
- If the application cannot be found.void removeGroupMapping(long applicationId, long directoryId, String groupName) throws ApplicationNotFoundException
applicationId
- Application id.directoryId
- Directory id.groupName
- Group name.ApplicationNotFoundException
void removeGroupMappings(long directoryId, String groupName)
directoryId
- Directory id.groupName
- Group name.void updateDirectoryMapping(long applicationId, long directoryId, int position) throws ApplicationNotFoundException, DirectoryNotFoundException
applicationId
- Application iddirectoryId
- Directory idposition
- New position in the order of directories for this given directory.
Positions in the list of directories are absolute and zero based.ApplicationNotFoundException
- if the application could not be foundDirectoryNotFoundException
- if the directory could not be foundList<Application> findAuthorisedApplications(long directoryId, List<String> groupNames)
directoryId
- directory id of the user.groupNames
- group memberships of the user in the particular directory.void updateDirectoryMapping(long applicationId, long directoryId, boolean allowAllToAuthenticate) throws ApplicationNotFoundException, DirectoryNotFoundException
applicationId
- Application iddirectoryId
- Directory id.allowAllToAuthenticate
- True, if all users are allowed to authenticate.ApplicationNotFoundException
- If the application cannot be found.DirectoryNotFoundException
- If the directory cannot be found.void updateDirectoryMapping(long applicationId, long directoryId, boolean allowAllToAuthenticate, Set<OperationType> operationTypes) throws ApplicationNotFoundException, DirectoryNotFoundException
applicationId
- Application iddirectoryId
- Directory id.allowAllToAuthenticate
- True, if all users are allowed to authenticate.operationTypes
- the set of permissible operation types.ApplicationNotFoundException
- If the application cannot be found.DirectoryNotFoundException
- If the directory cannot be found.DirectoryMapping findDirectoryMapping(long applicationId, long directoryId) throws ApplicationNotFoundException, DirectoryMappingNotFoundException
applicationId
- Application iddirectoryId
- Directory idApplicationNotFoundException
- If the application cannot be foundDirectoryMappingNotFoundException
- If the directory mapping cannot be foundCopyright © 2020 Atlassian. All rights reserved.