Class CredentialsImpl
- java.lang.Object
-
- org.springframework.extensions.webscripts.connector.CredentialsImpl
-
- All Implemented Interfaces:
java.io.Serializable,Credentials
public class CredentialsImpl extends java.lang.Object implements Credentials, java.io.Serializable
Credentials for a given user. This stores credentials that are to be passed to a back-end service in order to authenticate. Once these credentials are used to authenticate, they may no longer be necessary as the service may hand back "endpoint credentials" which are to be used on subsequent calls. An example of a user credential might be username/password. An example of an endpoint credential might be an Alfresco ticket.- Author:
- muzquiano
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringendpointIdprotected booleanpersistentprotected java.util.HashMap<java.lang.String,java.lang.Object>properties-
Fields inherited from interface org.springframework.extensions.webscripts.connector.Credentials
CREDENTIAL_PASSWORD, CREDENTIAL_USERNAME
-
-
Constructor Summary
Constructors Constructor Description CredentialsImpl(java.lang.String endpointId)Instantiates a new user credential.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEndpointId()Gets the endpoint id.java.lang.ObjectgetProperty(java.lang.String key)Gets a given propertyjava.lang.String[]getPropertyKeys()Returns the property keysbooleanisPersistent()Returns whether this credential is persistent A persistent credential is written to a persistent vault.voidremoveAllProperties(java.lang.String key)Removes all propertiesvoidremoveProperty(java.lang.String key)Removes a given propertyvoidsetProperty(java.lang.String key, java.lang.Object value)Sets a given propertyjava.lang.StringtoString()
-
-
-
Method Detail
-
getEndpointId
public java.lang.String getEndpointId()
Description copied from interface:CredentialsGets the endpoint id.- Specified by:
getEndpointIdin interfaceCredentials- Returns:
- the endpoint id
-
getProperty
public java.lang.Object getProperty(java.lang.String key)
Description copied from interface:CredentialsGets a given property- Specified by:
getPropertyin interfaceCredentials- Parameters:
key- the key- Returns:
- the property
-
setProperty
public void setProperty(java.lang.String key, java.lang.Object value)Description copied from interface:CredentialsSets a given property- Specified by:
setPropertyin interfaceCredentials- Parameters:
key- the keyvalue- the value
-
removeProperty
public void removeProperty(java.lang.String key)
Description copied from interface:CredentialsRemoves a given property- Specified by:
removePropertyin interfaceCredentials- Parameters:
key- String
-
removeAllProperties
public void removeAllProperties(java.lang.String key)
Description copied from interface:CredentialsRemoves all properties- Specified by:
removeAllPropertiesin interfaceCredentials- Parameters:
key- String
-
getPropertyKeys
public java.lang.String[] getPropertyKeys()
Description copied from interface:CredentialsReturns the property keys- Specified by:
getPropertyKeysin interfaceCredentials- Returns:
- array of property keys
-
isPersistent
public boolean isPersistent()
Description copied from interface:CredentialsReturns whether this credential is persistent A persistent credential is written to a persistent vault. A non-persistent credential is loaded into the vault but never stored- Specified by:
isPersistentin interfaceCredentials- Returns:
- boolean
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-