Class EncryptedFileBasedServerConfigStoreConnector

All Implemented Interfaces:
OMAGServerConfigStore, OMAGServerConfigStoreRetrieveAll, SecureConnectorExtension

public class EncryptedFileBasedServerConfigStoreConnector extends OMAGServerConfigStoreConnectorBase implements OMAGServerConfigStoreRetrieveAll
EncryptedFileBasedServerConfigStoreConnector is the OCF connector for the encrypted file based server configuration store.
  • Constructor Details

    • EncryptedFileBasedServerConfigStoreConnector

      public EncryptedFileBasedServerConfigStoreConnector()
      Default constructor
  • Method Details

    • start

      public void start() throws ConnectorCheckedException
      Indicates that the connector is completely configured and can begin processing.
      Overrides:
      start in class ConnectorBase
      Throws:
      ConnectorCheckedException - there is a problem within the connector.
    • saveServerConfig

      public void saveServerConfig(OMAGServerConfig omagServerConfig)
      Save the server configuration.
      Specified by:
      saveServerConfig in interface OMAGServerConfigStore
      Parameters:
      omagServerConfig - configuration properties to save
    • retrieveServerConfig

      public OMAGServerConfig retrieveServerConfig()
      Retrieve the configuration saved from a previous run of the server.
      Specified by:
      retrieveServerConfig in interface OMAGServerConfigStore
      Returns:
      server configuration
    • removeServerConfig

      public void removeServerConfig()
      Remove the server configuration.
      Specified by:
      removeServerConfig in interface OMAGServerConfigStore
    • retrieveAllServerConfigs

      public Set<OMAGServerConfig> retrieveAllServerConfigs()
      Retrieve all the stored server configurations
      Specified by:
      retrieveAllServerConfigs in interface OMAGServerConfigStoreRetrieveAll
      Returns:
      the set of server configurations present in this OMAG Server Config store
    • getFileNames

      protected Set<String> getFileNames(String templateString, String methodName)
      Get filenames from the file system that match the store template. Only supports 1 or 2 inserts in the template and they need to be in different url segments. When a file is matched on the file system, the match for the insert is the serverName.
      Parameters:
      methodName - callers name for diagnostics
      Returns:
      set of filenames fro the file System that match the template
    • disconnect

      public void disconnect()
      Free up any resources held since the connector is no longer needed.
      Overrides:
      disconnect in class ConnectorBase
    • equals

      public boolean equals(Object obj)
      Provide a common implementation of equals for all OCF Connector Provider objects. The UUID is unique and is randomly assigned and so its hashCode is as good as anything to evaluate the equality of the connector provider object.
      Overrides:
      equals in class ConnectorBase
      Parameters:
      obj - object to test
      Returns:
      boolean flag
    • hashCode

      public int hashCode()
      Provide a common implementation of hashCode for all OCF Connector objects. The UUID is unique and is randomly assigned and so its hashCode is as good as anything to describe the hash code of the connector object.
      Overrides:
      hashCode in class ConnectorBase
      Returns:
      random UUID as hashcode