Package org.forgerock.audit.secure
Class JcaKeyStoreHandler
- java.lang.Object
-
- org.forgerock.audit.secure.JcaKeyStoreHandler
-
- All Implemented Interfaces:
KeyStoreHandler
public class JcaKeyStoreHandler extends Object implements KeyStoreHandler
Default implementation of a Keystore handler.
-
-
Constructor Summary
Constructors Constructor Description JcaKeyStoreHandler(String type, String location, String password)Creates a new keystore handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocation()Returns the path to the keystore.StringgetPassword()Returns the password.KeyStoregetStore()Get the keystore.StringgetType()Returns the type of the keystore.voidsetStore(KeyStore keystore)Sets the keystore.voidstore()Saves the keystore.
-
-
-
Constructor Detail
-
JcaKeyStoreHandler
public JcaKeyStoreHandler(String type, String location, String password) throws Exception
Creates a new keystore handler.- Parameters:
type- The type of keystorelocation- The path of the keystorepassword- The password to access the keystore- Throws:
Exception- If an error occurs while initialising the keystore
-
-
Method Detail
-
getStore
public KeyStore getStore()
Description copied from interface:KeyStoreHandlerGet the keystore.- Specified by:
getStorein interfaceKeyStoreHandler- Returns:
- the keystore.
-
setStore
public void setStore(KeyStore keystore) throws Exception
Description copied from interface:KeyStoreHandlerSets the keystore.- Specified by:
setStorein interfaceKeyStoreHandler- Parameters:
keystore- The keystore to use- Throws:
Exception- If an error occurs
-
store
public void store() throws ExceptionDescription copied from interface:KeyStoreHandlerSaves the keystore.- Specified by:
storein interfaceKeyStoreHandler- Throws:
Exception- If an error occurs.
-
getPassword
public String getPassword()
Description copied from interface:KeyStoreHandlerReturns the password.- Specified by:
getPasswordin interfaceKeyStoreHandler- Returns:
- the password used to access the keystore
-
getLocation
public String getLocation()
Description copied from interface:KeyStoreHandlerReturns the path to the keystore.- Specified by:
getLocationin interfaceKeyStoreHandler- Returns:
- the path
-
getType
public String getType()
Description copied from interface:KeyStoreHandlerReturns the type of the keystore.- Specified by:
getTypein interfaceKeyStoreHandler- Returns:
- the keystore type
-
-