org.kuali.kfs.fp.document
Class NonCheckDisbursementDocument

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.NonCheckDisbursementDocument
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 NonCheckDisbursementDocument
extends AccountingDocumentBase
implements org.kuali.rice.kns.document.Copyable, Correctable, AmountTotaling

This is the business object that represents the NonCheckDisbursementDocument in Kuali. The "Non-Check Disbursement" document is used to record charges or credits directly assessed to university bank accounts. It is used primarily by the Tax and Treasury Accounting office to record wire transfers, foreign drafts, etc.

See Also:
Serialized Form

Field Summary
protected  Bank bank
           
protected  String financialDocumentBankCode
           
 
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
NonCheckDisbursementDocument()
          Constructs a NonCheckDisbursementDocument instance.
 
Method Summary
protected  String buildTransactionLedgerEntryDescriptionUsingRefOriginAndRefDocNumber(GeneralLedgerPendingEntrySourceDetail postable)
          Builds an appropriately formatted string to be used for the transactionLedgerEntryDescription.
 void customizeExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry)
          This method sets attributes on the explicitly general ledger pending entry specific to NonCheckDisbursement documents.
 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
 Bank getBank()
          Gets the bank attribute.
 String getFinancialDocumentBankCode()
          Gets the financialDocumentBankCode attribute.
 String getSourceAccountingLinesSectionTitle()
          Overrides the base implementation to return "From".
 boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
          This method determines if a given accounting line is a debit accounting line.
 void setBank(Bank bank)
          Sets the bank attribute value.
 void setDefautBankCode()
          Sets the bank code for a new document to the setup default for the Non Check Disbursement document.
 void setFinancialDocumentBankCode(String financialDocumentBankCode)
          Sets the financialDocumentBankCode attribute value.
 
Methods inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
addSourceAccountingLine, addTargetAccountingLine, buildAccountingLineMap, buildListOfDeletionAwareLists, copyAccountingLines, customizeOffsetGeneralLedgerPendingEntry, generateEvents, generateGeneralLedgerPendingEntries, generateSaveEvents, getAccountingLineParser, getDataDictionaryEntry, getDocumentClassForAccountingLineValueAllowedValidation, getEntryValue, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getNextSourceLineNumber, getNextTargetLineNumber, getPersistedSourceAccountingLinesForComparison, getPersistedTargetAccountingLinesForComparison, getSourceAccountingLine, getSourceAccountingLineClass, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesForComparison, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, 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, 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.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, 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

financialDocumentBankCode

protected String financialDocumentBankCode

bank

protected Bank bank
Constructor Detail

NonCheckDisbursementDocument

public NonCheckDisbursementDocument()
Constructs a NonCheckDisbursementDocument instance.

Method Detail

setDefautBankCode

public void setDefautBankCode()
Sets the bank code for a new document to the setup default for the Non Check Disbursement document.


getFinancialDocumentBankCode

public String getFinancialDocumentBankCode()
Gets the financialDocumentBankCode attribute.

Returns:
Returns the financialDocumentBankCode.

setFinancialDocumentBankCode

public void setFinancialDocumentBankCode(String financialDocumentBankCode)
Sets the financialDocumentBankCode attribute value.

Parameters:
financialDocumentBankCode - The financialDocumentBankCode to set.

getBank

public Bank getBank()
Gets the bank attribute.

Returns:
Returns the bank.

setBank

public void setBank(Bank bank)
Sets the bank attribute value.

Parameters:
bank - The bank to set.

getSourceAccountingLinesSectionTitle

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

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

isDebit

public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
                throws IllegalStateException
This method determines if a given accounting line is a debit accounting line. This is done by calling IsDebitUtiles.isDebitConsideringNothingPositiveOnly(). 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.
Throws:
IllegalStateException - Thrown if accounting line attributes are invalid.
See Also:
IsDebitUtils#isDebitConsideringNothingPositiveOnly(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 sets attributes on the explicitly general ledger pending entry specific to NonCheckDisbursement documents. This includes setting the transaction ledger entry description and blanking out the reference financial document number, the reference financial system origin code and the reference financial document type code. These values must be nullified because they don't belong in general ledger pending entries and if they aren't null, the general error corrections won't post properly.

Overrides:
customizeExplicitGeneralLedgerPendingEntry in class AccountingDocumentBase
Parameters:
financialDocument - The document which contains the general ledger pending entry being modified.
accountingLine - The accounting line the explicit entry was generated from.
explicitEntry - The explicit entry being updated.
See Also:
FinancialDocumentRuleBase#customizeExplicitGeneralLedgerPendingEntry(FinancialDocument, AccountingLine, GeneralLedgerPendingEntry)

generateDocumentGeneralLedgerPendingEntries

public boolean generateDocumentGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
Description copied from class: AccountingDocumentBase
Most accounting documents don't need to generate document level GLPE's, so don't do anything in the default implementation

Specified by:
generateDocumentGeneralLedgerPendingEntries in interface GeneralLedgerPendingEntrySource
Overrides:
generateDocumentGeneralLedgerPendingEntries in class AccountingDocumentBase
Parameters:
sequenceHelper - a sequence helper for the method to create more general ledger pending entries
Returns:
always true, because we've always successfully not generating anything
See Also:
AccountingDocumentBase.generateDocumentGeneralLedgerPendingEntries(org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper)

buildTransactionLedgerEntryDescriptionUsingRefOriginAndRefDocNumber

protected String buildTransactionLedgerEntryDescriptionUsingRefOriginAndRefDocNumber(GeneralLedgerPendingEntrySourceDetail postable)
Builds an appropriately formatted string to be used for the transactionLedgerEntryDescription. It is built using information from the AccountingLine. Format is "01-12345: blah blah blah".

Parameters:
financialDocument - The document the description will be pulled from, if the accounting line description is blank.
line - The accounting line that will be used for populating the transaction ledger entry description.
Returns:
The description to be applied to the transaction ledger entry.


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