IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.bc.cm
Class CashDrawerManagerImpl

java.lang.Object
  extended by com.ibm.btt.bc.cm.CashDrawerManagerImpl
All Implemented Interfaces:
CashDrawerManager, CashDrawerManagerInterface

public class CashDrawerManagerImpl
extends java.lang.Object
implements CashDrawerManager


Constructor Summary
CashDrawerManagerImpl()
           
 
Method Summary
 void addBranchManager(BranchCashDrawerManager branchManager)
           
 void assignCashDrawer(java.lang.String branchId, java.lang.String drawerId, java.lang.String userId)
          Assigns the specified cash drawer to the user with the specified userId.
 void closeBatch(java.lang.String branchId, java.lang.String drawerId, java.lang.String binType)
          Closes the last open batch in the bin batch and creates the next one for this bin.
 void createCashDrawer(java.lang.String branchId, java.lang.String drawerId, java.lang.String location, java.lang.String type, java.lang.String currencyCode, int reserves)
          Creates a new cash drawer with the specified characteristics.
 void deleteCashDrawer(java.lang.String branchId, java.lang.String drawerId)
          Deletes the specified cash drawer and all its trays, and totals.
 void endOfDayCashDrawer(java.lang.String branchId, java.lang.String drawerId, java.util.Calendar eodDate)
           
 java.util.List<CashDrawer> getAllCashDrawers(java.lang.String branchId)
          Return all cash drawers from specified branch.
 java.util.List<CashDrawer> getAssignedCashDrawers(java.lang.String branchId, java.lang.String userId)
          Returns all cash drawers assigned to the specified user ID for the specified branch ID.
 DenoAmounts getAvailableAmount(java.lang.String branchId, java.lang.String drawerId)
          Returns the amount with denominational detail that is available in the working cash tray.
 DenoAmounts getBaitBills(java.lang.String branchId, java.lang.String drawerId)
          Returns bait bill amount in specified drawer.
 java.util.List<Batch> getBatches(java.lang.String branchId, java.lang.String drawerId, java.lang.String binType)
          Returns a list of batches for specified bin for specified drawer.
 java.util.List<Bin> getBins(java.lang.String branchId, java.lang.String drawerId)
          Returns a list of bins.
 BranchCashDrawerManager getBranchCashDrawerManager(java.lang.String branchId)
           
 CashDrawer getCashDrawer(java.lang.String branchId, java.lang.String drawerId)
          Returns Cash Drawer object.
 DenoAmounts getCashDrawerCurrentPosition(java.lang.String branchId, java.lang.String drawerId)
          Returns the cash drawer total amount of money with denominational detail based on the sum of the current position fields from all its cash trays.
 DenoAmounts getCashDrawerStartingPosition(java.lang.String branchId, java.lang.String drawerId)
          Returns the cash drawer total amount of money with denominational detail based on the sum of the starting position fields from all its cash trays.
 java.util.Map<java.lang.String,CDTotal> getCashDrawerTotals(java.lang.String branchId, java.lang.String drawerId)
          Returns a hash map of cash drawer total objects : {totalsType, total} as {String, CDTotal}.
 DenoAmounts getTrapAmount(java.lang.String branchId, java.lang.String drawerId)
          Returns trap amounts' detail for trays belonging to this drawer.
 java.util.List<CashTray> getTrays(java.lang.String branchId, java.lang.String drawerId)
          Returns a list of cash trays in the specified drawer.
 void initializeCashDrawer(java.lang.String branchId, java.lang.String userId, java.util.Calendar date)
           
 void modifyBaitBills(java.lang.String branchId, java.lang.String drawerId, DenoAmounts trayBaitBill)
          Modifies the bait bill records according to the values contained in the parameter.
 void modifyCashDrawerLocation(java.lang.String branchId, java.lang.String drawerId, java.lang.String newLocation)
          Modifies the string representing the location of the specified cash drawer.
 void modifyTrapAmounts(java.lang.String branchId, java.lang.String drawerId, java.lang.String trayType, DenoAmounts trapAmount)
          Modifies the tray's trap amounts according to the new amount.
 java.util.List<CashTray> queryUnsettledTrays(java.lang.String branchId, java.lang.String drawerId)
          Returns a list of cash trays whose state is UNSETTLE.
 void settleCashDrawer(java.lang.String branchId, java.lang.String drawerId)
          Set the specified drawer's state to 'SETTLED'.
 void settleCashTray(java.lang.String branchId, java.lang.String drawerId, java.lang.String trayType)
          Set the specified tray's state to 'SETTLED'.
 void trayExchange(java.lang.String branchId, java.lang.String drawerId, java.lang.String fromTrayType, java.lang.String toTrayType, DenoAmounts amount)
          Transfers an amount from one tray to another tray of the specified drawer.
 void unAssignCashDrawer(java.lang.String branchId, java.lang.String drawerId)
          Unassigns the specified cash drawer.
 void updateCashDrawer(java.lang.String branchId, java.lang.String drawerId, java.lang.String txnCode, DenoAmounts amount)
          Updates the cash drawer totals, and trays.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CashDrawerManagerImpl

public CashDrawerManagerImpl()
Method Detail

addBranchManager

public void addBranchManager(BranchCashDrawerManager branchManager)

getBranchCashDrawerManager

public BranchCashDrawerManager getBranchCashDrawerManager(java.lang.String branchId)
                                                   throws CashDrawerManagementException
Throws:
CashDrawerManagementException

assignCashDrawer

public void assignCashDrawer(java.lang.String branchId,
                             java.lang.String drawerId,
                             java.lang.String userId)
                      throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Assigns the specified cash drawer to the user with the specified userId.

Specified by:
assignCashDrawer in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the cash drawer is located
drawerId - java.lang.String - the ID of the cash drawer that is assigned
userId - java.lang.String - the ID of the user
Throws:
CashDrawerManagementException

endOfDayCashDrawer

public void endOfDayCashDrawer(java.lang.String branchId,
                               java.lang.String drawerId,
                               java.util.Calendar eodDate)
                        throws CashDrawerManagementException
Specified by:
endOfDayCashDrawer in interface CashDrawerManagerInterface
Throws:
CashDrawerManagementException

initializeCashDrawer

public void initializeCashDrawer(java.lang.String branchId,
                                 java.lang.String userId,
                                 java.util.Calendar date)
                          throws CashDrawerManagementException
Specified by:
initializeCashDrawer in interface CashDrawerManagerInterface
Throws:
CashDrawerManagementException

settleCashDrawer

public void settleCashDrawer(java.lang.String branchId,
                             java.lang.String drawerId)
                      throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Set the specified drawer's state to 'SETTLED'.

Specified by:
settleCashDrawer in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the cash drawer is located
drawerId - java.lang.String - the ID of the drawer who will be settled
Throws:
CashDrawerManagementException

unAssignCashDrawer

public void unAssignCashDrawer(java.lang.String branchId,
                               java.lang.String drawerId)
                        throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Unassigns the specified cash drawer.

Specified by:
unAssignCashDrawer in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the cash drawer is located
drawerId - java.lang.String - the ID of the drawer being unassigned
Throws:
CashDrawerManagementException

updateCashDrawer

public void updateCashDrawer(java.lang.String branchId,
                             java.lang.String drawerId,
                             java.lang.String txnCode,
                             DenoAmounts amount)
                      throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Updates the cash drawer totals, and trays. It follows the totaling rules specified for this transaction.

Specified by:
updateCashDrawer in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer being updated
txnCode - java.lang.String - the code of the transaction being executed
amount - com.ibm.btt.bc.cm.DenoAmounts - the amount with denominational details
Throws:
CashDrawerManagementException

createCashDrawer

public void createCashDrawer(java.lang.String branchId,
                             java.lang.String drawerId,
                             java.lang.String location,
                             java.lang.String type,
                             java.lang.String currencyCode,
                             int reserves)
                      throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Creates a new cash drawer with the specified characteristics.

Specified by:
createCashDrawer in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is created
drawerId - java.lang.String - the ID of the drawer being created
location - java.lang.String - the location of the cash drawer
type - java.lang.String - the type of drawer being created
currencyCode - java.lang.String - the code of the currency that this cash drawer will handle
reserves - int - the number of reserve trays required for this drawer (0, 1, 2, etc.), and its value should bigger than 0.
Throws:
CashDrawerManagementException

deleteCashDrawer

public void deleteCashDrawer(java.lang.String branchId,
                             java.lang.String drawerId)
                      throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Deletes the specified cash drawer and all its trays, and totals.

Specified by:
deleteCashDrawer in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer being deleted
Throws:
CashDrawerManagementException

getAllCashDrawers

public java.util.List<CashDrawer> getAllCashDrawers(java.lang.String branchId)
                                             throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Return all cash drawers from specified branch.

Specified by:
getAllCashDrawers in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch whose cash drawers are being queried
Returns:
java.util.List
Throws:
CashDrawerManagementException

getAssignedCashDrawers

public java.util.List<CashDrawer> getAssignedCashDrawers(java.lang.String branchId,
                                                         java.lang.String userId)
                                                  throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns all cash drawers assigned to the specified user ID for the specified branch ID.

Specified by:
getAssignedCashDrawers in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the current branch ID for the user
userId - java.lang.String - the ID of the user whose assigned cash drawers are being retrieved
Returns:
Throws:
CashDrawerManagementException

getAvailableAmount

public DenoAmounts getAvailableAmount(java.lang.String branchId,
                                      java.lang.String drawerId)
                               throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns the amount with denominational detail that is available in the working cash tray. This is calculated with the formula currentPosition - (baitAmount + trapAmount) for the working tray of the specified drawer.

Specified by:
getAvailableAmount in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the specified drawer is located
drawerId - java.lang.String - the ID of the drawer whose available amount is being queried
Returns:
com.ibm.btt.bc.cm.DenoAmounts
Throws:
CashDrawerManagementException

getCashDrawer

public CashDrawer getCashDrawer(java.lang.String branchId,
                                java.lang.String drawerId)
                         throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns Cash Drawer object.

Specified by:
getCashDrawer in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the specified drawer is located
drawerId - java.lang.String - the ID of the drawer are being queried.
Returns:
com.ibm.btt.cm.model.CashDrawer
Throws:
CashDrawerManagementException

getCashDrawerCurrentPosition

public DenoAmounts getCashDrawerCurrentPosition(java.lang.String branchId,
                                                java.lang.String drawerId)
                                         throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns the cash drawer total amount of money with denominational detail based on the sum of the current position fields from all its cash trays.

Specified by:
getCashDrawerCurrentPosition in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the specified drawer is located
drawerId - java.lang.String - the ID of the drawer which is being queried.
Returns:
com.ibm.btt.bc.cm.DenoAmounts
Throws:
CashDrawerManagementException

getCashDrawerStartingPosition

public DenoAmounts getCashDrawerStartingPosition(java.lang.String branchId,
                                                 java.lang.String drawerId)
                                          throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns the cash drawer total amount of money with denominational detail based on the sum of the starting position fields from all its cash trays.

Specified by:
getCashDrawerStartingPosition in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer whose starting position is being queried
Returns:
com.ibm.btt.bc.cm.DenoAmounts
Throws:
CashDrawerManagementException

getCashDrawerTotals

public java.util.Map<java.lang.String,CDTotal> getCashDrawerTotals(java.lang.String branchId,
                                                                   java.lang.String drawerId)
                                                            throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns a hash map of cash drawer total objects : {totalsType, total} as {String, CDTotal}.

Specified by:
getCashDrawerTotals in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer whose totals are being queried
Returns:
java.util.Map
Throws:
CashDrawerManagementException

modifyCashDrawerLocation

public void modifyCashDrawerLocation(java.lang.String branchId,
                                     java.lang.String drawerId,
                                     java.lang.String newLocation)
                              throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Modifies the string representing the location of the specified cash drawer.

Specified by:
modifyCashDrawerLocation in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of a drawer whose location is being modified
newLocation - java.lang.String - the new location for the drawer
Throws:
CashDrawerManagementException

closeBatch

public void closeBatch(java.lang.String branchId,
                       java.lang.String drawerId,
                       java.lang.String binType)
                throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Closes the last open batch in the bin batch and creates the next one for this bin.

Specified by:
closeBatch in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the cash drawer is located
drawerId - java.lang.String - the ID of the drawer where the bin is located
binType - java.lang.String - the bin type of the batch to be closed
Throws:
CashDrawerManagementException

trayExchange

public void trayExchange(java.lang.String branchId,
                         java.lang.String drawerId,
                         java.lang.String fromTrayType,
                         java.lang.String toTrayType,
                         DenoAmounts amount)
                  throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Transfers an amount from one tray to another tray of the specified drawer.

Specified by:
trayExchange in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer containing the trays involved in this exchange
fromTrayType - java.lang.String - the type of tray from which money is being transferred
toTrayType - java.lang.String - the type of tray into which money is being transferred
amount - com.ibm.btt.bc.cm.DenoAmounts - the amount being transferred
Throws:
CashDrawerManagementException

queryUnsettledTrays

public java.util.List<CashTray> queryUnsettledTrays(java.lang.String branchId,
                                                    java.lang.String drawerId)
                                             throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns a list of cash trays whose state is UNSETTLE.

Specified by:
queryUnsettledTrays in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer which is being queried
Returns:
java.util.List
Throws:
CashDrawerManagementException

modifyTrapAmounts

public void modifyTrapAmounts(java.lang.String branchId,
                              java.lang.String drawerId,
                              java.lang.String trayType,
                              DenoAmounts trapAmount)
                       throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Modifies the tray's trap amounts according to the new amount.

Specified by:
modifyTrapAmounts in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of a drawer where the tray is located.
trayType - java.lang.String - the type of Tray whose trap amount is being modified
trapAmount - com.ibm.btt.bc.cm.DenoAmounts - the new trap amount for the tray.
Throws:
CashDrawerManagementException

getBaitBills

public DenoAmounts getBaitBills(java.lang.String branchId,
                                java.lang.String drawerId)
                         throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns bait bill amount in specified drawer.

Specified by:
getBaitBills in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer whose bait bills are being queried
Returns:
com.ibm.btt.bc.cm.DenoAmounts.
Throws:
CashDrawerManagementException

getTrapAmount

public DenoAmounts getTrapAmount(java.lang.String branchId,
                                 java.lang.String drawerId)
                          throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns trap amounts' detail for trays belonging to this drawer.

Specified by:
getTrapAmount in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer being queried
Returns:
com.ibm.btt.bc.cm.DenoAmounts.
Throws:
CashDrawerManagementException

settleCashTray

public void settleCashTray(java.lang.String branchId,
                           java.lang.String drawerId,
                           java.lang.String trayType)
                    throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Set the specified tray's state to 'SETTLED'.

Specified by:
settleCashTray in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the cash drawer is located
drawerId - java.lang.String - the ID of the drawer where the cash tray is located
trayType - java.lang.String - the type of the tray who will be settled
Throws:
CashDrawerManagementException

modifyBaitBills

public void modifyBaitBills(java.lang.String branchId,
                            java.lang.String drawerId,
                            DenoAmounts trayBaitBill)
                     throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Modifies the bait bill records according to the values contained in the parameter.

Specified by:
modifyBaitBills in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer being queried
trayBaitBill - com.ibm.btt.bc.cm.DenoAmounts - the new bait bill amount detail.
Throws:
CashDrawerManagementException

getBins

public java.util.List<Bin> getBins(java.lang.String branchId,
                                   java.lang.String drawerId)
                            throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns a list of bins. A bin contains information such as bin type.

Specified by:
getBins in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer whose bins are being queried
Returns:
java.util.List
Throws:
CashDrawerManagementException

getTrays

public java.util.List<CashTray> getTrays(java.lang.String branchId,
                                         java.lang.String drawerId)
                                  throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns a list of cash trays in the specified drawer.

Specified by:
getTrays in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer being queried
Returns:
java.util.List
Throws:
CashDrawerManagementException

getBatches

public java.util.List<Batch> getBatches(java.lang.String branchId,
                                        java.lang.String drawerId,
                                        java.lang.String binType)
                                 throws CashDrawerManagementException
Description copied from interface: CashDrawerManager
Returns a list of batches for specified bin for specified drawer.

Specified by:
getBatches in interface CashDrawerManager
Parameters:
branchId - java.lang.String - the ID of the branch where the drawer is located
drawerId - java.lang.String - the ID of the drawer containing the queried bin
binType - java.lang.String - the type of bin being queried
Returns:
java.util.List
Throws:
CashDrawerManagementException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009