01: /*
02: * Copyright 2006-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.budget.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.budget.rules.budget.BudgetDocumentRule;
23:
24: /**
25: * Class capturing a run audit event.
26: */
27: public class RunAuditEvent extends KualiDocumentEventBase implements
28: 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 RunAuditEvent(String errorPathPrefix, Document document) {
38: super ("Running audit on " + getDocumentId(document),
39: errorPathPrefix, document);
40: }
41:
42: /**
43: * Constructs a RunAuditEvent with the given document.
44: *
45: * @param errorPathPrefix
46: * @param document
47: * @param accountingLine
48: */
49: public RunAuditEvent(Document document) {
50: this ("", document);
51: }
52:
53: /**
54: * @see org.kuali.core.rule.event.KualiDocumentEvent#getRuleInterfaceClass()
55: */
56: public Class getRuleInterfaceClass() {
57: return BudgetDocumentRule.class;
58: }
59:
60: /**
61: * @see org.kuali.core.rule.event.KualiDocumentEvent#invokeRuleMethod(org.kuali.core.rule.BusinessRule)
62: */
63: public boolean invokeRuleMethod(BusinessRule rule) {
64: return ((BudgetDocumentRule) rule)
65: .processRunAuditBusinessRules(getDocument());
66: }
67: }
|