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

java.lang.Object
  extended by com.atlassian.jira.security.auth.trustedapps.CachingTrustedApplicationStore
All Implemented Interfaces:
Startable, TrustedApplicationStore

public class CachingTrustedApplicationStore
extends java.lang.Object
implements TrustedApplicationStore, Startable

TrustedApplicationStore that caches the data objects in memory.

Since:
v3.12

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.security.auth.trustedapps.TrustedApplicationStore
TrustedApplicationStore.Fields
 
Field Summary
 
Fields inherited from interface com.atlassian.jira.security.auth.trustedapps.TrustedApplicationStore
ENTITY_NAME
 
Constructor Summary
CachingTrustedApplicationStore(TrustedApplicationStore delegate, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 boolean delete(long id)
          Deletes the TrustedApplicationData with the specified ID.
 java.util.Set<com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData> getAll()
          Find all TrustedApplicationData objects in the database.
 com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData getByApplicationId(java.lang.String applicationId)
          Find a TrustedApplicationData given an application ID.
 com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData getById(long id)
          Find a TrustedApplicationData given an ID.
 void onClearCache(ClearCacheEvent event)
           
 void start()
          This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData store(com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData trustedApplicationData)
          Persist a TrustedApplicationData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingTrustedApplicationStore

public CachingTrustedApplicationStore(TrustedApplicationStore delegate,
                                      com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

start

public void start()
           throws java.lang.Exception
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable
Throws:
java.lang.Exception - Allows implementations to throw an Exception.

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getAll

public java.util.Set<com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData> getAll()
Description copied from interface: TrustedApplicationStore
Find all TrustedApplicationData objects in the database.

Specified by:
getAll in interface TrustedApplicationStore
Returns:
a Collection of all TrustedApplicationData in the database. Empty (not null) if none exist.

getByApplicationId

public com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData getByApplicationId(java.lang.String applicationId)
Description copied from interface: TrustedApplicationStore
Find a TrustedApplicationData given an application ID.

Specified by:
getByApplicationId in interface TrustedApplicationStore
Parameters:
applicationId - the id of the application
Returns:
the TrustedApplicationData if found, null otherwise.

getById

public com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData getById(long id)
Description copied from interface: TrustedApplicationStore
Find a TrustedApplicationData given an ID.

Specified by:
getById in interface TrustedApplicationStore
Parameters:
id - the id of the application
Returns:
the TrustedApplicationData if found, null otherwise.

store

public com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData store(com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData trustedApplicationData)
Description copied from interface: TrustedApplicationStore
Persist a TrustedApplicationData

Specified by:
store in interface TrustedApplicationStore
Parameters:
trustedApplicationData - the thing to save (create or update). Must not be null.
Returns:
the updated or created data object.

delete

public boolean delete(long id)
Description copied from interface: TrustedApplicationStore
Deletes the TrustedApplicationData with the specified ID.

Specified by:
delete in interface TrustedApplicationStore
Parameters:
id - the id of the application to delete
Returns:
true if the application was successfully deleted, false otherwise.


Copyright © 2002-2010 Atlassian. All Rights Reserved.