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

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

public final class CachingTrustedApplicationManager
extends Object
implements TrustedApplicationManager

TrustedApplicationManager that caches the info objects in memory.

Since:
v3.12

Constructor Summary
CachingTrustedApplicationManager(TrustedApplicationManager delegate, com.atlassian.cache.CacheManager cacheManager)
           
 
Method Summary
 boolean delete(com.atlassian.crowd.embedded.api.User user, long id)
          Deletes the TrustedApplicationInfo with the specified ID.
 boolean delete(com.atlassian.crowd.embedded.api.User user, String applicationId)
          Deletes the TrustedApplicationInfo with the specified application ID.
 TrustedApplicationInfo get(long id)
          Find a TrustedApplicationInfo given an ID.
 TrustedApplicationInfo get(String applicationId)
          Find a TrustedApplicationInfo given an application ID.
 Set<TrustedApplicationInfo> getAll()
          Find all TrustedApplicationInfo objects in the system.
 void onClearCache(ClearCacheEvent event)
           
 TrustedApplicationInfo store(String user, TrustedApplicationInfo info)
          Persist a TrustedApplicationInfo
 TrustedApplicationInfo store(com.atlassian.crowd.embedded.api.User user, TrustedApplicationInfo info)
          Persist a TrustedApplicationInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingTrustedApplicationManager

public CachingTrustedApplicationManager(TrustedApplicationManager delegate,
                                        com.atlassian.cache.CacheManager cacheManager)
Method Detail

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getAll

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

Specified by:
getAll in interface TrustedApplicationManager
Returns:
a Collection of all TrustedApplicationInfo. Empty (not null) if none exist.

get

public TrustedApplicationInfo get(String applicationId)
Description copied from interface: TrustedApplicationManager
Find a TrustedApplicationInfo given an application ID.

Specified by:
get in interface TrustedApplicationManager
Parameters:
applicationId - the id of the application
Returns:
the TrustedApplicationInfo if found, null otherwise.

get

public TrustedApplicationInfo get(long id)
Description copied from interface: TrustedApplicationManager
Find a TrustedApplicationInfo given an ID.

Specified by:
get in interface TrustedApplicationManager
Parameters:
id - the id of the application
Returns:
the TrustedApplicationInfo if found, null otherwise.

delete

public boolean delete(com.atlassian.crowd.embedded.api.User user,
                      long id)
Description copied from interface: TrustedApplicationManager
Deletes the TrustedApplicationInfo with the specified ID.

Specified by:
delete in interface TrustedApplicationManager
Parameters:
user - the user who is performing the delete
id - the id of the application to delete
Returns:
true if the application was successfully deleted, false otherwise.

delete

public boolean delete(com.atlassian.crowd.embedded.api.User user,
                      String applicationId)
Description copied from interface: TrustedApplicationManager
Deletes the TrustedApplicationInfo with the specified application ID.

Specified by:
delete in interface TrustedApplicationManager
Parameters:
user - the user who is performing the delete
applicationId - the id of the application to delete
Returns:
true if the application was successfully deleted, false otherwise.

store

public TrustedApplicationInfo store(com.atlassian.crowd.embedded.api.User user,
                                    TrustedApplicationInfo info)
Description copied from interface: TrustedApplicationManager
Persist a TrustedApplicationInfo

Specified by:
store in interface TrustedApplicationManager
Parameters:
user - the user who is performing the store
info - the thing to save (create or update). Must not be null.
Returns:
the updated or created business object.

store

public TrustedApplicationInfo store(String user,
                                    TrustedApplicationInfo info)
Description copied from interface: TrustedApplicationManager
Persist a TrustedApplicationInfo

Specified by:
store in interface TrustedApplicationManager
Parameters:
user - the user who is performing the store
info - the thing to save (create or update). Must not be null.
Returns:
the updated or created business object.


Copyright © 2002-2014 Atlassian. All Rights Reserved.