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.
@EvolvingAll public final class DefaultingPurpose<S extends Secret> extends Object
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
Constructors Constructor Description DefaultingPurpose(Purpose<S> defaultPurpose, String customSecretId)
Creates a new defaulting purpose.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Purpose<S>
getCustomPurpose(String instanceId)
Returns the instance specific purpose.Purpose<S>
getDefaultPurpose()
Returns the default purpose.
-
-
-
Constructor Detail
-
DefaultingPurpose
public DefaultingPurpose(Purpose<S> defaultPurpose, String customSecretId)
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.
-
-