1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.api.repository.term;
17
18 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
19 import org.kuali.rice.krms.api.KrmsConstants;
20 import org.springframework.cache.annotation.Cacheable;
21
22 import javax.jws.WebMethod;
23 import javax.jws.WebParam;
24 import javax.jws.WebResult;
25 import javax.jws.WebService;
26 import javax.jws.soap.SOAPBinding;
27 import javax.xml.bind.annotation.XmlElement;
28 import javax.xml.bind.annotation.XmlElementWrapper;
29 import java.util.List;
30 import org.springframework.cache.annotation.CacheEvict;
31
32
33
34
35
36
37
38
39 @WebService(name = "termRepositoryService", targetNamespace = KrmsConstants.Namespaces.KRMS_NAMESPACE_2_0)
40 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
41 public interface TermRepositoryService {
42
43
44
45
46
47
48
49
50
51
52
53 @WebMethod(operationName = "findTermResolversByNamespace")
54 @XmlElementWrapper(name = "termResolvers", required = true)
55 @XmlElement(name = "termResolver", required = false)
56 @WebResult(name = "termResolvers")
57 @Cacheable(value = TermResolverDefinition.Cache.NAME, key = "'namespace=' + #p0")
58 List<TermResolverDefinition> findTermResolversByNamespace(@WebParam(name = "namespace") String namespace) throws RiceIllegalArgumentException;
59
60
61
62
63
64
65
66
67
68
69
70 @WebMethod(operationName = "getTerm")
71 @WebResult(name = "term")
72 @Cacheable(value= TermDefinition.Cache.NAME, key="'id=' + #p0")
73 TermDefinition getTerm(@WebParam(name = "termId") String termId) throws RiceIllegalArgumentException;;
74
75
76
77
78
79
80
81
82
83
84
85 @WebMethod(operationName = "getTermSpecificationById")
86 @WebResult(name = "termSpecification")
87 @Cacheable(value = TermSpecificationDefinition.Cache.NAME, key = "'id=' + #p0")
88 TermSpecificationDefinition getTermSpecificationById(@WebParam(name = "id") String id)
89 throws RiceIllegalArgumentException;
90
91
92
93
94
95
96
97
98
99
100
101
102 @WebMethod(operationName = "createTermSpecification")
103 @WebResult(name = "termSpecification")
104 @CacheEvict(value = {TermSpecificationDefinition.Cache.NAME, TermDefinition.Cache.NAME}, allEntries = true)
105 TermSpecificationDefinition createTermSpecification(@WebParam(name = "termSpec") TermSpecificationDefinition termSpec)
106 throws RiceIllegalArgumentException;
107
108
109
110
111
112
113
114
115
116
117 @WebMethod(operationName = "updateTermSpecification")
118 @CacheEvict(value = {TermSpecificationDefinition.Cache.NAME, TermDefinition.Cache.NAME}, allEntries = true)
119 void updateTermSpecification(@WebParam(name = "termSpec") TermSpecificationDefinition termSpec)
120 throws RiceIllegalArgumentException;
121
122
123
124
125
126
127
128
129
130
131 @WebMethod(operationName = "deleteTermSpecification")
132 @CacheEvict(value = {TermSpecificationDefinition.Cache.NAME, TermDefinition.Cache.NAME}, allEntries = true)
133 void deleteTermSpecification(@WebParam(name = "id") String id)
134 throws RiceIllegalArgumentException;
135
136
137
138
139
140
141
142
143
144
145
146
147
148 @WebMethod(operationName = "createTerm")
149 @WebResult(name = "term")
150 @CacheEvict(value = {TermDefinition.Cache.NAME}, allEntries = true)
151 TermDefinition createTerm(@WebParam(name = "termDef") TermDefinition termDef)
152 throws RiceIllegalArgumentException;
153
154
155
156
157
158
159
160
161
162
163 @WebMethod(operationName = "updateTerm")
164 @WebResult(name = "term")
165 @CacheEvict(value = {TermDefinition.Cache.NAME}, allEntries = true)
166 void updateTerm(@WebParam(name = "termDef") TermDefinition termDef)
167 throws RiceIllegalArgumentException;
168
169
170
171
172
173
174
175
176
177
178
179 @WebMethod(operationName = "deleteTerm")
180 @WebResult(name = "term")
181 @CacheEvict(value = {TermDefinition.Cache.NAME}, allEntries = true)
182 void deleteTerm(@WebParam(name = "id") String id)
183 throws RiceIllegalArgumentException;
184
185
186
187
188
189
190
191
192
193
194
195
196
197 @WebMethod(operationName = "getTermResolverById")
198 @WebResult(name = "termResolver")
199 @Cacheable(value = TermResolverDefinition.Cache.NAME, key = "'id=' + #p0")
200 TermResolverDefinition getTermResolverById(@WebParam(name = "id") String id)
201 throws RiceIllegalArgumentException;
202
203
204
205
206
207
208
209
210
211
212
213 @WebMethod(operationName = "findTermResolversByOutputId")
214 @XmlElementWrapper(name = "termResolvers", required = true)
215 @XmlElement(name = "termResolver", required = false)
216 @WebResult(name = "termResolvers")
217 @Cacheable(value = TermResolverDefinition.Cache.NAME, key = "'id=' + #p0 + '|' + 'namespace=' + #p1")
218 List<TermResolverDefinition> findTermResolversByOutputId(@WebParam(name = "id") String id,
219 @WebParam(name = "namespace") String namespace)
220 throws RiceIllegalArgumentException;
221
222
223
224
225
226
227
228
229
230
231
232
233 @WebMethod(operationName = "createTermResolver")
234 @WebResult(name = "termResolver")
235 @CacheEvict(value = {TermResolverDefinition.Cache.NAME, TermDefinition.Cache.NAME}, allEntries = true)
236 TermResolverDefinition createTermResolver(@WebParam(name = "termResolver") TermResolverDefinition termResolver)
237 throws RiceIllegalArgumentException;
238
239
240
241
242
243
244
245
246
247
248
249
250
251 @WebMethod(operationName = "updateTermResolver")
252 @CacheEvict(value = {TermResolverDefinition.Cache.NAME, TermDefinition.Cache.NAME}, allEntries = true)
253 void updateTermResolver(@WebParam(name = "termResolver") TermResolverDefinition termResolver)
254 throws RiceIllegalArgumentException;
255
256
257
258
259
260
261
262
263
264
265
266 @WebMethod(operationName = "deleteTermResolver")
267 @CacheEvict(value = {TermResolverDefinition.Cache.NAME, TermDefinition.Cache.NAME}, allEntries = true)
268 void deleteTermResolver(@WebParam(name = "id") String id)
269 throws RiceIllegalArgumentException;
270
271
272
273
274
275
276
277
278
279
280
281 @WebMethod(operationName = "getTermResolverByNameAndNamespace")
282 @WebResult(name = "termResolver")
283
284
285 TermResolverDefinition getTermResolverByNameAndNamespace(@WebParam(name = "name") String name,
286 @WebParam(name = "namespace") String namespace) throws RiceIllegalArgumentException;
287
288
289
290
291
292
293
294
295
296
297
298 @WebMethod(operationName = "getTermSpecificationByNameAndNamespace")
299 @WebResult(name = "termSpecification")
300
301
302 TermSpecificationDefinition getTermSpecificationByNameAndNamespace(@WebParam(name = "name") String name,
303 @WebParam(name = "namespace") String namespace) throws RiceIllegalArgumentException;
304
305
306
307
308
309
310
311
312
313
314
315 @WebMethod(operationName = "findAllTermSpecificationsByContextId")
316 @XmlElementWrapper(name = "termSpecifications", required = true)
317 @XmlElement(name = "termSpecification", required = false)
318 @WebResult(name = "termSpecifications")
319 @Cacheable(value= TermSpecificationDefinition.Cache.NAME, key="'id=' + #p0")
320 List<TermSpecificationDefinition> findAllTermSpecificationsByContextId(@WebParam(name = "contextId") String contextId) throws RiceIllegalArgumentException;;
321
322 }