Cumulus4j API
(1.2.0)

org.cumulus4j.keymanager.front.webapp
Class KeyStoreManager

java.lang.Object
  extended by org.cumulus4j.keymanager.front.webapp.KeyStoreManager

public class KeyStoreManager
extends Object

Manager for KeyStores mapping a keyStoreID to a file name in the local file system.

One instance of this class is held as a REST-app-singleton and injected into the REST services via Context like this example:

 private @Context KeyStoreManager keyStoreManager;
 

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Field Summary
static String SYSTEM_PROPERTY_KEY_STORE_DIR
           System property to control which directory is used to manage key store files.
 
Constructor Summary
KeyStoreManager()
           
 
Method Summary
 AppServerManager getAppServerManager(String keyStoreID)
          Get the AppServerManager that is assigned (in a 1-1-relation) to the KeyStore identified by the given ID.
 KeyStore getKeyStore(String keyStoreID)
          Get the KeyStore identified by the given keyStoreID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_PROPERTY_KEY_STORE_DIR

public static final String SYSTEM_PROPERTY_KEY_STORE_DIR

System property to control which directory is used to manage key store files. If not specified, the directory "${user.home}/.cumulus4j/" will be used.

You can use system properties in this system-property's value. For example passing "-Dcumulus4j.keyStoreDir=${java.io.tmpdir}/cumulus4j-key-stores" to the java command will be resolved to "/tmp/cumulus4j-key-stores" on GNU+Linux.

See Also:
Constant Field Values
Constructor Detail

KeyStoreManager

public KeyStoreManager()
Method Detail

getKeyStore

public KeyStore getKeyStore(String keyStoreID)
                     throws IOException
Get the KeyStore identified by the given keyStoreID. If it does not exist, it is implicitely created.

Parameters:
keyStoreID - the identfier of the KeyStore to be returned. Must not be null.
Returns:
the KeyStore identified by the given keyStoreID.
Throws:
IOException - if reading from / writing to the local file system failed.

getAppServerManager

public AppServerManager getAppServerManager(String keyStoreID)
                                     throws IOException
Get the AppServerManager that is assigned (in a 1-1-relation) to the KeyStore identified by the given ID.

Parameters:
keyStoreID - the identfier of the KeyStore whose AppServerManager shall be returned. Must not be null.
Returns:
the AppServerManager that is assigned (in a 1-1-relation) to the KeyStore identified by the given ID.
Throws:
IOException - if reading from / writing to the local file system failed.

Cumulus4j API
(1.2.0)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.