Package org.forgerock.secrets.keystore
Class KeyStoreSecretStore.PredicateAliasSpecProvider
java.lang.Object
org.forgerock.secrets.keystore.KeyStoreSecretStore.PredicateAliasSpecProvider
- All Implemented Interfaces:
KeyStoreSecretStore.AliasSpecProvider
- Enclosing class:
- KeyStoreSecretStore
public static final class KeyStoreSecretStore.PredicateAliasSpecProvider
extends Object
implements KeyStoreSecretStore.AliasSpecProvider
Serves a matching subset of the aliases present in a KeyStore based on a predicate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new AliasSpec in the list of usable aliases.aliasSpecs
(List<String> aliases) Returns a list of every usable aliases in a KeyStore, may use a KeyStore's aliases list.boolean
Removes an alias from the usable aliases of a KeyStore.
-
Constructor Details
-
PredicateAliasSpecProvider
Constructor.- Parameters:
predicate
- the predicate filtering the aliases from the keyStore
-
-
Method Details
-
aliasSpecs
Description copied from interface:KeyStoreSecretStore.AliasSpecProvider
Returns a list of every usable aliases in a KeyStore, may use a KeyStore's aliases list.- Specified by:
aliasSpecs
in interfaceKeyStoreSecretStore.AliasSpecProvider
- Parameters:
aliases
- The list of every aliases present in a KeyStore- Returns:
- a list of AliasSpecs which should be present in a KeyStore
-
remove
Description copied from interface:KeyStoreSecretStore.AliasSpecProvider
Removes an alias from the usable aliases of a KeyStore.- Specified by:
remove
in interfaceKeyStoreSecretStore.AliasSpecProvider
- Parameters:
spec
- the alias to remove- Returns:
- true if the alias has been removed, false otherwise
-
addOrReplace
Description copied from interface:KeyStoreSecretStore.AliasSpecProvider
Adds a new AliasSpec in the list of usable aliases. If the alias was already present, overrides it.- Specified by:
addOrReplace
in interfaceKeyStoreSecretStore.AliasSpecProvider
- Parameters:
spec
- the AliasSpec to add into the usable aliases list.
-