Class CachingTrustedApplicationManager
java.lang.Object
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
ConstructorsConstructorDescriptionCachingTrustedApplicationManager
(TrustedApplicationManager delegate, com.atlassian.cache.CacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
delete
(ApplicationUser user, long id) Deletes theTrustedApplicationInfo
with the specified ID.boolean
delete
(ApplicationUser user, String applicationId) Deletes theTrustedApplicationInfo
with the specified application ID.get
(long id) Find aTrustedApplicationInfo
given an ID.Find aTrustedApplicationInfo
given an application ID.getAll()
Find allTrustedApplicationInfo
objects in the system.void
onClearCache
(ClearCacheEvent event) store
(ApplicationUser user, TrustedApplicationInfo info) Persist aTrustedApplicationInfo
store
(String user, TrustedApplicationInfo info) Persist aTrustedApplicationInfo
-
Constructor Details
-
CachingTrustedApplicationManager
public CachingTrustedApplicationManager(TrustedApplicationManager delegate, com.atlassian.cache.CacheManager cacheManager)
-
-
Method Details
-
onClearCache
-
getAll
Description copied from interface:TrustedApplicationManager
Find allTrustedApplicationInfo
objects in the system.- Specified by:
getAll
in interfaceTrustedApplicationManager
- Returns:
- a Collection of all
TrustedApplicationInfo
. Empty (not null) if none exist.
-
get
Description copied from interface:TrustedApplicationManager
Find aTrustedApplicationInfo
given an application ID.- Specified by:
get
in interfaceTrustedApplicationManager
- Parameters:
applicationId
- the id of the application- Returns:
- the
TrustedApplicationInfo
if found, null otherwise.
-
get
Description copied from interface:TrustedApplicationManager
Find aTrustedApplicationInfo
given an ID.- Specified by:
get
in interfaceTrustedApplicationManager
- Parameters:
id
- the id of the application- Returns:
- the
TrustedApplicationInfo
if found, null otherwise.
-
delete
Description copied from interface:TrustedApplicationManager
Deletes theTrustedApplicationInfo
with the specified ID.- Specified by:
delete
in interfaceTrustedApplicationManager
- Parameters:
user
- the user who is performing the deleteid
- the id of the application to delete- Returns:
- true if the application was successfully deleted, false otherwise.
-
delete
Description copied from interface:TrustedApplicationManager
Deletes theTrustedApplicationInfo
with the specified application ID.- Specified by:
delete
in interfaceTrustedApplicationManager
- Parameters:
user
- the user who is performing the deleteapplicationId
- the id of the application to delete- Returns:
- true if the application was successfully deleted, false otherwise.
-
store
Description copied from interface:TrustedApplicationManager
Persist aTrustedApplicationInfo
- Specified by:
store
in interfaceTrustedApplicationManager
- Parameters:
user
- the user who is performing the storeinfo
- the thing to save (create or update). Must not be null.- Returns:
- the updated or created business object.
-
store
Description copied from interface:TrustedApplicationManager
Persist aTrustedApplicationInfo
- Specified by:
store
in interfaceTrustedApplicationManager
- Parameters:
user
- the user who is performing the storeinfo
- the thing to save (create or update). Must not be null.- Returns:
- the updated or created business object.
-