1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.rules.rule.event;
17
18 import org.kuali.rice.krad.document.Document;
19 import org.kuali.rice.krad.rules.rule.BusinessRule;
20 import org.kuali.rice.krad.rules.rule.BusinessRule;
21 import org.kuali.rice.krad.rules.rule.CompleteDocumentRule;
22
23 import java.util.ArrayList;
24 import java.util.List;
25
26
27
28
29
30
31 public class CompleteDocumentEvent extends KualiDocumentEventBase {
32
33
34
35
36
37
38
39 public CompleteDocumentEvent(String errorPathPrefix, Document document) {
40 super("creating complete event for document " + getDocumentId(document), errorPathPrefix, document);
41 }
42
43
44
45
46
47
48 public CompleteDocumentEvent(Document document) {
49 this("", document);
50 }
51
52
53
54
55 public Class getRuleInterfaceClass() {
56 return CompleteDocumentRule.class;
57 }
58
59
60
61
62 public boolean invokeRuleMethod(BusinessRule rule) {
63 return ((CompleteDocumentRule) rule).processCompleteDocument(document);
64 }
65
66
67
68
69 public List generateEvents() {
70 List events = new ArrayList();
71 events.add(new RouteDocumentEvent(getDocument()));
72 return events;
73 }
74 }