public static class User.Credentials extends BusinessEntity
| Constructor and Description |
|---|
Credentials(org.json.JSONObject jsonObject)
Credential's constructor.
|
Credentials(java.lang.String json)
Credential's constructor.
|
Credentials(java.lang.String username,
java.lang.String password)
Credential's constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getPassword()
Get the user's password.
|
java.lang.String |
getUsername()
Get the user's username.
|
boolean |
isValid()
Check that the username and password are not both empty.
|
protected void |
loadFromJSONObject(org.json.JSONObject jsonObject)
Set the BusinessEntity's properties loading them from a JSONObject.
|
org.json.JSONObject |
toJSONObject()
Convert a BusinessEntity to JSONObject.
|
getJSONObject, toStringpublic Credentials(java.lang.String username,
java.lang.String password)
username - The user's username.password - The user's password.public Credentials(org.json.JSONObject jsonObject)
jsonObject - The JSONObject.public Credentials(java.lang.String json)
json - The json string.public java.lang.String getUsername()
public java.lang.String getPassword()
public boolean isValid()
public org.json.JSONObject toJSONObject()
BusinessEntitytoJSONObject in class BusinessEntityBusinessEntity.toJSONObject()protected void loadFromJSONObject(org.json.JSONObject jsonObject)
BusinessEntityloadFromJSONObject in class BusinessEntityjsonObject - The JSONObject.BusinessEntity.loadFromJSONObject(JSONObject)