Package org.forgerock.openam.secrets
Class DefaultingPurpose<S extends Secret>
java.lang.Object
org.forgerock.openam.secrets.DefaultingPurpose<S>
- Type Parameters:
S
- The type of the secret.
A purpose that can fallback to a default secret ID if the first - more specific - secret ID could not be found
in the secrets provider.
- Since:
- AM 6.5.0
-
Constructor Summary
ConstructorDescriptionDefaultingPurpose
(Purpose<S> defaultPurpose, String customSecretId) Creates a new defaulting purpose. -
Method Summary
Modifier and TypeMethodDescriptiongetCustomPurpose
(String instanceId) Returns the instance specific purpose.Returns the default purpose.
-
Constructor Details
-
DefaultingPurpose
Creates a new defaulting purpose.- Parameters:
defaultPurpose
- The default purpose to use if the custom purpose is not available in the secrets provider.customSecretId
- The instance specific secret ID to use if available. The ID must contain %s.
-
-
Method Details
-
getCustomPurpose
Returns the instance specific purpose.- Parameters:
instanceId
- The instance ID to include in the secret ID.- Returns:
- The instance specific purpose.
-
getDefaultPurpose
Returns the default purpose.- Returns:
- The default purpose.
-