net.sourceforge.mflow.impl
Class AccountManagerImpl

java.lang.Object
  extended bynet.sourceforge.mflow.impl.AccountManagerImpl
All Implemented Interfaces:
AccountManager

public class AccountManagerImpl
extends java.lang.Object
implements AccountManager

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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createNewAccount

public Account createNewAccount(java.lang.String name,
                                java.lang.Class typeClass)
Description copied from interface: AccountManager
Creates a new instance of Account.

Specified by:
createNewAccount in interface AccountManager
Parameters:
name - the name of the new Account
typeClass - the type class to instantiate
Returns:
the new Account instance

getAccounts

public java.util.List getAccounts()
Description copied from interface: AccountManager
Returns a list of all Accounts.

Specified by:
getAccounts in interface AccountManager
Returns:
a list of all Accounts

getTypes

public 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.

Specified by:
getTypes in interface AccountManager
Returns:
an unmodifiable Map of Strings to Classes

registerType

public void registerType(java.lang.String name,
                         java.lang.Class clazz)
Description copied from interface: AccountManager
Registers a new type of account.

Specified by:
registerType in interface AccountManager
Parameters:
name - the name of the account type
clazz - the Class of the account type; should implement Account

remove

public void remove(Account account)
Description copied from interface: AccountManager
Removes an Account.

Specified by:
remove in interface AccountManager
Parameters:
account - the Account to remove


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