01: /*
02: * Copyright 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.kfs.rule.event;
17:
18: import org.kuali.core.document.Document;
19: import org.kuali.core.rule.BusinessRule;
20: import org.kuali.kfs.bo.AccountingLine;
21: import org.kuali.kfs.document.AccountingDocument;
22: import org.kuali.kfs.rule.ReviewAccountingLineRule;
23:
24: /**
25: * This class represents the review accounting line event, which is generated by the Document service for every accountingLine of an
26: * incoming document, when that accountingLine isn't being updated or deleted or added.
27: */
28: public final class ReviewAccountingLineEvent extends
29: AccountingLineEventBase {
30: /**
31: * Constructs an ReviewAccountingLineEvent with the given errorPathPrefix, document, and accountingLine.
32: *
33: * @param errorPathPrefix
34: * @param document
35: * @param accountingLine
36: */
37: public ReviewAccountingLineEvent(String errorPathPrefix,
38: Document document, AccountingLine accountingLine) {
39: super ("reviewing accountingLine in document "
40: + getDocumentId(document), errorPathPrefix, document,
41: accountingLine);
42: }
43:
44: /**
45: * @see org.kuali.core.rule.event.KualiDocumentEvent#getRuleInterfaceClass()
46: */
47: public Class getRuleInterfaceClass() {
48: return ReviewAccountingLineRule.class;
49: }
50:
51: /**
52: * @see org.kuali.core.rule.event.KualiDocumentEvent#invokeRuleMethod(org.kuali.core.rule.BusinessRule)
53: */
54: public boolean invokeRuleMethod(BusinessRule rule) {
55: return ((ReviewAccountingLineRule) rule)
56: .processReviewAccountingLineBusinessRules(
57: (AccountingDocument) getDocument(),
58: getAccountingLine());
59: }
60: }
|