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 java.util.ArrayList;
19 import java.util.HashMap;
20 import java.util.List;
21 import java.util.Map;
22
23
24
25
26 abstract public class RuleEventBase implements RuleEvent {
27
28 private String name;
29 private final String description;
30 private final String errorPathPrefix;
31 private Map<String, Object> facts = new HashMap<String, Object>();
32 private String ruleMethodName;
33
34
35
36
37
38
39
40
41 public RuleEventBase( String description, String errorPathPrefix ) {
42 this.description = description;
43 this.errorPathPrefix = errorPathPrefix;
44 }
45
46 public void addFact( String key, Object object ) {
47 facts.put( key, object );
48 }
49
50
51
52
53
54 public String getName() {
55 return name;
56 }
57
58
59
60
61 public void setName( String name ) {
62 this.name = name;
63 }
64
65
66
67
68 public final String getDescription() {
69 return description;
70 }
71
72
73
74
75 public String getErrorPathPrefix() {
76 return errorPathPrefix;
77 }
78
79
80
81
82 @Override
83 public String toString() {
84 return getName();
85 }
86
87
88
89
90 public Map<String, Object> getFacts() {
91 return facts;
92 }
93
94
95
96
97 public void setFacts( Map<String, Object> facts ) {
98 this.facts = facts;
99 }
100
101
102
103
104 public String getRuleMethodName() {
105 return ruleMethodName;
106 }
107
108
109
110
111 public void setRuleMethodName( String name ) {
112 this.ruleMethodName = name;
113 }
114
115
116
117
118 @Override
119 public List<RuleEvent> generateEvents() {
120 return new ArrayList<RuleEvent>();
121 }
122 }