001: /*
002: * Copyright 2005-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.module.financial.document;
017:
018: import java.util.ArrayList;
019: import java.util.List;
020:
021: import org.kuali.core.document.AmountTotaling;
022: import org.kuali.core.document.Copyable;
023: import org.kuali.core.document.Correctable;
024: import org.kuali.kfs.KFSConstants;
025: import org.kuali.kfs.bo.AccountingLineParser;
026: import org.kuali.kfs.document.AccountingDocumentBase;
027: import org.kuali.module.financial.bo.PreEncumbranceDocumentAccountingLineParser;
028: import org.kuali.module.gl.util.SufficientFundsItem;
029:
030: /**
031: * The Pre-Encumbrance document provides the capability to record encumbrances independently of purchase orders, travel, or Physical
032: * Plant work orders. These transactions are for the use of the account manager to earmark funds for which unofficial commitments
033: * have already been made.
034: */
035: public class PreEncumbranceDocument extends AccountingDocumentBase
036: implements Copyable, Correctable, AmountTotaling {
037: private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
038: .getLogger(PreEncumbranceDocument.class);
039:
040: private java.sql.Date reversalDate;
041:
042: /**
043: * Initializes the array lists and some basic info.
044: */
045: public PreEncumbranceDocument() {
046: super ();
047: }
048:
049: /**
050: * @see org.kuali.kfs.document.AccountingDocumentBase#checkSufficientFunds()
051: */
052: @Override
053: public List<SufficientFundsItem> checkSufficientFunds() {
054: LOG.debug("checkSufficientFunds() started");
055:
056: // This document does not do sufficient funds checking
057: return new ArrayList<SufficientFundsItem>();
058: }
059:
060: /**
061: * @return Timestamp
062: */
063: public java.sql.Date getReversalDate() {
064: return reversalDate;
065: }
066:
067: /**
068: * @param reversalDate
069: */
070: public void setReversalDate(java.sql.Date reversalDate) {
071: this .reversalDate = reversalDate;
072: }
073:
074: /**
075: * Overrides the base implementation to return "Encumbrance".
076: *
077: * @see org.kuali.kfs.document.AccountingDocument#getSourceAccountingLinesSectionTitle()
078: */
079: @Override
080: public String getSourceAccountingLinesSectionTitle() {
081: return KFSConstants.ENCUMBRANCE;
082: }
083:
084: /**
085: * Overrides the base implementation to return "Disencumbrance".
086: *
087: * @see org.kuali.kfs.document.AccountingDocument#getTargetAccountingLinesSectionTitle()
088: */
089: @Override
090: public String getTargetAccountingLinesSectionTitle() {
091: return KFSConstants.DISENCUMBRANCE;
092: }
093:
094: /**
095: * @see org.kuali.kfs.document.AccountingDocumentBase#getAccountingLineParser()
096: */
097: @Override
098: public AccountingLineParser getAccountingLineParser() {
099: return new PreEncumbranceDocumentAccountingLineParser();
100: }
101:
102: }
|