com.atlassian.jira.security.auth.trustedapps
Class DefaultTrustedApplicationService

java.lang.Object
  extended by com.atlassian.jira.security.auth.trustedapps.DefaultTrustedApplicationService
All Implemented Interfaces:
TrustedApplicationService

public class DefaultTrustedApplicationService
extends Object
implements 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
DefaultTrustedApplicationService(TrustedApplicationManager manager, GlobalPermissionManager permissionManager, TrustedApplicationValidator validator)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTrustedApplicationService

public DefaultTrustedApplicationService(TrustedApplicationManager manager,
                                        GlobalPermissionManager permissionManager,
                                        TrustedApplicationValidator validator)
Method Detail

getAll

public Set<TrustedApplicationInfo> getAll(JiraServiceContext context)
Description copied from interface: TrustedApplicationService
Find all TrustedApplicationInfo objects in the system.

Specified by:
getAll in interface TrustedApplicationService
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

public TrustedApplicationInfo get(JiraServiceContext context,
                                  String applicationId)
Description copied from interface: TrustedApplicationService
Find a TrustedApplicationInfo given an application ID.

Specified by:
get in interface TrustedApplicationService
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
applicationId - the id of the application
Returns:
the TrustedApplicationInfo if found, null otherwise.

get

public TrustedApplicationInfo get(JiraServiceContext context,
                                  long id)
Description copied from interface: TrustedApplicationService
Find a TrustedApplicationInfo given an ID.

Specified by:
get in interface TrustedApplicationService
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
id - the id of the application
Returns:
the TrustedApplicationInfo if found, null otherwise.

delete

public boolean delete(JiraServiceContext context,
                      long id)
Description copied from interface: TrustedApplicationService
Deletes the TrustedApplicationInfo with the specified ID.

Specified by:
delete in interface TrustedApplicationService
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
id - the id of the application to delete
Returns:
true if the application was successfully deleted, false otherwise.

store

public TrustedApplicationInfo store(JiraServiceContext context,
                                    TrustedApplicationInfo info)
Description copied from interface: TrustedApplicationService
Persist a TrustedApplicationInfo

Specified by:
store in interface TrustedApplicationService
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
info - the thing to save (create or update). Must not be null.
Returns:
the updated or created business object.

validate

public boolean validate(JiraServiceContext jiraServiceContext,
                        SimpleTrustedApplication builder)
Description copied from interface: TrustedApplicationService
Validate that the information contained in the builder is valid and able to be saved.

Specified by:
validate in interface TrustedApplicationService
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 method
builder - contains the SimpleTrustedApplication info
Returns:
true if validation passed


Copyright © 2002-2013 Atlassian. All Rights Reserved.