1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.api.repository;
17
18 import org.kuali.rice.core.api.criteria.QueryByCriteria;
19 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
20 import org.kuali.rice.krms.api.KrmsConstants;
21 import org.kuali.rice.krms.api.repository.agenda.AgendaDefinition;
22 import org.kuali.rice.krms.api.repository.agenda.AgendaItemDefinition;
23 import org.kuali.rice.krms.api.repository.language.NaturalLanguageUsage;
24 import org.kuali.rice.krms.api.repository.proposition.PropositionDefinition;
25 import org.kuali.rice.krms.api.repository.reference.ReferenceObjectBinding;
26 import org.kuali.rice.krms.api.repository.rule.RuleDefinition;
27 import org.springframework.cache.annotation.Cacheable;
28
29 import javax.jws.WebMethod;
30 import javax.jws.WebParam;
31 import javax.jws.WebResult;
32 import javax.jws.WebService;
33 import javax.jws.soap.SOAPBinding;
34 import javax.xml.bind.annotation.XmlElement;
35 import javax.xml.bind.annotation.XmlElementWrapper;
36 import java.util.List;
37 import java.util.Set;
38
39
40
41
42
43
44
45 @WebService(name = "ruleManagementService", targetNamespace = KrmsConstants.Namespaces.KRMS_NAMESPACE_2_0)
46 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL,
47 parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
48 public interface RuleManagementService extends RuleRepositoryService {
49
50
51
52
53
54
55
56
57
58 @WebMethod(operationName = "createReferenceObjectBinding")
59 @WebResult(name = "referenceObjectBinding")
60 public ReferenceObjectBinding createReferenceObjectBinding(@WebParam(
61 name = "referenceObjectDefinition") ReferenceObjectBinding referenceObjectDefinition) throws RiceIllegalArgumentException;
62
63
64
65
66
67
68
69
70
71 @WebMethod(operationName = "getReferenceObjectBinding")
72 @WebResult(name = "referenceObjectBinding")
73 public ReferenceObjectBinding getReferenceObjectBinding(@WebParam(
74 name = "id") String id) throws RiceIllegalArgumentException;
75
76
77
78
79
80
81
82
83
84 @WebMethod(operationName = "getReferenceObjectBindings")
85 @XmlElementWrapper(name = "referenceObjectBindings", required = true)
86 @XmlElement(name = "referenceObjectBinding", required = false)
87 @WebResult(name = "referenceObjectBindings")
88 List<ReferenceObjectBinding> getReferenceObjectBindings(@WebParam(
89 name = "ids") List<String> ids) throws RiceIllegalArgumentException;
90
91
92
93
94
95
96
97
98
99
100
101 @WebMethod(operationName = "findReferenceObjectBindingsByReferenceDiscriminatorType")
102 @XmlElementWrapper(name = "referenceObjectBindings", required = true)
103 @XmlElement(name = "referenceObjectBinding", required = false)
104 @WebResult(name = "referenceObjectBindings")
105 public List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceDiscriminatorType(
106 @WebParam(name = "referenceObjectReferenceDiscriminatorType") String referenceObjectReferenceDiscriminatorType) throws RiceIllegalArgumentException;
107
108
109
110
111
112
113
114
115
116
117
118 @WebMethod(operationName = "findReferenceObjectBindingsByKrmsDiscriminatorType")
119 @XmlElementWrapper(name = "referenceObjectBindings", required = true)
120 @XmlElement(name = "referenceObjectBinding", required = false)
121 @WebResult(name = "referenceObjectBindings")
122 public List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsDiscriminatorType(
123 @WebParam(name = "referenceObjectKrmsDiscriminatorType") String referenceObjectKrmsDiscriminatorType) throws RiceIllegalArgumentException;
124
125
126
127
128
129
130
131
132
133
134
135 @WebMethod(operationName = "findReferenceObjectBindingsByKrmsObjectId")
136 @XmlElementWrapper(name = "referenceObjectBindings", required = true)
137 @XmlElement(name = "referenceObjectBinding", required = false)
138 @WebResult(name = "referenceObjectBindings")
139 public List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsObject(
140 @WebParam(name = "krmsObjectId") String krmsObjectId) throws RiceIllegalArgumentException;
141
142
143
144
145
146
147
148
149
150 @WebMethod(operationName = "updateReferenceObjectBinding")
151 public void updateReferenceObjectBinding(ReferenceObjectBinding referenceObjectBindingDefinition) throws RiceIllegalArgumentException;
152
153
154
155
156
157
158
159 @WebMethod(operationName = "deleteReferenceObjectBinding")
160 public void deleteReferenceObjectBinding(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175 @WebMethod(operationName = "findReferenceObjectBindingIds")
176 @XmlElementWrapper(name = "referenceObjectBindingIds", required = true)
177 @XmlElement(name = "referenceObjectBindingId", required = false)
178 @WebResult(name = "referenceObjectBindingIds")
179 List<String> findReferenceObjectBindingIds(@WebParam(name = "query") QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException;
180
181
182
183
184
185
186
187
188
189 @WebMethod(operationName = "createAgenda")
190 @WebResult(name = "agenda")
191 public AgendaDefinition createAgenda(@WebParam(name = "AgendaDefinition") AgendaDefinition agendaDefinition) throws RiceIllegalArgumentException;
192
193
194
195
196
197
198
199
200 @WebMethod(operationName = "getAgenda")
201 @WebResult(name = "agenda")
202 public AgendaDefinition getAgenda(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
203
204
205
206
207
208
209
210
211
212 @WebMethod(operationName = "getAgendasByType")
213 @XmlElementWrapper(name = "agendas", required = true)
214 @XmlElement(name = "agenda", required = false)
215 @WebResult(name = "agendas")
216 public List<AgendaDefinition> getAgendasByType(@WebParam(name = "typeId") String typeId) throws RiceIllegalArgumentException;
217
218
219
220
221
222
223
224
225
226 @WebMethod(operationName = "getAgendasByContext")
227 @XmlElementWrapper(name = "agendas", required = true)
228 @XmlElement(name = "agenda", required = false)
229 @WebResult(name = "agendas")
230 public List<AgendaDefinition> getAgendasByContext(@WebParam(name = "contextId") String contextId) throws RiceIllegalArgumentException;
231
232
233
234
235
236
237
238
239
240
241 @WebMethod(operationName = "getAgendasByTypeAndContext")
242 @XmlElementWrapper(name = "agendas", required = true)
243 @XmlElement(name = "agenda", required = false)
244 @WebResult(name = "agendas")
245 public List<AgendaDefinition> getAgendasByTypeAndContext(@WebParam(name = "typeId") String typeId,
246 @WebParam(name = "contextId") String contextId) throws RiceIllegalArgumentException;
247
248
249
250
251
252
253
254
255 @WebMethod(operationName = "updateAgenda")
256 public void updateAgenda(@WebParam(name = "agendaDefinition") AgendaDefinition agendaDefinition) throws RiceIllegalArgumentException;
257
258
259
260
261
262
263
264 @WebMethod(operationName = "deleteAgenda")
265 public void deleteAgenda(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
266
267
268
269
270
271
272
273
274
275 @WebMethod(operationName = "createAgendaItem")
276 @WebResult(name = "agendaItem")
277 public AgendaItemDefinition createAgendaItem(@WebParam(name = "AgendaItemDefinition") AgendaItemDefinition agendaItemDefinition) throws RiceIllegalArgumentException;
278
279
280
281
282
283
284
285
286 @WebMethod(operationName = "getAgendaItem")
287 @WebResult(name = "agendaItem")
288 public AgendaItemDefinition getAgendaItem(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
289
290
291
292
293
294
295
296
297
298 @WebMethod(operationName = "getAgendaItemsByType")
299 @XmlElementWrapper(name = "agendaItems", required = true)
300 @XmlElement(name = "agendaItem", required = false)
301 @WebResult(name = "agendaItems")
302 public List<AgendaItemDefinition> getAgendaItemsByType(@WebParam(name = "typeId") String typeId) throws RiceIllegalArgumentException;
303
304
305
306
307
308
309
310
311
312 @WebMethod(operationName = "getAgendaItemsByContext")
313 @XmlElementWrapper(name = "agendaItems", required = true)
314 @XmlElement(name = "agendaItem", required = false)
315 @WebResult(name = "agendaItems")
316 public List<AgendaItemDefinition> getAgendaItemsByContext(@WebParam(name = "contextId") String contextId) throws RiceIllegalArgumentException;
317
318
319
320
321
322
323
324
325
326
327 @WebMethod(operationName = "getAgendaItemsByTypeAndContext")
328 @XmlElementWrapper(name = "agendaItems", required = true)
329 @XmlElement(name = "agendaItem", required = false)
330 @WebResult(name = "agendaItems")
331 public List<AgendaItemDefinition> getAgendaItemsByTypeAndContext(@WebParam(name = "typeId") String typeId,
332 @WebParam(name = "contextId") String contextId) throws RiceIllegalArgumentException;
333
334
335
336
337
338
339
340
341 @WebMethod(operationName = "updateAgendaItem")
342 public void updateAgendaItem(@WebParam(name = "agendaItemDefinition") AgendaItemDefinition agendaItemDefinition) throws RiceIllegalArgumentException;
343
344
345
346
347
348
349
350 @WebMethod(operationName = "deleteAgendaItem")
351 public void deleteAgendaItem(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
352
353
354
355
356
357
358
359
360
361
362 @WebMethod(operationName = "createRule")
363 @WebResult(name = "rule")
364 public RuleDefinition createRule(@WebParam(name = "ruleDefinition") RuleDefinition ruleDefinition) throws RiceIllegalArgumentException;
365
366
367
368
369
370
371
372
373
374
375
376
377 @WebMethod(operationName = "getRule")
378 @WebResult(name = "rule")
379 @Cacheable(value = RuleDefinition.Cache.NAME, key = "'ruleId=' + #p0")
380 public RuleDefinition getRule(@WebParam(name = "ruleId") String ruleId);
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401 @WebMethod(operationName = "getRules")
402 @XmlElementWrapper(name = "rules", required = true)
403 @XmlElement(name = "rule", required = false)
404 @WebResult(name = "rules")
405 public List<RuleDefinition> getRules(@WebParam(name = "ruleIds") List<String> ruleIds);
406
407
408
409
410
411
412
413
414 @WebMethod(operationName = "updateRule")
415 public void updateRule(@WebParam(name = "ruleDefinition") RuleDefinition ruleDefinition) throws RiceIllegalArgumentException;
416
417
418
419
420
421
422
423 @WebMethod(operationName = "deleteRule")
424 public void deleteRule(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
425
426
427
428
429
430
431
432
433
434 @WebMethod(operationName = "createProposition")
435 @WebResult(name = "proposition")
436 public PropositionDefinition createProposition(@WebParam(name = "propositionDefinition") PropositionDefinition propositionDefinition) throws RiceIllegalArgumentException;
437
438
439
440
441
442
443
444
445 @WebMethod(operationName = "getProposition")
446 @WebResult(name = "proposition")
447 public PropositionDefinition getProposition(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
448
449
450
451
452
453
454
455
456
457 @WebMethod(operationName = "getPropositionsByType")
458 @XmlElementWrapper(name = "propositions", required = true)
459 @XmlElement(name = "proposition", required = false)
460 @WebResult(name = "propositions")
461 public Set<PropositionDefinition> getPropositionsByType(@WebParam(name = "typeId") String typeId) throws RiceIllegalArgumentException;
462
463
464
465
466
467
468
469
470
471 @WebMethod(operationName = "getPropositionsByRule")
472 @XmlElementWrapper(name = "propositions", required = true)
473 @XmlElement(name = "proposition", required = false)
474 @WebResult(name = "propositions")
475 public Set<PropositionDefinition> getPropositionsByRule(@WebParam(name = "ruleId") String ruleId) throws RiceIllegalArgumentException;
476
477
478
479
480
481
482
483
484 @WebMethod(operationName = "updateProposition")
485 public void updateProposition(
486 @WebParam(name = "propositionDefinition") PropositionDefinition propositionDefinition) throws RiceIllegalArgumentException;
487
488
489
490
491
492
493
494 @WebMethod(operationName = "deleteProposition")
495 public void deleteProposition(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
496
497
498
499
500
501
502
503
504
505 @WebMethod(operationName = "createNaturalLanguageUsage")
506 @WebResult(name = "naturalLanguageUsage")
507 public NaturalLanguageUsage createNaturalLanguageUsage(@WebParam(name = "naturalLanguageUsage") NaturalLanguageUsage naturalLanguageUsage) throws RiceIllegalArgumentException;
508
509
510
511
512
513
514
515
516 @WebMethod(operationName = "getNaturalLanguageUsage")
517 @WebResult(name = "naturalLanguageUsage")
518 public NaturalLanguageUsage getNaturalLanguageUsage(@WebParam(name = "id") String id) throws RiceIllegalArgumentException;
519
520
521
522
523
524
525
526
527 @WebMethod(operationName = "updateNaturalLanguageUsage")
528 public void updateNaturalLanguageUsage(@WebParam(name = "naturalLanguageUsage") NaturalLanguageUsage naturalLanguageUsage) throws RiceIllegalArgumentException;
529
530
531
532
533
534
535
536 @WebMethod(operationName = "deleteNaturalLanguageUsageType")
537 public void deleteNaturalLanguageUsageType(@WebParam(name = "naturalLanguageUsageId") String naturalLanguageUsageId) throws RiceIllegalArgumentException;
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554 @WebMethod(operationName = "getNaturalLanguageForType")
555 @WebResult(name = "naturalLanguage")
556 public String getNaturalLanguageForType(@WebParam(name = "naturalLanguageUsageId") String naturalLanguageUsageId, @WebParam(name = "typeId") String typeId, @WebParam(name = "krmsObjectId") String krmsObjectId,
557 @WebParam(name = "languageCode") String languageCode) throws RiceIllegalArgumentException;
558
559
560
561
562
563
564 @WebMethod(operationName = "getNaturalLanguageUsages")
565 @XmlElementWrapper(name = "naturalLanguageUsages", required = true)
566 @XmlElement(name = "naturalLanguageUsage", required = false)
567 @WebResult(name = "naturalLanguageUsages")
568 public Set<NaturalLanguageUsage> getNaturalLanguageUsages();
569 }