org.kuali.kfs.module.ld.batch.service.impl
Class LaborYearEndBalanceForwardServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.ld.batch.service.impl.LaborYearEndBalanceForwardServiceImpl
All Implemented Interfaces:
LaborYearEndBalanceForwardService

@Transactional
public class LaborYearEndBalanceForwardServiceImpl
extends Object
implements LaborYearEndBalanceForwardService

Labor Ledger Year End Inception to Date Beginning Balance process moves the Year-to-Date Total plus the Contracts and Grants Beginning Balances to the Contracts and Grants Beginning Balances of the new fiscal year for a designated group of accounts (to be identified by fund group and sub fund group).


Field Summary
protected static String PROCESSED_BALANCE_TYPES_LABEL
           
protected static String PROCESSED_OBJECT_TYPES_LABEL
           
 
Constructor Summary
LaborYearEndBalanceForwardServiceImpl()
           
 
Method Summary
protected  Map<String,Integer> constructReportSummary()
           
protected  void createDoneFile(String originEntryFileName)
           
protected  void fillParametersReportWriter(Date runDate, Integer closingYear, List<String> processedFundGroups, List<String> processedSubFundGroups, String originationCode, List<String> processedBalanceTypeCodes, List<String> processedObjectTypeCodes, String documentTypeCode)
          Report out which significant parameters were used in this report.
protected  void fillStatisticsReportWriter(Map<String,Integer> glEntryReportSummary)
           
 void forwardBalance()
          moves the Year-to-Date Total plus the Contracts and Grants Beginning Balances to the Contracts and Grants Beginning Balances of the new fiscal year for a designated group of accounts.
 void forwardBalance(Integer fiscalYear)
          moves the Year-to-Date Total plus the Contracts and Grants Beginning Balances to the Contracts and Grants Beginning Balances of the new fiscal year for a designated group of accounts
 void forwardBalance(Integer fiscalYear, Integer newFiscalYear)
          moves the Year-to-Date Total plus the Contracts and Grants Beginning Balances to the Contracts and Grants Beginning Balances of the new fiscal year for a designated group of accounts
protected  String getDescription()
          get the description of the transaction posted by year-end process
protected  String getDocumentTypeCode()
          get the document type code of the transaction posted by year-end process
protected  List<String> getFundGroupProcessed()
          get the fund group codes that are acceptable by year-end process
protected  String getOriginationCode()
          get the origination code of the transaction posted by year-end process
protected  List<String> getProcessableBalanceTypeCode(SystemOptions options)
          get the balance type codes that are acceptable by year-end process
protected  List<String> getProcessableObjectTypeCodes(SystemOptions options)
          get the object type codes that are acceptable by year-end process
protected  List<String> getSubFundGroupProcessed()
          get the fund group codes that are acceptable by year-end process
protected  void postAsOriginEntry(LedgerBalanceForYearEndBalanceForward balance, LaborOriginEntry originEntry, PrintStream balanceForwardsPs, Date postingDate)
          post the qualified balance into origin entry table for the further labor ledger processing
protected  int postSelectedBalancesAsOriginEntries(Iterator<LedgerBalanceForYearEndBalanceForward> balanceIterator, Integer newFiscalYear, PrintStream balanceForwardsPs, Date runDate, PosterOutputSummaryReport posterOutputSummaryReport, Map<String,Integer> reportSummary)
          post the qualified balances into origin entry table for the further labor ledger processing
 void setBatchFileDirectoryName(String batchFileDirectoryName)
          Sets the batchFileDirectoryName attribute value.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the dateTimeService attribute value.
 void setLaborBalanceForwardReportWriterService(ReportWriterService laborBalanceForwardReportWriterService)
          Sets the laborOutputSummaryReportWriterService attribute value.
 void setLaborLedgerBalanceService(LaborLedgerBalanceService laborLedgerBalanceService)
          Sets the laborLedgerBalanceService attribute value.
 void setOptionsService(OptionsService optionsService)
          Sets the optionsService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
protected  void updateReportSummary(Map<String,Integer> reportSummary, String destination, String operation)
           
protected  boolean validateBalance(LedgerBalanceForYearEndBalanceForward balance, List<Message> errors)
          determine if the given balance is qualified to be carried forward to new fiscal year
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROCESSED_BALANCE_TYPES_LABEL

protected static String PROCESSED_BALANCE_TYPES_LABEL

PROCESSED_OBJECT_TYPES_LABEL

protected static String PROCESSED_OBJECT_TYPES_LABEL
Constructor Detail

LaborYearEndBalanceForwardServiceImpl

public LaborYearEndBalanceForwardServiceImpl()
Method Detail

forwardBalance

public void forwardBalance()
Description copied from interface: LaborYearEndBalanceForwardService
moves the Year-to-Date Total plus the Contracts and Grants Beginning Balances to the Contracts and Grants Beginning Balances of the new fiscal year for a designated group of accounts. The fiscal year is given through application parameter table. The new fiscal year is (fiscalYear + 1) by default.

Specified by:
forwardBalance in interface LaborYearEndBalanceForwardService
See Also:
LaborYearEndBalanceForwardService.forwardBalance()

forwardBalance

public void forwardBalance(Integer fiscalYear)
Description copied from interface: LaborYearEndBalanceForwardService
moves the Year-to-Date Total plus the Contracts and Grants Beginning Balances to the Contracts and Grants Beginning Balances of the new fiscal year for a designated group of accounts

Specified by:
forwardBalance in interface LaborYearEndBalanceForwardService
Parameters:
fiscalYear - the fiscal year to be processed. The new fiscal year is (fiscalYear + 1) by default.
See Also:
LaborYearEndBalanceForwardService.forwardBalance(java.lang.Integer)

forwardBalance

public void forwardBalance(Integer fiscalYear,
                           Integer newFiscalYear)
Description copied from interface: LaborYearEndBalanceForwardService
moves the Year-to-Date Total plus the Contracts and Grants Beginning Balances to the Contracts and Grants Beginning Balances of the new fiscal year for a designated group of accounts

Specified by:
forwardBalance in interface LaborYearEndBalanceForwardService
Parameters:
fiscalYear - the fiscal year to be processed.
newFiscalYear - the new fiscal year
See Also:
LaborYearEndBalanceForwardService.forwardBalance(java.lang.Integer, java.lang.Integer)

createDoneFile

protected void createDoneFile(String originEntryFileName)

postSelectedBalancesAsOriginEntries

protected int postSelectedBalancesAsOriginEntries(Iterator<LedgerBalanceForYearEndBalanceForward> balanceIterator,
                                                  Integer newFiscalYear,
                                                  PrintStream balanceForwardsPs,
                                                  Date runDate,
                                                  PosterOutputSummaryReport posterOutputSummaryReport,
                                                  Map<String,Integer> reportSummary)
post the qualified balances into origin entry table for the further labor ledger processing

Parameters:
balanceIterator - the given ledger balances that will be carried forward
newFiscalYear - the new fiscal year
validGroup - the group that the posted transaction belongs to
errorMap - the map that records the error messages
runDate - the date the transaction is posted
Returns:
the number of qualified balances

validateBalance

protected boolean validateBalance(LedgerBalanceForYearEndBalanceForward balance,
                                  List<Message> errors)
determine if the given balance is qualified to be carried forward to new fiscal year

Parameters:
balance - the given ledger balance that could be carried forward
errors - the error list that is updated if the given balacne is not qualified for carry forward
Returns:
true if the balance is qualified; otherwise, false

postAsOriginEntry

protected void postAsOriginEntry(LedgerBalanceForYearEndBalanceForward balance,
                                 LaborOriginEntry originEntry,
                                 PrintStream balanceForwardsPs,
                                 Date postingDate)
post the qualified balance into origin entry table for the further labor ledger processing

Parameters:
balance - the given ledger balance that will be carried forward
newFiscalYear - the new fiscal year
validGroup - the group that the posted transaction belongs to
postingDate - the date the transaction is posted

getFundGroupProcessed

protected List<String> getFundGroupProcessed()
get the fund group codes that are acceptable by year-end process

Returns:
the fund group codes that are acceptable by year-end process

getSubFundGroupProcessed

protected List<String> getSubFundGroupProcessed()
get the fund group codes that are acceptable by year-end process

Returns:
the fund group codes that are acceptable by year-end process

getProcessableBalanceTypeCode

protected List<String> getProcessableBalanceTypeCode(SystemOptions options)
get the balance type codes that are acceptable by year-end process

Returns:
the balance type codes that are acceptable by year-end process

getProcessableObjectTypeCodes

protected List<String> getProcessableObjectTypeCodes(SystemOptions options)
get the object type codes that are acceptable by year-end process

Parameters:
options - the given system options
Returns:
the object type codes that are acceptable by year-end process

constructReportSummary

protected Map<String,Integer> constructReportSummary()

fillStatisticsReportWriter

protected void fillStatisticsReportWriter(Map<String,Integer> glEntryReportSummary)

fillParametersReportWriter

protected void fillParametersReportWriter(Date runDate,
                                          Integer closingYear,
                                          List<String> processedFundGroups,
                                          List<String> processedSubFundGroups,
                                          String originationCode,
                                          List<String> processedBalanceTypeCodes,
                                          List<String> processedObjectTypeCodes,
                                          String documentTypeCode)
Report out which significant parameters were used in this report.

Parameters:
runDate - the date when this job was run
closingYear - the fiscal year closed by this job
processedFundGroups - the fund groups processed by this job
processedSubFundGroups - the sub-fund groups processed by this job
originationCode - the origination code of the posted entries
processedBalanceTypeCodes - the balance type codes processed by this job
processedObjectTypeCodes - the object type codes processed by this job
documentTypeCode - the document type code of posted entries

updateReportSummary

protected void updateReportSummary(Map<String,Integer> reportSummary,
                                   String destination,
                                   String operation)

getDocumentTypeCode

protected String getDocumentTypeCode()
get the document type code of the transaction posted by year-end process

Returns:
the document type code of the transaction posted by year-end process

getOriginationCode

protected String getOriginationCode()
get the origination code of the transaction posted by year-end process

Returns:
the origination code of the transaction posted by year-end process

getDescription

protected String getDescription()
get the description of the transaction posted by year-end process

Returns:
the description of the transaction posted by year-end process

setBusinessObjectService

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

Parameters:
businessObjectService - The businessObjectService to set.

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
Sets the dateTimeService attribute value.

Parameters:
dateTimeService - The dateTimeService to set.

setParameterService

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

Parameters:
parameterService - The parameterService to set.

setLaborLedgerBalanceService

public void setLaborLedgerBalanceService(LaborLedgerBalanceService laborLedgerBalanceService)
Sets the laborLedgerBalanceService attribute value.

Parameters:
laborLedgerBalanceService - The laborLedgerBalanceService to set.

setOptionsService

public void setOptionsService(OptionsService optionsService)
Sets the optionsService attribute value.

Parameters:
optionsService - The optionsService to set.

setBatchFileDirectoryName

public void setBatchFileDirectoryName(String batchFileDirectoryName)
Sets the batchFileDirectoryName attribute value.

Parameters:
batchFileDirectoryName - The batchFileDirectoryName to set.

setLaborBalanceForwardReportWriterService

public void setLaborBalanceForwardReportWriterService(ReportWriterService laborBalanceForwardReportWriterService)
Sets the laborOutputSummaryReportWriterService attribute value.

Parameters:
laborOutputSummaryReportWriterService - The laborOutputSummaryReportWriterService to set.


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