public class DefaultAccount extends Object implements Account
Account implementation| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultAccount.AccountBuilder
Default
DefaultAccount.AccountBuilder implementation |
Account.AccountProvider, Account.BuilderCredentialsContainer.CredentialsMatcher| Constructor and Description |
|---|
DefaultAccount(String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Object |
getCredentials()
Account stored credentials data
|
Map<String,Object> |
getDetails()
Optional account details (e.g.
|
String |
getId()
Account id (required).
|
Collection<Permission> |
getPermissions()
Optional permissions granted to account
|
int |
hashCode() |
boolean |
isEnabled()
Indicates whether this account is enabled
|
boolean |
isExpired()
Indicates whether this account has expired
|
boolean |
isLocked()
Indicates whether this account is locked
|
boolean |
isRoot()
Whether account is
root, i.e. |
void |
setCredentials(Object credentials)
Set account credentials
|
void |
setDetail(String key,
Object value)
Add (or replace if given key already exists) a detail
|
void |
setDetails(Map<String,Object> details)
Set account details
|
void |
setEnabled(boolean enabled)
Set whether is enabled
|
void |
setExpired(boolean expired)
Set whether has expired
|
void |
setLocked(boolean locked)
Set whether is locked
|
void |
setPermissions(Collection<Permission> permissions)
Set account permissions
|
void |
setRoot(boolean root)
Set whether account is
root, i.e. |
String |
toString() |
accountCredentialsToken, accountCredentialsToken, authenticator, authenticator, builderdefaultMatcherpublic DefaultAccount(String id)
id - Account id (not null)public String getId()
Accountusername if account represents a user.public Object getCredentials()
AccountgetCredentials in interface AccountgetCredentials in interface CredentialsContainerpublic boolean isRoot()
Accountroot, i.e. has any permission. If this method returns true,
Account.getPermissions() is ignored.public Map<String,Object> getDetails()
AccountgetDetails in interface Accountpublic Collection<Permission> getPermissions()
AccountgetPermissions in interface Accountpublic boolean isEnabled()
Accountpublic boolean isLocked()
Accountpublic boolean isExpired()
Accountpublic void setRoot(boolean root)
root, i.e. has any permissionroot - If true, getPermissions() is ignored.public void setCredentials(Object credentials)
credentials - the credentials to setpublic void setDetails(Map<String,Object> details)
details - the details to setpublic void setDetail(String key, Object value)
key - Keyvalue - Valuepublic void setPermissions(Collection<Permission> permissions)
permissions - the permissions to setpublic void setEnabled(boolean enabled)
enabled - true if enabledpublic void setLocked(boolean locked)
locked - true if lockedpublic void setExpired(boolean expired)
expired - true if expiredCopyright © 2019 The Holon Platform. All rights reserved.