public final class SecretStoreAccessor extends Object
Modifier and Type | Method and Description |
---|---|
static KeyStore |
getKeyStore(String name,
SecretStore password)
Retrieves a
KeyStore by its name. |
static SecretStore |
getSecretStore(String name)
Retrieves a
SecretStore by its name. |
static SecretStoreFacade |
getSecretStoreFacade()
Returns the
SecretStoreFacade instance. |
static void |
setSecretStoreFacade(SecretStoreFacade secretStoreFacade)
Replaces the default
SecretStoreFacade instance. |
static io.vavr.control.Try<KeyStore> |
tryGetKeyStore(String name,
SecretStore password)
Retrieves a
KeyStore by its name. |
static io.vavr.control.Try<SecretStore> |
tryGetSecretStore(String name)
Retrieves a
SecretStore by its name. |
static io.vavr.control.Try<SecretStoreFacade> |
tryGetSecretStoreFacade()
Returns a
Try of the SecretStoreFacade instance. |
@Nullable public static SecretStoreFacade getSecretStoreFacade()
SecretStoreFacade
instance.SecretStoreFacade
instance, or null
.@Nonnull public static io.vavr.control.Try<SecretStoreFacade> tryGetSecretStoreFacade()
Try
of the SecretStoreFacade
instance.Try
of the SecretStoreFacade
instance.public static void setSecretStoreFacade(@Nullable SecretStoreFacade secretStoreFacade)
SecretStoreFacade
instance.secretStoreFacade
- An instance of SecretStoreFacade
. Use null
to reset the facade.@Nonnull public static SecretStore getSecretStore(@Nonnull String name) throws SecretStoreAccessException
SecretStore
by its name.name
- The name identifying a SecretStore
.SecretStore
for the given name.SecretStoreAccessException
- If there is an issue while accessing the SecretStore
.@Nonnull public static io.vavr.control.Try<SecretStore> tryGetSecretStore(@Nonnull String name)
SecretStore
by its name.name
- The name identifying a SecretStore
.Try
of the SecretStore
for the given name.@Nonnull public static KeyStore getKeyStore(@Nonnull String name, @Nonnull SecretStore password) throws KeyStoreAccessException
KeyStore
by its name.name
- The name identifying a KeyStore
.password
- The password to unlock the KeyStore
.KeyStore
for the given name.KeyStoreAccessException
- If there is an issue while accessing the KeyStore
.Copyright © 2019 SAP SE. All rights reserved.