atg.security
Class RemoteAccountManagerImpl

java.lang.Object
  extended by atg.security.RemoteAccountManagerImpl
All Implemented Interfaces:
RemoteAccountManager, java.rmi.Remote

public class RemoteAccountManagerImpl
extends java.lang.Object
implements RemoteAccountManager

An object that wraps an AccountManager object in order to expose it via RMI. Usually this is not used directly by client code, but rather via the ClientAccountManager object.

See Also:
AccountManager, ClientAccountManager

Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 RemoteAccount createAccount(java.lang.String pAccountName, int pType, java.util.Map pAttributes)
          Creates a new account with a given set of attributes.
static RemoteAccountManager createProxy(AccountManager pManager)
          Constructs a remote session-based proxy for an AccountManager
 RemoteAccount getAccount(java.lang.String pAccountName)
          Retrieves the account object for the account with the given name.
 java.lang.String getDescriptionAttribute()
          Returns the name of the group or privilege account attribute that describes the account in human-readable terms.
 java.lang.String getFirstNameAttribute()
          Returns the name of the attribute that contains the first name of the owner of a login account.
 java.lang.String getLastNameAttribute()
          Returns the name of the attribute that contains the last name of the owner of a login account.
 java.lang.String getPasswordAttribute()
          Returns the name of hte attribute that contains the password for a login account.
 PasswordHasher getPasswordHasher()
          Returns the password hasher that should be used to encrypt the password attribute of an account.
 atg.rmi.RemoteIterator listAccounts(int pType)
          Returns an iterator of accounts with a particular set of types.
 atg.rmi.RemoteIterator listMatchingAccounts(java.lang.String pExpression, int pType)
          Lists accounts that match a given expression.
 void removeAccount(java.lang.String pAccountName)
          Removes an account with the indicated name, if possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Method Detail

createProxy

public static RemoteAccountManager createProxy(AccountManager pManager)
                                        throws java.rmi.RemoteException
Constructs a remote session-based proxy for an AccountManager

Throws:
java.rmi.RemoteException

listAccounts

public atg.rmi.RemoteIterator listAccounts(int pType)
                                    throws TooManyAccountsException,
                                           java.rmi.RemoteException
Returns an iterator of accounts with a particular set of types. You may logical-or the account types together to select a union.

Specified by:
listAccounts in interface RemoteAccountManager
Parameters:
type - The account type(s) to list. You may logical-or the types togeter to select a union.
Throws:
TooManyAccountsException
java.rmi.RemoteException
See Also:
AccountTypes

listMatchingAccounts

public atg.rmi.RemoteIterator listMatchingAccounts(java.lang.String pExpression,
                                                   int pType)
                                            throws TooManyAccountsException,
                                                   java.rmi.RemoteException
Lists accounts that match a given expression.

Specified by:
listMatchingAccounts in interface RemoteAccountManager
Parameters:
expression - The expression to use to determine which accounts to list. Currently the language used for the expression is undefined.
type - The account type(s) to match against. You may logical-or the types togeter to select a union.
Throws:
TooManyAccountsException
java.rmi.RemoteException
See Also:
AccountTypes

getAccount

public RemoteAccount getAccount(java.lang.String pAccountName)
                         throws java.rmi.RemoteException
Retrieves the account object for the account with the given name.

Specified by:
getAccount in interface RemoteAccountManager
Parameters:
pAccountName - The name of the account to retrieve.
Throws:
java.rmi.RemoteException

createAccount

public RemoteAccount createAccount(java.lang.String pAccountName,
                                   int pType,
                                   java.util.Map pAttributes)
                            throws AccountExistsException,
                                   InvalidAttributeException,
                                   PermissionDeniedException,
                                   java.rmi.RemoteException
Creates a new account with a given set of attributes.

Specified by:
createAccount in interface RemoteAccountManager
Parameters:
pAccountName - The name of the account to create.
pAttributes - Set of attributes that should be set in the new account. Usually at least "password" is required. All attribute values must be strings.
pType - The type of the account to create.
Throws:
AccountExistsException
InvalidAttributeException
PermissionDeniedException
java.rmi.RemoteException

removeAccount

public void removeAccount(java.lang.String pAccountName)
                   throws NoSuchAccountException,
                          PermissionDeniedException
Removes an account with the indicated name, if possible.

Specified by:
removeAccount in interface RemoteAccountManager
Throws:
NoSuchAccountException
PermissionDeniedException

getDescriptionAttribute

public java.lang.String getDescriptionAttribute()
Returns the name of the group or privilege account attribute that describes the account in human-readable terms.

Specified by:
getDescriptionAttribute in interface RemoteAccountManager

getFirstNameAttribute

public java.lang.String getFirstNameAttribute()
Returns the name of the attribute that contains the first name of the owner of a login account.

Specified by:
getFirstNameAttribute in interface RemoteAccountManager

getLastNameAttribute

public java.lang.String getLastNameAttribute()
Returns the name of the attribute that contains the last name of the owner of a login account.

Specified by:
getLastNameAttribute in interface RemoteAccountManager

getPasswordAttribute

public java.lang.String getPasswordAttribute()
Returns the name of hte attribute that contains the password for a login account.

Specified by:
getPasswordAttribute in interface RemoteAccountManager

getPasswordHasher

public PasswordHasher getPasswordHasher()
Returns the password hasher that should be used to encrypt the password attribute of an account.

Specified by:
getPasswordHasher in interface RemoteAccountManager