public abstract class AccountingDocumentBase extends GeneralLedgerPostingDocumentBase implements AccountingDocument, GeneralLedgerPendingEntrySource
| Modifier and Type | Field and Description |
|---|---|
protected FinancialSystemTransactionalDocumentEntry |
dataDictionaryEntry |
protected static org.apache.log4j.Logger |
LOG |
protected Integer |
nextSourceLineNumber |
protected Integer |
nextTargetLineNumber |
protected Class |
sourceAccountingLineClass |
protected List |
sourceAccountingLines |
protected Class |
targetAccountingLineClass |
protected List |
targetAccountingLines |
generalLedgerPendingEntriesaccountingPeriod, accountingPeriodService, checkPostingYearForCopy, dataDictionaryService, dateTimeService, postingPeriodCode, postingYearUPDATE_TOTAL_AMOUNT_IN_POST_PROCESSING_PARAMETER_NAME| Constructor and Description |
|---|
AccountingDocumentBase()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSourceAccountingLine(SourceAccountingLine line)
This implementation sets the sequence number appropriately for the passed in source accounting line using the value that has
been stored in the nextSourceLineNumber variable, adds the accounting line to the list that is aggregated by this object, and
then handles incrementing the nextSourceLineNumber variable for you.
|
void |
addTargetAccountingLine(TargetAccountingLine line)
This implementation sets the sequence number appropriately for the passed in target accounting line using the value that has
been stored in the nextTargetLineNumber variable, adds the accounting line to the list that is aggregated by this object, and
then handles incrementing the nextTargetLineNumber variable for you.
|
protected Map |
buildAccountingLineMap(List accountingLines) |
List |
buildListOfDeletionAwareLists() |
protected void |
copyAccountingLines(boolean isErrorCorrection)
Copies accounting lines but sets new document number and version If error correction, reverses line amount.
|
void |
customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable,
GeneralLedgerPendingEntry explicitEntry) |
boolean |
customizeOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail accountingLine,
GeneralLedgerPendingEntry explicitEntry,
GeneralLedgerPendingEntry offsetEntry) |
boolean |
generateDocumentGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
Most accounting documents don't need to generate document level GLPE's, so don't do anything in the default implementation
|
protected List |
generateEvents(List persistedLines,
List currentLines,
String errorPathPrefix,
org.kuali.rice.krad.document.TransactionalDocument document)
Generates a List of instances of AccountingLineEvent subclasses, one for each accountingLine in the union of the
persistedLines and currentLines lists.
|
boolean |
generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail,
GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
Perform business rules common to all transactional documents when generating general ledger pending entries.
|
List |
generateSaveEvents() |
AccountingLineParser |
getAccountingLineParser()
Used to get the appropriate
for the Document |
FinancialSystemTransactionalDocumentEntry |
getDataDictionaryEntry() |
Class<? extends AccountingDocument> |
getDocumentClassForAccountingLineValueAllowedValidation()
This method returns the Class to use for AccountingLingValuesAllowedValidation.
|
protected String |
getEntryValue(String preferredString,
String secondaryString)
Returns one of the two given String's; if the preferred String is not null and has a length > 0, then it is returned,
otherwise the second String is returned
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getGeneralLedgerPendingEntryAmountForDetail(GeneralLedgerPendingEntrySourceDetail postable)
GLPE amounts are ALWAYS positive, so just take the absolute value of the accounting line's amount.
|
List<GeneralLedgerPendingEntrySourceDetail> |
getGeneralLedgerPendingEntrySourceDetails()
Returns a list of any GeneralLedgerPostables this helper has, to create GeneralLedgerPendingEntries
|
Integer |
getNextSourceLineNumber()
Retrieves the next line sequence number for an accounting line in the Source accounting line section on a transactional
document.
|
Integer |
getNextTargetLineNumber()
Retrieves the next line sequence number for an accounting line in the Target accounting line section on a transactional
document.
|
protected List |
getPersistedSourceAccountingLinesForComparison()
This method gets the Persisted Source Accounting Lines that will be used in comparisons
|
protected List |
getPersistedTargetAccountingLinesForComparison()
This method gets the Persisted Target Accounting Lines that will be used in comparisons
|
SourceAccountingLine |
getSourceAccountingLine(int index)
This implementation is coupled tightly with some underlying issues that the Struts PojoProcessor plugin has with how objects
get instantiated within lists.
|
Class |
getSourceAccountingLineClass()
Returns the default Source accounting line class.
|
String |
getSourceAccountingLineEntryName() |
List |
getSourceAccountingLines()
This method returns a list of target accounting lines.
|
protected List |
getSourceAccountingLinesForComparison()
This method gets the Source Accounting Lines that will be used in comparisons
|
String |
getSourceAccountingLinesSectionTitle()
This method is used to return the title that a transactional document should give to it's source accounting line section.
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getSourceTotal()
Sums up the amounts of all of the source accounting lines.
|
TargetAccountingLine |
getTargetAccountingLine(int index)
This implementation is coupled tightly with some underlying issues that the Struts PojoProcessor plugin has with how objects
get instantiated within lists.
|
Class |
getTargetAccountingLineClass()
Returns the default Target accounting line class.
|
String |
getTargetAccountingLineEntryName() |
List |
getTargetAccountingLines()
This method retrieves all of the target accounting lines associated with this document.
|
protected List |
getTargetAccountingLinesForComparison()
This method gets the Target Accounting Lines that will be used in comparisons
|
String |
getTargetAccountingLinesSectionTitle()
This method is used to return the title that a transactional document should give to it's source accounting line section.
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getTargetTotal()
Sums up the amounts of all of the target accounting lines.
|
org.kuali.rice.core.api.util.type.KualiDecimal |
getTotalDollarAmount()
Since one side of the document should match the other and the document should balance, the total dollar amount for the
document should either be the expense line or the income line.
|
abstract boolean |
isDebit(GeneralLedgerPendingEntrySourceDetail postable)
This method determines if the passed in GeneralLedgerPendingEntrySourceDetail is a debit or not.
|
boolean |
isDocumentFinalOrProcessed()
This method check the document status to determine whether the document is final/processed or not.
|
void |
prepareForSave(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent event) |
protected void |
processExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper,
GeneralLedgerPendingEntrySourceDetail glpeSourceDetail,
GeneralLedgerPendingEntry explicitEntry)
This method processes all necessary information to build an explicit general ledger entry, and then adds that to the
document.
|
protected boolean |
processOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper,
GeneralLedgerPendingEntrySourceDetail postable,
GeneralLedgerPendingEntry explicitEntry,
GeneralLedgerPendingEntry offsetEntry)
This method processes an accounting line's information to build an offset entry, and then adds that to the document.
|
void |
setNextSourceLineNumber(Integer nextLineNumber) |
void |
setNextTargetLineNumber(Integer nextLineNumber) |
void |
setSourceAccountingLines(List sourceLines)
This method sets the list of source accounting lines for this document.
|
void |
setTargetAccountingLines(List targetLines)
This method sets the list of target accounting lines for this document.
|
void |
toCopy()
If we've copied, we need to update the posting period and year
|
void |
toErrorCorrection() |
protected void |
updatePostingYearForAccountingLines(List<AccountingLine> lines)
Updates the posting year on accounting lines to be the current posting year
|
addPendingEntry, changeGeneralLedgerPendingEntriesApprovedStatusCode, checkSufficientFunds, clearAnyGeneralLedgerPendingEntries, documentPerformsSufficientFundsCheck, doRouteStatusChange, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, removeGeneralLedgerPendingEntries, setGeneralLedgerPendingEntriescreateInitialAccountingPeriod, getAccountingPeriod, getAccountingPeriodCompositeString, getAccountingPeriodService, getDataDictionaryService, getDateTimeService, getFinancialDocumentTypeCode, getPostingPeriodCode, getPostingYear, retrieveCurrentAccountingPeriod, setAccountingPeriod, setAccountingPeriodCompositeString, setPostingPeriodCode, setPostingYearanswerSplitNodeQuestion, doRouteLevelChange, getApplicationDocumentStatus, getBusinessObjectService, getFinancialSystemDocumentHeader, getFinancialSystemDocumentService, getParameterService, prepareForSave, processAfterRetrieve, setApplicationDocumentStatus, setDocumentHeader, updateAndSaveAppDocStatusgetAllowsCopy, isSessionDocumentaddCopyErrorDocumentNote, addNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAttachmentService, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentHeader, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getNote, getNotes, getNoteService, getNoteTarget, getNoteType, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, logErrors, populateDocumentForRouting, postLoad, postProcessSave, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, removeNote, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentNumber, setNewDocumentHeader, setNotes, setPessimisticLocks, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerializationafterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckSufficientFunds, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, setGeneralLedgerPendingEntriesgetAccountingPeriod, getPostingPeriodCode, getPostingYear, setAccountingPeriod, setPostingPeriodCode, setPostingYearanswerSplitNodeQuestion, getFinancialSystemDocumentHeaderaddNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, doRouteStatusChange, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAllowsCopy, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentHeader, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNote, getNotes, getNoteTarget, getNoteType, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, prepareForSave, processAfterRetrieve, refreshPessimisticLocks, removeNote, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, setNotes, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerializationgetExtension, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumberaddPendingEntry, clearAnyGeneralLedgerPendingEntries, getDocumentHeader, getFinancialDocumentTypeCode, getFinancialSystemDocumentHeader, getPostingYearprotected static org.apache.log4j.Logger LOG
protected Integer nextSourceLineNumber
protected Integer nextTargetLineNumber
protected List sourceAccountingLines
protected List targetAccountingLines
protected transient FinancialSystemTransactionalDocumentEntry dataDictionaryEntry
protected transient Class sourceAccountingLineClass
protected transient Class targetAccountingLineClass
public AccountingDocumentBase()
public List getSourceAccountingLines()
AccountingDocumentgetSourceAccountingLines in interface AccountingDocumentAccountingDocument.getSourceAccountingLines()public void setSourceAccountingLines(List sourceLines)
AccountingDocumentsetSourceAccountingLines in interface AccountingDocumentAccountingDocument.setSourceAccountingLines(java.util.List)public List getTargetAccountingLines()
AccountingDocumentgetTargetAccountingLines in interface AccountingDocumentAccountingDocument.getTargetAccountingLines()public void setTargetAccountingLines(List targetLines)
AccountingDocumentsetTargetAccountingLines in interface AccountingDocumentAccountingDocument.setTargetAccountingLines(java.util.List)public void addSourceAccountingLine(SourceAccountingLine line)
addSourceAccountingLine in interface AccountingDocumentAccountingDocument.addSourceAccountingLine(SourceAccountingLine)public void addTargetAccountingLine(TargetAccountingLine line)
addTargetAccountingLine in interface AccountingDocumentAccountingDocument.addTargetAccountingLine(TargetAccountingLine)public SourceAccountingLine getSourceAccountingLine(int index)
getSourceAccountingLine in interface AccountingDocumentAccountingDocument.getSourceAccountingLine(int)public TargetAccountingLine getTargetAccountingLine(int index)
getTargetAccountingLine in interface AccountingDocumentAccountingDocument.getTargetAccountingLine(int)public String getSourceAccountingLinesSectionTitle()
AccountingDocumentgetSourceAccountingLinesSectionTitle in interface AccountingDocumentAccountingDocument.getSourceAccountingLinesSectionTitle()public String getTargetAccountingLinesSectionTitle()
AccountingDocumentgetTargetAccountingLinesSectionTitle in interface AccountingDocumentAccountingDocument.getTargetAccountingLinesSectionTitle()public org.kuali.rice.core.api.util.type.KualiDecimal getTotalDollarAmount()
public org.kuali.rice.core.api.util.type.KualiDecimal getSourceTotal()
AccountingDocumentgetSourceTotal in interface AccountingDocumentAccountingDocument.getSourceTotal()public org.kuali.rice.core.api.util.type.KualiDecimal getTargetTotal()
AccountingDocumentgetTargetTotal in interface AccountingDocumentAccountingDocument.getTargetTotal()public Integer getNextSourceLineNumber()
AccountingDocumentgetNextSourceLineNumber in interface AccountingDocumentAccountingDocument.getNextSourceLineNumber()public void setNextSourceLineNumber(Integer nextLineNumber)
setNextSourceLineNumber in interface AccountingDocumentAccountingDocument.setNextSourceLineNumber(java.lang.Integer)public Integer getNextTargetLineNumber()
AccountingDocumentgetNextTargetLineNumber in interface AccountingDocumentAccountingDocument.getNextTargetLineNumber()public void setNextTargetLineNumber(Integer nextLineNumber)
setNextTargetLineNumber in interface AccountingDocumentAccountingDocument.setNextTargetLineNumber(java.lang.Integer)public Class getSourceAccountingLineClass()
getSourceAccountingLineClass in interface AccountingDocumentAccountingDocument.getSourceAccountingLineClass()public Class getTargetAccountingLineClass()
getTargetAccountingLineClass in interface AccountingDocumentAccountingDocument.getTargetAccountingLineClass()public AccountingLineParser getAccountingLineParser()
AccountingLineParser for the DocumentgetAccountingLineParser in interface AccountingDocumentpublic FinancialSystemTransactionalDocumentEntry getDataDictionaryEntry()
public String getSourceAccountingLineEntryName()
getSourceAccountingLineEntryName in interface AccountingDocumentpublic String getTargetAccountingLineEntryName()
getTargetAccountingLineEntryName in interface AccountingDocumentpublic List<GeneralLedgerPendingEntrySourceDetail> getGeneralLedgerPendingEntrySourceDetails()
GeneralLedgerPendingEntrySourcegetGeneralLedgerPendingEntrySourceDetails in interface GeneralLedgerPendingEntrySourcepublic void customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry)
public boolean customizeOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
public void toCopy() throws org.kuali.rice.kew.api.exception.WorkflowException
LedgerPostingDocumentBasetoCopy in class GeneralLedgerPostingDocumentBaseorg.kuali.rice.kew.api.exception.WorkflowExceptionGeneralLedgerPostingDocumentBase.toCopy()public void toErrorCorrection() throws org.kuali.rice.kew.api.exception.WorkflowException
toErrorCorrection in class GeneralLedgerPostingDocumentBaseorg.kuali.rice.kew.api.exception.WorkflowExceptionGeneralLedgerPostingDocumentBase.toErrorCorrection()protected void copyAccountingLines(boolean isErrorCorrection)
protected void updatePostingYearForAccountingLines(List<AccountingLine> lines)
lines - a List of accounting lines to updatepublic List buildListOfDeletionAwareLists()
buildListOfDeletionAwareLists in interface org.kuali.rice.krad.bo.PersistableBusinessObjectbuildListOfDeletionAwareLists in class org.kuali.rice.krad.bo.PersistableBusinessObjectBasePersistableBusinessObjectBase.buildListOfDeletionAwareLists()public void prepareForSave(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent event)
prepareForSave in interface org.kuali.rice.krad.document.DocumentprepareForSave in class GeneralLedgerPostingDocumentBasepublic List generateSaveEvents()
generateSaveEvents in interface org.kuali.rice.krad.document.DocumentgenerateSaveEvents in class org.kuali.rice.krad.document.DocumentBaseprotected List getTargetAccountingLinesForComparison()
protected List getPersistedTargetAccountingLinesForComparison()
protected List getSourceAccountingLinesForComparison()
protected List getPersistedSourceAccountingLinesForComparison()
protected List generateEvents(List persistedLines, List currentLines, String errorPathPrefix, org.kuali.rice.krad.document.TransactionalDocument document)
persistedLines - currentLines - errorPathPrefix - document - protected Map buildAccountingLineMap(List accountingLines)
accountingLines - public boolean generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
generateGeneralLedgerPendingEntries in interface GeneralLedgerPendingEntrySourceglpeSourceDetail - the source detail line to generate general ledger pending entries forsequenceHelper - the sequence helper which will assign sequence number to generated general ledger pending entriesorg.kuali.rice.krad.rule.GenerateGeneralLedgerPendingEntriesRule#processGenerateGeneralLedgerPendingEntries(org.kuali.rice.krad.document.AccountingDocument,
org.kuali.rice.krad.bo.AccountingLine, org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper)protected void processExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntry explicitEntry)
accountingDocument - sequenceHelper - accountingLine - explicitEntry - protected boolean processOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry)
accountingDocument - sequenceHelper - accountingLine - explicitEntry - offsetEntry - protected String getEntryValue(String preferredString, String secondaryString)
preferredString - the String you're hoping isn't blank so you can get it backsecondaryString - the "rebound" String, which you'll end up with if the preferred String is blankpublic abstract boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
GeneralLedgerPendingEntrySourceisDebit in interface GeneralLedgerPendingEntrySourceorg.kuali.ole.document.GeneralLedgerPostingHelper#isDebit(org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntrySourceDetail)public boolean generateDocumentGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
generateDocumentGeneralLedgerPendingEntries in interface GeneralLedgerPendingEntrySourcesequenceHelper - a sequence helper for the method to create more general ledger pending entriesorg.kuali.ole.document.GeneralLedgerPostingHelper#processGenerateDocumentGeneralLedgerPendingEntries(org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper)public org.kuali.rice.core.api.util.type.KualiDecimal getGeneralLedgerPendingEntryAmountForDetail(GeneralLedgerPendingEntrySourceDetail postable)
getGeneralLedgerPendingEntryAmountForDetail in interface GeneralLedgerPendingEntrySourceaccountingLine - public Class<? extends AccountingDocument> getDocumentClassForAccountingLineValueAllowedValidation()
AccountingDocumentgetDocumentClassForAccountingLineValueAllowedValidation in interface AccountingDocumentpublic boolean isDocumentFinalOrProcessed()
AccountingDocumentisDocumentFinalOrProcessed in interface AccountingDocumentAccountingDocument.isDocumentFinalOrProcessed()Copyright © 2004–2015 The Kuali Foundation. All rights reserved.