View Javadoc

1   /**
2    * Copyright 2005-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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   * TODO ... annotate for JAX-WS! 
44   * 
45   * @author Kuali Rice Team (rice.collab@kuali.org)
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       * Gets a {@link Document} from a documentId.
53       *
54       * <p>
55       *   This method will return null if the Document does not exist.
56       * </p>
57       *
58       * @param documentId the unique id of the document to return
59       * @return the document with the passed in id value
60       * @throws RiceIllegalArgumentException if {@code documentId} is null
61       */
62      @WebMethod(operationName = "getDocument")
63      @WebResult(name = "document")
64  	Document getDocument(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentException;
65  
66      /**
67       * Returns a boolean depending on if a {@link Document} exists with the specified documentId
68       *
69       * <p>
70       *   This method will return false if the responsibility does not exist.
71       * </p>
72       *
73       * @param documentId the unique id of the document to check for existence
74       * @return boolean value representative of whether the document exists
75       * @throws RiceIllegalArgumentException if {@code documentId} is null
76       */
77      @WebMethod(operationName = "doesDocumentExist")
78      @WebResult(name = "document")
79  	boolean doesDocumentExist(@WebParam(name = "documentId") String documentId)
80              throws RiceIllegalArgumentException;
81  
82      /**
83       * Gets {@link DocumentContent} from a documentId.
84       *
85       * <p>
86       *   This method will return null if the document does not exist.
87       * </p>
88       *
89       * @param documentId the unique id of the document content to return
90       * @return the documentContent with the passed in id value
91       * @throws RiceIllegalArgumentException if {@code documentId} is null
92       */
93      @WebMethod(operationName = "getDocumentContent")
94      @WebResult(name = "documentContent")
95  	DocumentContent getDocumentContent(@WebParam(name = "documentId") String documentId)
96              throws RiceIllegalArgumentException;
97  
98      /**
99       * Gets a list of root ActionRequests for a given documentId
100      *
101      * @param documentId the unique id of a document
102      *
103      * @return the list of root ActionRequests for a given documentId
104      *
105      * @throws RiceIllegalArgumentException if {@code documentId} is null
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      * Gets a list of ActionRequests which are pending for a given documentId
116      * 
117      * @since 2.1
118      * @param documentId the unique id of a document
119      * @return the list of pending ActionRequests for a given documentId
120      * @throws RiceIllegalArgumentException if {@code documentId} is null
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      * Gets a list of ActionRequests for a given documentId, nodeName and principalId
130      *
131      * @param documentId the unique id of a document
132      * @param nodeName the name of a RouteNode
133      * @param principalId the unique id of a principal
134      *
135      * @return the list of ActionRequests for a given documentId, nodeName, and principalId
136      *
137      * @throws RiceIllegalArgumentException if {@code documentId} is null
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      * Gets a list of past {@link ActionTaken} of a {@link Document} with the given documentId
149      *
150      * @param documentId the unique id of a document
151      *
152      * @return the list of past ActionTakens for a given documentId
153      *
154      * @throws RiceIllegalArgumentException if {@code documentId} is null
155      */
156     @WebMethod(operationName = "getActionsTaken")
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      * @deprecated mistaken operation name...use getActionsTaken instead
165      *
166      * @param documentId the unique id of a document
167      *
168      * @return the list of past ActionTakens for a given documentId
169      *
170      * @throws RiceIllegalArgumentException if {@code documentId} is null
171      */
172     @WebMethod(operationName = "getActionRequests")
173     @XmlElementWrapper(name = "actionsTaken", required = true)
174     @XmlElement(name = "actionTaken", required = false)
175     @WebResult(name = "actionsTaken")
176     @Deprecated
177     List<ActionTaken> _getActionsTaken(@WebParam(name = "documentId") String documentId)
178             throws RiceIllegalArgumentException;
179 
180 
181     /**
182     * Gets a list of all {@link ActionTaken} of a {@link Document} with the given documentId
183     *
184     * @since 2.0.2
185     *
186     * @param documentId the unique id of a document
187     *
188     * @return the list of ActionTakens (both current and not) for a given documentId
189     *
190     * @throws RiceIllegalArgumentException if {@code documentId} is null
191     */
192       @WebMethod(operationName = "getAllActionRequests")
193       @XmlElementWrapper(name = "actionsTaken", required = true)
194       @XmlElement(name = "actionTaken", required = false)
195       @WebResult(name = "actionsTaken")
196       List<ActionTaken> getAllActionsTaken(@WebParam(name = "documentId") String documentId)
197               throws RiceIllegalArgumentException;
198 
199 
200     /**
201      * Gets a {@link DocumentDetail} of a {@link Document} with the given documentTypeName and appId
202      *
203      * @param documentTypeName the name of the DocumentType
204      * @param appId the unique id of the application
205      *
206      * @return a {@link DocumentDetail} for with the given documentTypeName and appId
207      *
208      * @throws RiceIllegalArgumentException if {@code documentTypeName} is null
209      * @throws RiceIllegalArgumentException if {@code appId} is null
210      */
211     @WebMethod(operationName = "getDocumentDetailByAppId")
212     @WebResult(name = "documentDetail")
213     DocumentDetail getDocumentDetailByAppId(@WebParam(name = "documentTypeName") String documentTypeName,
214                                             @WebParam(name = "appId") String appId)
215             throws RiceIllegalArgumentException;
216 
217     /**
218      * Gets a {@link DocumentDetail} of a {@link Document} with the given documentId
219      *
220      * @param documentId the unique id of the Document
221      *
222      * @return a {@link DocumentDetail} for with the given documentId
223      *
224      * @throws RiceIllegalArgumentException if {@code documentId} is null
225      */
226     @WebMethod(operationName = "getDocumentDetail")
227     @WebResult(name = "documentDetail")
228 	DocumentDetail getDocumentDetail(@WebParam(name = "documentId") String documentId);
229 
230 
231     /**
232      * Gets a {@link RouteNodeInstance} with the given nodeInstanceId
233      *
234      * @param routeNodeInstanceId the unique id of the {@link RouteNodeInstance}
235      *
236      * @return a {@link DocumentDetail} for with the given documentId
237      *
238      * @throws RiceIllegalArgumentException if {@code nodeInstanceId} is null
239      */
240     @WebMethod(operationName = "getRouteNodeInstance")
241     @WebResult(name = "routeNodeInstance")
242 	RouteNodeInstance getRouteNodeInstance(@WebParam(name = "routeNodeInstanceId") String routeNodeInstanceId)
243             throws RiceIllegalArgumentException;
244 
245     /**
246      * Gets a value application document id of a {@link Document} with the given documentId
247      *
248      * @param documentId the unique id of the Document
249      *
250      * @return the value of the applicationDocumentId for the {@link Document} with the given documentId
251      *
252      * @throws RiceIllegalArgumentException if {@code documentId} is null
253      */
254     @WebMethod(operationName = "getApplicationDocumentId")
255     @WebResult(name = "applicationDocumentId")
256 	String getApplicationDocumentId(@WebParam(name = "documentId") String documentId)
257             throws RiceIllegalArgumentException;
258 
259     /**
260      * Executes a search for workflow documents using the given criteria and as the principal with the given id.  Since
261      * documents can define security which permits access to view certain search results, the given principal id will
262      * be used when evaluating which documents should be filtered from the results because of lack of access.
263      *
264      * @param principalId the id of the principal to execute the search as, if this value is non-null then security
265      * filtering will be executed against the results, if it is null then no filtering will be performed
266      * @param criteria the criteria to use when executing the search
267      *
268      * @return the results of the search, this will never be null but may contain an empty list of results
269      *
270      * @throws RiceIllegalArgumentException if the given criteria is null
271      */
272     @WebMethod(operationName = "documentSearch")
273     @WebResult(name = "documentSearchResults")
274     DocumentSearchResults documentSearch(
275             @WebParam(name = "principalId") String principalId,
276             @WebParam(name = "criteria") DocumentSearchCriteria criteria)
277         throws RiceIllegalArgumentException;
278 
279     /**
280      * Gets a list of all {@link RouteNodeInstance} for a {@link Document} with the given documentId
281      *
282      * @param documentId the unique id of a Document
283      *
284      * @return the list of {@link RouteNodeInstance}s for the {@link Document} with the given documentId
285      *
286      * @throws RiceIllegalArgumentException if {@code documentId} is null
287      */
288     @WebMethod(operationName = "getRouteNodeInstances")
289     @XmlElementWrapper(name = "routeNodeInstances", required = true)
290     @XmlElement(name = "routeNodeInstance", required = false)
291     @WebResult(name = "routeNodeInstances")
292 	List<RouteNodeInstance> getRouteNodeInstances(@WebParam(name = "documentId") String documentId)
293             throws RiceIllegalArgumentException;
294 
295     /**
296      * Gets a list of active {@link RouteNodeInstance} for a {@link Document} with the given documentId
297      *
298      * @param documentId the unique id of a Document
299      *
300      * @return the list of active {@link RouteNodeInstance}s for the {@link Document} with the given documentId
301      *
302      * @throws RiceIllegalArgumentException if {@code documentId} is null
303      */
304     @WebMethod(operationName = "getActiveRouteNodeInstances")
305     @XmlElementWrapper(name = "routeNodeInstances", required = true)
306     @XmlElement(name = "routeNodeInstance", required = false)
307     @WebResult(name = "routeNodeInstances")
308 	List<RouteNodeInstance> getActiveRouteNodeInstances(@WebParam(name = "documentId") String documentId)
309             throws RiceIllegalArgumentException;
310 
311     /**
312      * Gets a list of terminal {@link RouteNodeInstance}s for a {@link Document} with the given documentId
313      *
314      * @param documentId the unique id of a Document
315      *
316      * @return the list of terminal {@link RouteNodeInstance}s for the {@link Document} with the given documentId
317      *
318      * @throws RiceIllegalArgumentException if {@code documentId} is null
319      */
320     @WebMethod(operationName = "getTerminalRouteNodeInstances")
321     @XmlElementWrapper(name = "routeNodeInstances", required = true)
322     @XmlElement(name = "routeNodeInstance", required = false)
323     @WebResult(name = "routeNodeInstances")
324 	List<RouteNodeInstance> getTerminalRouteNodeInstances(@WebParam(name = "documentId") String documentId)
325             throws RiceIllegalArgumentException;
326 
327     /**
328      * Gets a list of current {@link RouteNodeInstance}s for a {@link Document} with the given documentId
329      *
330      * @param documentId the unique id of a Document
331      *
332      * @return the list of current {@link RouteNodeInstance}s for the {@link Document} with the given documentId
333      *
334      * @throws RiceIllegalArgumentException if {@code documentId} is null
335      */
336     @WebMethod(operationName = "getCurrentRouteNodeInstances")
337     @XmlElementWrapper(name = "routeNodeInstances", required = true)
338     @XmlElement(name = "routeNodeInstance", required = false)
339     @WebResult(name = "routeNodeInstances")
340 	List<RouteNodeInstance> getCurrentRouteNodeInstances(@WebParam(name = "documentId") String documentId)
341             throws RiceIllegalArgumentException;
342 
343     /**
344      * Gets a list of all previous {@link RouteNodeInstance}'s node names for a {@link Document} with the given documentId
345      *
346      * @param documentId the unique id of a Document
347      *
348      * @return the list of all previous {@link RouteNodeInstance}'s node names for the {@link Document} with the
349      * given documentId
350      *
351      * @throws RiceIllegalArgumentException if {@code documentId} is null
352      */
353     @WebMethod(operationName = "getPreviousRouteNodeNames")
354     @XmlElementWrapper(name = "previousRouteNodeNames", required = true)
355     @XmlElement(name = "previousRouteNodeName", required = false)
356     @WebResult(name = "previousRouteNodeNames")
357 	List<String> getPreviousRouteNodeNames(@WebParam(name = "documentId") String documentId)
358             throws RiceIllegalArgumentException;
359 
360 	/**
361      * Gets the status value for a {@link Document} with the given documentId
362      *
363      * @param documentId the unique id of a Document
364      *
365      * @return the current status of the {@link Document} with the
366      * given documentId
367      *
368      * @throws RiceIllegalArgumentException if {@code documentId} is null
369      */
370     @WebMethod(operationName = "getDocumentStatus")
371     @WebResult(name = "documentStatus")
372 	DocumentStatus getDocumentStatus(@WebParam(name = "documentId") String documentId)
373             throws RiceIllegalArgumentException;
374 
375 
376     /**
377      * Gets a list of principalId values for a {@link Document} with the given documentId
378      * and action request code that have pending action requests
379      *
380      * @param actionRequestedCd code for the pending action requested
381      * @param documentId the unique id of a Document
382      *
383      * @return a list of principalIds for the {@link Document} with the
384      * given parameters and have a pending action request
385      *
386      * @throws RiceIllegalArgumentException if {@code documentId} is null
387      * @throws RiceIllegalArgumentException if {@code actionRequestCd} is null
388      */
389     @WebMethod(operationName = "getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId")
390     @XmlElementWrapper(name = "principalIds", required = true)
391     @XmlElement(name = "principalId", required = false)
392     @WebResult(name = "principalIds")
393 	List<String> getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId(
394                     @WebParam(name = "actionRequestedCd") String actionRequestedCd,
395 		            @WebParam(name = "documentId") String documentId)
396             throws RiceIllegalArgumentException;
397 
398 
399     /**
400      * Gets the {@link Document} initiator's principalId with the given documentId
401      *
402      * @param documentId the unique id of a Document
403      *
404      * @return the {@link Document} initiator's principalId
405      *
406      * @throws RiceIllegalArgumentException if {@code documentId} is null
407      */
408     @WebMethod(operationName = "getDocumentInitiatorPrincipalId")
409     @WebResult(name = "principalId")
410 	String getDocumentInitiatorPrincipalId(@WebParam(name = "documentId") String documentId)
411             throws RiceIllegalArgumentException;
412 
413     /**
414      * Gets the {@link Document}'s 'routed by' principalId with the given documentId
415      * Returns null if the document is not found
416      *
417      * @param documentId the unique id of a Document
418      *
419      * @return the {@link Document}'s 'routed by' principalId
420      *
421      * @throws RiceIllegalArgumentException if {@code documentId} is null
422      */
423     @WebMethod(operationName = "getRoutedByPrincipalIdByDocumentId")
424     @WebResult(name = "principalId")
425 	String getRoutedByPrincipalIdByDocumentId(@WebParam(name = "documentId") String documentId)
426             throws RiceIllegalArgumentException;
427 
428     /**
429      * Does a direct search for searchableAttributes without going through the document search
430      * This returns a list of String values for String searchableAttributes
431      *
432      * @param documentId the unique id of a Document
433      * @param key the searchableAttributes key value
434      *
435      * @return a list of String values for the {@link Document} with the
436      * given documentId and searchable attribute key
437      *
438      * @throws RiceIllegalArgumentException if {@code documentId} is null
439      * @throws RiceIllegalArgumentException if {@code key} is null
440      */
441     @WebMethod(operationName = "getSearchableAttributeStringValuesByKey")
442     @XmlElementWrapper(name = "searchableAttributeStringValues", required = true)
443     @XmlElement(name = "searchableAttributeStringValue", required = false)
444     @WebResult(name = "searchableAttributeStringValues")
445 	List<String> getSearchableAttributeStringValuesByKey(@WebParam(name = "documentId") String documentId,
446 			                                             @WebParam(name = "key") String key)
447             throws RiceIllegalArgumentException;
448 
449 	/**
450      * Does a direct search for searchableAttributes without going through the document search
451      * This returns a list of DateTime values for date/time searchableAttributes
452      *
453      * @param documentId the unique id of a Document
454      * @param key the searchableAttributes key value
455      *
456      * @return a list of DateTime values for the {@link Document} with the
457      * given documentId and searchable attribute key
458      *
459      * @throws RiceIllegalArgumentException if {@code documentId} is null
460      * @throws RiceIllegalArgumentException if {@code key} is null
461      */
462     @WebMethod(operationName = "getSearchableAttributeDateTimeValuesByKey")
463     @XmlElementWrapper(name = "searchableAttributeDateTimeValues", required = true)
464     @XmlElement(name = "searchableAttributeDateTimeValue", required = false)
465     @WebResult(name = "searchableAttributeDateTimeValues")
466 	@XmlJavaTypeAdapter(value = DateTimeAdapter.class)
467 	List<DateTime> getSearchableAttributeDateTimeValuesByKey(@WebParam(name = "documentId") String documentId,
468 			                                                 @WebParam(name = "key") String key)
469             throws RiceIllegalArgumentException;
470 
471 	/**
472      * Does a direct search for searchableAttributes without going through the document search
473      * This returns a list of BigDecimal values for decimal searchableAttributes
474      *
475      * @param documentId the unique id of a Document
476      * @param key the searchableAttributes key value
477      *
478      * @return a list of BigDecimal values for the {@link Document} with the
479      * given documentId and searchable attribute key
480      *
481      * @throws RiceIllegalArgumentException if {@code documentId} is null
482      * @throws RiceIllegalArgumentException if {@code key} is null
483      */
484     @WebMethod(operationName = "getSearchableAttributeFloatValuesByKey")
485     @XmlElementWrapper(name = "searchableAttributeBigDecimalValues", required = true)
486     @XmlElement(name = "searchableAttributeBigDecimalValue", required = false)
487     @WebResult(name = "searchableAttributeBigDecimalValues")
488 	List<BigDecimal> getSearchableAttributeFloatValuesByKey(@WebParam(name = "documentId") String documentId,
489 			                                                @WebParam(name = "key") String key)
490             throws RiceIllegalArgumentException;
491 
492 	/**
493      * Does a direct search for searchableAttributes without going through the document search
494      * This returns a list of Long values for long searchableAttributes
495      *
496      * @param documentId the unique id of a Document
497      * @param key the searchableAttributes key value
498      *
499      * @return a list of BigDecimal values for the {@link Document} with the
500      * given documentId and searchable attribute key
501      *
502      * @throws RiceIllegalArgumentException if {@code documentId} is null
503      * @throws RiceIllegalArgumentException if {@code key} is null
504      */
505     @WebMethod(operationName = "getSearchableAttributeLongValuesByKey")
506     @XmlElementWrapper(name = "searchableAttributeLongValues", required = true)
507     @XmlElement(name = "searchableAttributeLongValue", required = false)
508     @WebResult(name = "searchableAttributeLongValues")
509 	List<Long> getSearchableAttributeLongValuesByKey(@WebParam(name = "documentId") String documentId,
510 			                                         @WebParam(name = "key") String key)
511             throws RiceIllegalArgumentException;
512 
513     /**
514      * Gets a list of DocumentStatusTransitions for the {@link Document} with the given documentId
515      *
516      * @param documentId the unique id of a Document
517      *
518      * @return a list of DocumentStatusTransitions for the {@link Document} with the
519      * given documentId
520      *
521      * @throws RiceIllegalArgumentException if {@code documentId} is null
522      */
523     @WebMethod(operationName = "getDocumentStatusTransitionHistory")
524     @XmlElementWrapper(name = "documentStatusTransitions", required = true)
525     @XmlElement(name = "documentStatusTransition", required = false)
526     @WebResult(name = "documentStatusTransitions")
527 	List<DocumentStatusTransition> getDocumentStatusTransitionHistory(@WebParam(name = "documentId") String documentId)
528             throws RiceIllegalArgumentException;
529 
530 
531     /**
532      * Saves the passed in {@link DocumentLink}.  If the {@link DocumentLink}'s id field is created.  This method
533      * actually creates two different links in the database (one from the document being
534 	 * linked to the target and vice-versa).  If the links already exist, then the call is ignored.
535      *
536      * @param documentLink the unique id of a Document
537      *
538      * @return the newly saved {@link DocumentLink}
539      *
540      * @throws RiceIllegalArgumentException if {@code documentLink} is null
541      * @throws RiceIllegalArgumentException if {@code documentLink}'s is id value is populated
542      */
543     @WebMethod(operationName = "addDocumentLink")
544     @WebResult(name = "documentLink")
545 	DocumentLink addDocumentLink(@WebParam(name = "documentLink") DocumentLink documentLink) throws RiceIllegalArgumentException;
546 
547     /**
548      * Removes the  {@link DocumentLink} with the given documentLinkId.
549      *
550      * @param documentLinkId the unique id of a Document
551      *
552      * @return the deleted {@link DocumentLink}
553      *
554      * @throws RiceIllegalArgumentException if {@code documentLink} is null
555      * @throws RiceIllegalStateException if no DocumentLink with the passed in{@code documentLink} exist
556      */
557     @WebMethod(operationName = "deleteDocumentLink")
558     @WebResult(name = "documentLink")
559 	DocumentLink deleteDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException;
560 
561 
562     /**
563      * Removes all {@link DocumentLink}s for the given {@link Document} with the given originatingDocumentId.
564      *
565      * @param originatingDocumentId the unique id of the originating Document of the document links to delete
566      *
567      * @return a list of the deleted {@link DocumentLink}s
568      *
569      * @throws RiceIllegalArgumentException if {@code documentLink} is null
570      */
571     @WebMethod(operationName = "deleteDocumentLinksByDocumentId")
572     @XmlElementWrapper(name = "documentLinks", required = true)
573     @XmlElement(name = "documentLink", required = false)
574     @WebResult(name = "documentLinks")
575     List<DocumentLink> deleteDocumentLinksByDocumentId(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException;
576 
577     /**
578      * Gets a list of all {@link DocumentLink}s for outgoing links from the {@link Document} with the given documentId.
579      *
580      * @param originatingDocumentId the unique id of the originating Document of the document links to retrieve
581      *
582      * @return a list of the outgoing {@link DocumentLink}s for the originating document
583      *
584      * @throws RiceIllegalArgumentException if {@code originatingDocumentId} is null
585      */
586     @WebMethod(operationName = "getOutgoingDocumentLinks")
587     @XmlElementWrapper(name = "documentLinks", required = true)
588     @XmlElement(name = "documentLink", required = false)
589     @WebResult(name = "documentLinks")
590     List<DocumentLink> getOutgoingDocumentLinks(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException;
591 
592     /**
593      * Gets a list of all {@link DocumentLink}s for incoming links from the {@link Document} with the given documentId.
594      *
595      * @param originatingDocumentId the unique id of the incoming Document of the document links to retrieve
596      *
597      * @return a list of the outgoing {@link DocumentLink}s for the incoming document
598      *
599      * @throws RiceIllegalArgumentException if {@code originatingDocumentId} is null
600      */
601     @WebMethod(operationName = "getIncomingDocumentLinks")
602     @XmlElementWrapper(name = "documentLinks", required = true)
603     @XmlElement(name = "documentLink", required = false)
604     @WebResult(name = "documentLinks")
605     List<DocumentLink> getIncomingDocumentLinks(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException;
606 
607     /**
608      * Gets the {@link DocumentLink} for  with the given documentLinkId.
609      *
610      * @param documentLinkId the unique id of the {@link DocumentLink} to retrieve
611      *
612      * @return a {@link DocumentLink} with the passed in documentLinkId
613      *
614      * @throws RiceIllegalArgumentException if {@code documentLinkId} is null
615      */
616     @WebMethod(operationName = "getDocumentLink")
617     @WebResult(name = "documentLinks")
618     DocumentLink getDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException;
619     
620     /**
621      * Gets a list of active route node names for a {@link Document} with the given documentId.   Will never return null but an empty collection to indicate no results.
622      *
623      * @param documentId the unique id of a Document
624      *
625      * @return an unmodifiable list of active route node names for the {@link Document} with the given documentId
626      *
627      * @throws RiceIllegalArgumentException if {@code documentId} is null or blank
628      * 
629      * @since rice 2.2
630      */
631     @WebMethod(operationName = "getActiveRouteNodeNames")
632     @XmlElementWrapper(name = "nodes", required = true)
633     @XmlElement(name = "node", required = false)
634     @WebResult(name = "nodes")
635     List<String> getActiveRouteNodeNames(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentException;
636     
637     /**
638      * Gets a list of terminal route node names for a {@link Document} with the given documentId.   Will never return null but an empty collection to indicate no results.
639      *
640      * @param documentId the unique id of a Document
641      *
642      * @return an unmodifiable list of terminal route node names for the {@link Document} with the given documentId
643      *
644      * @throws RiceIllegalArgumentException if {@code documentId} is null or blank
645      * 
646      * @since rice 2.2
647      */
648     @WebMethod(operationName = "getTerminalRouteNodeNames")
649     @XmlElementWrapper(name = "nodes", required = true)
650     @XmlElement(name = "node", required = false)
651     @WebResult(name = "nodes")
652     List<String> getTerminalRouteNodeNames(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentException;
653 
654     /**
655      * Gets a list of current route node names for a {@link Document} with the given documentId.  Will never return null but an empty collection to indicate no results.
656      *
657      * @param documentId the unique id of a Document
658      *
659      * @return an unmodifiable list of current route node names for the {@link Document} with the given documentId
660      *
661      * @throws RiceIllegalArgumentException if {@code documentId} is null or blank
662      * 
663      * @since rice 2.2
664      */
665     @WebMethod(operationName = "getCurrentRouteNodeNames")
666     @XmlElementWrapper(name = "nodes", required = true)
667     @XmlElement(name = "node", required = false)
668     @WebResult(name = "nodes")
669     List<String> getCurrentRouteNodeNames(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentException;
670 }