Class SimpleSecretsBiz

java.lang.Object
net.solarnetwork.central.biz.SimpleSecretsBiz
All Implemented Interfaces:
SecretsBiz

public class SimpleSecretsBiz extends Object implements SecretsBiz
A very basic implementation of SecretsBiz designed for testing and development.
  • Constructor Details

    • SimpleSecretsBiz

      public SimpleSecretsBiz(Path dir, String password)
  • Method Details

    • getSecret

      public String getSecret(String secretName)
      Description copied from interface: SecretsBiz
      Get a secret value.
      Specified by:
      getSecret in interface SecretsBiz
      Parameters:
      secretName - the unique name of the secret to get
      Returns:
      the secret value, or null if one does not exist
    • putSecret

      public void putSecret(String secretName, String secretValue)
      Description copied from interface: SecretsBiz
      Put a secret value.

      This will replace any existing value of a secret with the same name.

      Specified by:
      putSecret in interface SecretsBiz
      Parameters:
      secretName - the unique name of the secret to put
      secretValue - the value to store
    • deleteSecret

      public void deleteSecret(String secretName)
      Description copied from interface: SecretsBiz
      Delete a secret.
      Specified by:
      deleteSecret in interface SecretsBiz
      Parameters:
      secretName - the name of the secret to delete