Package org.alfresco.encryption
Class SpringKeyResourceLoader
- java.lang.Object
-
- org.alfresco.encryption.SpringKeyResourceLoader
-
- All Implemented Interfaces:
KeyResourceLoader
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class SpringKeyResourceLoader extends java.lang.Object implements KeyResourceLoader, org.springframework.context.ApplicationContextAware
Loads key resources (key store and key store passwords) from the Spring classpath.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description SpringKeyResourceLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
getKeyStore(java.lang.String keyStoreLocation)
Loads and returns an InputStream of the key store at the configured location.java.util.Properties
loadKeyMetaData(java.lang.String keyMetaDataFileLocation)
Loads key metadata from the configured passwords file location.void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getKeyStore
public java.io.InputStream getKeyStore(java.lang.String keyStoreLocation)
Loads and returns an InputStream of the key store at the configured location. If the file cannot be found this method returns null.- Specified by:
getKeyStore
in interfaceKeyResourceLoader
- Returns:
- InputStream
-
loadKeyMetaData
public java.util.Properties loadKeyMetaData(java.lang.String keyMetaDataFileLocation) throws java.io.IOException
Loads key metadata from the configured passwords file location. Note that the passwords are not cached locally. If the file cannot be found this method returns null.- Specified by:
loadKeyMetaData
in interfaceKeyResourceLoader
- Returns:
- Properties
- Throws:
java.io.IOException
-
-