Class NoSuchSecretException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.forgerock.secrets.NoSuchSecretException
All Implemented Interfaces:
Serializable

public class NoSuchSecretException extends Exception
Indicates that no secret was configured for the given purpose, or the named secret is not available.
See Also:
  • Constructor Details

    • NoSuchSecretException

      public NoSuchSecretException(Purpose<?> purpose, String id)
      Constructs the exception for the given purpose and secret stable id.
      Parameters:
      purpose - the purpose.
      id - the stable id of the secret that was not found.
    • NoSuchSecretException

      public NoSuchSecretException(Purpose<?> purpose)
      Constructs the exception for the given purpose.
      Parameters:
      purpose - the purpose.
    • NoSuchSecretException

      public NoSuchSecretException(String id)
      Constructs the exception for the given secret stable id.
      Parameters:
      id - the stable id of the secret that was not found.
    • NoSuchSecretException

      public NoSuchSecretException(String message, Throwable cause)
      Constructs a new exception with the specified detail message and cause. Note that this does not capture the secretId or purpose.
      Parameters:
      message - the detail message
      cause - the cause
  • Method Details

    • getPurpose

      public Purpose<?> getPurpose()
      Returns the purpose for which no secret was found, or null if not specified.
      Returns:
      the purpose for which no secret was found.
    • getSecretId

      public String getSecretId()
      Returns the stable id of the secret that was not found, or null if not specified.
      Returns:
      the stable if of the secret that was not found, or null if not specified.