org.kuali.kfs.fp.document.service.impl
Class CashReceiptServiceImpl

java.lang.Object
  extended by org.kuali.kfs.fp.document.service.impl.CashReceiptServiceImpl
All Implemented Interfaces:
CashReceiptService

@Transactional
public class CashReceiptServiceImpl
extends Object
implements CashReceiptService

This is the default implementation of the CashReceiptService interface.


Constructor Summary
CashReceiptServiceImpl()
           
 
Method Summary
 void addCashDetailsToCashDrawer(CashReceiptDocument crDoc)
          This method retrieves the cash details from the cash receipt document provided and adds those details to the associated cash drawer.
 boolean areCashTotalsInvalid(CashReceiptDocument cashReceiptDocument)
          Checks whether the CashReceiptDocument's cash totals are invalid, generating global errors if so.
protected  Map buildCashReceiptCriteriaMap(String campusCode, String[] statii)
          This method builds out a map of search criteria for performing cash receipt lookups using the values provided.
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 CashDrawerService getCashDrawerService()
          Gets the cashDrawerService attribute.
 CashManagementDao getCashManagementDao()
          Gets the cashManagementDao attribute.
 List getCashReceipts(String verificationUnit, String statusCode)
          This method retrieves a collection of cash receipts using the verification unit and the status provided to retrieve the cash receipts.
 List getCashReceipts(String verificationUnit, String[] statii)
          This method retrieves a collection of cash receipts using the verification unit and the statuses provided to retrieve the cash receipts.
 String getCashReceiptVerificationUnitForUser(org.kuali.rice.kim.bo.Person user)
          This method retrieves the cash receipt verification unit based on the user provided.
 org.kuali.rice.kns.service.DictionaryValidationService getDictionaryValidationService()
          Gets the dictionaryValidationService attribute.
 org.kuali.rice.kns.service.ParameterService getParameterService()
          Gets the parameterService attribute.
 List getPopulatedCashReceipts(String verificationUnit, String[] statii)
          This method retrieves a populated collection of cash receipts using the lookup parameters provided.
 org.kuali.rice.kns.workflow.service.WorkflowDocumentService getWorkflowDocumentService()
          Gets the workflowDocumentService attribute.
protected  boolean isTotalInvalid(CashReceiptFamilyBase cashReceiptDocument, org.kuali.rice.kns.util.KualiDecimal totalAmount, String documentEntryName, String propertyName)
          Puts an error message in the error map for that property if the amount is negative.
protected  void populateWorkflowFields(List documents)
          This method populates the workflowDocument field of each CashReceiptDocument in the given List
protected  CashDrawer retrieveCashDrawer(CashReceiptDocument crDoc)
          This method finds the appropriate cash drawer for this cash receipt document to add cash to.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setCashDrawerService(CashDrawerService cashDrawerService)
          Sets the cashDrawerService attribute value.
 void setCashManagementDao(CashManagementDao cashManagementDao)
          Sets the cashManagementDao attribute value.
 void setDictionaryValidationService(org.kuali.rice.kns.service.DictionaryValidationService dictionaryValidationService)
          Sets the dictionaryValidationService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 void setWorkflowDocumentService(org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService)
          Sets the workflowDocumentService attribute value.
protected  boolean verifyCampus(String campusCode)
          This method verifies the campus code provided exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CashReceiptServiceImpl

public CashReceiptServiceImpl()
Method Detail

verifyCampus

protected boolean verifyCampus(String campusCode)
This method verifies the campus code provided exists. This is done by retrieving all the available campuses from the BusinessObjectService and then looking for a matching campus code within the result set.

Parameters:
campusCode - The campus code to be verified.
Returns:
True if the campus code provided is valid and exists, false otherwise.

getCashReceiptVerificationUnitForUser

public String getCashReceiptVerificationUnitForUser(org.kuali.rice.kim.bo.Person user)
This method retrieves the cash receipt verification unit based on the user provided. This is done by retrieving the campus code associated with the user provided and then performing the lookup using this campus code.

Specified by:
getCashReceiptVerificationUnitForUser in interface CashReceiptService
Parameters:
user - The user to be used to retrieve the verification unit.
Returns:
The cash receipt verification unit associated with the user provided.
See Also:
org.kuali.kfs.fp.document.service.CashReceiptService#getCashReceiptVerificationUnit(org.kuali.rice.kns.bo.user.KualiUser)

getCashReceipts

public List getCashReceipts(String verificationUnit,
                            String statusCode)
This method retrieves a collection of cash receipts using the verification unit and the status provided to retrieve the cash receipts.

Specified by:
getCashReceipts in interface CashReceiptService
Parameters:
verificationUnit - The verification unit used to retrieve a collection of associated cash receipts.
statusCode - The status code of the cash receipts to be retrieved.
Returns:
A collection of cash receipt documents which match the search criteria provided.
See Also:
CashReceiptService.getCashReceipts(java.lang.String, java.lang.String)

getCashReceipts

public List getCashReceipts(String verificationUnit,
                            String[] statii)
This method retrieves a collection of cash receipts using the verification unit and the statuses provided to retrieve the cash receipts.

Specified by:
getCashReceipts in interface CashReceiptService
Parameters:
verificationUnit - The verification unit used to retrieve a collection of associated cash receipts.
statii - A collection of possible statuses that will be used in the lookup of cash receipts.
Returns:
A collection of cash receipt documents which match the search criteria provided.
See Also:
CashReceiptService.getCashReceipts(java.lang.String, java.lang.String[])

getPopulatedCashReceipts

public List getPopulatedCashReceipts(String verificationUnit,
                                     String[] statii)
This method retrieves a populated collection of cash receipts using the lookup parameters provided. A populated cash receipt document is a cash receipt document with fully populated workflow fields.

Parameters:
verificationUnit - The verification unit used to retrieve a collection of associated cash receipts.
statii - A collection of possible statuses that will be used in the lookup of the cash receipts.
Returns:
List of CashReceiptDocument instances with their associated workflowDocuments populated.

buildCashReceiptCriteriaMap

protected Map buildCashReceiptCriteriaMap(String campusCode,
                                          String[] statii)
This method builds out a map of search criteria for performing cash receipt lookups using the values provided.

Parameters:
campusCode - The campus code to use as search criteria for looking up cash receipts.
statii - A collection of possible statuses to use as search criteria for looking up cash receipts.
Returns:
The search criteria provided in a map with CashReceiptConstants used as keys to the parameters given.

populateWorkflowFields

protected void populateWorkflowFields(List documents)
This method populates the workflowDocument field of each CashReceiptDocument in the given List

Parameters:
documents - A collection of CashReceiptDocuments to be populated with workflow document data.

addCashDetailsToCashDrawer

public void addCashDetailsToCashDrawer(CashReceiptDocument crDoc)
This method retrieves the cash details from the cash receipt document provided and adds those details to the associated cash drawer. After the details are added to the drawer, the drawer is persisted to the database.

Specified by:
addCashDetailsToCashDrawer in interface CashReceiptService
Parameters:
crDoc - The cash receipt document the cash details will be retrieved from.
See Also:
CashReceiptService.addCashDetailsToCashDrawer(org.kuali.kfs.fp.document.CashReceiptDocument)

retrieveCashDrawer

protected CashDrawer retrieveCashDrawer(CashReceiptDocument crDoc)
This method finds the appropriate cash drawer for this cash receipt document to add cash to.

Parameters:
crDoc - The document the cash drawer will be retrieved from.
Returns:
An instance of a cash drawer associated with the cash receipt document provided.

areCashTotalsInvalid

public boolean areCashTotalsInvalid(CashReceiptDocument cashReceiptDocument)
Description copied from interface: CashReceiptService
Checks whether the CashReceiptDocument's cash totals are invalid, generating global errors if so.

Specified by:
areCashTotalsInvalid in interface CashReceiptService
Parameters:
cashReceiptDocument - submitted cash receipt document
Returns:
true if CashReceiptDocument's cash totals are valid
See Also:
org.kuali.module.financial.service.CashReceiptTotalsVerificationService#areCashTotalsInvalid(org.kuali.kfs.fp.document.CashReceiptDocument)

isTotalInvalid

protected boolean isTotalInvalid(CashReceiptFamilyBase cashReceiptDocument,
                                 org.kuali.rice.kns.util.KualiDecimal totalAmount,
                                 String documentEntryName,
                                 String propertyName)
Puts an error message in the error map for that property if the amount is negative.

Parameters:
cashReceiptDocument - submitted cash receipt document
totalAmount - total amount (cash total, check total, etc)
documentEntryName - document type
propertyName - property type (i.e totalCashAmount, totalCheckAmount, etc)
Returns:
true if the totalAmount is an invalid value

getBusinessObjectService

public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
Gets the businessObjectService attribute.

Returns:
current value of businessObjectService.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

getWorkflowDocumentService

public org.kuali.rice.kns.workflow.service.WorkflowDocumentService getWorkflowDocumentService()
Gets the workflowDocumentService attribute.

Returns:
current value of workflowDocumentService.

setWorkflowDocumentService

public void setWorkflowDocumentService(org.kuali.rice.kns.workflow.service.WorkflowDocumentService workflowDocumentService)
Sets the workflowDocumentService attribute value.

Parameters:
workflowDocumentService - The workflowDocumentService to set.

getCashManagementDao

public CashManagementDao getCashManagementDao()
Gets the cashManagementDao attribute.

Returns:
Returns the cashManagementDao.

setCashManagementDao

public void setCashManagementDao(CashManagementDao cashManagementDao)
Sets the cashManagementDao attribute value.

Parameters:
cashManagementDao - The cashManagementDao to set.

getCashDrawerService

public CashDrawerService getCashDrawerService()
Gets the cashDrawerService attribute.

Returns:
Returns the cashDrawerService.

setCashDrawerService

public void setCashDrawerService(CashDrawerService cashDrawerService)
Sets the cashDrawerService attribute value.

Parameters:
cashDrawerService - The cashDrawerService to set.

getParameterService

public org.kuali.rice.kns.service.ParameterService getParameterService()
Gets the parameterService attribute.

Returns:
Returns the parameterService.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value.

Parameters:
parameterService - The parameterService to set.

getDictionaryValidationService

public org.kuali.rice.kns.service.DictionaryValidationService getDictionaryValidationService()
Gets the dictionaryValidationService attribute.

Returns:
Returns the dictionaryValidationService.

setDictionaryValidationService

public void setDictionaryValidationService(org.kuali.rice.kns.service.DictionaryValidationService dictionaryValidationService)
Sets the dictionaryValidationService attribute value.

Parameters:
dictionaryValidationService - The dictionaryValidationService to set.


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