Class SingletonStableIdResolver
- java.lang.Object
-
- org.forgerock.secrets.propertyresolver.SingletonStableIdResolver
-
- All Implemented Interfaces:
StableIdResolver
public class SingletonStableIdResolver extends Object implements StableIdResolver
AStableIdResolver
that matches a stableId exactly to the purpose for returning only oneSecret
.
-
-
Constructor Summary
Constructors Constructor Description SingletonStableIdResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<SecretResource>
candidatesForPurpose(Stream<SecretResource> candidates, String purpose)
Creates candidate stream in order from latest to oldest, latest being the active secret for the purpose label.String
getPurposeLabelFromStableId(String stableId)
Pulls the purpose label from the stableId.
-
-
-
Method Detail
-
getPurposeLabelFromStableId
public String getPurposeLabelFromStableId(String stableId)
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
-
-