01: /*
02: * Copyright 2005-2006 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.core.rule.event;
17:
18: import java.util.List;
19:
20: import org.kuali.core.document.Document;
21: import org.kuali.core.rule.BusinessRule;
22:
23: /**
24: * Parent interface of all document-related events, which are used to drive the business rules evaluation process.
25: *
26: *
27: */
28: public interface KualiDocumentEvent {
29: /**
30: * @return Document The document associated with this event
31: */
32: public Document getDocument();
33:
34: /**
35: * The name of the event.
36: *
37: * @return String
38: */
39: public String getName();
40:
41: /**
42: * A description of the event.
43: *
44: * @return String
45: */
46: public String getDescription();
47:
48: /**
49: * @return errorPathPrefix for this event
50: */
51: public String getErrorPathPrefix();
52:
53: /**
54: * Returns the interface that classes must implement to recieve this event.
55: *
56: * @return
57: */
58: public Class getRuleInterfaceClass();
59:
60: /**
61: * Validates the event has all the necessary properties.
62: */
63: public void validate();
64:
65: /**
66: * Invokes the event handling method on the rule object.
67: *
68: * @param rule
69: * @return
70: */
71: public boolean invokeRuleMethod(BusinessRule rule);
72:
73: /**
74: * This will return a list of events that are spawned from this event.
75: *
76: * @return
77: */
78: public List generateEvents();
79: }
|