atg.security
Interface RemoteAccount

All Superinterfaces:
AccountTypes, java.rmi.Remote
All Known Implementing Classes:
RemoteAccountImpl

public interface RemoteAccount
extends java.rmi.Remote, AccountTypes

An object used to expose the Account interface via RMI.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from interface atg.security.AccountTypes
ANY_ACCOUNT, GROUP_ACCOUNT, LOGIN_ACCOUNT, PRIVILEGE_ACCOUNT
 
Method Summary
 void addGroup(java.lang.String newGroupName)
          Makes this account a member of a new group.
 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 dictionary of all defined attributes and their values from the account.
 java.util.Map getDisplayNamesForAttributes()
          Returns a mapping of attribute names to display names that can be used in an attribute editor.
 java.util.Set getGroups()
          Returns an enumeration of the groups that this account is a member of.
 java.util.Set getMembers()
          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.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getAccountName

java.lang.String getAccountName()
                                throws java.rmi.RemoteException
Returns the name of the account. This is usually either a login name or a group name.

Throws:
java.rmi.RemoteException

getAccountType

int getAccountType()
                   throws java.rmi.RemoteException
Returns the account type.

Throws:
java.rmi.RemoteException
See Also:
AccountTypes

getAttribute

java.lang.String getAttribute(java.lang.String attributeName)
                              throws java.rmi.RemoteException
Retrieves the string value of a given attribute.

Note that this will not return the correct value for the password attribute, for security reasons.

Parameters:
attributeName - The name of the desired attribute.
Throws:
java.rmi.RemoteException

getAttributes

java.util.Map getAttributes()
                            throws java.rmi.RemoteException
Retrieves a dictionary of all defined attributes and their values from the account.

Note that this will not return the correct value for the password attribute, for security reasons.

Throws:
java.rmi.RemoteException

setAttribute

void setAttribute(java.lang.String attributeName,
                  java.lang.String newValue)
                  throws InvalidAttributeException,
                         java.rmi.RemoteException
Changes the value of a given attribute.

Parameters:
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.
Throws:
InvalidAttributeException
java.rmi.RemoteException

setAttributes

void setAttributes(java.util.Map newAttributes)
                   throws InvalidAttributeException,
                          java.rmi.RemoteException
Changes the values of a set of account attributes. The dictionary may contain a subset of existing attribute values; only those attributes that are present in the dictionary are changed, and none are removed.

Parameters:
newAttributes - The set of attributes to change, and their associated values.
Throws:
InvalidAttributeException
java.rmi.RemoteException

getGroups

java.util.Set getGroups()
                        throws java.rmi.RemoteException
Returns an enumeration of the groups that this account is a member of.

Note that for efficiency concerns the remote interface differs from the normal account interface in that it returns a set rather than an iterator.

Throws:
java.rmi.RemoteException

addGroup

void addGroup(java.lang.String newGroupName)
              throws NoSuchAccountException,
                     PermissionDeniedException,
                     java.rmi.RemoteException
Makes this account a member of a new group.

Parameters:
newGroupName - The name of the group to add membership to.
Throws:
NoSuchAccountException - Indicates that the specified group does not exist.
PermissionDeniedException
java.rmi.RemoteException

setGroups

void setGroups(java.lang.String[] newGroups)
               throws NoSuchAccountException,
                      PermissionDeniedException,
                      java.rmi.RemoteException
Makes this account a member of a set of groups.

Parameters:
newGroups - An array of names of groups to remove membership from.
Throws:
NoSuchAccountException - Indicates that a specified group does not exist.
PermissionDeniedException
java.rmi.RemoteException

removeGroup

void removeGroup(java.lang.String groupName)
                 throws NoSuchAccountException,
                        PermissionDeniedException,
                        java.rmi.RemoteException
Removes a group from the set of groups that this account is a member of.

Parameters:
groupName - The name of the group to remove membership from.
Throws:
NoSuchAccountException - Indicates that the account is not a member of the group.
PermissionDeniedException
java.rmi.RemoteException

getMembers

java.util.Set getMembers()
                         throws java.rmi.RemoteException
If this Account is a group, return the names of the members of the group.

Note that there is no way to add members to the group; rather, you add the group to the account and it automagically becomes a member.

Note that for efficiency concerns the remote interface differs from the normal account interface in that it returns a set rather than an iterator.

Throws:
java.rmi.RemoteException

getDisplayNamesForAttributes

java.util.Map getDisplayNamesForAttributes()
                                           throws java.rmi.RemoteException
Returns a mapping of attribute names to display names that can be used in an attribute editor.

Throws:
java.rmi.RemoteException