Class OrderedStableIdResolver
java.lang.Object
org.forgerock.secrets.propertyresolver.OrderedStableIdResolver
- All Implemented Interfaces:
StableIdResolver
A
StableIdResolver
that uses a version suffix and a subsequent number to determine
the stableId of a Secret
.-
Constructor Summary
ConstructorDescriptionOrderedStableIdResolver
(String versionSuffix) Constructor for OrderedVersionStableIdResolver. -
Method Summary
Modifier and TypeMethodDescriptioncandidatesForPurpose
(Stream<SecretResource> candidates, String purpose) Creates candidate stream in order from latest to oldest, latest being the active secret for the purpose label.getPurposeLabelFromStableId
(String stableId) Pulls the purpose label from the stableId.
-
Constructor Details
-
OrderedStableIdResolver
Constructor for OrderedVersionStableIdResolver.- Parameters:
versionSuffix
- the version suffix prepended to each version
-
-
Method Details
-
getPurposeLabelFromStableId
Description copied from interface:StableIdResolver
Pulls the purpose label from the stableId.- Specified by:
getPurposeLabelFromStableId
in interfaceStableIdResolver
- Parameters:
stableId
- The stableId of a secret- Returns:
- The purpose label of the given stableId
-
candidatesForPurpose
public Stream<SecretResource> candidatesForPurpose(Stream<SecretResource> candidates, String purpose) Description copied from interface:StableIdResolver
Creates candidate stream in order from latest to oldest, latest being the active secret for the purpose label.- Specified by:
candidatesForPurpose
in interfaceStableIdResolver
- Parameters:
candidates
- stream of candidate secret resources for the secretpurpose
- purpose label for the secret to match candidates to- Returns:
- stream of
SecretResource
-