org.kuali.kfs.module.cam.document
Class AssetPaymentDocument

java.lang.Object
  extended by org.kuali.rice.kns.bo.BusinessObjectBase
      extended by org.kuali.rice.kns.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kns.document.DocumentBase
              extended by org.kuali.rice.kns.document.TransactionalDocumentBase
                  extended by org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
                      extended by org.kuali.kfs.sys.document.LedgerPostingDocumentBase
                          extended by org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
                              extended by org.kuali.kfs.sys.document.AccountingDocumentBase
                                  extended by org.kuali.kfs.module.cam.document.AssetPaymentDocument
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, AccountingDocument, AmountTotaling, FinancialSystemTransactionalDocument, GeneralLedgerPendingEntrySource, GeneralLedgerPostingDocument, LedgerPostingDocument, org.kuali.rice.kns.bo.BusinessObject, org.kuali.rice.kns.bo.PersistableBusinessObject, org.kuali.rice.kns.document.Copyable, org.kuali.rice.kns.document.Document, org.kuali.rice.kns.document.SessionDocument, org.kuali.rice.kns.document.TransactionalDocument

public class AssetPaymentDocument
extends AccountingDocumentBase
implements org.kuali.rice.kns.document.Copyable, AmountTotaling

Capital assets document class for the asset payment document

See Also:
Serialized Form

Field Summary
protected  List<AssetPaymentAssetDetail> assetPaymentAssetDetail
           
protected  boolean capitalAssetBuilderOriginIndicator
           
protected  Long capitalAssetNumber
           
protected static org.apache.log4j.Logger LOG
           
 
Fields inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
dataDictionaryEntry, nextSourceLineNumber, nextTargetLineNumber, sourceAccountingLineClass, sourceAccountingLines, targetAccountingLineClass, targetAccountingLines
 
Fields inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
generalLedgerPendingEntries
 
Fields inherited from class org.kuali.kfs.sys.document.LedgerPostingDocumentBase
accountingPeriod, accountingPeriodService, checkPostingYearForCopy, dataDictionaryService, dateTimeService, postingPeriodCode, postingYear
 
Fields inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
documentHeader
 
Fields inherited from class org.kuali.rice.kns.document.DocumentBase
documentBusinessObject, documentNumber
 
Fields inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
AssetPaymentDocument()
           
 
Method Summary
 void addAssetPaymentAssetDetail(AssetPaymentAssetDetail assetPaymentAssetDetail)
          This method...
 List buildListOfDeletionAwareLists()
          Remove asset from collection for deletion
 void doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO statusChangeEvent)
          Override to call super and then iterate over all GLPEs and update the approved code appropriately.
 List generateSaveEvents()
          When document save, AddAccountingLineEvent is added by the framework.
 List<AssetPaymentAssetDetail> getAssetPaymentAssetDetail()
           
 AssetPaymentDistributor getAssetPaymentDistributor()
          Get the asset payment distributor built by AssetPaymentDetails, AssetPaymentAssetDetail and totalHistoricalCost
 org.kuali.rice.kns.util.KualiDecimal getAssetsTotalHistoricalCost()
          calculates the total previous cost amount of all the assets in the document
protected  CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()
           
 Long getCapitalAssetNumber()
           
 List<Long> getWorkflowEngineDocumentIdsToLock()
          Lock on purchase order document since post processor will update PO document by adding notes.
 boolean isCapitalAssetBuilderOriginIndicator()
           
 boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
          Determines if the given AccountingLine (as a GeneralLedgerPostable) is a credit or a debit, in terms of GLPE generation
 void postProcessSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
           
 void prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
           
 void setAssetPaymentAssetDetail(List<AssetPaymentAssetDetail> assetPaymentAssetDetail)
           
 void setCapitalAssetBuilderOriginIndicator(boolean capitalAssetBuilderOriginIndicator)
           
 void setCapitalAssetNumber(Long capitalAssetNumber)
           
 
Methods inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
addSourceAccountingLine, addTargetAccountingLine, buildAccountingLineMap, copyAccountingLines, customizeExplicitGeneralLedgerPendingEntry, customizeOffsetGeneralLedgerPendingEntry, generateDocumentGeneralLedgerPendingEntries, generateEvents, generateGeneralLedgerPendingEntries, getAccountingLineParser, getDataDictionaryEntry, getDocumentClassForAccountingLineValueAllowedValidation, getEntryValue, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getNextSourceLineNumber, getNextTargetLineNumber, getPersistedSourceAccountingLinesForComparison, getPersistedTargetAccountingLinesForComparison, getSourceAccountingLine, getSourceAccountingLineClass, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesForComparison, getSourceAccountingLinesSectionTitle, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, getTargetAccountingLinesForComparison, getTargetAccountingLinesSectionTitle, getTargetTotal, getTotalDollarAmount, processExplicitGeneralLedgerPendingEntry, processOffsetGeneralLedgerPendingEntry, setNextSourceLineNumber, setNextTargetLineNumber, setSourceAccountingLines, setTargetAccountingLines, toCopy, toErrorCorrection, updatePostingYearForAccountingLines
 
Methods inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
addPendingEntry, changeGeneralLedgerPendingEntriesApprovedStatusCode, checkSufficientFunds, clearAnyGeneralLedgerPendingEntries, documentPerformsSufficientFundsCheck, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, removeGeneralLedgerPendingEntries, setGeneralLedgerPendingEntries
 
Methods inherited from class org.kuali.kfs.sys.document.LedgerPostingDocumentBase
createInitialAccountingPeriod, getAccountingPeriod, getAccountingPeriodService, getDataDictionaryService, getDateTimeService, getFinancialDocumentTypeCode, getPostingPeriodCode, getPostingYear, retrieveCurrentAccountingPeriod, setAccountingPeriod, setPostingPeriodCode, setPostingYear
 
Methods inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
answerSplitNodeQuestion, getDocumentHeader, prepareForSave, processAfterRetrieve, setDocumentHeader
 
Methods inherited from class org.kuali.rice.kns.document.TransactionalDocumentBase
getAllowsCopy, isSessionDocument
 
Methods inherited from class org.kuali.rice.kns.document.DocumentBase
addCopyErrorDocumentNote, addPessimisticLock, afterLookup, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, doRouteLevelChange, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getPessimisticLocks, getXmlForRouteReport, logErrors, populateDocumentForRouting, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentNumber, setNewDocumentHeader, setPessimisticLocks, toString, toStringBuilder, toStringMapper, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
addNote, afterDelete, afterInsert, afterUpdate, beforeDelete, beforeInsert, beforeInsert, beforeUpdate, beforeUpdate, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes
 
Methods inherited from class org.kuali.rice.kns.bo.BusinessObjectBase
prepareForWorkflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kns.document.Copyable
toCopy
 
Methods inherited from interface org.kuali.kfs.sys.document.AmountTotaling
getTotalDollarAmount
 
Methods inherited from interface org.kuali.kfs.sys.document.GeneralLedgerPostingDocument
checkSufficientFunds, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, setGeneralLedgerPendingEntries
 
Methods inherited from interface org.kuali.kfs.sys.document.LedgerPostingDocument
getAccountingPeriod, getPostingPeriodCode, getPostingYear, setAccountingPeriod, setPostingPeriodCode, setPostingYear
 
Methods inherited from interface org.kuali.kfs.sys.document.FinancialSystemTransactionalDocument
answerSplitNodeQuestion, getDocumentHeader
 
Methods inherited from interface org.kuali.rice.kns.document.Document
addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAllowsCopy, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getPessimisticLocks, getXmlForRouteReport, populateDocumentForRouting, prepareForSave, processAfterRetrieve, refreshPessimisticLocks, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from interface org.kuali.rice.kns.bo.PersistableBusinessObject
addNote, deleteNote, getBoNote, getBoNotes, getExtension, getObjectId, getVersionNumber, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from interface org.kuali.rice.kns.bo.BusinessObject
prepareForWorkflow, refresh
 
Methods inherited from interface org.apache.ojb.broker.PersistenceBrokerAware
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate
 
Methods inherited from interface org.kuali.kfs.sys.document.GeneralLedgerPendingEntrySource
addPendingEntry, clearAnyGeneralLedgerPendingEntries, getDocumentHeader, getFinancialDocumentTypeCode, getPostingYear
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

assetPaymentAssetDetail

protected List<AssetPaymentAssetDetail> assetPaymentAssetDetail

capitalAssetNumber

protected Long capitalAssetNumber

capitalAssetBuilderOriginIndicator

protected boolean capitalAssetBuilderOriginIndicator
Constructor Detail

AssetPaymentDocument

public AssetPaymentDocument()
Method Detail

buildListOfDeletionAwareLists

public List buildListOfDeletionAwareLists()
Remove asset from collection for deletion

Specified by:
buildListOfDeletionAwareLists in interface org.kuali.rice.kns.bo.PersistableBusinessObject
Overrides:
buildListOfDeletionAwareLists in class AccountingDocumentBase
See Also:
AccountingDocumentBase.buildListOfDeletionAwareLists()

generateSaveEvents

public List generateSaveEvents()
When document save, AddAccountingLineEvent is added by the framework. Also, we need to add AssetPaymentManuallyAddAccountingLineEvent manually to run all relating validations.

Specified by:
generateSaveEvents in interface org.kuali.rice.kns.document.Document
Overrides:
generateSaveEvents in class AccountingDocumentBase
See Also:
AccountingDocumentBase.generateSaveEvents()

getWorkflowEngineDocumentIdsToLock

public List<Long> getWorkflowEngineDocumentIdsToLock()
Lock on purchase order document since post processor will update PO document by adding notes.

Specified by:
getWorkflowEngineDocumentIdsToLock in interface org.kuali.rice.kns.document.Document
Overrides:
getWorkflowEngineDocumentIdsToLock in class org.kuali.rice.kns.document.DocumentBase
See Also:
DocumentBase.getWorkflowEngineDocumentIdsToLock()

isDebit

public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
Determines if the given AccountingLine (as a GeneralLedgerPostable) is a credit or a debit, in terms of GLPE generation

Specified by:
isDebit in interface GeneralLedgerPendingEntrySource
Specified by:
isDebit in class AccountingDocumentBase
Returns:
true if the given GeneralLedgerPendingEntrySourceDetail is a debit, false if it is a credit
See Also:
org.kuali.kfs.sys.document.AccountingDocumentBase#isDebit(org.kuali.kfs.bo.GeneralLedgerPostable)

isCapitalAssetBuilderOriginIndicator

public boolean isCapitalAssetBuilderOriginIndicator()

setCapitalAssetBuilderOriginIndicator

public void setCapitalAssetBuilderOriginIndicator(boolean capitalAssetBuilderOriginIndicator)

addAssetPaymentAssetDetail

public void addAssetPaymentAssetDetail(AssetPaymentAssetDetail assetPaymentAssetDetail)
This method...

Parameters:
assetPaymentAssetDetail -

postProcessSave

public void postProcessSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
Specified by:
postProcessSave in interface org.kuali.rice.kns.document.Document
Overrides:
postProcessSave in class org.kuali.rice.kns.document.DocumentBase
See Also:
DocumentBase.postProcessSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent)

getCapitalAssetManagementModuleService

protected CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()

doRouteStatusChange

public void doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO statusChangeEvent)
Description copied from class: GeneralLedgerPostingDocumentBase
Override to call super and then iterate over all GLPEs and update the approved code appropriately.

Specified by:
doRouteStatusChange in interface org.kuali.rice.kns.document.Document
Overrides:
doRouteStatusChange in class GeneralLedgerPostingDocumentBase
See Also:
org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase#doRouteStatusChange()

prepareForSave

public void prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
Specified by:
prepareForSave in interface org.kuali.rice.kns.document.Document
Overrides:
prepareForSave in class AccountingDocumentBase
See Also:
AccountingDocumentBase.prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent)

getAssetPaymentAssetDetail

public List<AssetPaymentAssetDetail> getAssetPaymentAssetDetail()

setAssetPaymentAssetDetail

public void setAssetPaymentAssetDetail(List<AssetPaymentAssetDetail> assetPaymentAssetDetail)

getCapitalAssetNumber

public Long getCapitalAssetNumber()

setCapitalAssetNumber

public void setCapitalAssetNumber(Long capitalAssetNumber)

getAssetsTotalHistoricalCost

public org.kuali.rice.kns.util.KualiDecimal getAssetsTotalHistoricalCost()
calculates the total previous cost amount of all the assets in the document

Returns:
KualiDecimal

getAssetPaymentDistributor

public AssetPaymentDistributor getAssetPaymentDistributor()
Get the asset payment distributor built by AssetPaymentDetails, AssetPaymentAssetDetail and totalHistoricalCost

Returns:
AssetPaymentDistributor


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