public final class

CachingTrustedApplicationStore

extends Object
implements TrustedApplicationStore
java.lang.Object
   ↳ com.atlassian.jira.security.auth.trustedapps.CachingTrustedApplicationStore

Class Overview

TrustedApplicationStore that caches the data objects in memory.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.security.auth.trustedapps.TrustedApplicationStore
Public Constructors
CachingTrustedApplicationStore(TrustedApplicationStore delegate, CacheManager cacheManager)
Public Methods
boolean delete(long id)
Deletes the TrustedApplicationData with the specified ID.
boolean delete(String applicationId)
Deletes the TrustedApplicationData with the specified application ID.
Set<TrustedApplicationData> getAll()
Find all TrustedApplicationData objects in the database.
TrustedApplicationData getByApplicationId(String applicationId)
Find a TrustedApplicationData given an application ID.
TrustedApplicationData getById(long id)
Find a TrustedApplicationData given an ID.
@EventListener void onClearCache(ClearCacheEvent event)
TrustedApplicationData store(TrustedApplicationData trustedApplicationData)
Persist a TrustedApplicationData
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.security.auth.trustedapps.TrustedApplicationStore

Public Constructors

public CachingTrustedApplicationStore (TrustedApplicationStore delegate, CacheManager cacheManager)

Public Methods

public boolean delete (long id)

Deletes the TrustedApplicationData with the specified ID.

Parameters
id the id of the application to delete
Returns
  • true if the application was successfully deleted, false otherwise.

public boolean delete (String applicationId)

Deletes the TrustedApplicationData with the specified application ID.

Parameters
applicationId the id of the application to delete
Returns
  • true if the application was successfully deleted, false otherwise.

public Set<TrustedApplicationData> getAll ()

Find all TrustedApplicationData objects in the database.

Returns
  • a Collection of all TrustedApplicationData in the database. Empty (not null) if none exist.

public TrustedApplicationData getByApplicationId (String applicationId)

Find a TrustedApplicationData given an application ID.

Parameters
applicationId the id of the application
Returns
  • the TrustedApplicationData if found, null otherwise.

public TrustedApplicationData getById (long id)

Find a TrustedApplicationData given an ID.

Parameters
id the id of the application
Returns
  • the TrustedApplicationData if found, null otherwise.

@EventListener public void onClearCache (ClearCacheEvent event)

public TrustedApplicationData store (TrustedApplicationData trustedApplicationData)

Persist a TrustedApplicationData

Parameters
trustedApplicationData the thing to save (create or update). Must not be null.
Returns
  • the updated or created data object.