org.kuali.kfs.gl.batch.service.impl
Class CollectorReportServiceImpl

java.lang.Object
  extended by org.kuali.kfs.gl.batch.service.impl.CollectorReportServiceImpl
All Implemented Interfaces:
CollectorReportService

public class CollectorReportServiceImpl
extends Object
implements CollectorReportService

The base implementation of the CollectorReportService


Nested Class Summary
protected  class CollectorReportServiceImpl.KualiDecimalFormatter
           
 
Constructor Summary
CollectorReportServiceImpl()
          Constructs a CollectorReportServiceImpl instance
 
Method Summary
protected  void appendAmountCountLine(StringBuilder buf, String countTitle, String count, org.kuali.rice.kns.util.KualiDecimal amount)
          Writes the Amount/Count line of the Collector to a buffer
protected  void appendCollectorHeaderInformation(CollectorReportData collectorReportData)
          Appends Collector header information to the report writer
protected  void appendDeletedOriginEntryAndDetailReport(CollectorReportData collectorReportData)
          Writes information about origin entry and details to the report
protected  void appendDemergerReport(CollectorReportData collectorReportData)
          Writes the report of the demerger run against the Collector data
protected  void appendDetailChangedAccountReport(CollectorReportData collectorReportData)
          Writes information about what details where changed in the Collector to the report
protected  void appendHeaderInformation(StringBuilder buf, CollectorBatch batch)
          Appends header information to the given buffer
protected  void appendLedgerReport(CollectorReportData collectorReportData)
          Adds the ledger report to this Collector report
protected  StringBuilder appendPaddingString(StringBuilder buf, char padCharacter, int valueLength, int desiredLength)
          Writes some padding to a buffer
protected  void appendPreScrubberReport(CollectorReportData collectorReportData)
           
protected  void appendScrubberReport(CollectorReportData collectorReportData)
          Writes the results of the Scrubber's run on the Collector data to the report writer
protected  void appendTotalsInformation(StringBuilder buf, CollectorBatch batch)
          Writes totals information to the report
protected  void appendValidationStatus(StringBuilder buf, List<String> errorMessages, boolean notifyIfSuccessful, int numLeftPaddingSpaces)
          Appends the validation status message to a buffer
protected  List<Summary> buildDemergerReportSummary(ScrubberReportData scrubberReportData, DemergerReportData demergerReport)
          Generate the header for the demerger status report.
protected  String createDemergerMessageBody(CollectorBatch batch, CollectorReportData collectorReportData)
          Writes the part of the report about the demerger
protected  String createValidationMessageBody(List<String> errorMessages, CollectorBatch batch, CollectorReportData collectorReportData)
          Creates a section about validation messages
 void generateCollectorRunReports(CollectorReportData collectorReportData)
          Generates the reports about a given Collector run
protected  org.kuali.rice.kns.service.DateTimeService getDateTimeService()
          Gets the dateTimeService attribute.
 org.kuali.rice.kns.service.MailService getMailService()
          Gets the mailService attribute.
protected  String getValidationStatus(List<String> errorMessages, boolean notifyIfSuccessful, int numLeftPaddingSpaces)
          Generates a String that reports on the validation status of the document
protected  void sendDemergerEmail(CollectorBatch batch, CollectorReportData collectorReportData)
          Sends the e-mail about the demerger step
 void sendEmails(CollectorReportData collectorReportData)
          Sends out e-mails about the validation and demerger of the Collector run
protected  void sendEmailSendFailureNotice(CollectorReportData collectorReportData)
          Sends email message to batch mailing list notifying of email send failures during the collector processing
protected  void sendValidationEmail(CollectorBatch batch, CollectorReportData collectorReportData)
          Sends email with results of the batch processing.
 void setCollectorReportWriterService(ReportWriterService collectorReportWriterService)
          Sets the collectorReportWriterService attribute value.
 void setConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService configurationService)
           
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the dateTimeService attribute value.
 void setMailService(org.kuali.rice.kns.service.MailService mailService)
          Sets the mailService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setPreScrubberService(PreScrubberService preScrubberService)
           
protected  List<String> translateErrorsFromErrorMap(org.kuali.rice.kns.util.MessageMap errorMap)
          Builds actual error message from error key and parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectorReportServiceImpl

public CollectorReportServiceImpl()
Constructs a CollectorReportServiceImpl instance

Method Detail

sendEmails

public void sendEmails(CollectorReportData collectorReportData)
Sends out e-mails about the validation and demerger of the Collector run

Specified by:
sendEmails in interface CollectorReportService
Parameters:
collectorReportData - data gathered from the run of the Collector
See Also:
CollectorReportService.sendEmails(org.kuali.kfs.gl.report.CollectorReportData)

generateCollectorRunReports

public void generateCollectorRunReports(CollectorReportData collectorReportData)
Generates the reports about a given Collector run

Specified by:
generateCollectorRunReports in interface CollectorReportService
Parameters:
collectorReportData - data gathered from the run of the Collector
See Also:
CollectorReportService.generateCollectorRunReports(org.kuali.kfs.gl.report.CollectorReportData)

appendCollectorHeaderInformation

protected void appendCollectorHeaderInformation(CollectorReportData collectorReportData)
Appends Collector header information to the report writer

Parameters:
collectorReportData - data gathered from the run of the Collector

appendHeaderInformation

protected void appendHeaderInformation(StringBuilder buf,
                                       CollectorBatch batch)
Appends header information to the given buffer

Parameters:
buf - the buffer where the message should go
batch - the data from the Collector file

appendTotalsInformation

protected void appendTotalsInformation(StringBuilder buf,
                                       CollectorBatch batch)
Writes totals information to the report

Parameters:
buf - the buffer where the e-mail report is being written
batch - the data generated by the Collector file upload
totals - the totals to write

appendAmountCountLine

protected void appendAmountCountLine(StringBuilder buf,
                                     String countTitle,
                                     String count,
                                     org.kuali.rice.kns.util.KualiDecimal amount)
Writes the Amount/Count line of the Collector to a buffer

Parameters:
buf - the buffer to write the line to
countTitle - the title of this part of the report
count - the Collector count
amountString - the Collector amount

appendPaddingString

protected StringBuilder appendPaddingString(StringBuilder buf,
                                            char padCharacter,
                                            int valueLength,
                                            int desiredLength)
Writes some padding to a buffer

Parameters:
buf - the buffer to write to
padCharacter - the character to repeat in the pad
valueLength - the length of the value being padded
desiredLength - the length the whole String should be
Returns:
the buffer

appendPreScrubberReport

protected void appendPreScrubberReport(CollectorReportData collectorReportData)

appendScrubberReport

protected void appendScrubberReport(CollectorReportData collectorReportData)
Writes the results of the Scrubber's run on the Collector data to the report writer

Parameters:
collectorReportData - data gathered from the run of the Collector

appendDemergerReport

protected void appendDemergerReport(CollectorReportData collectorReportData)
Writes the report of the demerger run against the Collector data

Parameters:
collectorReportData - data gathered from the run of the Collector
Throws:
DocumentException - the exception thrown if the PDF cannot be written to

appendDeletedOriginEntryAndDetailReport

protected void appendDeletedOriginEntryAndDetailReport(CollectorReportData collectorReportData)
Writes information about origin entry and details to the report

Parameters:
collectorReportData - data gathered from the run of the Collector
Throws:
DocumentException - the exception thrown if the PDF cannot be written to

appendDetailChangedAccountReport

protected void appendDetailChangedAccountReport(CollectorReportData collectorReportData)
Writes information about what details where changed in the Collector to the report

Parameters:
collectorReportData - data gathered from the run of the Collector
Throws:
DocumentException - the exception thrown if the PDF cannot be written to

getDateTimeService

protected org.kuali.rice.kns.service.DateTimeService getDateTimeService()
Gets the dateTimeService attribute.

Returns:
Returns the dateTimeService.

setDateTimeService

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

Parameters:
dateTimeService - The dateTimeService to set.

buildDemergerReportSummary

protected List<Summary> buildDemergerReportSummary(ScrubberReportData scrubberReportData,
                                                   DemergerReportData demergerReport)
Generate the header for the demerger status report.

Parameters:
scrubberReportData - the data gathered from the run of the scrubber on the collector data
demergerReport - the data gathered from the run of the demerger on the collector data
Returns:
list of report summaries to be printed

appendLedgerReport

protected void appendLedgerReport(CollectorReportData collectorReportData)
Adds the ledger report to this Collector report

Parameters:
collectorReportData - the data from the Collector run
Throws:
DocumentException - thrown if it is impossible to write to the report

translateErrorsFromErrorMap

protected List<String> translateErrorsFromErrorMap(org.kuali.rice.kns.util.MessageMap errorMap)
Builds actual error message from error key and parameters.

Parameters:
errorMap - a map of errors
Returns:
List of error message text

sendValidationEmail

protected void sendValidationEmail(CollectorBatch batch,
                                   CollectorReportData collectorReportData)
Sends email with results of the batch processing.

Parameters:
batch - the Collector data from the file
collectorReportData - data gathered from the run of the Collector

sendDemergerEmail

protected void sendDemergerEmail(CollectorBatch batch,
                                 CollectorReportData collectorReportData)
Sends the e-mail about the demerger step

Parameters:
batch - the data from the Collector file
collectorReportData - data gathered from the run of the Collector

sendEmailSendFailureNotice

protected void sendEmailSendFailureNotice(CollectorReportData collectorReportData)
Sends email message to batch mailing list notifying of email send failures during the collector processing

Parameters:
collectorReportData - - data from collector run

createValidationMessageBody

protected String createValidationMessageBody(List<String> errorMessages,
                                             CollectorBatch batch,
                                             CollectorReportData collectorReportData)
Creates a section about validation messages

Parameters:
errorMessages - a List of errors that happened during the Collector run
batch - the data from the Collector file
collectorReportData - data gathered from the run of the Collector
Returns:
the Validation message body

getValidationStatus

protected String getValidationStatus(List<String> errorMessages,
                                     boolean notifyIfSuccessful,
                                     int numLeftPaddingSpaces)
Generates a String that reports on the validation status of the document

Parameters:
errorMessages - a List of error messages encountered in the Collector process
notifyIfSuccessful - true if a special message for the process running successfully should be added, false otherwise
numLeftPaddingSpaces - the number of spaces to pad on the left
Returns:
a String with the validation status message

appendValidationStatus

protected void appendValidationStatus(StringBuilder buf,
                                      List<String> errorMessages,
                                      boolean notifyIfSuccessful,
                                      int numLeftPaddingSpaces)
Appends the validation status message to a buffer

Parameters:
buf - a StringBuilder to append error messages to
errorMessages - a List of error messages encountered in the Collector process
notifyIfSuccessful - true if a special message for the process running successfully should be added, false otherwise
numLeftPaddingSpaces - the number of spaces to pad on the left

createDemergerMessageBody

protected String createDemergerMessageBody(CollectorBatch batch,
                                           CollectorReportData collectorReportData)
Writes the part of the report about the demerger

Parameters:
batch - the data from the Collector file
collectorReportData - data gathered from the run of the Collector
Returns:

getMailService

public org.kuali.rice.kns.service.MailService getMailService()
Gets the mailService attribute.

Returns:
Returns the mailService.

setMailService

public void setMailService(org.kuali.rice.kns.service.MailService mailService)
Sets the mailService attribute value.

Parameters:
mailService - The mailService to set.

setConfigurationService

public void setConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService configurationService)

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)

setCollectorReportWriterService

public void setCollectorReportWriterService(ReportWriterService collectorReportWriterService)
Sets the collectorReportWriterService attribute value.

Parameters:
collectorReportWriterService - The collectorReportWriterService to set.

setPreScrubberService

public void setPreScrubberService(PreScrubberService preScrubberService)


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