1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.api.document;
17
18 import org.joda.time.DateTime;
19 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
20 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
21 import org.kuali.rice.core.api.util.jaxb.DateTimeAdapter;
22 import org.kuali.rice.core.api.util.jaxb.MapStringStringAdapter;
23 import org.kuali.rice.kew.api.KewApiConstants;
24 import org.kuali.rice.kew.api.action.ActionRequest;
25 import org.kuali.rice.kew.api.action.ActionTaken;
26 import org.kuali.rice.kew.api.document.search.DocumentSearchCriteria;
27 import org.kuali.rice.kew.api.document.search.DocumentSearchResults;
28 import org.kuali.rice.kew.api.document.node.RouteNodeInstance;
29
30 import javax.jws.WebMethod;
31 import javax.jws.WebParam;
32 import javax.jws.WebResult;
33 import javax.jws.WebService;
34 import javax.jws.soap.SOAPBinding;
35 import javax.xml.bind.annotation.XmlElement;
36 import javax.xml.bind.annotation.XmlElementWrapper;
37 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
38 import java.math.BigDecimal;
39 import java.util.List;
40 import java.util.Map;
41
42
43
44
45
46
47 @WebService(name = "workflowDocumentService", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
48 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
49 public interface WorkflowDocumentService {
50
51
52
53
54
55
56
57
58
59
60
61
62 @WebMethod(operationName = "getDocument")
63 @WebResult(name = "document")
64 Document getDocument(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentException;
65
66
67
68
69
70
71
72
73
74
75
76
77 @WebMethod(operationName = "doesDocumentExist")
78 @WebResult(name = "document")
79 boolean doesDocumentExist(@WebParam(name = "documentId") String documentId)
80 throws RiceIllegalArgumentException;
81
82
83
84
85
86
87
88
89
90
91
92
93 @WebMethod(operationName = "getDocumentContent")
94 @WebResult(name = "documentContent")
95 DocumentContent getDocumentContent(@WebParam(name = "documentId") String documentId)
96 throws RiceIllegalArgumentException;
97
98
99
100
101
102
103
104
105
106
107 @WebMethod(operationName = "getRootActionRequests")
108 @XmlElementWrapper(name = "rootActionRequests", required = true)
109 @XmlElement(name = "rootActionRequest", required = false)
110 @WebResult(name = "rootActionRequests")
111 List<ActionRequest> getRootActionRequests(@WebParam(name = "documentId") String documentId)
112 throws RiceIllegalArgumentException;
113
114
115
116
117
118
119
120
121
122 @WebMethod(operationName = "getPendingActionRequests")
123 @XmlElementWrapper(name = "pendingActionRequests", required = true)
124 @XmlElement(name = "pendingActionRequest", required = false)
125 @WebResult(name = "pendingActionRequests")
126 List<ActionRequest> getPendingActionRequests(String documentId);
127
128
129
130
131
132
133
134
135
136
137
138
139 @WebMethod(operationName = "getActionRequestsForPrincipalAtNode")
140 @XmlElementWrapper(name = "actionRequests", required = true)
141 @XmlElement(name = "actionRequests", required = false)
142 @WebResult(name = "actionRequests")
143 List<ActionRequest> getActionRequestsForPrincipalAtNode(@WebParam(name = "documentId") String documentId,
144 @WebParam(name = "nodeName") String nodeName, @WebParam(name = "principalId") String principalId)
145 throws RiceIllegalArgumentException;
146
147
148
149
150
151
152
153
154
155
156 @WebMethod(operationName = "getActionRequests")
157 @XmlElementWrapper(name = "actionsTaken", required = true)
158 @XmlElement(name = "actionTaken", required = false)
159 @WebResult(name = "actionsTaken")
160 List<ActionTaken> getActionsTaken(@WebParam(name = "documentId") String documentId)
161 throws RiceIllegalArgumentException;
162
163
164
165
166
167
168
169
170
171
172
173
174 @WebMethod(operationName = "getAllActionRequests")
175 @XmlElementWrapper(name = "actionsTaken", required = true)
176 @XmlElement(name = "actionTaken", required = false)
177 @WebResult(name = "actionsTaken")
178 List<ActionTaken> getAllActionsTaken(@WebParam(name = "documentId") String documentId)
179 throws RiceIllegalArgumentException;
180
181
182
183
184
185
186
187
188
189
190
191
192
193 @WebMethod(operationName = "getDocumentDetailByAppId")
194 @WebResult(name = "documentDetail")
195 DocumentDetail getDocumentDetailByAppId(@WebParam(name = "documentTypeName") String documentTypeName,
196 @WebParam(name = "appId") String appId)
197 throws RiceIllegalArgumentException;
198
199
200
201
202
203
204
205
206
207
208 @WebMethod(operationName = "getDocumentDetail")
209 @WebResult(name = "documentDetail")
210 DocumentDetail getDocumentDetail(@WebParam(name = "documentId") String documentId);
211
212
213
214
215
216
217
218
219
220
221
222 @WebMethod(operationName = "getRouteNodeInstance")
223 @WebResult(name = "routeNodeInstance")
224 RouteNodeInstance getRouteNodeInstance(@WebParam(name = "routeNodeInstanceId") String routeNodeInstanceId)
225 throws RiceIllegalArgumentException;
226
227
228
229
230
231
232
233
234
235
236 @WebMethod(operationName = "getApplicationDocumentId")
237 @WebResult(name = "applicationDocumentId")
238 String getApplicationDocumentId(@WebParam(name = "documentId") String documentId)
239 throws RiceIllegalArgumentException;
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254 @WebMethod(operationName = "documentSearch")
255 @WebResult(name = "documentSearchResults")
256 DocumentSearchResults documentSearch(
257 @WebParam(name = "principalId") String principalId,
258 @WebParam(name = "criteria") DocumentSearchCriteria criteria)
259 throws RiceIllegalArgumentException;
260
261
262
263
264
265
266
267
268
269
270 @WebMethod(operationName = "getRouteNodeInstances")
271 @XmlElementWrapper(name = "routeNodeInstances", required = true)
272 @XmlElement(name = "routeNodeInstance", required = false)
273 @WebResult(name = "routeNodeInstances")
274 List<RouteNodeInstance> getRouteNodeInstances(@WebParam(name = "documentId") String documentId)
275 throws RiceIllegalArgumentException;
276
277
278
279
280
281
282
283
284
285
286 @WebMethod(operationName = "getActiveRouteNodeInstances")
287 @XmlElementWrapper(name = "routeNodeInstances", required = true)
288 @XmlElement(name = "routeNodeInstance", required = false)
289 @WebResult(name = "routeNodeInstances")
290 List<RouteNodeInstance> getActiveRouteNodeInstances(@WebParam(name = "documentId") String documentId)
291 throws RiceIllegalArgumentException;
292
293
294
295
296
297
298
299
300
301
302 @WebMethod(operationName = "getTerminalRouteNodeInstances")
303 @XmlElementWrapper(name = "routeNodeInstances", required = true)
304 @XmlElement(name = "routeNodeInstance", required = false)
305 @WebResult(name = "routeNodeInstances")
306 List<RouteNodeInstance> getTerminalRouteNodeInstances(@WebParam(name = "documentId") String documentId)
307 throws RiceIllegalArgumentException;
308
309
310
311
312
313
314
315
316
317
318 @WebMethod(operationName = "getCurrentRouteNodeInstances")
319 @XmlElementWrapper(name = "routeNodeInstances", required = true)
320 @XmlElement(name = "routeNodeInstance", required = false)
321 @WebResult(name = "routeNodeInstances")
322 List<RouteNodeInstance> getCurrentRouteNodeInstances(@WebParam(name = "documentId") String documentId)
323 throws RiceIllegalArgumentException;
324
325
326
327
328
329
330
331
332
333
334
335 @WebMethod(operationName = "getPreviousRouteNodeNames")
336 @XmlElementWrapper(name = "previousRouteNodeNames", required = true)
337 @XmlElement(name = "previousRouteNodeName", required = false)
338 @WebResult(name = "previousRouteNodeNames")
339 List<String> getPreviousRouteNodeNames(@WebParam(name = "documentId") String documentId)
340 throws RiceIllegalArgumentException;
341
342
343
344
345
346
347
348
349
350
351
352 @WebMethod(operationName = "getDocumentStatus")
353 @WebResult(name = "documentStatus")
354 DocumentStatus getDocumentStatus(@WebParam(name = "documentId") String documentId)
355 throws RiceIllegalArgumentException;
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371 @WebMethod(operationName = "getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId")
372 @XmlElementWrapper(name = "principalIds", required = true)
373 @XmlElement(name = "principalId", required = false)
374 @WebResult(name = "principalIds")
375 List<String> getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId(
376 @WebParam(name = "actionRequestedCd") String actionRequestedCd,
377 @WebParam(name = "documentId") String documentId)
378 throws RiceIllegalArgumentException;
379
380
381
382
383
384
385
386
387
388
389
390 @WebMethod(operationName = "getDocumentInitiatorPrincipalId")
391 @WebResult(name = "principalId")
392 String getDocumentInitiatorPrincipalId(@WebParam(name = "documentId") String documentId)
393 throws RiceIllegalArgumentException;
394
395
396
397
398
399
400
401
402
403
404
405 @WebMethod(operationName = "getRoutedByPrincipalIdByDocumentId")
406 @WebResult(name = "principalId")
407 String getRoutedByPrincipalIdByDocumentId(@WebParam(name = "documentId") String documentId)
408 throws RiceIllegalArgumentException;
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423 @WebMethod(operationName = "getSearchableAttributeStringValuesByKey")
424 @XmlElementWrapper(name = "searchableAttributeStringValues", required = true)
425 @XmlElement(name = "searchableAttributeStringValue", required = false)
426 @WebResult(name = "searchableAttributeStringValues")
427 List<String> getSearchableAttributeStringValuesByKey(@WebParam(name = "documentId") String documentId,
428 @WebParam(name = "key") String key)
429 throws RiceIllegalArgumentException;
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444 @WebMethod(operationName = "getSearchableAttributeDateTimeValuesByKey")
445 @XmlElementWrapper(name = "searchableAttributeDateTimeValues", required = true)
446 @XmlElement(name = "searchableAttributeDateTimeValue", required = false)
447 @WebResult(name = "searchableAttributeDateTimeValues")
448 @XmlJavaTypeAdapter(value = DateTimeAdapter.class)
449 List<DateTime> getSearchableAttributeDateTimeValuesByKey(@WebParam(name = "documentId") String documentId,
450 @WebParam(name = "key") String key)
451 throws RiceIllegalArgumentException;
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466 @WebMethod(operationName = "getSearchableAttributeFloatValuesByKey")
467 @XmlElementWrapper(name = "searchableAttributeBigDecimalValues", required = true)
468 @XmlElement(name = "searchableAttributeBigDecimalValue", required = false)
469 @WebResult(name = "searchableAttributeBigDecimalValues")
470 List<BigDecimal> getSearchableAttributeFloatValuesByKey(@WebParam(name = "documentId") String documentId,
471 @WebParam(name = "key") String key)
472 throws RiceIllegalArgumentException;
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487 @WebMethod(operationName = "getSearchableAttributeLongValuesByKey")
488 @XmlElementWrapper(name = "searchableAttributeLongValues", required = true)
489 @XmlElement(name = "searchableAttributeLongValue", required = false)
490 @WebResult(name = "searchableAttributeLongValues")
491 List<Long> getSearchableAttributeLongValuesByKey(@WebParam(name = "documentId") String documentId,
492 @WebParam(name = "key") String key)
493 throws RiceIllegalArgumentException;
494
495
496
497
498
499
500
501
502
503
504
505 @WebMethod(operationName = "getDocumentStatusTransitionHistory")
506 @XmlElementWrapper(name = "documentStatusTransitions", required = true)
507 @XmlElement(name = "documentStatusTransition", required = false)
508 @WebResult(name = "documentStatusTransitions")
509 List<DocumentStatusTransition> getDocumentStatusTransitionHistory(@WebParam(name = "documentId") String documentId)
510 throws RiceIllegalArgumentException;
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525 @WebMethod(operationName = "addDocumentLink")
526 @WebResult(name = "documentLink")
527 DocumentLink addDocumentLink(@WebParam(name = "documentLink") DocumentLink documentLink) throws RiceIllegalArgumentException;
528
529
530
531
532
533
534
535
536
537
538
539 @WebMethod(operationName = "deleteDocumentLink")
540 @WebResult(name = "documentLink")
541 DocumentLink deleteDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException;
542
543
544
545
546
547
548
549
550
551
552
553 @WebMethod(operationName = "deleteDocumentLinksByDocumentId")
554 @XmlElementWrapper(name = "documentLinks", required = true)
555 @XmlElement(name = "documentLink", required = false)
556 @WebResult(name = "documentLinks")
557 List<DocumentLink> deleteDocumentLinksByDocumentId(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException;
558
559
560
561
562
563
564
565
566
567
568 @WebMethod(operationName = "getOutgoingDocumentLinks")
569 @XmlElementWrapper(name = "documentLinks", required = true)
570 @XmlElement(name = "documentLink", required = false)
571 @WebResult(name = "documentLinks")
572 List<DocumentLink> getOutgoingDocumentLinks(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException;
573
574
575
576
577
578
579
580
581
582
583 @WebMethod(operationName = "getIncomingDocumentLinks")
584 @XmlElementWrapper(name = "documentLinks", required = true)
585 @XmlElement(name = "documentLink", required = false)
586 @WebResult(name = "documentLinks")
587 List<DocumentLink> getIncomingDocumentLinks(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException;
588
589
590
591
592
593
594
595
596
597
598 @WebMethod(operationName = "getDocumentLink")
599 @WebResult(name = "documentLinks")
600 DocumentLink getDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException;
601
602 }