public abstract class KeyringBackend extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
keyStorePath
Path to key store.
|
| Constructor and Description |
|---|
KeyringBackend() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
deletePassword(String service,
String account) |
abstract String |
getId()
Gets backend Id.
|
String |
getKeyStorePath()
Gets path to key store.
|
abstract String |
getPassword(String service,
String account)
Gets password from key store.
|
abstract boolean |
isKeyStorePathRequired()
Returns true if the backend directory uses some file to store passwords.
|
abstract boolean |
isSupported()
Returns true when the backend is supported.
|
void |
setKeyStorePath(String path)
Sets path to key store.
|
abstract void |
setPassword(String service,
String account,
String password)
Sets password to key store.
|
protected String keyStorePath
public abstract String getId()
public String getKeyStorePath()
public void setKeyStorePath(String path)
path - Path to key storepublic abstract boolean isSupported()
public abstract boolean isKeyStorePathRequired()
public abstract String getPassword(String service, String account) throws LockException, PasswordRetrievalException
service - Service nameaccount - Account namePasswordRetrievalException - Thrown when an error happened while getting passwordLockException - Thrown when an error happened while getting passwordpublic abstract void setPassword(String service, String account, String password) throws LockException, PasswordSaveException
service - Service nameaccount - Account namepassword - PasswordPasswordSaveException - Thrown when an error happened while saving the passwordLockException - Thrown when an error happened while getting passwordpublic abstract void deletePassword(String service, String account) throws LockException, PasswordSaveException
LockExceptionPasswordSaveExceptionCopyright © 2019 Java Keyring. All rights reserved.