01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.kuali.module.financial.rules;
18:
19: import org.kuali.kfs.bo.AccountingLine;
20: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
21: import org.kuali.kfs.document.AccountingDocument;
22: import org.kuali.module.financial.document.DistributionOfIncomeAndExpenseDocument;
23: import org.kuali.module.financial.document.YearEndDocumentUtil;
24:
25: /**
26: * Business rules applicable to <code>YearEndDistributionOfIncomeAndExpenseDocument</code>
27: */
28: public class YearEndDistributionOfIncomeAndExpenseDocumentRule extends
29: DistributionOfIncomeAndExpenseDocumentRule {
30:
31: /**
32: * This method calls the super class's overridden method to perform the general customization actions, then calls the
33: * YearEndDocumentUtil matching method to perform year end specific customization activities.
34: *
35: * @param accountingDocument The accounting document containing the general ledger pending entries being customized.
36: * @param accountingLine The accounting line the explicit general ledger pending entry was generated from.
37: * @param explicitEntry The explicit general ledger pending entry to be customized.
38: *
39: * @see org.kuali.module.financial.rules.DistributeOfIncomeAndExpenseDocumentRule#customizeExplicitGeneralLedgerPendingEntry(org.kuali.kfs.document.AccountingDocument,
40: * org.kuali.kfs.bo.AccountingLine, org.kuali.module.gl.bo.GeneralLedgerPendingEntry)
41: * @see YearEndDocumentUtil#customizeExplicitGeneralLedgerPendingEntry(TransactionalDocument, AccountingLine,
42: * GeneralLedgerPendingEntry)
43: */
44: @Override
45: protected void customizeExplicitGeneralLedgerPendingEntry(
46: AccountingDocument accountingDocument,
47: AccountingLine accountingLine,
48: GeneralLedgerPendingEntry explicitEntry) {
49: super .customizeExplicitGeneralLedgerPendingEntry(
50: accountingDocument, accountingLine, explicitEntry);
51: YearEndDocumentUtil.customizeExplicitGeneralLedgerPendingEntry(
52: accountingDocument, accountingLine, explicitEntry);
53: }
54:
55: /**
56: * Overriding to return the corresponding parent class DistributionOfIncomeAndExpenseDocument.
57: *
58: * @param financialDocument The financial document the class will be determined for.
59: * @return The class type of the document passed in.
60: *
61: * @see org.kuali.kfs.rules.AccountingDocumentRuleBase#getAccountingLineDocumentClass(org.kuali.kfs.document.AccountingDocument)
62: */
63: @Override
64: protected Class getAccountingLineDocumentClass(
65: AccountingDocument financialDocument) {
66: return DistributionOfIncomeAndExpenseDocument.class;
67: }
68:
69: }
|