1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.api.rule;
17
18 import org.joda.time.DateTime;
19 import org.kuali.rice.core.api.criteria.QueryByCriteria;
20 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
21 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
22 import org.kuali.rice.core.api.util.jaxb.DateTimeAdapter;
23 import org.kuali.rice.kew.api.KewApiConstants;
24 import org.springframework.cache.annotation.Cacheable;
25
26 import javax.jws.WebMethod;
27 import javax.jws.WebParam;
28 import javax.jws.WebResult;
29 import javax.jws.WebService;
30 import javax.jws.soap.SOAPBinding;
31 import javax.xml.bind.annotation.XmlElement;
32 import javax.xml.bind.annotation.XmlElementWrapper;
33 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
34 import java.util.List;
35
36 @WebService(name = "ruleService", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
37 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
38 public interface RuleService {
39
40
41
42
43
44
45
46
47
48
49 @WebMethod(operationName = "getRule")
50 @WebResult(name = "rule")
51 @Cacheable(value=Rule.Cache.NAME, key="'id=' + #p0")
52 Rule getRule(@WebParam(name="id") String id)
53 throws RiceIllegalArgumentException, RiceIllegalStateException;
54
55
56
57
58
59
60
61
62
63
64
65 @WebMethod(operationName = "getRuleByName")
66 @WebResult(name = "rule")
67 @Cacheable(value=Rule.Cache.NAME, key="'name=' + #p0")
68 Rule getRuleByName(@WebParam(name="name") String name)
69 throws RiceIllegalArgumentException, RiceIllegalStateException;
70
71
72
73
74
75
76
77
78
79
80 @WebMethod(operationName = "getRuleByTemplateId")
81 @WebResult(name = "rules")
82 @XmlElementWrapper(name = "rules", required = true)
83 @XmlElement(name = "rule", required = true)
84 @Cacheable(value=Rule.Cache.NAME, key="'templateId=' + #p0")
85 List<Rule> getRulesByTemplateId(@WebParam(name="templateId") String templateId)
86 throws RiceIllegalArgumentException;
87
88
89
90
91
92
93
94
95
96
97
98
99 @WebMethod(operationName = "getRulesByTemplateNameAndDocumentTypeName")
100 @WebResult(name = "rules")
101 @XmlElementWrapper(name = "rules", required = true)
102 @XmlElement(name = "rule", required = true)
103 @Cacheable(value=Rule.Cache.NAME, key="'templateName=' + #p0 + '|' + 'documentTypeName=' + #p1")
104 List<Rule> getRulesByTemplateNameAndDocumentTypeName(@WebParam(name = "templateName") String templateName,
105 @WebParam(name = "documentTypeName") String documentTypeName)
106 throws RiceIllegalArgumentException;
107
108
109
110
111
112
113
114
115
116
117
118
119
120 @WebMethod(operationName = "getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate")
121 @WebResult(name = "rules")
122 @XmlElementWrapper(name = "rules", required = true)
123 @XmlElement(name = "rule", required = true)
124 List<Rule> getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate(@WebParam(name = "templateName") String templateName,
125 @WebParam(name = "documentTypeName") String documentTypeName,
126 @XmlJavaTypeAdapter(value = DateTimeAdapter.class) @WebParam(name = "effectiveDate") DateTime effectiveDate)
127 throws RiceIllegalArgumentException;
128
129
130
131
132
133
134
135
136
137
138
139
140 @WebMethod(operationName = "findRules")
141 @WebResult(name = "findRules")
142 RuleQueryResults findRules(@WebParam(name = "query") QueryByCriteria queryByCriteria)
143 throws RiceIllegalArgumentException;
144
145
146
147
148
149
150
151
152
153
154 @WebMethod(operationName = "ruleReport")
155 @WebResult(name = "rules")
156 @XmlElementWrapper(name = "rules", required = true)
157 @XmlElement(name = "rule", required = true)
158 List<Rule> ruleReport(
159 @WebParam(name = "ruleCriteria") RuleReportCriteria reportCriteria)
160 throws RiceIllegalArgumentException;
161
162
163
164
165
166
167
168
169
170
171
172
173 @WebMethod(operationName = "getRuleTemplate")
174 @WebResult(name = "ruleTemplate")
175 @Cacheable(value=RuleTemplate.Cache.NAME, key="'id=' + #p0")
176 RuleTemplate getRuleTemplate(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
177
178
179
180
181
182
183
184
185
186
187
188 @WebMethod(operationName = "getRuleTemplateByName")
189 @WebResult(name = "ruleTemplate")
190 @Cacheable(value=RuleTemplate.Cache.NAME, key="'name=' + #p0")
191 RuleTemplate getRuleTemplateByName(@WebParam(name = "name") String name) throws RiceIllegalArgumentException;
192
193
194
195
196
197
198
199
200
201
202
203
204 @WebMethod(operationName = "findRuleTemplates")
205 @WebResult(name = "findRuleTemplates")
206 RuleTemplateQueryResults findRuleTemplates(@WebParam(name = "query") QueryByCriteria queryByCriteria)
207 throws RiceIllegalArgumentException;
208
209
210
211
212
213
214
215
216
217
218
219 @WebMethod(operationName = "getRuleResponsibility")
220 @WebResult(name = "ruleResponsibility")
221 @Cacheable(value=RuleResponsibility.Cache.NAME, key="'responsibilityId=' + #p0")
222 RuleResponsibility getRuleResponsibility(@WebParam(name = "responsibilityId") String responsibilityId) throws RiceIllegalArgumentException;
223
224
225
226
227
228
229
230
231
232
233 @WebMethod(operationName = "getRuleDelegationsByResponsiblityId")
234 @XmlElementWrapper(name = "ruleDelegations", required = true)
235 @XmlElement(name = "ruleDelegation", required = false)
236 @WebResult(name = "ruleDelegations")
237 @Cacheable(value=RuleDelegation.Cache.NAME, key="'id=' + #p0")
238 List<RuleDelegation> getRuleDelegationsByResponsibiltityId(@WebParam(name="id") String id)
239 throws RiceIllegalArgumentException;
240 }