public class ScrubberProcessImpl extends Object implements ScrubberProcess
Constructor and Description |
---|
ScrubberProcessImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addTransactionError(String errorMessage,
String errorValue,
int type)
Add an error message to the list of messages for this transaction
|
Date |
calculateRunDate(Date currentDate)
This method modifies the run date if it is before the cutoff time specified by the RunTimeService See
KULRNE-70 This method is public to facilitate unit testing
|
protected String |
checkAndSetTransactionTypeCostShare(String financialBalanceTypeCode,
String desc,
String currentValidLine) |
protected boolean |
checkingBypassEntry(String financialBalanceTypeCode,
String desc,
DemergerReportData demergerReport) |
protected void |
createOutputEntry(OriginEntryInformation entry,
PrintStream ps) |
protected void |
createOutputEntry(String line,
PrintStream ps) |
protected org.kuali.ole.gl.batch.service.impl.ScrubberProcessImpl.TransactionError |
generateCostShareEncumbranceEntries(OriginEntryInformation scrubbedEntry,
ScrubberReportData scrubberReport)
The purpose of this method is to generate a "Cost Share Encumbrance"
transaction for the current transaction and its offset.
|
protected org.kuali.ole.gl.batch.service.impl.ScrubberProcessImpl.TransactionError |
generateCostShareEntries(OriginEntryInformation scrubbedEntry,
ScrubberReportData scrubberReport)
Generates a cost share entry and offset for the given entry and saves both to the valid group
|
protected void |
generateDemergerRemovedTransactionsReport(String errorFileName) |
protected boolean |
generateOffset(OriginEntryInformation scrubbedEntry,
ScrubberReportData scrubberReport)
The purpose of this method is to build the actual offset transaction.
|
protected void |
generateScrubberBlankBalanceTypeCodeReport(String inputFileName)
Generates the scrubber report that lists out the input origin entries with blank balance type codes.
|
protected void |
generateScrubberTransactionListingReport(String documentNumber,
String inputFileName)
Generates the scrubber listing report for the GLCP document
|
AccountingCycleCachingService |
getAccountingCycleCachingService()
Gets the accountingCycleCachingService attribute.
|
org.kuali.rice.core.api.config.property.ConfigurationService |
getConfigurationService()
Gets the configurationService attribute.
|
org.kuali.rice.core.api.datetime.DateTimeService |
getDateTimeService()
Gets the dateTimeService attribute.
|
ReportWriterService |
getDemergerRemovedTransactionsListingReportWriterService()
Gets the demergerRemovedTransactionsListingReportWriterService attribute.
|
ReportWriterService |
getDemergerReportWriterService()
Gets the demergerReportWriterService attribute.
|
FlexibleOffsetAccountService |
getFlexibleOffsetAccountService()
Gets the flexibleOffsetAccountService attribute.
|
protected ObjectCode |
getFundBalanceObjectCode(String fundBalanceCode,
OriginEntryFull originEntryFull)
This method...
|
protected String |
getOffsetMessage()
Generate the offset message with the flag at the end
|
org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService()
Gets the parameterService attribute.
|
org.kuali.rice.krad.service.PersistenceService |
getPersistenceService()
Gets the persistenceService attribute.
|
PreScrubberService |
getPreScrubberService()
Gets the preScrubberService attribute.
|
RunDateService |
getRunDateService()
Gets the runDateService attribute.
|
ReportWriterService |
getScrubberBadBalanceListingReportWriterService()
Gets the scrubberBadBalanceListingReportWriterService attribute.
|
DocumentNumberAwareReportWriterService |
getScrubberLedgerReportWriterService()
Gets the scrubberLedgerReportWriterService attribute.
|
DocumentNumberAwareReportWriterService |
getScrubberListingReportWriterService()
Gets the scrubberListingReportWriterService attribute.
|
DocumentNumberAwareReportWriterService |
getScrubberReportWriterService()
Gets the scrubberReportWriterService attribute.
|
ScrubberValidator |
getScrubberValidator()
Gets the scrubberValidator attribute.
|
protected String |
getTransactionType(OriginEntryInformation transaction)
Determine the type of the transaction by looking at attributes
|
protected String |
getTransactionType(String financialBalanceTypeCode,
String desc) |
String |
getTransferDescription()
Gets the transferDescription attribute.
|
protected void |
handleDemergerSaveValidEntry(String entryString) |
protected void |
handleEndOfScrubberReport(ScrubberReportData scrubberReport) |
protected void |
handleTransactionError(Transaction errorTransaction,
Message message) |
protected void |
handleTransactionErrors(Transaction errorTransaction,
List<Message> messages) |
protected boolean |
isFatal(List<Message> errors)
Determines if a given error is fatal and should stop this scrubber run
|
void |
performDemerger()
The demerger process reads all of the documents in the error group, then moves all of the original entries for that document
from the valid group to the error group.
|
protected void |
plantFundAccountLookup(OriginEntryInformation scrubbedEntry,
OriginEntryFull liabilityEntry)
Updates the entries with the proper chart and account for the plant fund
|
protected void |
populateTransactionDebtCreditCode(OriginEntryInformation scrubbedEntry,
OriginEntryFull fullEntry)
This method...
|
protected String |
processCapitalization(OriginEntryInformation scrubbedEntry,
ScrubberReportData scrubberReport)
Generates capitalization entries if necessary
|
protected void |
processGroup(boolean reportOnlyMode,
ScrubberReportData scrubberReport)
This will process a group of origin entries.
|
protected String |
processLiabilities(OriginEntryInformation scrubbedEntry,
ScrubberReportData scrubberReport)
Generate the liability entries for the entry if necessary
|
protected String |
processPlantIndebtedness(OriginEntryInformation scrubbedEntry,
ScrubberReportData scrubberReport)
Generates the plant indebtedness entries
|
protected void |
putTransactionError(Transaction s,
String errorMessage,
String errorValue,
int type)
Puts a transaction error into this instance's collection of errors
|
void |
scrubCollectorBatch(ScrubberStatus scrubberStatus,
CollectorBatch batch,
CollectorReportData collectorReportData)
Scrubs the origin entry and ID billing details if the given batch.
|
void |
scrubEntries()
Scrubs all entries in all groups and documents.
|
void |
scrubEntries(boolean reportOnlyMode,
String documentNumber)
Scrub all entries that need it in origin entry.
|
void |
scrubGroupReportOnly(String fileName,
String documentNumber)
Scrub this single group read only.
|
void |
setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)
Sets the accountingCycleCachingService attribute value.
|
void |
setBatchFileDirectoryName(String batchFileDirectoryName)
Sets the batchFileDirectoryName attribute value.
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.
|
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
Sets the configurationService attribute value.
|
void |
setCostShareObjectCode(OriginEntryFull costShareEntry,
OriginEntryInformation originEntry)
Sets the proper cost share object code in an entry and its offset
|
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
Sets the dateTimeService attribute value.
|
void |
setDemergerRemovedTransactionsListingReportWriterService(ReportWriterService demergerRemovedTransactionsListingReportWriterService)
Sets the demergerRemovedTransactionsListingReportWriterService attribute value.
|
void |
setDemergerReportWriterService(ReportWriterService demergerReportWriterService)
Sets the demergerReportWriterService attribute value.
|
protected void |
setDescriptions()
Get all the transaction descriptions from the param table
|
void |
setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService)
Sets the flexibleOffsetAccountService attribute value.
|
protected void |
setOffsetString()
Generate the flag for the end of specific descriptions.
|
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the parameterService attribute value.
|
void |
setPersistenceService(org.kuali.rice.krad.service.PersistenceService persistenceService)
Sets the persistenceService attribute value.
|
void |
setPreScrubberReportWriterService(DocumentNumberAwareReportWriterService preScrubberReportWriterService)
Sets the preScrubberReportWriterService attribute value.
|
void |
setPreScrubberService(PreScrubberService preScrubberService)
Sets the preScrubberService attribute value.
|
void |
setRunDateService(RunDateService runDateService)
Sets the runDateService attribute value.
|
void |
setScrubberBadBalanceListingReportWriterService(ReportWriterService scrubberBadBalanceListingReportWriterService)
Sets the scrubberBadBalanceListingReportWriterService attribute value.
|
void |
setScrubberLedgerReportWriterService(DocumentNumberAwareReportWriterService scrubberLedgerReportWriterService)
Sets the scrubberLedgerReportWriterService attribute value.
|
void |
setScrubberListingReportWriterService(DocumentNumberAwareReportWriterService scrubberListingReportWriterService)
Sets the scrubberListingReportWriterService attribute value.
|
void |
setScrubberReportWriterService(DocumentNumberAwareReportWriterService scrubberReportWriterService)
Sets the scrubberReportWriterService attribute value.
|
void |
setScrubberValidator(ScrubberValidator scrubberValidator)
Sets the scrubberValidator attribute value.
|
void |
setTransferDescription(String transferDescription)
Sets the transferDescription attribute value.
|
protected boolean |
shouldScrubberGenerateOffsetsForDocType(String docTypeCode)
Determines if the scrubber should generate offsets for the given document type
|
protected static final String TRANSACTION_TYPE_COST_SHARE_ENCUMBRANCE
protected static final String TRANSACTION_TYPE_OFFSET
protected static final String TRANSACTION_TYPE_CAPITALIZATION
protected static final String TRANSACTION_TYPE_LIABILITY
protected static final String TRANSACTION_TYPE_TRANSFER
protected static final String TRANSACTION_TYPE_COST_SHARE
protected static final String TRANSACTION_TYPE_OTHER
protected static final String COST_SHARE_CODE
protected static final String COST_SHARE_TRANSFER_ENTRY_IND
protected static final int COST_SHARE_ENCUMBRANCE_ENTRY_MAXLENGTH
protected static final int DEMERGER_TRANSACTION_LEDGET_ENTRY_DESCRIPTION
protected static final int OFFSET_MESSAGE_MAXLENGTH
protected FlexibleOffsetAccountService flexibleOffsetAccountService
protected org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected org.kuali.rice.core.api.config.property.ConfigurationService configurationService
protected org.kuali.rice.krad.service.PersistenceService persistenceService
protected ScrubberValidator scrubberValidator
protected RunDateService runDateService
protected AccountingCycleCachingService accountingCycleCachingService
protected DocumentNumberAwareReportWriterService scrubberReportWriterService
protected DocumentNumberAwareReportWriterService scrubberLedgerReportWriterService
protected DocumentNumberAwareReportWriterService scrubberListingReportWriterService
protected DocumentNumberAwareReportWriterService preScrubberReportWriterService
protected ReportWriterService scrubberBadBalanceListingReportWriterService
protected ReportWriterService demergerRemovedTransactionsListingReportWriterService
protected ReportWriterService demergerReportWriterService
protected PreScrubberService preScrubberService
protected Map<OriginEntryInformation,OriginEntryInformation> unscrubbedToScrubbedEntries
protected Map<Transaction,List<Message>> scrubberReportErrors
protected LedgerSummaryReport ledgerSummaryReport
protected ScrubberReportData scrubberReport
protected DemergerReportData demergerReport
protected UniversityDate universityRunDate
protected String offsetString
protected org.kuali.ole.gl.batch.service.impl.ScrubberProcessImpl.UnitOfWorkInfo unitOfWork
protected org.kuali.rice.core.api.util.type.KualiDecimal scrubCostShareAmount
protected List<Message> transactionErrors
protected String offsetDescription
protected String capitalizationDescription
protected String liabilityDescription
protected String transferDescription
protected String costShareDescription
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
protected boolean collectorMode
protected String batchFileDirectoryName
protected PrintStream OUTPUT_GLE_FILE_ps
protected PrintStream OUTPUT_ERR_FILE_ps
protected PrintStream OUTPUT_EXP_FILE_ps
protected String expiredFile
public ScrubberProcessImpl()
public void scrubGroupReportOnly(String fileName, String documentNumber)
scrubGroupReportOnly
in interface ScrubberProcess
group
- the origin entry group that should be scrubbedthe
- document number of any specific entries to scrubpublic void scrubEntries()
scrubEntries
in interface ScrubberProcess
public void scrubCollectorBatch(ScrubberStatus scrubberStatus, CollectorBatch batch, CollectorReportData collectorReportData)
scrubCollectorBatch
in interface ScrubberProcess
batch
- the data gathered from a Collector filecollectorReportData
- the statistics generated by running the Collectorpublic void scrubEntries(boolean reportOnlyMode, String documentNumber)
scrubEntries
in interface ScrubberProcess
group
- the specific origin entry group to scrubdocumentNumber
- the number of the document with entries to scrubpublic void performDemerger()
performDemerger
in interface ScrubberProcess
errorGroup
- this scrubber run's error groupvalidGroup
- this scrubber run's valid groupprotected String getTransactionType(OriginEntryInformation transaction)
transaction
- Transaction to identifyprotected String getTransactionType(String financialBalanceTypeCode, String desc)
protected void processGroup(boolean reportOnlyMode, ScrubberReportData scrubberReport)
originEntryGroup
- Group to processprotected boolean isFatal(List<Message> errors)
errors
- errors from a scrubber runprotected org.kuali.ole.gl.batch.service.impl.ScrubberProcessImpl.TransactionError generateCostShareEntries(OriginEntryInformation scrubbedEntry, ScrubberReportData scrubberReport)
scrubbedEntry
- the originEntry that was scrubbedprotected void setDescriptions()
protected void setOffsetString()
protected String getOffsetMessage()
protected String processCapitalization(OriginEntryInformation scrubbedEntry, ScrubberReportData scrubberReport)
scrubbedEntry
- the entry to generate capitalization entries (possibly) forprotected String processPlantIndebtedness(OriginEntryInformation scrubbedEntry, ScrubberReportData scrubberReport)
scrubbedEntry
- the entry to generated plant indebtedness entries for if necessaryprotected String processLiabilities(OriginEntryInformation scrubbedEntry, ScrubberReportData scrubberReport)
scrubbedEntry
- the entry to generate liability entries for if necessaryprotected ObjectCode getFundBalanceObjectCode(String fundBalanceCode, OriginEntryFull originEntryFull)
fundBalanceCodeParameter
- originEntryFull
- protected void populateTransactionDebtCreditCode(OriginEntryInformation scrubbedEntry, OriginEntryFull fullEntry)
scrubbedEntry
- fullEntry
- protected void plantFundAccountLookup(OriginEntryInformation scrubbedEntry, OriginEntryFull liabilityEntry)
scrubbedEntry
- basis for plant fund entryliabilityEntry
- liability entryprotected org.kuali.ole.gl.batch.service.impl.ScrubberProcessImpl.TransactionError generateCostShareEncumbranceEntries(OriginEntryInformation scrubbedEntry, ScrubberReportData scrubberReport)
scrubbedEntry
- the entry to perhaps create a cost share encumbrance forpublic void setCostShareObjectCode(OriginEntryFull costShareEntry, OriginEntryInformation originEntry)
setCostShareObjectCode
in interface ScrubberProcess
costShareEntry
- GL Entry for cost shareoriginEntry
- Scrubbed GL Entry that this is based onprotected boolean generateOffset(OriginEntryInformation scrubbedEntry, ScrubberReportData scrubberReport)
scrubbedEntry
- entry to determine if an offset is needed forprotected void createOutputEntry(OriginEntryInformation entry, PrintStream ps) throws IOException
IOException
protected void createOutputEntry(String line, PrintStream ps) throws IOException
IOException
protected void addTransactionError(String errorMessage, String errorValue, int type)
errorMessage
- Error messageerrorValue
- Value that is in errortype
- Type of error (Fatal or Warning)protected void putTransactionError(Transaction s, String errorMessage, String errorValue, int type)
s
- a transaction that caused a scrubber errorerrorMessage
- the message of what caused the errorerrorValue
- the value in errortype
- the type of errorprotected boolean shouldScrubberGenerateOffsetsForDocType(String docTypeCode)
docTypeCode
- the document type code to check if it generates scrubber offsetspublic Date calculateRunDate(Date currentDate)
calculateRunDate
in interface ScrubberProcess
currentDate
- the date the scrubber should report as having run onprotected boolean checkingBypassEntry(String financialBalanceTypeCode, String desc, DemergerReportData demergerReport)
protected String checkAndSetTransactionTypeCostShare(String financialBalanceTypeCode, String desc, String currentValidLine)
protected void generateScrubberTransactionListingReport(String documentNumber, String inputFileName)
documentNumber
- the document number of the GLCP documentprotected void generateScrubberBlankBalanceTypeCodeReport(String inputFileName)
protected void generateDemergerRemovedTransactionsReport(String errorFileName)
protected void handleTransactionError(Transaction errorTransaction, Message message)
protected void handleTransactionErrors(Transaction errorTransaction, List<Message> messages)
protected void handleEndOfScrubberReport(ScrubberReportData scrubberReport)
protected void handleDemergerSaveValidEntry(String entryString)
public void setBatchFileDirectoryName(String batchFileDirectoryName)
batchFileDirectoryName
- The batchFileDirectoryName to set.public String getTransferDescription()
public void setTransferDescription(String transferDescription)
transferDescription
- The transferDescription to set.public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
dateTimeService
- The dateTimeService to set.public void setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService)
flexibleOffsetAccountService
- The flexibleOffsetAccountService to set.public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
configurationService
- The configurationService to set.public void setPersistenceService(org.kuali.rice.krad.service.PersistenceService persistenceService)
persistenceService
- The persistenceService to set.public void setScrubberValidator(ScrubberValidator scrubberValidator)
scrubberValidator
- The scrubberValidator to set.public void setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)
accountingCycleCachingService
- The accountingCycleCachingService to set.public void setScrubberReportWriterService(DocumentNumberAwareReportWriterService scrubberReportWriterService)
scrubberReportWriterService
- The scrubberReportWriterService to set.public void setScrubberLedgerReportWriterService(DocumentNumberAwareReportWriterService scrubberLedgerReportWriterService)
scrubberLedgerReportWriterService
- The scrubberLedgerReportWriterService to set.public void setScrubberListingReportWriterService(DocumentNumberAwareReportWriterService scrubberListingReportWriterService)
scrubberListingReportWriterService
- The scrubberListingReportWriterService to set.public void setScrubberBadBalanceListingReportWriterService(ReportWriterService scrubberBadBalanceListingReportWriterService)
scrubberBadBalanceListingReportWriterService
- The scrubberBadBalanceListingReportWriterService to set.public void setDemergerRemovedTransactionsListingReportWriterService(ReportWriterService demergerRemovedTransactionsListingReportWriterService)
demergerRemovedTransactionsListingReportWriterService
- The demergerRemovedTransactionsListingReportWriterService to set.public void setDemergerReportWriterService(ReportWriterService demergerReportWriterService)
demergerReportWriterService
- The demergerReportWriterService to set.public void setPreScrubberService(PreScrubberService preScrubberService)
preScrubberService
- The preScrubberService to set.public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService
- The parameterService to set.public void setRunDateService(RunDateService runDateService)
runDateService
- The runDateService to set.public FlexibleOffsetAccountService getFlexibleOffsetAccountService()
public org.kuali.rice.core.api.datetime.DateTimeService getDateTimeService()
public org.kuali.rice.core.api.config.property.ConfigurationService getConfigurationService()
public org.kuali.rice.krad.service.PersistenceService getPersistenceService()
public ScrubberValidator getScrubberValidator()
public RunDateService getRunDateService()
public AccountingCycleCachingService getAccountingCycleCachingService()
public DocumentNumberAwareReportWriterService getScrubberReportWriterService()
public DocumentNumberAwareReportWriterService getScrubberLedgerReportWriterService()
public DocumentNumberAwareReportWriterService getScrubberListingReportWriterService()
public ReportWriterService getScrubberBadBalanceListingReportWriterService()
public ReportWriterService getDemergerRemovedTransactionsListingReportWriterService()
public ReportWriterService getDemergerReportWriterService()
public PreScrubberService getPreScrubberService()
public org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
public void setPreScrubberReportWriterService(DocumentNumberAwareReportWriterService preScrubberReportWriterService)
preScrubberReportWriterService
- The preScrubberReportWriterService to set.public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
businessObjectService
- The businessObjectService to set.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.