com.atlassian.jira.security.auth.trustedapps
Interface TrustedApplicationService

All Known Implementing Classes:
DefaultTrustedApplicationService

public interface TrustedApplicationService

Contains methods for managing TrustedApplicationInfo objects in JIRA

Since:
v3.12

Field Summary
static Comparator<TrustedApplicationInfo> NAME_COMPARATOR
          Compares two given TrustedApplicationInfo objects by their names and returns the result of the comparison.
 
Method Summary
 boolean delete(JiraServiceContext jiraServiceContext, long id)
          Deletes the TrustedApplicationInfo with the specified ID.
 TrustedApplicationInfo get(JiraServiceContext jiraServiceContext, long id)
          Find a TrustedApplicationInfo given an ID.
 TrustedApplicationInfo get(JiraServiceContext jiraServiceContext, String applicationId)
          Find a TrustedApplicationInfo given an application ID.
 Set<TrustedApplicationInfo> getAll(JiraServiceContext jiraServiceContext)
          Find all TrustedApplicationInfo objects in the system.
 TrustedApplicationInfo store(JiraServiceContext jiraServiceContext, 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.
 

Field Detail

NAME_COMPARATOR

static final Comparator<TrustedApplicationInfo> NAME_COMPARATOR
Compares two given TrustedApplicationInfo objects by their names and returns the result of the comparison.

Method Detail

getAll

Set<TrustedApplicationInfo> getAll(JiraServiceContext jiraServiceContext)
Find all TrustedApplicationInfo objects in the system.

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
Returns:
a Collection of all TrustedApplicationInfo. Empty (not null) if none exist.

get

TrustedApplicationInfo get(JiraServiceContext jiraServiceContext,
                           String applicationId)
Find a TrustedApplicationInfo given an application ID.

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
applicationId - the id of the application
Returns:
the TrustedApplicationInfo if found, null otherwise.

get

TrustedApplicationInfo get(JiraServiceContext jiraServiceContext,
                           long id)
Find a TrustedApplicationInfo given an ID.

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
id - the id of the application
Returns:
the TrustedApplicationInfo if found, null otherwise.

delete

boolean delete(JiraServiceContext jiraServiceContext,
               long id)
Deletes the TrustedApplicationInfo with the specified ID.

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

store

TrustedApplicationInfo store(JiraServiceContext jiraServiceContext,
                             TrustedApplicationInfo info)
Persist a TrustedApplicationInfo

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

validate

boolean validate(JiraServiceContext jiraServiceContext,
                 SimpleTrustedApplication builder)
Validate that the information contained in the builder is valid and able to be saved.

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-2011 Atlassian. All Rights Reserved.