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.module.financial.rule.event;
17:
18: import org.kuali.core.document.Document;
19: import org.kuali.core.rule.BusinessRule;
20: import org.kuali.kfs.document.AccountingDocument;
21: import org.kuali.module.financial.bo.Check;
22: import org.kuali.module.financial.rule.UpdateCheckRule;
23:
24: /**
25: * This class represents the update check event.
26: */
27: public final class UpdateCheckEvent extends CheckEventBase {
28: /**
29: * Constructs an UpdateCheckEvent with the given errorPathPrefix, document, and check
30: *
31: * @param errorPathPrefix
32: * @param document
33: * @param check
34: */
35: public UpdateCheckEvent(String errorPathPrefix, Document document,
36: Check check) {
37: super ("updating check in document " + getDocumentId(document),
38: errorPathPrefix, document, check);
39: }
40:
41: /**
42: * @see org.kuali.core.rule.event.KualiDocumentEvent#getRuleInterfaceClass()
43: */
44: public Class getRuleInterfaceClass() {
45: return UpdateCheckRule.class;
46: }
47:
48: /**
49: * @see org.kuali.core.rule.event.KualiDocumentEvent#invokeRuleMethod(org.kuali.core.rule.BusinessRule)
50: */
51: public boolean invokeRuleMethod(BusinessRule rule) {
52: UpdateCheckRule crule = (UpdateCheckRule) rule;
53:
54: return crule.processUpdateCheckRule(
55: (AccountingDocument) getDocument(), getCheck());
56: }
57: }
|