Package org.forgerock.secrets.vault
Interface VaultKeyValueSecretStore.SecretFieldDecoder
- 
- All Superinterfaces:
 BiFunction<SecretBuilder,JsonValue,Promise<SecretBuilder,NoSuchSecretException>>
- All Known Implementing Classes:
 VaultKeyValueSecretStore.SecretField
- Enclosing class:
 - VaultKeyValueSecretStore
 
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
@FunctionalInterface public static interface VaultKeyValueSecretStore.SecretFieldDecoder extends BiFunction<SecretBuilder,JsonValue,Promise<SecretBuilder,NoSuchSecretException>>
Determines how a field in the Vault JSON response should be decoded into one or more fields on aSecretBuilderobject. SeeVaultKeyValueSecretStore.SecretFieldfor standard implementations. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Promise<SecretBuilder,NoSuchSecretException>apply(SecretBuilder secretBuilder, JsonValue jsonValue)Decodes a JSON value into one or more fields on aSecretBuilder.- 
Methods inherited from interface java.util.function.BiFunction
andThen 
 - 
 
 - 
 
- 
- 
Method Detail
- 
apply
Promise<SecretBuilder,NoSuchSecretException> apply(SecretBuilder secretBuilder, JsonValue jsonValue)
Decodes a JSON value into one or more fields on aSecretBuilder. The function will be passed theJsonValuecorresponding to the data element in the response (if it exists) and should return a modified copy of the secret builder with fields set from the data.- Specified by:
 applyin interfaceBiFunction<SecretBuilder,JsonValue,Promise<SecretBuilder,NoSuchSecretException>>- Parameters:
 secretBuilder- the secret builder to populate.jsonValue- the JSON value to process.- Returns:
 - a promise for a new secret builder or an exception if the data cannot be processed.
 
 
 - 
 
 -