public class SimpleCredentials extends PropertyContainer implements Credentials, java.lang.Cloneable
NL, properties, RESERVED_NAME| Constructor and Description |
|---|
SimpleCredentials(java.lang.String username,
char[] password)
Creates SimpleCredentials object from the given username and password.
|
SimpleCredentials(java.lang.String username,
java.lang.String password)
Creates SimpleCredentials object from the given username and password.
|
| Modifier and Type | Method and Description |
|---|---|
SimpleCredentials |
clone() |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the named attributes as an Object, or
null if
no attribute of the given name exists. |
java.lang.String |
getPassword() |
java.lang.String |
getUsername() |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Stores an attribute in this credentials instance.
|
java.lang.String |
toString() |
SimpleCredentials |
withAttribute(java.lang.String name,
java.lang.Object value)
Stores an attribute in this credentials instance and return the updated
SimpleCredentials object. |
appendPropertiesTo, appendPropertiesTo, asDate, asDate, asInteger, asInteger, asLong, asLong, asString, asString, elementName, getProperties, getProperty, getPropertyMap, hasProperties, hasProperty, isVisible, jsonElementName, removeProperty, setPropertiesFrom, setProperty, toJsonpublic SimpleCredentials(java.lang.String username,
char[] password)
username - the given username.password - the given password.public SimpleCredentials(java.lang.String username,
java.lang.String password)
username - the given username.password - the given password.public java.lang.Object getAttribute(java.lang.String name)
null if
no attribute of the given name exists.name - a String specifying the name of the attribute.null if the
attribute does not exists.public void setAttribute(java.lang.String name,
java.lang.Object value)
name - the String specifying the name of attribute.value - the Object to be stored.public SimpleCredentials withAttribute(java.lang.String name, java.lang.Object value)
SimpleCredentials object.name - the String specifying the name of attribute.value - the Object to be store.SimpleCredentials object with the new
new attribute to store.public java.lang.String getUsername()
public java.lang.String getPassword()
public SimpleCredentials clone()
clone in class PropertyContainerSimpleCredentials object.public java.lang.String toString()
toString in class PropertyContainer