org.kuali.kfs.fp.document
Class ProcurementCardDocument

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.fp.document.ProcurementCardDocument
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, CapitalAssetEditable, AccountingDocument, AmountTotaling, FinancialSystemTransactionalDocument, GeneralLedgerPendingEntrySource, GeneralLedgerPostingDocument, LedgerPostingDocument, org.kuali.rice.kns.bo.BusinessObject, org.kuali.rice.kns.bo.PersistableBusinessObject, org.kuali.rice.kns.document.Document, org.kuali.rice.kns.document.SessionDocument, org.kuali.rice.kns.document.TransactionalDocument

public class ProcurementCardDocument
extends AccountingDocumentBase
implements AmountTotaling, CapitalAssetEditable

This is the Procurement Card Document Class. The procurement cards distributes expenses from clearing accounts. It is a two-sided document, but only target lines are displayed because source lines cannot be changed. Transaction, Card, and Vendor information are associated with the document to help better distribute the expense.

See Also:
Serialized Form

Field Summary
protected  CapitalAssetInformation capitalAssetInformation
           
protected  CapitalAssetManagementModuleService capitalAssetManagementModuleService
           
protected static org.apache.log4j.Logger LOG
           
protected  ProcurementCardHolder procurementCardHolder
           
protected  List transactionEntries
           
 
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
ProcurementCardDocument()
          Default constructor.
 
Method Summary
 void addSourceAccountingLine(SourceAccountingLine sourceLine)
          Override to set the accounting line in the transaction detail object.
 void addTargetAccountingLine(TargetAccountingLine targetLine)
          Override to set the accounting line in the transaction detail object.
 List buildListOfDeletionAwareLists()
           
 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.
 CapitalAssetInformation getCapitalAssetInformation()
          Gets the capitalAssetInformation attribute.
protected  CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()
           
 ProcurementCardHolder getProcurementCardHolder()
          Gets the procurementCardHolder attribute.
 Class getSourceAccountingLineClass()
          Returns the default Source accounting line class.
 List getSourceAccountingLines()
          Override to get source accounting lines out of transactions
 Class getTargetAccountingLineClass()
          Returns the default Target accounting line class.
 List getTargetAccountingLines()
          Override to get target accounting lines out of transactions
 List getTransactionEntries()
           
 boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
          On procurement card documents, positive source amounts are credits, negative source amounts are debits.
 void postProcessSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
           
 void removeTargetAccountingLine(int index)
          Removes the target accounting line at the given index from the transaction detail entry.
 void setCapitalAssetInformation(CapitalAssetInformation capitalAssetInformation)
          Deprecated. 
 void setProcurementCardHolder(ProcurementCardHolder procurementCardHolder)
          Sets the procurementCardHolder attribute value.
 void setTransactionEntries(List transactionEntries)
           
protected  LinkedHashMap toStringMapper()
           
 
Methods inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
buildAccountingLineMap, copyAccountingLines, customizeExplicitGeneralLedgerPendingEntry, customizeOffsetGeneralLedgerPendingEntry, generateDocumentGeneralLedgerPendingEntries, generateEvents, generateGeneralLedgerPendingEntries, generateSaveEvents, getAccountingLineParser, getDataDictionaryEntry, getDocumentClassForAccountingLineValueAllowedValidation, getEntryValue, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getNextSourceLineNumber, getNextTargetLineNumber, getPersistedSourceAccountingLinesForComparison, getPersistedTargetAccountingLinesForComparison, getSourceAccountingLine, getSourceAccountingLineEntryName, getSourceAccountingLinesForComparison, getSourceAccountingLinesSectionTitle, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineEntryName, getTargetAccountingLinesForComparison, getTargetAccountingLinesSectionTitle, getTargetTotal, getTotalDollarAmount, prepareForSave, 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, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, logErrors, populateDocumentForRouting, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentNumber, setNewDocumentHeader, setPessimisticLocks, toString, toStringBuilder, 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.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, getWorkflowEngineDocumentIdsToLock, 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

procurementCardHolder

protected ProcurementCardHolder procurementCardHolder

transactionEntries

protected List transactionEntries

capitalAssetInformation

protected transient CapitalAssetInformation capitalAssetInformation

capitalAssetManagementModuleService

protected transient CapitalAssetManagementModuleService capitalAssetManagementModuleService
Constructor Detail

ProcurementCardDocument

public ProcurementCardDocument()
Default constructor.

Method Detail

buildListOfDeletionAwareLists

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

getTransactionEntries

public List getTransactionEntries()
Returns:
Returns the transactionEntries.

setTransactionEntries

public void setTransactionEntries(List transactionEntries)
Parameters:
transactionEntries - The transactionEntries to set.

getProcurementCardHolder

public ProcurementCardHolder getProcurementCardHolder()
Gets the procurementCardHolder attribute.

Returns:
Returns the procurementCardHolder.

setProcurementCardHolder

public void setProcurementCardHolder(ProcurementCardHolder procurementCardHolder)
Sets the procurementCardHolder attribute value.

Parameters:
procurementCardHolder - The procurementCardHolder to set.

removeTargetAccountingLine

public void removeTargetAccountingLine(int index)
Removes the target accounting line at the given index from the transaction detail entry.

Parameters:
index -

addSourceAccountingLine

public void addSourceAccountingLine(SourceAccountingLine sourceLine)
Override to set the accounting line in the transaction detail object.

Specified by:
addSourceAccountingLine in interface AccountingDocument
Overrides:
addSourceAccountingLine in class AccountingDocumentBase
See Also:
AccountingDocument.addSourceAccountingLine(SourceAccountingLine)

addTargetAccountingLine

public void addTargetAccountingLine(TargetAccountingLine targetLine)
Override to set the accounting line in the transaction detail object.

Specified by:
addTargetAccountingLine in interface AccountingDocument
Overrides:
addTargetAccountingLine in class AccountingDocumentBase
See Also:
AccountingDocument.addTargetAccountingLine(TargetAccountingLine)

getSourceAccountingLines

public List getSourceAccountingLines()
Override to get source accounting lines out of transactions

Specified by:
getSourceAccountingLines in interface AccountingDocument
Overrides:
getSourceAccountingLines in class AccountingDocumentBase
Returns:
The list of source accounting lines.
See Also:
AccountingDocument.getSourceAccountingLines()

getTargetAccountingLines

public List getTargetAccountingLines()
Override to get target accounting lines out of transactions

Specified by:
getTargetAccountingLines in interface AccountingDocument
Overrides:
getTargetAccountingLines in class AccountingDocumentBase
See Also:
AccountingDocument.getTargetAccountingLines()

getSourceAccountingLineClass

public Class getSourceAccountingLineClass()
Description copied from class: AccountingDocumentBase
Returns the default Source accounting line class.

Specified by:
getSourceAccountingLineClass in interface AccountingDocument
Overrides:
getSourceAccountingLineClass in class AccountingDocumentBase
See Also:
AccountingDocumentBase.getSourceAccountingLineClass()

getTargetAccountingLineClass

public Class getTargetAccountingLineClass()
Description copied from class: AccountingDocumentBase
Returns the default Target accounting line class.

Specified by:
getTargetAccountingLineClass in interface AccountingDocument
Overrides:
getTargetAccountingLineClass in class AccountingDocumentBase
See Also:
AccountingDocumentBase.getTargetAccountingLineClass()

toStringMapper

protected LinkedHashMap toStringMapper()
Overrides:
toStringMapper in class org.kuali.rice.kns.document.DocumentBase
See Also:
BusinessObjectBase.toStringMapper()

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:
Document#doRouteStatusChange()

isDebit

public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
                throws IllegalStateException
On procurement card documents, positive source amounts are credits, negative source amounts are debits.

Specified by:
isDebit in interface GeneralLedgerPendingEntrySource
Specified by:
isDebit in class AccountingDocumentBase
Parameters:
transactionalDocument - The document the accounting line being checked is located in.
accountingLine - The accounting line being analyzed.
Returns:
True if the accounting line given is a debit accounting line, false otherwise.
Throws:
Throws - an IllegalStateException if one of the following rules are violated: the accounting line amount is zero or the accounting line is not an expense or income accounting line.
IllegalStateException
See Also:
org.kuali.module.financial.rules.FinancialDocumentRuleBase#isDebit(FinancialDocument, org.kuali.rice.kns.bo.AccountingLine), org.kuali.kfs.sys.document.validation.impl.AccountingDocumentRuleBase.IsDebitUtils#isDebitConsideringSection(AccountingDocumentRuleBase, AccountingDocument, AccountingLine)

getCapitalAssetInformation

public CapitalAssetInformation getCapitalAssetInformation()
Gets the capitalAssetInformation attribute.

Specified by:
getCapitalAssetInformation in interface CapitalAssetEditable
Returns:
Returns the capitalAssetInformation.

setCapitalAssetInformation

@Deprecated
public void setCapitalAssetInformation(CapitalAssetInformation capitalAssetInformation)
Deprecated. 

Sets the capitalAssetInformation attribute value.

Specified by:
setCapitalAssetInformation in interface CapitalAssetEditable
Parameters:
capitalAssetInformation - The capitalAssetInformation to set.

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()
Returns:
CapitalAssetManagementModuleService


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