public class StringKeyStoreBuilder extends Object implements KeyStoreBuilder<String>
Constructor and Description |
---|
StringKeyStoreBuilder() |
Modifier and Type | Method and Description |
---|---|
String |
buildAlias(String alias)
Build an alias based on the input provided.
|
String |
credentialToKey(Credential credential)
Convert a credential to a key value.
|
Credential |
getKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore)
Retrieves a key form a key store.
|
List<String> |
getKeysFromKeyStore(oracle.security.pki.OracleSecretStore secretStore)
Retrieves all the keys from the key store.
|
Credential |
keyToCredential(String key)
Converts a key to a credential.
|
void |
persistKeyToKeyStore(String alias, String key, oracle.security.pki.OracleSecretStore secretStore)
Saves a key to a key store.
|
void |
removeKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore)
Removes a key form a key store.
|
public String buildAlias(String alias)
KeyStoreBuilder
buildAlias
in interface KeyStoreBuilder<String>
alias
- base alias namepublic String credentialToKey(Credential credential)
KeyStoreBuilder
credentialToKey
in interface KeyStoreBuilder<String>
credential
- the credentialpublic List<String> getKeysFromKeyStore(oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuilder
getKeysFromKeyStore
in interface KeyStoreBuilder<String>
secretStore
- the key store.FMWCredentialsException
- if an error occurspublic Credential keyToCredential(String key) throws FMWCredentialsException
KeyStoreBuilder
keyToCredential
in interface KeyStoreBuilder<String>
key
- the key to be convertedFMWCredentialsException
- if an error occurspublic Credential getKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuilder
getKeyFromKeyStore
in interface KeyStoreBuilder<String>
alias
- the key to be retrievedsecretStore
- the key storeFMWCredentialsException
- if an error occurspublic void persistKeyToKeyStore(String alias, String key, oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuilder
persistKeyToKeyStore
in interface KeyStoreBuilder<String>
alias
- the key aliaskey
- the key to be storedsecretStore
- the store to be used in saving the keyFMWCredentialsException
- if an error occurspublic void removeKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuilder
removeKeyFromKeyStore
in interface KeyStoreBuilder<String>
alias
- the alias identifying the key to be removedsecretStore
- the store to be usedFMWCredentialsException
- if an error occurs