org.kuali.kfs.fp.document
Class PreEncumbranceDocument

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.PreEncumbranceDocument
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, 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

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

The Pre-Encumbrance document provides the capability to record encumbrances independently of purchase orders, travel, or Physical Plant work orders. These transactions are for the use of the account manager to earmark funds for which unofficial commitments have already been made.

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger LOG
           
protected  Date reversalDate
           
 
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
PreEncumbranceDocument()
          Initializes the array lists and some basic info.
 
Method Summary
 List<SufficientFundsItem> checkSufficientFunds()
          This method will check sufficient funds for the document
 void customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry)
          This method contains PreEncumbrance document specific general ledger pending entry explicit entry attribute assignments.
 Date getReversalDate()
           
 String getSourceAccountingLinesSectionTitle()
          Overrides the base implementation to return "Encumbrance".
 String getTargetAccountingLinesSectionTitle()
          Overrides the base implementation to return "Disencumbrance".
 boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
          This method limits valid debits to only expense object type codes.
protected  boolean refreshReversalDate()
          If the reversal date on this document is in need of refreshing, refreshes the reveral date.
 void setReversalDate(Date reversalDate)
           
 void toCopy()
          If we've copied, we need to update the posting period and year
 
Methods inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
addSourceAccountingLine, addTargetAccountingLine, buildAccountingLineMap, buildListOfDeletionAwareLists, copyAccountingLines, 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, toErrorCorrection, updatePostingYearForAccountingLines
 
Methods inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
addPendingEntry, changeGeneralLedgerPendingEntriesApprovedStatusCode, clearAnyGeneralLedgerPendingEntries, documentPerformsSufficientFundsCheck, doRouteStatusChange, 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, postProcessSave, 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.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
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, doRouteStatusChange, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAllowsCopy, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, 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

reversalDate

protected Date reversalDate
Constructor Detail

PreEncumbranceDocument

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

Method Detail

checkSufficientFunds

public List<SufficientFundsItem> checkSufficientFunds()
Description copied from interface: GeneralLedgerPostingDocument
This method will check sufficient funds for the document

Specified by:
checkSufficientFunds in interface GeneralLedgerPostingDocument
Overrides:
checkSufficientFunds in class GeneralLedgerPostingDocumentBase
Returns:
a list of sufficientfundsitems that do not have sufficient funds. It returns an empty list if there is sufficient funds for the entire document
See Also:
GeneralLedgerPostingDocumentBase.checkSufficientFunds()

getReversalDate

public Date getReversalDate()
Returns:
Timestamp

setReversalDate

public void setReversalDate(Date reversalDate)
Parameters:
reversalDate -

getSourceAccountingLinesSectionTitle

public String getSourceAccountingLinesSectionTitle()
Overrides the base implementation to return "Encumbrance".

Specified by:
getSourceAccountingLinesSectionTitle in interface AccountingDocument
Overrides:
getSourceAccountingLinesSectionTitle in class AccountingDocumentBase
Returns:
The source accounting line section's title.
See Also:
AccountingDocument.getSourceAccountingLinesSectionTitle()

getTargetAccountingLinesSectionTitle

public String getTargetAccountingLinesSectionTitle()
Overrides the base implementation to return "Disencumbrance".

Specified by:
getTargetAccountingLinesSectionTitle in interface AccountingDocument
Overrides:
getTargetAccountingLinesSectionTitle in class AccountingDocumentBase
Returns:
The target accounting line section's title.
See Also:
AccountingDocument.getTargetAccountingLinesSectionTitle()

isDebit

public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
This method limits valid debits to only expense object type codes. Additionally, an IllegalStateException will be thrown if the accounting line passed in is not an expense, is an error correction with a positive dollar amount or is not an error correction and has a negative amount.

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

customizeExplicitGeneralLedgerPendingEntry

public void customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable,
                                                       GeneralLedgerPendingEntry explicitEntry)
This method contains PreEncumbrance document specific general ledger pending entry explicit entry attribute assignments. These attributes include financial balance type code, reversal date and transaction encumbrance update code.

Overrides:
customizeExplicitGeneralLedgerPendingEntry in class AccountingDocumentBase
Parameters:
financialDocument - The document which contains the explicit entry.
accountingLine - The accounting line the explicit entry is generated from.
explicitEntry - The explicit entry being updated.
See Also:
org.kuali.module.financial.rules.FinancialDocumentRuleBase#customizeExplicitGeneralLedgerPendingEntry(org.kuali.rice.kns.document.FinancialDocument, org.kuali.rice.kns.bo.AccountingLine, org.kuali.module.gl.bo.GeneralLedgerPendingEntry)

toCopy

public void toCopy()
            throws org.kuali.rice.kew.exception.WorkflowException
Description copied from class: LedgerPostingDocumentBase
If we've copied, we need to update the posting period and year

Specified by:
toCopy in interface org.kuali.rice.kns.document.Copyable
Overrides:
toCopy in class AccountingDocumentBase
Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
AccountingDocumentBase.toCopy()

refreshReversalDate

protected boolean refreshReversalDate()
If the reversal date on this document is in need of refreshing, refreshes the reveral date. THIS METHOD MAY CHANGE DOCUMENT STATE!

Returns:
true if the reversal date ended up getting refreshed, false otherwise


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