public class SecretStoreAccessor extends Object
This class handles the access to the secret and key store by delegating the calls to the underlying
SecretStoreFacade
.
Constructor and Description |
---|
SecretStoreAccessor() |
Modifier and Type | Method and Description |
---|---|
static KeyStore |
getKeyStore(String name,
SecretStore password) |
static SecretStore |
getSecretStore(String name) |
static SecretStoreFacade |
getSecretStoreFacade()
Returns the
SecretStoreFacade instance. |
static void |
setSecretStoreFacade(SecretStoreFacade secretStoreFacade)
Replaces the default
SecretStoreFacade instance. |
public static void setSecretStoreFacade(SecretStoreFacade secretStoreFacade)
SecretStoreFacade
instance. This method is for internal use only.secretStoreFacade
- The facade to replace the current/default one with.public static SecretStore getSecretStore(String name) throws SecretStoreNotFoundException, SecretStoreAccessException
name
- The name identifying a SecretStore
.SecretStore
for the given name.SecretStoreNotFoundException
- If the SecretStore
cannot be found.SecretStoreAccessException
- If there is an issue while accessing the SecretStore
.public static KeyStore getKeyStore(String name, SecretStore password) throws KeyStoreNotFoundException, KeyStoreAccessException
name
- The name identifying a KeyStore
.password
- The password to unlick the KeyStore
.KeyStore
for the given name.KeyStoreNotFoundException
- If the KeyStore
cannot be found.KeyStoreAccessException
- If there is an issue while accessing the KeyStore
.@Nullable public static SecretStoreFacade getSecretStoreFacade()
SecretStoreFacade
instance. For internal use only.Copyright © 2018 SAP SE. All rights reserved.