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

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

@Transactional
public class LaborPosterServiceImpl
extends Object
implements LaborPosterService

The Labor Ledger Poster accepts pending entries generated by Labor Ledger e-docs (such as Salary Expense Transfer and Benefit Expense Transfer), and combines them with entries from external systems. It edits the entries for validity. Invalid entries can be marked for Labor Ledger Error Correction process. The Poster writes valid entries to the Labor Ledger Entry table, updates balances in the Labor Ledger Balance table, and summarizes the entries for posting to the General Ledger.


Constructor Summary
LaborPosterServiceImpl()
           
 
Method Summary
protected  Map<String,Integer> constructGlEntryReportSummary()
           
protected  Map<String,Integer> constructPosterReportSummary()
           
protected  void fillGlEntryReportWriter(Map<String,Integer> glEntryReportSummary)
           
protected  void fillPosterReportWriter(int lineNumber, Map<String,Integer> reportSummary, Map<String,Integer> glEntryReportSummary)
           
 List<String> getBalanceTypesNotProcessed()
          Get a set of the balance type codes that are bypassed by Labor Poster
 List<String> getPeriodCodesNotProcessed()
          Get a set of the fiscal period codes that are bypassed by Labor Poster
protected  List<Message> isPostableForLaborGLEntry(LaborOriginEntry originEntry)
          determine if the given origin entry can be posted back to Labor GL entry
protected  String postAsLedgerEntry(LaborOriginEntry originEntry, Date postDate)
          post the given entry to the labor entry table
protected  void postLaborLedgerEntries(Date runDate)
          post the qualified origin entries into Labor Ledger tables
 void postMainEntries()
          Post the eligible entries into Ledger tables
protected  boolean postSingleEntryIntoLaborLedger(LaborOriginEntry originEntry, Map<String,Integer> reportSummary, Date runDate, String line)
          post the given entry into the labor ledger tables if the entry is qualified; otherwise report error
 void setBatchFileDirectoryName(String batchFileDirectoryName)
          Sets the batchFileDirectoryName attribute value.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the dateTimeService attribute value.
 void setErrorListingReportWriterService(ReportWriterService errorListingReportWriterService)
          Sets the errorListingReportWriterService
 void setLaborGlEntryStatisticsReportWriterService(ReportWriterService laborGlEntryStatisticsReportWriterService)
          Sets the laborGlEntryStatisticsReportWriterService attribute value.
 void setLaborGLLedgerEntryPoster(PostTransaction laborGLLedgerEntryPoster)
          Sets the laborGLLedgerEntryPoster attribute value.
 void setLaborLedgerBalancePoster(PostTransaction laborLedgerBalancePoster)
          Sets the laborLedgerBalancePoster attribute value.
 void setLaborLedgerEntryPoster(PostTransaction laborLedgerEntryPoster)
          Sets the laborLedgerEntryPoster attribute value.
 void setLaborOriginEntryService(LaborOriginEntryService laborOriginEntryService)
          Sets the laborOriginEntryService attribute value.
 void setLaborPosterTransactionValidator(VerifyTransaction laborPosterTransactionValidator)
          Sets the laborPosterTransactionValidator attribute value.
 void setLaborTransactionDescriptionService(LaborTransactionDescriptionService laborTransactionDescriptionService)
          Sets the laborTransactionDescriptionService attribute value.
 void setLedgerSummaryReportWriterService(ReportWriterService ledgerSummaryReportWriterService)
          Sets the ledgerSummaryReportWriterService
 void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService)
          Sets the originEntryGroupService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 void setReportWriterService(ReportWriterService reportWriterService)
          Sets the reportWriterService
protected  LaborOriginEntry summarizeLaborGLEntries(LaborOriginEntry laborOriginEntry, LaborLedgerUnitOfWork laborLedgerUnitOfWork, Date runDate, int lineNumber, Map<String,Integer> glEntryReportSummary)
          summary the valid origin entries for the General Ledger
protected  String updateLedgerBalance(LaborOriginEntry originEntry, Date postDate)
          update the labor ledger balance for the given entry
protected  void updateReportSummary(Map<String,Integer> reportSummary, String destination, String operation)
           
protected  List<Message> validateEntry(LaborOriginEntry originEntry)
          validate the given entry, and generate an error list if the entry cannot meet the business rules
protected  void writeErrorEntry(String line)
           
protected  void writeLaborGLEntry(LaborOriginEntry laborOriginEntry, LaborLedgerUnitOfWork laborLedgerUnitOfWork, Date runDate, int lineNumber, Map<String,Integer> glEntryReportSummary)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LaborPosterServiceImpl

public LaborPosterServiceImpl()
Method Detail

postMainEntries

public void postMainEntries()
Description copied from interface: LaborPosterService
Post the eligible entries into Ledger tables

Specified by:
postMainEntries in interface LaborPosterService
See Also:
LaborPosterService.postMainEntries()

postLaborLedgerEntries

protected void postLaborLedgerEntries(Date runDate)
post the qualified origin entries into Labor Ledger tables

Parameters:
validGroup - the origin entry group that holds the valid transactions
invalidGroup - the origin entry group that holds the invalid transactions
runDate - the data when the process is running

postSingleEntryIntoLaborLedger

protected boolean postSingleEntryIntoLaborLedger(LaborOriginEntry originEntry,
                                                 Map<String,Integer> reportSummary,
                                                 Date runDate,
                                                 String line)
post the given entry into the labor ledger tables if the entry is qualified; otherwise report error

Parameters:
originEntry - the given origin entry, a transaction
reportSummary - the report summary object that need to be update when a transaction is posted
runDate - the data when the process is running
Returns:
true if the given transaction is posted into ledger tables; otherwise, return false

validateEntry

protected List<Message> validateEntry(LaborOriginEntry originEntry)
validate the given entry, and generate an error list if the entry cannot meet the business rules

Parameters:
originEntry - the given origin entry, a transcation
Returns:
error message list. If the given transaction is invalid, the list has message(s); otherwise, it is empty

postAsLedgerEntry

protected String postAsLedgerEntry(LaborOriginEntry originEntry,
                                   Date postDate)
post the given entry to the labor entry table

Parameters:
originEntry - the given origin entry, a transaction
postDate - the data when the transaction is processes return the operation type of the process

updateLedgerBalance

protected String updateLedgerBalance(LaborOriginEntry originEntry,
                                     Date postDate)
update the labor ledger balance for the given entry

Parameters:
originEntry - the given origin entry, a transaction
postDate - the data when the transaction is processes return the operation type of the process

isPostableForLaborGLEntry

protected List<Message> isPostableForLaborGLEntry(LaborOriginEntry originEntry)
determine if the given origin entry can be posted back to Labor GL entry

Parameters:
originEntry - the given origin entry, atransaction
Returns:
a message list. The list has message(s) if the given origin entry cannot be posted back to Labor GL entry; otherwise, it is empty

fillPosterReportWriter

protected void fillPosterReportWriter(int lineNumber,
                                      Map<String,Integer> reportSummary,
                                      Map<String,Integer> glEntryReportSummary)

constructPosterReportSummary

protected Map<String,Integer> constructPosterReportSummary()

constructGlEntryReportSummary

protected Map<String,Integer> constructGlEntryReportSummary()

fillGlEntryReportWriter

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

summarizeLaborGLEntries

protected LaborOriginEntry summarizeLaborGLEntries(LaborOriginEntry laborOriginEntry,
                                                   LaborLedgerUnitOfWork laborLedgerUnitOfWork,
                                                   Date runDate,
                                                   int lineNumber,
                                                   Map<String,Integer> glEntryReportSummary)
summary the valid origin entries for the General Ledger

Parameters:
laborOriginEntry - the current entry to check for summarization
laborLedgerUnitOfWork - the current (in process) summarized entry for the GL
runDate - the data when the process is running
lineNumber - the line in the input file (used for error message only)

writeLaborGLEntry

protected void writeLaborGLEntry(LaborOriginEntry laborOriginEntry,
                                 LaborLedgerUnitOfWork laborLedgerUnitOfWork,
                                 Date runDate,
                                 int lineNumber,
                                 Map<String,Integer> glEntryReportSummary)

updateReportSummary

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

writeErrorEntry

protected void writeErrorEntry(String line)

getBalanceTypesNotProcessed

public List<String> getBalanceTypesNotProcessed()
Get a set of the balance type codes that are bypassed by Labor Poster

Returns:
a set of the balance type codes that are bypassed by Labor Poster

getPeriodCodesNotProcessed

public List<String> getPeriodCodesNotProcessed()
Get a set of the fiscal period codes that are bypassed by Labor Poster

Returns:
a set of the fiscal period codes that are bypassed by Labor Poster

setDateTimeService

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

Parameters:
dateTimeService - The dateTimeService to set.

setLaborLedgerBalancePoster

public void setLaborLedgerBalancePoster(PostTransaction laborLedgerBalancePoster)
Sets the laborLedgerBalancePoster attribute value.

Parameters:
laborLedgerBalancePoster - The laborLedgerBalancePoster to set.

setLaborGLLedgerEntryPoster

public void setLaborGLLedgerEntryPoster(PostTransaction laborGLLedgerEntryPoster)
Sets the laborGLLedgerEntryPoster attribute value.

Parameters:
laborGLLedgerEntryPoster - The laborGLLedgerEntryPoster to set.

setLaborLedgerEntryPoster

public void setLaborLedgerEntryPoster(PostTransaction laborLedgerEntryPoster)
Sets the laborLedgerEntryPoster attribute value.

Parameters:
laborLedgerEntryPoster - The laborLedgerEntryPoster to set.

setLaborOriginEntryService

public void setLaborOriginEntryService(LaborOriginEntryService laborOriginEntryService)
Sets the laborOriginEntryService attribute value.

Parameters:
laborOriginEntryService - The laborOriginEntryService to set.

setOriginEntryGroupService

public void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService)
Sets the originEntryGroupService attribute value.

Parameters:
originEntryGroupService - The originEntryGroupService to set.

setLaborTransactionDescriptionService

public void setLaborTransactionDescriptionService(LaborTransactionDescriptionService laborTransactionDescriptionService)
Sets the laborTransactionDescriptionService attribute value.

Parameters:
laborTransactionDescriptionService - The laborTransactionDescriptionService to set.

setReportWriterService

public void setReportWriterService(ReportWriterService reportWriterService)
Sets the reportWriterService

Parameters:
reportWriterService - The reportWriterService to set.

setErrorListingReportWriterService

public void setErrorListingReportWriterService(ReportWriterService errorListingReportWriterService)
Sets the errorListingReportWriterService

Parameters:
errorListingReportWriterService - The errorListingReportWriterService to set.

setLedgerSummaryReportWriterService

public void setLedgerSummaryReportWriterService(ReportWriterService ledgerSummaryReportWriterService)
Sets the ledgerSummaryReportWriterService

Parameters:
ledgerSummaryReportWriterService - The ledgerSummaryReportWriterService to set.

setLaborPosterTransactionValidator

public void setLaborPosterTransactionValidator(VerifyTransaction laborPosterTransactionValidator)
Sets the laborPosterTransactionValidator attribute value.

Parameters:
laborPosterTransactionValidator - The laborPosterTransactionValidator to set.

setParameterService

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

Parameters:
parameterService - The parameterService to set.

setLaborGlEntryStatisticsReportWriterService

public void setLaborGlEntryStatisticsReportWriterService(ReportWriterService laborGlEntryStatisticsReportWriterService)
Sets the laborGlEntryStatisticsReportWriterService attribute value.

Parameters:
laborGlEntryStatisticsReportWriterService - The laborGlEntryStatisticsReportWriterService to set.

setBatchFileDirectoryName

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

Parameters:
batchFileDirectoryName - The batchFileDirectoryName to set.


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