public class DefaultTrustedApplicationService extends Object implements TrustedApplicationService
NAME_COMPARATOR
Constructor and Description |
---|
DefaultTrustedApplicationService(TrustedApplicationManager manager,
GlobalPermissionManager permissionManager,
TrustedApplicationValidator validator) |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(JiraServiceContext context,
long id)
Deletes the
TrustedApplicationInfo with the specified ID. |
TrustedApplicationInfo |
get(JiraServiceContext context,
long id)
Find a
TrustedApplicationInfo given an ID. |
TrustedApplicationInfo |
get(JiraServiceContext context,
String applicationId)
Find a
TrustedApplicationInfo given an application ID. |
Set<TrustedApplicationInfo> |
getAll(JiraServiceContext context)
Find all
TrustedApplicationInfo objects in the system. |
TrustedApplicationInfo |
store(JiraServiceContext context,
TrustedApplicationInfo info)
Persist a
TrustedApplicationInfo |
boolean |
validate(JiraServiceContext jiraServiceContext,
SimpleTrustedApplication builder)
Validate that the information contained in the builder is valid and able to be saved.
|
public DefaultTrustedApplicationService(TrustedApplicationManager manager, GlobalPermissionManager permissionManager, TrustedApplicationValidator validator)
public Set<TrustedApplicationInfo> getAll(JiraServiceContext context)
TrustedApplicationService
TrustedApplicationInfo
objects in the system.getAll
in interface TrustedApplicationService
context
- jiraServiceContext containing the user who the permission checks will be run against (can be null,
indicating an anonymous user) and the errorCollection that will contain any errors in calling the methodTrustedApplicationInfo
. Empty (not null) if none exist.public TrustedApplicationInfo get(JiraServiceContext context, String applicationId)
TrustedApplicationService
TrustedApplicationInfo
given an application ID.get
in interface TrustedApplicationService
context
- jiraServiceContext containing the user who the permission checks will be run against (can be null,
indicating an anonymous user) and the errorCollection that will contain any errors in calling the methodapplicationId
- the id of the applicationTrustedApplicationInfo
if found, null otherwise.public TrustedApplicationInfo get(JiraServiceContext context, long id)
TrustedApplicationService
TrustedApplicationInfo
given an ID.get
in interface TrustedApplicationService
context
- jiraServiceContext containing the user who the permission checks will be run against (can be null,
indicating an anonymous user) and the errorCollection that will contain any errors in calling the methodid
- the id of the applicationTrustedApplicationInfo
if found, null otherwise.public boolean delete(JiraServiceContext context, long id)
TrustedApplicationService
TrustedApplicationInfo
with the specified ID.delete
in interface TrustedApplicationService
context
- jiraServiceContext containing the user who the permission checks will be run against (can be null,
indicating an anonymous user) and the errorCollection that will contain any errors in calling the methodid
- the id of the application to deletepublic TrustedApplicationInfo store(JiraServiceContext context, TrustedApplicationInfo info)
TrustedApplicationService
TrustedApplicationInfo
store
in interface TrustedApplicationService
context
- jiraServiceContext containing the user who the permission checks will be run against (can be null,
indicating an anonymous user) and the errorCollection that will contain any errors in calling the methodinfo
- the thing to save (create or update). Must not be null.public boolean validate(JiraServiceContext jiraServiceContext, SimpleTrustedApplication builder)
TrustedApplicationService
validate
in interface TrustedApplicationService
jiraServiceContext
- jiraServiceContext containing the user who the permission checks will be run against (can be null,
indicating an anonymous user) and the errorCollection that will contain any errors in calling the methodbuilder
- contains the SimpleTrustedApplication infoCopyright © 2002-2021 Atlassian. All Rights Reserved.