org.kuali.kfs.fp.service
Interface CashDrawerService

All Known Implementing Classes:
CashDrawerServiceImpl

public interface CashDrawerService

This service interface defines methods that a CashDrawerService implementation must provide.


Method Summary
 void closeCashDrawer(CashDrawer cd)
          Closes the cash drawer associated with the given document
 void closeCashDrawer(String campusCode)
          Closes the CashDrawer instance associated with the given campus code, creating one if necessary.
 CashDrawer getByCampusCode(String campusCode)
          Retrieves the CashDrawer instance associated with the given campus code, if any.
 org.kuali.rice.kns.util.KualiDecimal getCoinTotal(CashDrawer drawer)
          Calculates the total amount of all the coins in the drawer.
 org.kuali.rice.kns.util.KualiDecimal getCurrencyTotal(CashDrawer drawer)
          Calculates the total amount of all the currency in the drawer.
 void lockCashDrawer(CashDrawer cd, String documentId)
          Locks the given cash drawer, if it is open
 void lockCashDrawer(String campusCode, String documentId)
          Locks the currently-open CashDrawer instance associated with the given campus, throwing an IllegalStateException if that cashDrawer is not open (i.e.
 CashDrawer openCashDrawer(CashDrawer cd, String documentId)
          Opens the given cash drawer
 CashDrawer openCashDrawer(String campusCode, String documentId)
          Opens the CashDrawer instance associated with the given campus, creating one if necessary.
 void unlockCashDrawer(CashDrawer cd, String documentId)
          Unlocks the given cash drawer, if it is open and locked
 void unlockCashDrawer(String campusCode, String documentId)
          Unlocks the currently-locked CashDrawer instance associated with the given campus code, throwing an IllegalStateException if that cashDrawer is not locked (i.e.
 

Method Detail

closeCashDrawer

void closeCashDrawer(String campusCode)
Closes the CashDrawer instance associated with the given campus code, creating one if necessary.

Parameters:
campusCode - The campus code used to retrieve the cash drawer to be closed.

closeCashDrawer

void closeCashDrawer(CashDrawer cd)
Closes the cash drawer associated with the given document

Parameters:
cd - The cash drawer to closed.

openCashDrawer

CashDrawer openCashDrawer(String campusCode,
                          String documentId)
Opens the CashDrawer instance associated with the given campus, creating one if necessary. Records the given documentId as the document which opened the cashdrawer.

Parameters:
campusCode - The campus code to be used to retrieve the cash drawer to be closed.
documentId - The id of the document used to open the cash drawer.
Returns:
The opened version of the cash drawer.

openCashDrawer

CashDrawer openCashDrawer(CashDrawer cd,
                          String documentId)
Opens the given cash drawer

Parameters:
cd - The cash drawer to open
documentId - the document number which is opening the cash drawer
Returns:
The opened version of the cash drawer

lockCashDrawer

void lockCashDrawer(String campusCode,
                    String documentId)
Locks the currently-open CashDrawer instance associated with the given campus, throwing an IllegalStateException if that cashDrawer is not open (i.e. is closed or locked). Records the given documentId as the document which locked the cashDrawer.

Parameters:
campusCode - The campus code used to retrieve the cash drawer to be locked.
documentId - The id of the document used to lock the cash drawer.

lockCashDrawer

void lockCashDrawer(CashDrawer cd,
                    String documentId)
Locks the given cash drawer, if it is open

Parameters:
cd - The cash drawer to open
documentId - The document id which is locking the cash drawer

unlockCashDrawer

void unlockCashDrawer(String campusCode,
                      String documentId)
Unlocks the currently-locked CashDrawer instance associated with the given campus code, throwing an IllegalStateException if that cashDrawer is not locked (i.e. is closed or open). Records the given documentId as the document which unlocked the cashDrawer.

Parameters:
campusCode - The campus code used to retrieve the cash drawer to be unlocked.
documentId - The id of the document used to unlock the cash drawer.

unlockCashDrawer

void unlockCashDrawer(CashDrawer cd,
                      String documentId)
Unlocks the given cash drawer, if it is open and locked

Parameters:
cd - The cash drawer to unlock
documentId - The document which is unlocking the cash drawer

getByCampusCode

CashDrawer getByCampusCode(String campusCode)
Retrieves the CashDrawer instance associated with the given campus code, if any. If autocreate is true, and no CashDrawer for the given campus exists, getByCampusCode will return a newly-created (non-persisted) CashDrawer instance.

Parameters:
campusCode - The campus code used to retrieve the cash drawer.
Returns:
CashDrawer instance or null

getCurrencyTotal

org.kuali.rice.kns.util.KualiDecimal getCurrencyTotal(CashDrawer drawer)
Calculates the total amount of all the currency in the drawer. NOTE: The value returned only refers to paper currency in the drawer and does not include coin amounts.

Parameters:
drawer - The cash drawer to calculate the currency total from.
Returns:
The summed amount of currency in the cash drawer.

getCoinTotal

org.kuali.rice.kns.util.KualiDecimal getCoinTotal(CashDrawer drawer)
Calculates the total amount of all the coins in the drawer.

Parameters:
drawer - The drawer to calculate the coin total from.
Returns:
The summed value of coins in the drawer.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.