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

java.lang.Object
  extended by 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
static String ACCESS_LOCK
           
 
Constructor Summary
DefaultCurrentApplicationStore(ApplicationProperties applicationProperties, JiraLicenseService jiraLicenseService, com.atlassian.cache.CacheManager cacheManager, com.atlassian.beehive.ClusterLockService clusterLockService)
           
 
Method Summary
 com.atlassian.security.auth.trustedapps.CurrentApplication getCurrentApplication()
          Return JIRA's CurrentApplication.
 KeyPair getKeyPair()
          Get the current KeyPair used by trusted apps.
 void onClearCache(ClearCacheEvent event)
           
 void setCurrentApplication(String applicationId, KeyPair pair)
          Set the current application's (aka JIRA's) trusted application properties.
 void setCurrentApplication(String applicationId, String publicKey, String privateKey)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_LOCK

public static final String ACCESS_LOCK
Constructor Detail

DefaultCurrentApplicationStore

public DefaultCurrentApplicationStore(ApplicationProperties applicationProperties,
                                      JiraLicenseService jiraLicenseService,
                                      com.atlassian.cache.CacheManager cacheManager,
                                      com.atlassian.beehive.ClusterLockService clusterLockService)
Method Detail

start

public void start()
           throws Exception
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.

Specified by:
start in interface Startable
Throws:
Exception - Allows implementations to throw an Exception.

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getCurrentApplication

public com.atlassian.security.auth.trustedapps.CurrentApplication getCurrentApplication()
Description copied from interface: CurrentApplicationStore
Return JIRA's CurrentApplication. Will create a CurrentApplication if one does not exist or has been set.

Specified by:
getCurrentApplication in interface CurrentApplicationStore
Returns:
JIRA's CurrentApplication.

getKeyPair

public KeyPair getKeyPair()
Description copied from interface: CurrentApplicationStore
Get the current KeyPair used by trusted apps.

Specified by:
getKeyPair in interface CurrentApplicationStore
Returns:
the KeyPair used by trustedapps.

setCurrentApplication

public void setCurrentApplication(String applicationId,
                                  KeyPair pair)
Description copied from interface: CurrentApplicationStore
Set the current application's (aka JIRA's) trusted application properties.

Specified by:
setCurrentApplication in interface CurrentApplicationStore
Parameters:
applicationId - the name of JIRA's trusted application. Passing an empty or null string will result in an IllegalArgumentException.
pair - public and private key used for trusted apps. Passing null for pair or either the private or public key will result in an IllegalArgumentException.

setCurrentApplication

public void setCurrentApplication(String applicationId,
                                  String publicKey,
                                  String privateKey)
Description copied from interface: CurrentApplicationStore
Set the current application's (aka JIRA's) trusted application properties.

Specified by:
setCurrentApplication in interface CurrentApplicationStore
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 a IllegalArgumentException will be thrown.
privateKey - string representation of the private key. Must be valid key or a IllegalArgumentException will be thrown.


Copyright © 2002-2015 Atlassian. All Rights Reserved.