org.kuali.kfs.fp.document
Class InternalBillingDocument

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.InternalBillingDocument
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, CapitalAssetEditable, AccountingDocument, AmountTotaling, Correctable, 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
Direct Known Subclasses:
ServiceBillingDocument

public class InternalBillingDocument
extends AccountingDocumentBase
implements org.kuali.rice.kns.document.Copyable, Correctable, AmountTotaling, CapitalAssetEditable

This is the business object that represents the InternalBillingDocument in Kuali. This is a transactional document that will eventually post transactions to the G/L. It integrates with workflow and also contains two groupings of accounting lines: Expense and Income.

See Also:
Serialized Form

Field Summary
protected  CapitalAssetInformation capitalAssetInformation
           
protected  CapitalAssetManagementModuleService capitalAssetManagementModuleService
           
protected  List items
           
protected  Integer nextItemLineNumber
           
 
Fields inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
dataDictionaryEntry, LOG, 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
InternalBillingDocument()
          Initializes the array lists and some basic info.
 
Method Summary
 void addItem(InternalBillingItem item)
          Adds a new item to the item list.
 List buildListOfDeletionAwareLists()
          Allows items (in addition to accounting lines) to be deleted from the database after being saved there.
 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.
 InternalBillingItem getItem(int index)
          Retrieve a particular item at a given index in the list of items.
 List getItems()
           
 org.kuali.rice.kns.util.KualiDecimal getItemTotal()
          Iterates through the list of items and sums up their totals.
 Integer getNextItemLineNumber()
          Retrieves the next item line number.
 String getSourceAccountingLinesSectionTitle()
          This method is used to return the title that a transactional document should give to it's source accounting line section.
 String getTargetAccountingLinesSectionTitle()
          This method is used to return the title that a transactional document should give to it's source accounting line section.
 boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
          This method determines if an accounting line is a debit accounting line by calling IsDebitUtils.isDebitConsideringSection().
 void postProcessSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
           
 void setCapitalAssetInformation(CapitalAssetInformation capitalAssetInformation)
          Deprecated. 
 void setItems(List items)
           
 void setNextItemLineNumber(Integer nextItemLineNumber)
          Setter for OJB to get from database and JSP to maintain state in hidden fields.
 
Methods inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
addSourceAccountingLine, addTargetAccountingLine, buildAccountingLineMap, copyAccountingLines, customizeExplicitGeneralLedgerPendingEntry, customizeOffsetGeneralLedgerPendingEntry, generateDocumentGeneralLedgerPendingEntries, generateEvents, generateGeneralLedgerPendingEntries, generateSaveEvents, getAccountingLineParser, getDataDictionaryEntry, getDocumentClassForAccountingLineValueAllowedValidation, getEntryValue, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getNextSourceLineNumber, getNextTargetLineNumber, getPersistedSourceAccountingLinesForComparison, getPersistedTargetAccountingLinesForComparison, getSourceAccountingLine, getSourceAccountingLineClass, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesForComparison, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, getTargetAccountingLinesForComparison, 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, 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.Correctable
toErrorCorrection
 
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

items

protected List items

nextItemLineNumber

protected Integer nextItemLineNumber

capitalAssetInformation

protected transient CapitalAssetInformation capitalAssetInformation

capitalAssetManagementModuleService

protected transient CapitalAssetManagementModuleService capitalAssetManagementModuleService
Constructor Detail

InternalBillingDocument

public InternalBillingDocument()
Initializes the array lists and some basic info.

Method Detail

addItem

public void addItem(InternalBillingItem item)
Adds a new item to the item list.

Parameters:
item -

getItem

public InternalBillingItem getItem(int index)
Retrieve a particular item at a given index in the list of items. For Struts, the requested item and any intervening ones are initialized if necessary.

Parameters:
index -
Returns:
the item

getItems

public List getItems()
Returns:
Returns the items.

buildListOfDeletionAwareLists

public List buildListOfDeletionAwareLists()
Allows items (in addition to accounting lines) to be deleted from the database after being saved there.

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

getItemTotal

public org.kuali.rice.kns.util.KualiDecimal getItemTotal()
Iterates through the list of items and sums up their totals.

Returns:
the total

getNextItemLineNumber

public Integer getNextItemLineNumber()
Retrieves the next item line number.

Returns:
The next available item line number

setItems

public void setItems(List items)
Parameters:
items -

setNextItemLineNumber

public void setNextItemLineNumber(Integer nextItemLineNumber)
Setter for OJB to get from database and JSP to maintain state in hidden fields. This property is also incremented by the addItem method.

Parameters:
nextItemLineNumber -

getSourceAccountingLinesSectionTitle

public String getSourceAccountingLinesSectionTitle()
Description copied from interface: AccountingDocument
This method is used to return the title that a transactional document should give to it's source accounting line section.

Specified by:
getSourceAccountingLinesSectionTitle in interface AccountingDocument
Overrides:
getSourceAccountingLinesSectionTitle in class AccountingDocumentBase
Returns:
"Income"
See Also:
AccountingDocument.getSourceAccountingLinesSectionTitle()

getTargetAccountingLinesSectionTitle

public String getTargetAccountingLinesSectionTitle()
Description copied from interface: AccountingDocument
This method is used to return the title that a transactional document should give to it's source accounting line section.

Specified by:
getTargetAccountingLinesSectionTitle in interface AccountingDocument
Overrides:
getTargetAccountingLinesSectionTitle in class AccountingDocumentBase
Returns:
"Expense"
See Also:
AccountingDocument.getTargetAccountingLinesSectionTitle()

isDebit

public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
This method determines if an accounting line is a debit accounting line by calling IsDebitUtils.isDebitConsideringSection().

Specified by:
isDebit in interface GeneralLedgerPendingEntrySource
Specified by:
isDebit in class AccountingDocumentBase
Parameters:
transactionalDocument - The document containing the accounting line being analyzed.
accountingLine - The accounting line being reviewed to determine if it is a debit line or not.
Returns:
True if the accounting line is a debit accounting line, false otherwise.
See Also:
IsDebitUtils#isDebitConsideringSection(FinancialDocumentRuleBase, FinancialDocument, AccountingLine), org.kuali.rice.kns.rule.AccountingLineRule#isDebit(org.kuali.rice.kns.document.FinancialDocument, org.kuali.rice.kns.bo.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.

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()

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)


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