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.rules;
017:
018: import org.kuali.kfs.bo.AccountingLine;
019: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
020: import org.kuali.kfs.document.AccountingDocument;
021: import org.kuali.module.financial.document.TransferOfFundsDocument;
022: import org.kuali.module.financial.document.YearEndDocumentUtil;
023:
024: /**
025: * Business rule(s) applicable to <code>YearEndTransferOfFundsDocument</code>s
026: *
027: * @see org.kuali.module.financial.rules.TransferOfFundsDocumentRule
028: */
029: public class YearEndTransferOfFundsDocumentRule extends
030: TransferOfFundsDocumentRule {
031:
032: /**
033: * This method calls the super class's overridden method to perform the general customization actions, then calls the
034: * YearEndDocumentUtil matching method to perform year end specific customization activities.
035: *
036: * @param accountingDocument The accounting document containing the general ledger pending entries being customized.
037: * @param accountingLine The accounting line the explicit general ledger pending entry was generated from.
038: * @param explicitEntry The explicit general ledger pending entry to be customized.
039: *
040: * @see org.kuali.module.financial.rules.TransferOfFundsDocumentRule#customizeExplicitGeneralLedgerPendingEntry(org.kuali.kfs.document.AccountingDocument,
041: * org.kuali.kfs.bo.AccountingLine, org.kuali.kfs.bo.GeneralLedgerPendingEntry)
042: * @see YearEndDocumentUtil#customizeExplicitGeneralLedgerPendingEntry(TransactionalDocument, AccountingLine,
043: * GeneralLedgerPendingEntry)
044: */
045: @Override
046: protected void customizeExplicitGeneralLedgerPendingEntry(
047: AccountingDocument accountingDocument,
048: AccountingLine accountingLine,
049: GeneralLedgerPendingEntry explicitEntry) {
050: super .customizeExplicitGeneralLedgerPendingEntry(
051: accountingDocument, accountingLine, explicitEntry);
052: YearEndDocumentUtil.customizeExplicitGeneralLedgerPendingEntry(
053: accountingDocument, accountingLine, explicitEntry);
054: }
055:
056: /**
057: * This method calls the super class's overridden method to perform the general customization actions, then calls the
058: * YearEndDocumentUtil matching method to perform year end specific customization activities.
059: *
060: * @param accountingDocument The accounting document containing the general ledger pending entries being customized.
061: * @param accountingLine The accounting line the explicit general ledger pending entry was generated from.
062: * @param explicitEntry The explicit general ledger pending entry the offset entry is generated for.
063: * @param offsetEntry The offset general ledger pending entry being customized.
064: * @return True if the customization does not encounter any errors, false otherwise.
065: *
066: * @see org.kuali.module.financial.rules.TransferOfFundsDocumentRule#customizeOffsetGeneralLedgerPendingEntry(org.kuali.kfs.document.AccountingDocument,
067: * org.kuali.kfs.bo.AccountingLine, org.kuali.kfs.bo.GeneralLedgerPendingEntry, org.kuali.kfs.bo.GeneralLedgerPendingEntry)
068: * @see YearEndDocumentUtil#customizeExplicitGeneralLedgerPendingEntry(TransactionalDocument, AccountingLine,
069: * GeneralLedgerPendingEntry)
070: */
071: @Override
072: protected boolean customizeOffsetGeneralLedgerPendingEntry(
073: AccountingDocument accountingDocument,
074: AccountingLine accountingLine,
075: GeneralLedgerPendingEntry explicitEntry,
076: GeneralLedgerPendingEntry offsetEntry) {
077: boolean success = super
078: .customizeOffsetGeneralLedgerPendingEntry(
079: accountingDocument, accountingLine,
080: explicitEntry, offsetEntry);
081: YearEndDocumentUtil.customizeExplicitGeneralLedgerPendingEntry(
082: accountingDocument, accountingLine, explicitEntry);
083: return success;
084: }
085:
086: /**
087: * Overriding to return corresponding parent class TransferOfFunds.
088: *
089: * @param financialDocument The financial document the class will be determined for.
090: * @return The class type of the document passed in.
091: *
092: * @see org.kuali.kfs.rules.AccountingDocumentRuleBase#getAccountingLineDocumentClass(org.kuali.kfs.document.AccountingDocument)
093: */
094: @Override
095: protected Class getAccountingLineDocumentClass(
096: AccountingDocument financialDocument) {
097: return TransferOfFundsDocument.class;
098: }
099:
100: }
|