public class SimpleCredentialVault extends Object implements CredentialVault, Serializable
Credentials can be stored and retrieved from this vault but they will be lost when the server is restarted.
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Credentials> |
credentialsMap |
protected String |
id |
protected RemoteConfigElement |
remote |
| Constructor and Description |
|---|
SimpleCredentialVault(String id,
RemoteConfigElement remote)
Instantiates a new simple credential vault.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getStoredIds()
Returns the ids for stored credentials
|
boolean |
hasCredentials(String endpointId) |
Credentials |
newCredentials(String endpointId)
Creates new credentials which are stored in this vault
|
void |
remove(String endpointId)
Removes credentials for a given endpoint id from the vault
|
Credentials |
retrieve(String endpointId)
Retrieves credentials for a given endpoint id from the vault
|
void |
store(Credentials credentials)
Places the given credentials into the vault
|
String |
toString() |
protected final String id
protected final Map<String,Credentials> credentialsMap
protected final RemoteConfigElement remote
public SimpleCredentialVault(String id, RemoteConfigElement remote)
id - the idpublic void store(Credentials credentials)
CredentialVaultstore in interface CredentialVaultcredentials - the credentialspublic Credentials retrieve(String endpointId)
CredentialVaultretrieve in interface CredentialVaultendpointId - the endpoint idpublic void remove(String endpointId)
CredentialVaultremove in interface CredentialVaultendpointId - Stringpublic boolean hasCredentials(String endpointId)
hasCredentials in interface CredentialVaultpublic String[] getStoredIds()
CredentialVaultgetStoredIds in interface CredentialVaultpublic Credentials newCredentials(String endpointId)
CredentialVaultnewCredentials in interface CredentialVaultendpointId - StringCopyright © 2005–2015 Alfresco Software. All rights reserved.