public class Account
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Account.AccountBuilder
Builder class responsible for producing Accounts.
|
| Constructor and Description |
|---|
Account(java.lang.String issuer,
java.lang.String displayIssuer,
java.lang.String accountName,
java.lang.String displayAccountName,
java.lang.String imageURL,
java.lang.String backgroundColor,
java.util.Calendar timeAdded)
Creates Account object with given information.
|
| Modifier and Type | Method and Description |
|---|---|
static Account.AccountBuilder |
builder()
Returns a builder for creating an Account.
|
int |
compareTo(Account another) |
static Account |
deserialize(java.lang.String jsonString)
Deserializes the specified Json into an object of the
Account object. |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAccountName()
Returns the name of this account.
|
java.lang.String |
getBackgroundColor()
Gets the background color for the IDP that issued this account.
|
java.lang.String |
getDisplayAccountName()
Returns the name of this account.
|
java.lang.String |
getDisplayIssuer()
Gets the alternative name of the IDP that issued this account.
|
java.lang.String |
getId()
Gets the unique identifier for the Account.
|
java.lang.String |
getImageURL()
Gets the image URL for the IDP that issued this account.
|
java.lang.String |
getIssuer()
Gets the name of the IDP that issued this account.
|
java.util.List<Mechanism> |
getMechanisms()
Get the list of mechanisms associates with this account.
|
java.util.Calendar |
getTimeAdded()
Get the Date and Time this Account was stored.
|
int |
hashCode() |
boolean |
matches(Account other)
Returns true if the two objects would conflict if added to a storage system.
|
void |
setDisplayAccountName(java.lang.String accountName)
Sets an alternative name for the account.
|
void |
setDisplayIssuer(java.lang.String issuer)
Sets an alternative Issuer for this account.
|
java.lang.String |
toJson()
Creates a JSON string representation of
T object. |
public Account(java.lang.String issuer,
java.lang.String displayIssuer,
java.lang.String accountName,
java.lang.String displayAccountName,
java.lang.String imageURL,
java.lang.String backgroundColor,
java.util.Calendar timeAdded)
issuer - String value of issuerdisplayIssuer - String alternative value of the issueraccountName - String value of accountName or usernamedisplayAccountName - String alternative value of the accountNameimageURL - URL of account's logo image (optional)backgroundColor - String HEX code of account's background color (optional)timeAdded - Date and Time this Account was storedpublic static Account.AccountBuilder builder()
public java.lang.String getId()
public java.lang.String getIssuer()
public java.lang.String getDisplayIssuer()
issuer if
displayIssuer is not set.public void setDisplayIssuer(java.lang.String issuer)
issuer - The new IDP name.public java.lang.String getDisplayAccountName()
accountName if displayAccountName
is not set.public void setDisplayAccountName(java.lang.String accountName)
accountName - The new account name.public java.lang.String getAccountName()
public java.lang.String getImageURL()
public java.lang.String getBackgroundColor()
public java.util.Calendar getTimeAdded()
public java.util.List<Mechanism> getMechanisms()
public java.lang.String toJson()
T object. Sensitive information are not
exposed.public static Account deserialize(java.lang.String jsonString)
Account object.jsonString - the json string representing the object to be deserializedAccount object from the string. Returns null if jsonString is null,
if jsonString is empty or not able to parse it.public boolean matches(Account other)
other - The object to compare.public int compareTo(Account another)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object