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 TypeMethodDescriptionbooleandelete(JiraServiceContext context, long id) Deletes theTrustedApplicationInfowith the specified ID.get(JiraServiceContext context, long id) Find aTrustedApplicationInfogiven an ID.get(JiraServiceContext context, String applicationId) Find aTrustedApplicationInfogiven an application ID.getAll(JiraServiceContext context) Find allTrustedApplicationInfoobjects in the system.store(JiraServiceContext context, TrustedApplicationInfo info) Persist aTrustedApplicationInfobooleanvalidate(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:TrustedApplicationServiceFind allTrustedApplicationInfoobjects in the system.- Specified by:
getAllin 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:TrustedApplicationServiceFind aTrustedApplicationInfogiven an application ID.- Specified by:
getin 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
TrustedApplicationInfoif found, null otherwise.
-
get
Description copied from interface:TrustedApplicationServiceFind aTrustedApplicationInfogiven an ID.- Specified by:
getin 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
TrustedApplicationInfoif found, null otherwise.
-
delete
Description copied from interface:TrustedApplicationServiceDeletes theTrustedApplicationInfowith the specified ID.- Specified by:
deletein 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:TrustedApplicationServicePersist aTrustedApplicationInfo- Specified by:
storein 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:TrustedApplicationServiceValidate that the information contained in the builder is valid and able to be saved.- Specified by:
validatein 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
-