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 Object implements KeyResourceLoader, org.springframework.context.ApplicationContextAware
Loads key resources (key store and key store passwords) from the Spring classpath.
Since:
4.0
  • Constructor Details

    • SpringKeyResourceLoader

      public SpringKeyResourceLoader()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • getKeyStore

      public InputStream getKeyStore(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 interface KeyResourceLoader
      Returns:
      InputStream
    • loadKeyMetaData

      public Properties loadKeyMetaData(String keyMetaDataFileLocation) throws 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 interface KeyResourceLoader
      Returns:
      Properties
      Throws:
      IOException