Class DefaultCurrentApplicationStore
java.lang.Object
com.atlassian.jira.security.auth.trustedapps.DefaultCurrentApplicationStore
- All Implemented Interfaces:
Startable
,CurrentApplicationStore
public class DefaultCurrentApplicationStore
extends Object
implements CurrentApplicationStore, Startable
- Since:
- v3.12
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultCurrentApplicationStore
(ApplicationProperties applicationProperties, JiraLicenseService jiraLicenseService, com.atlassian.cache.CacheManager cacheManager, com.atlassian.beehive.ClusterLockService clusterLockService) -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.security.auth.trustedapps.CurrentApplication
Return JIRA'sCurrentApplication
.Get the current KeyPair used by trusted apps.void
onClearCache
(ClearCacheEvent event) void
setCurrentApplication
(String applicationId, String publicKey, String privateKey) Set the current application's (aka JIRA's) trusted application properties.void
setCurrentApplication
(String applicationId, KeyPair pair) Set the current application's (aka JIRA's) trusted application properties.void
start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
-
Field Details
-
ACCESS_LOCK
-
-
Constructor Details
-
DefaultCurrentApplicationStore
public DefaultCurrentApplicationStore(ApplicationProperties applicationProperties, JiraLicenseService jiraLicenseService, com.atlassian.cache.CacheManager cacheManager, com.atlassian.beehive.ClusterLockService clusterLockService)
-
-
Method Details
-
start
Description copied from interface:Startable
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework. -
onClearCache
-
getCurrentApplication
public com.atlassian.security.auth.trustedapps.CurrentApplication getCurrentApplication()Description copied from interface:CurrentApplicationStore
Return JIRA'sCurrentApplication
. Will create a CurrentApplication if one does not exist or has been set.- Specified by:
getCurrentApplication
in interfaceCurrentApplicationStore
- Returns:
- JIRA's CurrentApplication.
-
getKeyPair
Description copied from interface:CurrentApplicationStore
Get the current KeyPair used by trusted apps.- Specified by:
getKeyPair
in interfaceCurrentApplicationStore
- Returns:
- the
KeyPair
used by trustedapps.
-
setCurrentApplication
Description copied from interface:CurrentApplicationStore
Set the current application's (aka JIRA's) trusted application properties.- Specified by:
setCurrentApplication
in interfaceCurrentApplicationStore
- Parameters:
applicationId
- the name of JIRA's trusted application. Passing an empty or null string will result in anIllegalArgumentException
.pair
- public and private key used for trusted apps. Passing null for pair or either the private or public key will result in anIllegalArgumentException
.
-
setCurrentApplication
Description copied from interface:CurrentApplicationStore
Set the current application's (aka JIRA's) trusted application properties.- Specified by:
setCurrentApplication
in interfaceCurrentApplicationStore
- Parameters:
applicationId
- the name of JIRA's trusted application. Passing null will set an automatically generated ID.publicKey
- string representation of the public key. Must be a valid key or aIllegalArgumentException
will be thrown.privateKey
- string representation of the private key. Must be valid key or aIllegalArgumentException
will be thrown.
-