atg.security
Interface AccountManager

All Superinterfaces:
AccountTypes
All Known Implementing Classes:
ActiveDirectoryAccountManager, ClientAccountManager, GenericAccountManager, iPlanetDirectoryAccountManager, LDAPRepositoryAccountManager, RepositoryAccountManager, SerializedAccountManager, XmlAccountManager

public interface AccountManager
extends AccountTypes

Interface to Account object management facilities. This is usually an additional interface supplied by a UserAuthority object. This interface is usually used by GUI applications to manipulate users and groups, with a different manager for user accounts versus group accounts.

See Also:
Account, UserAuthority

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
 Account createAccount(java.lang.String accountName, int type, java.util.Map attributes)
          Creates a new account with a given set of attributes.
 Account getAccount(java.lang.String accountName)
          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 the 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.
 java.util.Iterator listAccounts(int type)
          Returns an iterator of accounts with a particular set of types.
 java.util.Iterator listMatchingAccounts(java.lang.String expression, int type)
          Lists accounts that match a given expression.
 void removeAccount(java.lang.String accountName)
          Removes an account with the indicated name, if possible.
 

Field Detail

CLASS_VERSION

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

listAccounts

java.util.Iterator listAccounts(int type)
                                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. The account manager may refuse to iterate the entire set by throwing a TooManyAccountsException.

Parameters:
type - The account type(s) to list. You may logical-or the types togeter to select a union.
Throws:
TooManyAccountsException
See Also:
AccountTypes, TooManyAccountsException

listMatchingAccounts

java.util.Iterator listMatchingAccounts(java.lang.String expression,
                                        int type)
                                        throws TooManyAccountsException
Lists accounts that match a given expression. The account manager may refuse to iterate the entire set by throwing a TooManyAccountsException

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, TooManyAccountsException

getAccount

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

Parameters:
accountName - The name of the account to retrieve.

createAccount

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

Parameters:
accountName - The name of the account to create.
type - The type of the account to create.
attributes - Set of attributes that should be set in the new account. Usually at least "password" is required. All attribute values must be strings.
Throws:
AccountExistsException
InvalidAttributeException
PermissionDeniedException
See Also:
AccountTypes

removeAccount

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

Throws:
NoSuchAccountException
PermissionDeniedException

getDescriptionAttribute

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


getFirstNameAttribute

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


getLastNameAttribute

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


getPasswordAttribute

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


getPasswordHasher

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