org.kuali.kfs.pdp.service.impl
Class FormatServiceImpl

java.lang.Object
  extended by org.kuali.kfs.pdp.service.impl.FormatServiceImpl
All Implemented Interfaces:
FormatService

@Transactional
public class FormatServiceImpl
extends Object
implements FormatService


Nested Class Summary
protected  class FormatServiceImpl.PaymentInfo
          This class holds disbursement number and noteLines info for payment group disbursement number assignment and combine checks.
 
Constructor Summary
FormatServiceImpl()
          Constructs a FormatServiceImpl.java.
 
Method Summary
protected  org.kuali.rice.kns.util.KualiInteger assignDisbursementNumber(String campus, DisbursementNumberRange range, PaymentGroup paymentGroup, FormatProcessSummary postFormatProcessSummary)
          This method gets a new disbursement number and sets it on the payment group and process summary.
protected  boolean assignDisbursementNumbersAndCombineChecks(PaymentProcess paymentProcess, FormatProcessSummary postFormatProcessSummary)
          This method assigns disbursement numbers and tries to combine payment groups with disbursement type check if possible.
 void clearUnfinishedFormat(Integer processId)
          If the start format process was run and the user doesn't want to continue, this needs to be run to set all payments back to open.
 void endFormatProcess(String campus)
          This method removes the format process from the format process table
protected  void extractChecks()
          runs the extract process.
 List<CustomerProfile> getAllCustomerProfiles()
          This method gets all customer profiles
 List<DisbursementNumberRange> getAllDisbursementNumberRanges()
          This method gets all disbursement number ranges
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 FormatSelection getDataForFormat(org.kuali.rice.kim.bo.Person user)
          This method gets the data for the format process
protected  ExtractPaymentService getExtractPaymentService()
          Gets the extractPaymentService attribute.
 Date getFormatProcessStartDate(String campus)
          This method gets the format process by campus code and returns the start date for that process.
protected  int getMaxNoteLines()
          This method gets the maximum number of lines in a note.
protected  org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
           
protected  DisbursementNumberRange getRange(List<DisbursementNumberRange> ranges, Bank bank, String disbursementTypeCode)
          Given the List of disbursement number ranges for the processing campus, finds matches for the bank code and disbursement type code.
 void performFormat(Integer processId)
          This method formats the data for check printing.
protected  boolean processPaymentGroup(PaymentGroup paymentGroup, PaymentProcess paymentProcess)
          This method processes the payment group data.
 void resetFormatPayments(Integer processId)
          If the start format process was run and errored out, this needs to be run to allow formats to continue to function
 void setAchService(AchService as)
          This method sets the achService
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService bos)
          This method sets the businessObjectService
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          This method sets the dateTimeService
 void setExtractPaymentService(ExtractPaymentService extractPaymentService)
          Sets the extractPaymentService attribute value.
 void setFormatPaymentDao(FormatPaymentDao fpd)
          This method sets the formatPaymentDao
 void setGlPendingTransactionService(PendingTransactionService gs)
          This method sets the glPendingTransactionService
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          This method sets the parameterService
 void setPaymentDetailDao(PaymentDetailDao pdd)
          This method sets the paymentDetailDao
 void setPaymentGroupDao(PaymentGroupDao pgd)
          This method sets the paymentGroupDao
 void setPaymentGroupService(PaymentGroupService paymentGroupService)
          This method sets the paymentGroupService
 void setProcessDao(ProcessDao pd)
          This method sets the processDao
 void setSchedulerService(SchedulerService ss)
          This method sets the schedulerService
 FormatProcessSummary startFormatProcess(org.kuali.rice.kim.bo.Person user, String campus, List<CustomerProfile> customers, Date paydate, String paymentTypes)
          This method marks the process log so a format only happens once per campus.
protected  boolean validateAndUpdatePaymentGroupBankCode(PaymentGroup paymentGroup, DisbursementType disbursementType, CustomerProfile customer)
          Verifies a valid bank is set on the payment group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatServiceImpl

public FormatServiceImpl()
Constructs a FormatServiceImpl.java.

Method Detail

getDataForFormat

public FormatSelection getDataForFormat(org.kuali.rice.kim.bo.Person user)
Description copied from interface: FormatService
This method gets the data for the format process

Specified by:
getDataForFormat in interface FormatService
Parameters:
user - the user that initiated the format process
Returns:
FormatSelection
See Also:
org.kuali.kfs.pdp.service.FormatProcessService#getDataForFormat(org.kuali.rice.kim.bo.Person)

getFormatProcessStartDate

public Date getFormatProcessStartDate(String campus)
Description copied from interface: FormatService
This method gets the format process by campus code and returns the start date for that process.

Specified by:
getFormatProcessStartDate in interface FormatService
Parameters:
campus - the campus code
Returns:
the format process start date if any process found for the given campus code, null otherwise
See Also:
FormatService.getFormatProcessStartDate(java.lang.String)

startFormatProcess

public FormatProcessSummary startFormatProcess(org.kuali.rice.kim.bo.Person user,
                                               String campus,
                                               List<CustomerProfile> customers,
                                               Date paydate,
                                               String paymentTypes)
Description copied from interface: FormatService
This method marks the process log so a format only happens once per campus. Mark all the payments that will be formatted and return a summary. attachments will be Y, N or null for both.

Specified by:
startFormatProcess in interface FormatService
Returns:
FormatProcessSummary
See Also:
FormatService.startFormatProcess(org.kuali.rice.kim.bo.Person, java.lang.String, java.util.List, java.util.Date, java.lang.String)

getMaxNoteLines

protected int getMaxNoteLines()
This method gets the maximum number of lines in a note.

Returns:
the maximum number of lines in a note

performFormat

public void performFormat(Integer processId)
                   throws FormatException
Description copied from interface: FormatService
This method formats the data for check printing.

Specified by:
performFormat in interface FormatService
Throws:
FormatException
See Also:
FormatService.performFormat(java.lang.Integer)

processPaymentGroup

protected boolean processPaymentGroup(PaymentGroup paymentGroup,
                                      PaymentProcess paymentProcess)
This method processes the payment group data.

Parameters:
paymentGroup -
paymentProcess -

validateAndUpdatePaymentGroupBankCode

protected boolean validateAndUpdatePaymentGroupBankCode(PaymentGroup paymentGroup,
                                                        DisbursementType disbursementType,
                                                        CustomerProfile customer)
Verifies a valid bank is set on the payment group. A bank is valid if it is active and supports the given disbursement type. If the payment group already has an assigned bank it will be used unless it is not valid. If the payment group bank is not valid or was not given the bank specified on the customer profile to use for the given disbursement type is used. If this bank is inactive then its continuation bank is used. If not valid bank to use is found an error is added to the global message map.

Parameters:
paymentGroup - group to set bank on
disbursementType - type of disbursement for given payment group
customer - customer profile for payment group
Returns:
boolean true if a valid bank is set on the payment group, false otherwise

assignDisbursementNumbersAndCombineChecks

protected boolean assignDisbursementNumbersAndCombineChecks(PaymentProcess paymentProcess,
                                                            FormatProcessSummary postFormatProcessSummary)
This method assigns disbursement numbers and tries to combine payment groups with disbursement type check if possible.

Parameters:
paymentProcess -
postFormatProcessSummary -

assignDisbursementNumber

protected org.kuali.rice.kns.util.KualiInteger assignDisbursementNumber(String campus,
                                                                        DisbursementNumberRange range,
                                                                        PaymentGroup paymentGroup,
                                                                        FormatProcessSummary postFormatProcessSummary)
This method gets a new disbursement number and sets it on the payment group and process summary.

Parameters:
campus -
range -
paymentGroup -
postFormatProcessSummary -
Returns:

extractChecks

protected void extractChecks()
runs the extract process.


clearUnfinishedFormat

public void clearUnfinishedFormat(Integer processId)
Description copied from interface: FormatService
If the start format process was run and the user doesn't want to continue, this needs to be run to set all payments back to open. This method unmarks the payments and removes the format process entry.

Specified by:
clearUnfinishedFormat in interface FormatService
See Also:
FormatService.clearUnfinishedFormat(java.lang.Integer)

resetFormatPayments

public void resetFormatPayments(Integer processId)
Description copied from interface: FormatService
If the start format process was run and errored out, this needs to be run to allow formats to continue to function

Specified by:
resetFormatPayments in interface FormatService
See Also:
FormatService.resetFormatPayments(java.lang.Integer)

endFormatProcess

public void endFormatProcess(String campus)
Description copied from interface: FormatService
This method removes the format process from the format process table

Specified by:
endFormatProcess in interface FormatService
See Also:
FormatService.endFormatProcess(java.lang.String)

getAllCustomerProfiles

public List<CustomerProfile> getAllCustomerProfiles()
Description copied from interface: FormatService
This method gets all customer profiles

Specified by:
getAllCustomerProfiles in interface FormatService
Returns:
See Also:
FormatService.getAllCustomerProfiles()

getAllDisbursementNumberRanges

public List<DisbursementNumberRange> getAllDisbursementNumberRanges()
Description copied from interface: FormatService
This method gets all disbursement number ranges

Specified by:
getAllDisbursementNumberRanges in interface FormatService
Returns:
See Also:
FormatService.getAllDisbursementNumberRanges()

getRange

protected DisbursementNumberRange getRange(List<DisbursementNumberRange> ranges,
                                           Bank bank,
                                           String disbursementTypeCode)
Given the List of disbursement number ranges for the processing campus, finds matches for the bank code and disbursement type code. If more than one match is found, the range with the latest start date (before or equal to today) will be returned.

Parameters:
ranges - List of disbursement ranges to search (already filtered to processing campus, active, and start date before or equal to today)
bank - bank code to find range for
disbursementTypeCode - disbursement type code to find range for
Returns:
found DisbursementNumberRange

setFormatPaymentDao

public void setFormatPaymentDao(FormatPaymentDao fpd)
This method sets the formatPaymentDao

Parameters:
fpd -

setGlPendingTransactionService

public void setGlPendingTransactionService(PendingTransactionService gs)
This method sets the glPendingTransactionService

Parameters:
gs -

setAchService

public void setAchService(AchService as)
This method sets the achService

Parameters:
as -

setProcessDao

public void setProcessDao(ProcessDao pd)
This method sets the processDao

Parameters:
pd -

setPaymentGroupDao

public void setPaymentGroupDao(PaymentGroupDao pgd)
This method sets the paymentGroupDao

Parameters:
pgd -

setPaymentDetailDao

public void setPaymentDetailDao(PaymentDetailDao pdd)
This method sets the paymentDetailDao

Parameters:
pdd -

setSchedulerService

public void setSchedulerService(SchedulerService ss)
This method sets the schedulerService

Parameters:
ss -

setParameterService

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

Parameters:
parameterService -

getBusinessObjectService

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

Returns:
Returns the businessObjectService.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService bos)
This method sets the businessObjectService

Parameters:
bos -

setPaymentGroupService

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

Parameters:
paymentGroupService -

setDateTimeService

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

Parameters:
dateTimeService -

getExtractPaymentService

protected ExtractPaymentService getExtractPaymentService()
Gets the extractPaymentService attribute.

Returns:
Returns the extractPaymentService.

setExtractPaymentService

public void setExtractPaymentService(ExtractPaymentService extractPaymentService)
Sets the extractPaymentService attribute value.

Parameters:
extractPaymentService - The extractPaymentService 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.