Class DefaultTrustedApplicationService
java.lang.Object
com.atlassian.jira.security.auth.trustedapps.DefaultTrustedApplicationService
- All Implemented Interfaces:
TrustedApplicationService
The default implementation of TrustedApplicationService.
- Since:
- v3.12
-
Field Summary
Fields inherited from interface com.atlassian.jira.security.auth.trustedapps.TrustedApplicationService
NAME_COMPARATOR
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTrustedApplicationService
(TrustedApplicationManager manager, GlobalPermissionManager permissionManager, TrustedApplicationValidator validator) -
Method Summary
Modifier and TypeMethodDescriptionboolean
delete
(JiraServiceContext context, long id) Deletes theTrustedApplicationInfo
with the specified ID.get
(JiraServiceContext context, long id) Find aTrustedApplicationInfo
given an ID.get
(JiraServiceContext context, String applicationId) Find aTrustedApplicationInfo
given an application ID.getAll
(JiraServiceContext context) Find allTrustedApplicationInfo
objects in the system.store
(JiraServiceContext context, TrustedApplicationInfo info) Persist aTrustedApplicationInfo
boolean
validate
(JiraServiceContext jiraServiceContext, SimpleTrustedApplication builder) Validate that the information contained in the builder is valid and able to be saved.
-
Constructor Details
-
DefaultTrustedApplicationService
public DefaultTrustedApplicationService(TrustedApplicationManager manager, GlobalPermissionManager permissionManager, TrustedApplicationValidator validator)
-
-
Method Details
-
getAll
Description copied from interface:TrustedApplicationService
Find allTrustedApplicationInfo
objects in the system.- Specified by:
getAll
in interfaceTrustedApplicationService
- Parameters:
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 method- Returns:
- a Collection of all
TrustedApplicationInfo
. Empty (not null) if none exist.
-
get
Description copied from interface:TrustedApplicationService
Find aTrustedApplicationInfo
given an application ID.- Specified by:
get
in interfaceTrustedApplicationService
- Parameters:
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 application- Returns:
- the
TrustedApplicationInfo
if found, null otherwise.
-
get
Description copied from interface:TrustedApplicationService
Find aTrustedApplicationInfo
given an ID.- Specified by:
get
in interfaceTrustedApplicationService
- Parameters:
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- Returns:
- the
TrustedApplicationInfo
if found, null otherwise.
-
delete
Description copied from interface:TrustedApplicationService
Deletes theTrustedApplicationInfo
with the specified ID.- Specified by:
delete
in interfaceTrustedApplicationService
- Parameters:
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 delete- Returns:
- true if the application was successfully deleted, false otherwise.
-
store
Description copied from interface:TrustedApplicationService
Persist aTrustedApplicationInfo
- Specified by:
store
in interfaceTrustedApplicationService
- Parameters:
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.- Returns:
- the updated or created business object.
-
validate
Description copied from interface:TrustedApplicationService
Validate that the information contained in the builder is valid and able to be saved.- Specified by:
validate
in interfaceTrustedApplicationService
- Parameters:
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 info- Returns:
- true if validation passed
-