Package org.forgerock.secrets
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NoSuchSecretException(String id)
Constructs the exception for the given purpose and secret stable id.NoSuchSecretException(Purpose<?> purpose)
Constructs the exception for the given purpose.NoSuchSecretException(Purpose<?> purpose, String id)
Constructs the exception for the given purpose and secret stable id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Purpose<?>
getPurpose()
Returns the purpose for which no secret was found.String
getSecretId()
Returns the stable id of the secret that was not found, or null if not specified.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
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 purpose and secret stable id.- Parameters:
id
- the stable id of the secret that was not found.
-
-
Method Detail
-
getPurpose
public Purpose<?> getPurpose()
Returns the purpose for which no secret was found.- 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.
-
-