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.kra.routingform.rules.event;
17:
18: import org.kuali.core.document.Document;
19: import org.kuali.core.rule.BusinessRule;
20: import org.kuali.core.rule.event.KualiDocumentEvent;
21: import org.kuali.core.rule.event.KualiDocumentEventBase;
22: import org.kuali.module.kra.routingform.rules.RoutingFormDocumentRule;
23:
24: /**
25: * Class capturing a run audit event.
26: */
27: public class RunRoutingFormAuditEvent extends KualiDocumentEventBase
28: implements KualiDocumentEvent {
29:
30: /**
31: * Constructs a RunAuditEvent with the given errorPathPrefix and document.
32: *
33: * @param errorPathPrefix
34: * @param document
35: * @param accountingLine
36: */
37: public RunRoutingFormAuditEvent(String errorPathPrefix,
38: Document document) {
39: super ("Running audit on " + getDocumentId(document),
40: errorPathPrefix, document);
41: }
42:
43: /**
44: * Constructs a RunAuditEvent with the given document.
45: *
46: * @param errorPathPrefix
47: * @param document
48: * @param accountingLine
49: */
50: public RunRoutingFormAuditEvent(Document document) {
51: this ("", document);
52: }
53:
54: /**
55: * @see org.kuali.core.rule.event.KualiDocumentEvent#getRuleInterfaceClass()
56: */
57: public Class getRuleInterfaceClass() {
58: return RoutingFormDocumentRule.class;
59: }
60:
61: /**
62: * @see org.kuali.core.rule.event.KualiDocumentEvent#invokeRuleMethod(org.kuali.core.rule.BusinessRule)
63: */
64: public boolean invokeRuleMethod(BusinessRule rule) {
65: return ((RoutingFormDocumentRule) rule)
66: .processRunAuditBusinessRules(getDocument());
67: }
68: }
|