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: package org.kuali.module.financial.rules;
17:
18: import org.kuali.kfs.bo.AccountingLine;
19: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
20: import org.kuali.kfs.document.AccountingDocument;
21: import org.kuali.module.financial.document.GeneralErrorCorrectionDocument;
22: import org.kuali.module.financial.document.YearEndDocumentUtil;
23:
24: /**
25: * Business rule(s) applicable to Year End General Error Correction documents. All other business rules are inherited from the
26: * parent non-year end version.
27: */
28: public class YearEndGeneralErrorCorrectionDocumentRule extends
29: GeneralErrorCorrectionDocumentRule {
30:
31: /**
32: * Set attributes of an explicit pending entry according to rules specific to GeneralErrorCorrectionDocument.<br/> <br/> Uses
33: * <code>{@link YearEndDocumentUtil#customizeExplicitGeneralLedgerPendingEntry(AccountingDocument, AccountingLine, GeneralLedgerPendingEntry)}</code>
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.GeneralErrorCorrectionDocumentRule#customizeExplicitGeneralLedgerPendingEntry(org.kuali.kfs.document.AccountingDocument,
40: * org.kuali.core.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 GeneralErrorCorrectionDocument.
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 GeneralErrorCorrectionDocument.class;
67: }
68:
69: }
|