Package org.forgerock.openig.secrets
Class DefaultSecretsService.Builder
- java.lang.Object
-
- org.forgerock.openig.secrets.DefaultSecretsService.Builder
-
- Enclosing class:
- DefaultSecretsService
public static class DefaultSecretsService.Builder extends Object
DefaultSecretsService
's builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
injectIn(HeapImpl destination)
Builds and configures a newDefaultSecretsService
instance, and finally inject the reference in the givendestination
HeapImpl
.DefaultSecretsService.Builder
withDefaultStore(Supplier<SecretStore<?>> supplier)
Configure this service with a default SecretStore supplier.DefaultSecretsService.Builder
withSecretsProvider(SecretsProvider provider)
Configure this service with the givenprovider
.DefaultSecretsService.Builder
withSecretsService(SecretsService service)
Configure this service with the given parent secretsservice
.
-
-
-
Method Detail
-
withSecretsProvider
public DefaultSecretsService.Builder withSecretsProvider(SecretsProvider provider)
Configure this service with the givenprovider
.Note that this automatically replace any previously set reference to
SecretsService
.- Parameters:
provider
- secrets provider- Returns:
- this builder.
-
withSecretsService
public DefaultSecretsService.Builder withSecretsService(SecretsService service)
Configure this service with the given parent secretsservice
.Note that this automatically replace any previously set reference to
SecretsProvider
.- Parameters:
service
- parentSecretsService
- Returns:
- this builder.
-
withDefaultStore
public DefaultSecretsService.Builder withDefaultStore(Supplier<SecretStore<?>> supplier)
Configure this service with a default SecretStore supplier.This supplier will only be called if there is no store configured in the JSON node.
- Parameters:
supplier
- provide a defaultSecretStore
- Returns:
- this builder
-
injectIn
public void injectIn(HeapImpl destination) throws HeapException
Builds and configures a newDefaultSecretsService
instance, and finally inject the reference in the givendestination
HeapImpl
.- Parameters:
destination
- heap receiving the new SecretsService- Throws:
HeapException
- if cannot build the instance
-
-