|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.rmi.RemoteExceptionManager atg.security.ClientAccount
public class ClientAccount
An Account object that wraps a RemoteAccount object. This allows a client to utilize a server-side AccountManager without knowing that it is working via RMI. Any RemoteExceptions that occur will be sent to all registered listeners or (in the case that there aren't any listeners) printed to System.err.
AccountManager
,
RemoteAccountManager
,
RemoteExceptionListener
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
Fields inherited from interface atg.security.AccountTypes |
---|
ANY_ACCOUNT, GROUP_ACCOUNT, LOGIN_ACCOUNT, PRIVILEGE_ACCOUNT |
Constructor Summary | |
---|---|
ClientAccount(ClientAccountManager pAccountManager,
RemoteAccount pAccount)
Wrap an Account object with an RMI accessibility layer. |
Method Summary | |
---|---|
void |
addGroup(java.lang.String pNewGroupName)
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 pAttributeName)
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.lang.String |
getDisplayNameForAttribute(java.lang.String pAttributeName)
Returns the display name that should be associated with an attribute. |
void |
invalidate()
Invalidates locally cached values. |
protected void |
invalidate(java.lang.String pAccountName)
Invalidates a named account's cache. |
java.util.Iterator |
listGroups()
Returns an iterator 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 |
refresh()
Refreshes locally cached values if necessary. |
void |
removeGroup(java.lang.String pGroupName)
Removes a group from the set of groups that this account is a member of. |
void |
setAttribute(java.lang.String pAttributeName,
java.lang.String pNewValue)
Changes the value of a given attribute. |
void |
setAttributes(java.util.Map pNewAttributes)
Changes the values of a set of account attributes. |
void |
setGroups(java.lang.String[] pNewGroups)
Makes this account a member of a set of groups. |
Methods inherited from class atg.rmi.RemoteExceptionManager |
---|
addRemoteExceptionListener, notifyRemoteExceptionListeners, removeRemoteExceptionListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public ClientAccount(ClientAccountManager pAccountManager, RemoteAccount pAccount)
Account
object with an RMI accessibility layer. This
version is to be used on the client side when you've received a
RemoteAccount RMI object.
pAccountManager
- The client-side account manager that manages this
account.pAccount
- The RMI stub object for the account.pType
- The type of account.AccountTypes
Method Detail |
---|
public void invalidate()
protected void invalidate(java.lang.String pAccountName)
public void refresh()
public AccountManager getAccountManager()
getAccountManager
in interface Account
public java.lang.String getAccountName()
getAccountName
in interface Account
public int getAccountType()
getAccountType
in interface Account
AccountTypes
public java.lang.String getAttribute(java.lang.String pAttributeName)
Note that this will not return the real value for the password attribute, for security reasons.
getAttribute
in interface Account
pAttributeName
- The name of the desired attribute.public java.util.Map getAttributes()
Note that this will not return the correct value for the password attribute, for security reasons.
getAttributes
in interface Account
public void setAttribute(java.lang.String pAttributeName, java.lang.String pNewValue) throws InvalidAttributeException
setAttribute
in interface Account
pAttributeName
- The name of the attribute to change.pNewValue
- The new value to give to the attribute. If this value
is null
, the attribute is removed.
InvalidAttributeException
public void setAttributes(java.util.Map pNewAttributes) throws InvalidAttributeException
setAttributes
in interface Account
pNewAttributes
- The set of attributes to change, and their
associated values.
InvalidAttributeException
public java.util.Iterator listGroups()
listGroups
in interface Account
public void addGroup(java.lang.String pNewGroupName) throws NoSuchAccountException, PermissionDeniedException
addGroup
in interface Account
newGroupName
- The name of the group to add membership to.
NoSuchAccountException
- Indicates that the specified group
does not exist.
PermissionDeniedException
public void setGroups(java.lang.String[] pNewGroups) throws NoSuchAccountException, PermissionDeniedException
setGroups
in interface Account
pNewGroups
- An array of names of groups to add membership to.
NoSuchAccountException
- Indicates that a specified group
does not exist.
PermissionDeniedException
public void removeGroup(java.lang.String pGroupName) throws NoSuchAccountException, PermissionDeniedException
removeGroup
in interface Account
groupName
- The name of the group to remove membership from.
NoSuchAccountException
- Indicates that the account is not
a member of the group.
PermissionDeniedException
public java.util.Iterator listMembers()
listMembers
in interface Account
public java.lang.String getDisplayNameForAttribute(java.lang.String pAttributeName)
getDisplayNameForAttribute
in interface atg.security.I18nAccount
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |