public interface Wallet
Modifier and Type | Method and Description |
---|---|
void |
closeWallet(boolean forcedSave)
Close the wallet.
|
void |
createNewWallet()
Create a new wallet.
|
void |
deleteWallet()
Delete the wallet file.
|
boolean |
exists(String alias)
Check the existent of a credential in the wallet.
|
Credential |
getCredential(String alias)
Retrieve the credential from the underlying wallet that matches the alias
|
Credentials |
loadCredentials()
Retrieve a list of credentials from underlying wallet.
|
void |
removeCredential(String alias)
Remove a credential from the wallet.
|
void |
setCredential(Credential cred)
Persist a credential to the underlying wallet.
|
boolean |
walletExists(String location,
char[] walletPassword)
Check the existent of a wallet file.
|
void closeWallet(boolean forcedSave) throws FMWCredentialsException
forcedSave
- flag to indicate if wallet file need to be saved regardless if any wallet keyStore change has occurred.FMWCredentialsException
- an error occurred when closing the wallet.void createNewWallet() throws FMWCredentialsException
FMWCredentialsException
- an error occurred when creating a new wallet.void deleteWallet() throws FMWCredentialsException
FMWCredentialsException
- an error occurred when deleting the wallet.boolean exists(String alias)
alias
- Credential aliasCredentials loadCredentials() throws FMWCredentialsException
FMWCredentialsException
- an error occurred when retrieving credentials from the wallet.void removeCredential(String alias) throws FMWCredentialsException
alias
- The alias of the credential that is being removedFMWCredentialsException
- an error occurred when removing a credential from the wallet.void setCredential(Credential cred) throws FMWCredentialsException
cred
- The credential object that need to be persistedFMWCredentialsException
- an error occurred when persisting a credential to the wallet.boolean walletExists(String location, char[] walletPassword)
location
- File path to the wallet file.walletPassword
- Wallet passwordCredential getCredential(String alias) throws FMWCredentialsException
alias
- The alias of the credential that is being retrievedFMWCredentialsException
- if there is a problem accessing the underlying wallet