|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.module.ld.batch.service.impl.LaborScrubberProcess
public class LaborScrubberProcess
This class has the logic for the scrubber. It is required because the scrubber process needs instance variables. Instance variables in a spring service are shared between all code calling the service. This will make sure each run of the scrubber has it's own instance variables instead of being shared.
Constructor Summary | |
---|---|
LaborScrubberProcess(FlexibleOffsetAccountService flexibleOffsetAccountService,
LaborAccountingCycleCachingService laborAccountingCycleCachingService,
LaborOriginEntryService laborOriginEntryService,
OriginEntryGroupService originEntryGroupService,
org.kuali.rice.kns.service.DateTimeService dateTimeService,
OffsetDefinitionService offsetDefinitionService,
ObjectCodeService objectCodeService,
org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService,
UniversityDateDao universityDateDao,
org.kuali.rice.kns.service.PersistenceService persistenceService,
ScrubberValidator scrubberValidator,
String batchFileDirectoryName,
DocumentNumberAwareReportWriterService laborMainReportWriterService,
DocumentNumberAwareReportWriterService laborLedgerReportWriterService,
ReportWriterService laborBadBalanceTypeReportWriterService,
ReportWriterService laborErrorListingReportWriterService,
DocumentNumberAwareReportWriterService laborGeneratedTransactionsReportWriterService,
ReportWriterService laborDemergerReportWriterService,
PreScrubberService laborPreScrubberService,
DocumentNumberAwareReportWriterService laborPreScrubberReportWriterService,
org.kuali.rice.kns.service.ParameterService parameterService)
These parameters are all the dependencies. |
Method Summary | |
---|---|
protected void |
buildScrubbedEntry(LaborOriginEntry unscrubbedEntry,
LaborOriginEntry scrubbedEntry)
|
Date |
calculateRunDate(Date currentDate)
This method modifies the run date if it is before the cutoff time specified by calling the setCutoffTimeForPreviousDay method. |
protected boolean |
checkEntry(LaborOriginEntry validEntry,
LaborOriginEntry errorEntry,
String documentTypeCode)
|
protected void |
createOutputEntry(LaborOriginEntry entry,
PrintStream ps)
|
protected void |
createOutputEntry(String line,
PrintStream ps)
|
protected void |
generateScrubberBadBalanceTypeListingReport()
Generates a transaction listing report for labor origin entries with bad balance types |
protected void |
generateScrubberErrorListingReport(String errorFileName)
Generates a transaction listing report for labor origin entries with errors |
protected void |
generateScrubberTransactionsOnline()
Generates a transaction listing report for labor origin entries that were valid |
protected String |
getOffsetMessage()
Generate the offset message with the flag at the end |
protected String |
getTransactionType(LaborOriginEntry transaction)
Determine the type of the transaction by looking at attributes |
protected void |
initCutoffTime()
|
protected boolean |
isCurrentDateBeforeCutoff(Calendar currentCal)
|
protected boolean |
isFatal(List<Message> errors)
|
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 |
processGroup()
This will process a group of origin entries. |
void |
scrubEntries()
|
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. |
protected void |
setCutoffTime(String cutoffTime)
|
protected void |
setCutoffTimeForPreviousDay(int hourOfDay,
int minuteOfDay,
int secondOfDay)
|
protected void |
setDescriptions()
Get all the transaction descriptions from the param table |
protected void |
setOffsetString()
Generate the flag for the end of specific descriptions. |
void |
unsetCutoffTimeForPreviousDay()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LaborScrubberProcess(FlexibleOffsetAccountService flexibleOffsetAccountService, LaborAccountingCycleCachingService laborAccountingCycleCachingService, LaborOriginEntryService laborOriginEntryService, OriginEntryGroupService originEntryGroupService, org.kuali.rice.kns.service.DateTimeService dateTimeService, OffsetDefinitionService offsetDefinitionService, ObjectCodeService objectCodeService, org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService, UniversityDateDao universityDateDao, org.kuali.rice.kns.service.PersistenceService persistenceService, ScrubberValidator scrubberValidator, String batchFileDirectoryName, DocumentNumberAwareReportWriterService laborMainReportWriterService, DocumentNumberAwareReportWriterService laborLedgerReportWriterService, ReportWriterService laborBadBalanceTypeReportWriterService, ReportWriterService laborErrorListingReportWriterService, DocumentNumberAwareReportWriterService laborGeneratedTransactionsReportWriterService, ReportWriterService laborDemergerReportWriterService, PreScrubberService laborPreScrubberService, DocumentNumberAwareReportWriterService laborPreScrubberReportWriterService, org.kuali.rice.kns.service.ParameterService parameterService)
Method Detail |
---|
public void scrubGroupReportOnly(String fileName, String documentNumber)
group
- public void scrubEntries()
public void scrubEntries(boolean reportOnlyMode, String documentNumber)
protected String getTransactionType(LaborOriginEntry transaction)
transaction
- Transaction to identify
protected void processGroup()
originEntryGroup
- Group to processprotected boolean isFatal(List<Message> errors)
protected void setDescriptions()
protected void setOffsetString()
protected String getOffsetMessage()
protected void setCutoffTimeForPreviousDay(int hourOfDay, int minuteOfDay, int secondOfDay)
protected void setCutoffTime(String cutoffTime)
public void unsetCutoffTimeForPreviousDay()
public Date calculateRunDate(Date currentDate)
currentDate
-
protected boolean isCurrentDateBeforeCutoff(Calendar currentCal)
protected void initCutoffTime()
protected void buildScrubbedEntry(LaborOriginEntry unscrubbedEntry, LaborOriginEntry scrubbedEntry)
public void performDemerger()
errorGroup
- validGroup
- protected void createOutputEntry(LaborOriginEntry entry, PrintStream ps) throws IOException
IOException
protected void createOutputEntry(String line, PrintStream ps) throws IOException
IOException
protected boolean checkEntry(LaborOriginEntry validEntry, LaborOriginEntry errorEntry, String documentTypeCode)
protected void generateScrubberTransactionsOnline()
protected void generateScrubberBadBalanceTypeListingReport()
protected void generateScrubberErrorListingReport(String errorFileName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |