Class CachingTrustedApplicationStore
java.lang.Object
com.atlassian.jira.security.auth.trustedapps.CachingTrustedApplicationStore
- All Implemented Interfaces:
TrustedApplicationStore
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
ConstructorsConstructorDescriptionCachingTrustedApplicationStore
(TrustedApplicationStore delegate, com.atlassian.cache.CacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
delete
(long id) Deletes theTrustedApplicationData
with the specified ID.boolean
Deletes theTrustedApplicationData
with the specified application ID.Set<com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData>
getAll()
Find allTrustedApplicationData
objects in the database.com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData
getByApplicationId
(String applicationId) Find aTrustedApplicationData
given an application ID.com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData
getById
(long id) Find aTrustedApplicationData
given an ID.void
onClearCache
(ClearCacheEvent event) com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData
store
(com.atlassian.jira.security.auth.trustedapps.TrustedApplicationData trustedApplicationData) Persist aTrustedApplicationData
-
Constructor Details
-
CachingTrustedApplicationStore
public CachingTrustedApplicationStore(TrustedApplicationStore delegate, com.atlassian.cache.CacheManager cacheManager)
-
-
Method Details
-
onClearCache
-
getAll
Description copied from interface:TrustedApplicationStore
Find allTrustedApplicationData
objects in the database.- Specified by:
getAll
in interfaceTrustedApplicationStore
- 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(String applicationId) Description copied from interface:TrustedApplicationStore
Find aTrustedApplicationData
given an application ID.- Specified by:
getByApplicationId
in interfaceTrustedApplicationStore
- 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 aTrustedApplicationData
given an ID.- Specified by:
getById
in interfaceTrustedApplicationStore
- 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 aTrustedApplicationData
- Specified by:
store
in interfaceTrustedApplicationStore
- 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 theTrustedApplicationData
with the specified ID.- Specified by:
delete
in interfaceTrustedApplicationStore
- Parameters:
id
- the id of the application to delete- Returns:
- true if the application was successfully deleted, false otherwise.
-
delete
Description copied from interface:TrustedApplicationStore
Deletes theTrustedApplicationData
with the specified application ID.- Specified by:
delete
in interfaceTrustedApplicationStore
- Parameters:
applicationId
- the id of the application to delete- Returns:
- true if the application was successfully deleted, false otherwise.
-