atg.security
Class ClientAccountManager

java.lang.Object
  extended by atg.rmi.RemoteExceptionManager
      extended by atg.security.ClientAccountManager
All Implemented Interfaces:
AccountManager, AccountTypes, java.io.Serializable

public class ClientAccountManager
extends atg.rmi.RemoteExceptionManager
implements AccountManager

An AccountManager object that wraps an RMI-accessible AccountManager object to expose the standard AccountManager interface on the client side.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from interface atg.security.AccountTypes
ANY_ACCOUNT, GROUP_ACCOUNT, LOGIN_ACCOUNT, PRIVILEGE_ACCOUNT
 
Constructor Summary
ClientAccountManager(RemoteAccountManager pRemoteManager)
          Wraps a client-side AccountManager object around a RemoteAccountManager reference.
 
Method Summary
 Account createAccount(java.lang.String pAccountName, int pType, java.util.Map pAttributes)
          Creates a new account with a given set of attributes.
 Account getAccount(java.lang.String pAccountName)
          Retrieves the account object for the account with the given name.
 int getCacheTimeout()
          Returns the length of time, in seconds, an account object remains valid in the cache.
 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.
 void invalidate()
          Invalidates the account cache.
 void invalidate(java.lang.String pAccountName)
          Invalidates an account in the account cache.
 java.util.Iterator listAccounts(int pType)
          Returns an iterator of accounts with a particular set of types.
 java.util.Iterator 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.
 void setCacheTimeout(int pTimeout)
          Changes the length of time an account object remains valid in the cache.
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

ClientAccountManager

public ClientAccountManager(RemoteAccountManager pRemoteManager)
Wraps a client-side AccountManager object around a RemoteAccountManager reference. This allows client-side code to work with the RMI-accessible object without realizing that it is remote.

Method Detail

getCacheTimeout

public int getCacheTimeout()
Returns the length of time, in seconds, an account object remains valid in the cache.


setCacheTimeout

public void setCacheTimeout(int pTimeout)
Changes the length of time an account object remains valid in the cache.


invalidate

public void invalidate()
Invalidates the account cache.


invalidate

public void invalidate(java.lang.String pAccountName)
Invalidates an account in the account cache.


listAccounts

public java.util.Iterator listAccounts(int pType)
                                throws TooManyAccountsException
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 AccountManager
Parameters:
type - The account type(s) to list. You may logical-or the types togeter to select a union.
Throws:
TooManyAccountsException
See Also:
AccountTypes

listMatchingAccounts

public java.util.Iterator listMatchingAccounts(java.lang.String pExpression,
                                               int pType)
                                        throws TooManyAccountsException
Lists accounts that match a given expression.

Specified by:
listMatchingAccounts in interface AccountManager
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
See Also:
AccountTypes

getAccount

public Account getAccount(java.lang.String pAccountName)
Retrieves the account object for the account with the given name.

Specified by:
getAccount in interface AccountManager
Parameters:
pAccountName - The name of the account to retrieve.

createAccount

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

Specified by:
createAccount in interface AccountManager
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
See Also:
AccountTypes

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 AccountManager
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 AccountManager

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 AccountManager

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 AccountManager

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 AccountManager

getPasswordHasher

public PasswordHasher getPasswordHasher()
Returns the password hasher that should be used to encrypt the password attribute of an account. This is just a pass-through to the RMI interface.

Specified by:
getPasswordHasher in interface AccountManager