net.sourceforge.mflow.api
Interface AccountManager

All Known Implementing Classes:
AccountManagerImpl

public interface AccountManager

A manager for Accounts.

Author:
carrd

Method Summary
 Account createNewAccount(java.lang.String name, java.lang.Class typeClass)
          Creates a new instance of Account.
 java.util.List getAccounts()
          Returns a list of all Accounts.
 java.util.Map getTypes()
          Returns an unmodifiable copy of the type Map.
 void registerType(java.lang.String name, java.lang.Class clazz)
          Registers a new type of account.
 void remove(Account account)
          Removes an Account.
 

Method Detail

createNewAccount

Account createNewAccount(java.lang.String name,
                         java.lang.Class typeClass)
Creates a new instance of Account.

Parameters:
name - the name of the new Account
typeClass - the type class to instantiate
Returns:
the new Account instance

getAccounts

java.util.List getAccounts()
Returns a list of all Accounts.

Returns:
a list of all Accounts

getTypes

java.util.Map getTypes()
Returns an unmodifiable copy of the type Map. The keys are the names of the account types, while the keys are the type classes.

Returns:
an unmodifiable Map of Strings to Classes

registerType

void registerType(java.lang.String name,
                  java.lang.Class clazz)
Registers a new type of account.

Parameters:
name - the name of the account type
clazz - the Class of the account type; should implement Account

remove

void remove(Account account)
Removes an Account.

Parameters:
account - the Account to remove


Copyright © 2002-2004 MFlow Group. All Rights Reserved.