public interface Account extends AccountTypes
Persona,
AccountManager| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
ANY_ACCOUNT, GROUP_ACCOUNT, LOGIN_ACCOUNT, PRIVILEGE_ACCOUNT| Modifier and Type | Method and Description |
|---|---|
void |
addGroup(java.lang.String newGroupName)
Makes this account a member of a new group.
|
AccountManager |
getAccountManager()
Returns the account manager associated with this account.
|
java.lang.String |
getAccountName()
Returns the name of the account.
|
int |
getAccountType()
Returns the account type.
|
java.lang.String |
getAttribute(java.lang.String attributeName)
Retrieves the string value of a given attribute.
|
java.util.Map |
getAttributes()
Retrieves a mapping of all defined attributes and their values from
the account.
|
java.util.Iterator |
listGroups()
Returns an enumeration of the groups that this account is a member of.
|
java.util.Iterator |
listMembers()
If this Account is a group, return the names of the members of the group.
|
void |
removeGroup(java.lang.String groupName)
Removes a group from the set of groups that this account is a member
of.
|
void |
setAttribute(java.lang.String attributeName,
java.lang.String newValue)
Changes the value of a given attribute.
|
void |
setAttributes(java.util.Map newAttributes)
Changes the values of a set of account attributes.
|
void |
setGroups(java.lang.String[] newGroups)
Makes this account a member of a set of groups.
|
static final java.lang.String CLASS_VERSION
AccountManager getAccountManager()
java.lang.String getAccountName()
int getAccountType()
AccountTypesjava.lang.String getAttribute(java.lang.String attributeName)
attributeName - The name of the desired attribute.java.util.Map getAttributes()
void setAttribute(java.lang.String attributeName,
java.lang.String newValue)
throws InvalidAttributeException
attributeName - The name of the attribute to change.newValue - The new value to give to the attribute. If this value
is null, the attribute is removed.InvalidAttributeExceptionvoid setAttributes(java.util.Map newAttributes)
throws InvalidAttributeException
newAttributes - The set of attributes to change, and their
associated values.InvalidAttributeExceptionjava.util.Iterator listGroups()
void addGroup(java.lang.String newGroupName)
throws NoSuchAccountException,
PermissionDeniedException
newGroupName - The name of the group to add membership to.NoSuchAccountException - Indicates that the specified group
does not exist.PermissionDeniedExceptionvoid setGroups(java.lang.String[] newGroups)
throws NoSuchAccountException,
PermissionDeniedException
newGroups - An array of names of groups to remove membership from.NoSuchAccountException - Indicates that a specified group
does not exist.PermissionDeniedExceptionvoid removeGroup(java.lang.String groupName)
throws NoSuchAccountException,
PermissionDeniedException
groupName - The name of the group to remove membership from.NoSuchAccountException - Indicates that the account is not
a member of the group.PermissionDeniedExceptionjava.util.Iterator listMembers()