org.kuali.kfs.fp.batch.service.impl
Class DisbursementVoucherExtractServiceImpl

java.lang.Object
  extended by org.kuali.kfs.fp.batch.service.impl.DisbursementVoucherExtractServiceImpl
All Implemented Interfaces:
DisbursementVoucherExtractService

@Transactional
public class DisbursementVoucherExtractServiceImpl
extends Object
implements DisbursementVoucherExtractService

This is the default implementation of the DisbursementVoucherExtractService interface.


Constructor Summary
DisbursementVoucherExtractServiceImpl()
           
 
Method Summary
protected  void addPayment(DisbursementVoucherDocument document, Batch batch, Date processRunDate)
          This method creates a payment group from the disbursement voucher and batch provided and persists that group to the database.
protected  PaymentDetail buildPaymentDetail(DisbursementVoucherDocument document, Batch batch, Date processRunDate)
          This method builds a payment detail object from the disbursement voucher document provided and links that detail file to the batch and process run date given.
protected  PaymentGroup buildPaymentGroup(DisbursementVoucherDocument document, Batch batch)
          This method creates a PaymentGroup from the disbursement voucher and batch provided.
 void cancelExtractedDisbursementVoucher(DisbursementVoucherDocument dv, Date processDate)
          This cancels the disbursement voucher
protected  Batch createBatch(String campusCode, org.kuali.rice.kim.bo.Person user, Date processRunDate)
          This method creates a Batch instance and populates it with the information provided.
 boolean extractPayments()
          This method extracts all payments from a disbursement voucher with a status code of "A" and uploads them as a batch for processing.
protected  void extractPaymentsForCampus(String campusCode, org.kuali.rice.kim.bo.Person user, Date processRunDate)
          This method extracts all outstanding payments from all the disbursement vouchers in approved status for a given campus and adds these payments to a batch file that is uploaded for processing.
protected  Set<String> getCampusListByDocumentStatusCode(String statusCode)
          This method retrieves a collection of campus instances representing all the campuses which currently have disbursement vouchers with the status code provided.
 DisbursementVoucherDocument getDocumentById(String documentNumber)
          Looks up the document using document service, and deals with any nasty WorkflowException or ClassCastExceptions that pop up
protected  Collection<DisbursementVoucherDocument> getListByDocumentStatusCodeCampus(String statusCode, String campusCode)
          This method retrieves a list of disbursement voucher documents that are in the status provided for the campus code given.
protected  org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
           
 void markDisbursementVoucherAsPaid(DisbursementVoucherDocument dv, Date processDate)
          Marks the disbursement voucher as paid by setting its paid date
protected  void oppositifyEntry(GeneralLedgerPendingEntry glpe, org.kuali.rice.kns.service.BusinessObjectService boService, GeneralLedgerPendingEntrySequenceHelper glpeSeqHelper)
          Updates the given general ledger pending entry so that it will have the opposite effect of what it was created to do; this, in effect, undoes the entries that were already posted for this document
 void resetExtractedDisbursementVoucher(DisbursementVoucherDocument dv, Date processDate)
          This updates the disbursement voucher so that when it is re-extracted, information about it will be accurate
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setCustomerProfileService(CustomerProfileService customerProfileService)
          This method sets the customerProfileService instance.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          This method sets the dateTimeService instance.
 void setDisbursementVoucherDao(DisbursementVoucherDao disbursementVoucherDao)
          This method sets the disbursementVoucherDao instance.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          This method sets the ParameterService instance.
 void setPaymentFileEmailService(PdpEmailService paymentFileEmailService)
          Sets the paymentFileEmailService attribute value.
 void setPaymentFileService(PaymentFileService paymentFileService)
          This method sets the paymentFileService instance.
 void setPaymentGroupService(PaymentGroupService paymentGroupService)
          This method sets the paymentGroupService instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisbursementVoucherExtractServiceImpl

public DisbursementVoucherExtractServiceImpl()
Method Detail

extractPayments

public boolean extractPayments()
This method extracts all payments from a disbursement voucher with a status code of "A" and uploads them as a batch for processing.

Specified by:
extractPayments in interface DisbursementVoucherExtractService
Returns:
Always returns true if the method completes.
See Also:
DisbursementVoucherExtractService.extractPayments()

extractPaymentsForCampus

protected void extractPaymentsForCampus(String campusCode,
                                        org.kuali.rice.kim.bo.Person user,
                                        Date processRunDate)
This method extracts all outstanding payments from all the disbursement vouchers in approved status for a given campus and adds these payments to a batch file that is uploaded for processing.

Parameters:
campusCode - The id code of the campus the payments will be retrieved for.
user - The user object used when creating the batch file to upload with outstanding payments.
processRunDate - This is the date that the batch file is created, often this value will be today's date.

addPayment

protected void addPayment(DisbursementVoucherDocument document,
                          Batch batch,
                          Date processRunDate)
This method creates a payment group from the disbursement voucher and batch provided and persists that group to the database.

Parameters:
document - The document used to build a payment group detail.
batch - The batch file used to build a payment group and detail.
processRunDate - The date the batch file is to post.

buildPaymentGroup

protected PaymentGroup buildPaymentGroup(DisbursementVoucherDocument document,
                                         Batch batch)
This method creates a PaymentGroup from the disbursement voucher and batch provided. The values provided by the disbursement voucher are used to assign appropriate attributes to the payment group, including address and vendor detail information. The information added to the payment group includes tax encoding to identify if taxes should be taken out of the payment. The tax rules vary depending on the type of individual or entity being paid

Parameters:
document - The document to be used for retrieving the information about the vendor being paid.
batch - The batch that the payment group will be associated with.
Returns:
A PaymentGroup object fully populated with all the values necessary to make a payment.

buildPaymentDetail

protected PaymentDetail buildPaymentDetail(DisbursementVoucherDocument document,
                                           Batch batch,
                                           Date processRunDate)
This method builds a payment detail object from the disbursement voucher document provided and links that detail file to the batch and process run date given.

Parameters:
document - The disbursement voucher document to retrieve payment information from to populate the PaymentDetail.
batch - The batch file associated with the payment.
processRunDate - The date of the payment detail invoice.
Returns:
A fully populated PaymentDetail instance.

createBatch

protected Batch createBatch(String campusCode,
                            org.kuali.rice.kim.bo.Person user,
                            Date processRunDate)
This method creates a Batch instance and populates it with the information provided.

Parameters:
campusCode - The campus code used to retrieve a customer profile to be set on the batch.
user - The user who submitted the batch.
processRunDate - The date the batch was submitted and the date the customer profile was generated.
Returns:
A fully populated batch instance.

getCampusListByDocumentStatusCode

protected Set<String> getCampusListByDocumentStatusCode(String statusCode)
This method retrieves a collection of campus instances representing all the campuses which currently have disbursement vouchers with the status code provided.

Parameters:
statusCode - The status code to retrieve disbursement vouchers by.
Returns:
A collection of campus codes of all the campuses with disbursement vouchers in the status given.

getListByDocumentStatusCodeCampus

protected Collection<DisbursementVoucherDocument> getListByDocumentStatusCodeCampus(String statusCode,
                                                                                    String campusCode)
This method retrieves a list of disbursement voucher documents that are in the status provided for the campus code given.

Parameters:
statusCode - The status of the disbursement vouchers to be retrieved.
campusCode - The campus code that the disbursement vouchers will be associated with.
Returns:
A collection of disbursement voucher objects that meet the search criteria given.

cancelExtractedDisbursementVoucher

public void cancelExtractedDisbursementVoucher(DisbursementVoucherDocument dv,
                                               Date processDate)
This cancels the disbursement voucher

Specified by:
cancelExtractedDisbursementVoucher in interface DisbursementVoucherExtractService
Parameters:
dv - the disbursement voucher document to cancel
processDate - the date of the cancelation
See Also:
org.kuali.kfs.fp.batch.service.DisbursementVoucherExtractService#cancelExtractedDisbursementVoucher(org.kuali.kfs.fp.document.DisbursementVoucherDocument)

oppositifyEntry

protected void oppositifyEntry(GeneralLedgerPendingEntry glpe,
                               org.kuali.rice.kns.service.BusinessObjectService boService,
                               GeneralLedgerPendingEntrySequenceHelper glpeSeqHelper)
Updates the given general ledger pending entry so that it will have the opposite effect of what it was created to do; this, in effect, undoes the entries that were already posted for this document

Parameters:
glpe - the general ledger pending entry to undo

resetExtractedDisbursementVoucher

public void resetExtractedDisbursementVoucher(DisbursementVoucherDocument dv,
                                              Date processDate)
This updates the disbursement voucher so that when it is re-extracted, information about it will be accurate

Specified by:
resetExtractedDisbursementVoucher in interface DisbursementVoucherExtractService
Parameters:
dv - the disbursement voucher document to reset
processDate - the date of the reseting
See Also:
org.kuali.kfs.fp.batch.service.DisbursementVoucherExtractService#resetExtractedDisbursementVoucher(org.kuali.kfs.fp.document.DisbursementVoucherDocument)

getDocumentById

public DisbursementVoucherDocument getDocumentById(String documentNumber)
Looks up the document using document service, and deals with any nasty WorkflowException or ClassCastExceptions that pop up

Specified by:
getDocumentById in interface DisbursementVoucherExtractService
Parameters:
documentNumber - the number of the document to look up
Returns:
the dv doc if found, or null otherwise
See Also:
DisbursementVoucherExtractService.getDocumentById(java.lang.String)

markDisbursementVoucherAsPaid

public void markDisbursementVoucherAsPaid(DisbursementVoucherDocument dv,
                                          Date processDate)
Marks the disbursement voucher as paid by setting its paid date

Specified by:
markDisbursementVoucherAsPaid in interface DisbursementVoucherExtractService
Parameters:
dv - the dv document to mark as paid
processDate - the date when the dv was paid
See Also:
org.kuali.kfs.fp.batch.service.DisbursementVoucherExtractService#markDisbursementVoucherAsPaid(org.kuali.kfs.fp.document.DisbursementVoucherDocument)

setDisbursementVoucherDao

public void setDisbursementVoucherDao(DisbursementVoucherDao disbursementVoucherDao)
This method sets the disbursementVoucherDao instance.

Parameters:
disbursementVoucherDao - The DisbursementVoucherDao to be set.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
This method sets the ParameterService instance.

Parameters:
parameterService - The ParameterService to be set.

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
This method sets the dateTimeService instance.

Parameters:
dateTimeService - The DateTimeService to be set.

setCustomerProfileService

public void setCustomerProfileService(CustomerProfileService customerProfileService)
This method sets the customerProfileService instance.

Parameters:
customerProfileService - The CustomerProfileService to be set.

setPaymentFileService

public void setPaymentFileService(PaymentFileService paymentFileService)
This method sets the paymentFileService instance.

Parameters:
paymentFileService - The PaymentFileService to be set.

setPaymentGroupService

public void setPaymentGroupService(PaymentGroupService paymentGroupService)
This method sets the paymentGroupService instance.

Parameters:
paymentGroupService - The PaymentGroupService to be set.

setBusinessObjectService

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

Parameters:
businessObjectService - The businessObjectService to set.

setPaymentFileEmailService

public void setPaymentFileEmailService(PdpEmailService paymentFileEmailService)
Sets the paymentFileEmailService attribute value.

Parameters:
paymentFileEmailService - The paymentFileEmailService to set.

getPersonService

protected org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
Returns:
Returns the personService.


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