001    /**
002     * Copyright 2005-2012 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.kew.api.document;
017    
018    import org.joda.time.DateTime;
019    import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
020    import org.kuali.rice.core.api.exception.RiceIllegalStateException;
021    import org.kuali.rice.core.api.util.jaxb.DateTimeAdapter;
022    import org.kuali.rice.core.api.util.jaxb.MapStringStringAdapter;
023    import org.kuali.rice.kew.api.KewApiConstants;
024    import org.kuali.rice.kew.api.action.ActionRequest;
025    import org.kuali.rice.kew.api.action.ActionTaken;
026    import org.kuali.rice.kew.api.document.search.DocumentSearchCriteria;
027    import org.kuali.rice.kew.api.document.search.DocumentSearchResults;
028    import org.kuali.rice.kew.api.document.node.RouteNodeInstance;
029    
030    import javax.jws.WebMethod;
031    import javax.jws.WebParam;
032    import javax.jws.WebResult;
033    import javax.jws.WebService;
034    import javax.jws.soap.SOAPBinding;
035    import javax.xml.bind.annotation.XmlElement;
036    import javax.xml.bind.annotation.XmlElementWrapper;
037    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
038    import java.math.BigDecimal;
039    import java.util.List;
040    import java.util.Map;
041    
042    /**
043     * TODO ... annotate for JAX-WS! 
044     * 
045     * @author Kuali Rice Team (rice.collab@kuali.org)
046     */
047    @WebService(name = "workflowDocumentService", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
048    @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
049    public interface WorkflowDocumentService {
050    
051        /**
052         * Gets a {@link Document} from a documentId.
053         *
054         * <p>
055         *   This method will return null if the Document does not exist.
056         * </p>
057         *
058         * @param documentId the unique id of the document to return
059         * @return the document with the passed in id value
060         * @throws RiceIllegalArgumentException if {@code documentId} is null
061         */
062        @WebMethod(operationName = "getDocument")
063        @WebResult(name = "document")
064            Document getDocument(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentException;
065    
066        /**
067         * Returns a boolean depending on if a {@link Document} exists with the specified documentId
068         *
069         * <p>
070         *   This method will return false if the responsibility does not exist.
071         * </p>
072         *
073         * @param documentId the unique id of the document to check for existence
074         * @return boolean value representative of whether the document exists
075         * @throws RiceIllegalArgumentException if {@code documentId} is null
076         */
077        @WebMethod(operationName = "doesDocumentExist")
078        @WebResult(name = "document")
079            boolean doesDocumentExist(@WebParam(name = "documentId") String documentId)
080                throws RiceIllegalArgumentException;
081    
082        /**
083         * Gets {@link DocumentContent} from a documentId.
084         *
085         * <p>
086         *   This method will return null if the document does not exist.
087         * </p>
088         *
089         * @param documentId the unique id of the document content to return
090         * @return the documentContent with the passed in id value
091         * @throws RiceIllegalArgumentException if {@code documentId} is null
092         */
093        @WebMethod(operationName = "getDocumentContent")
094        @WebResult(name = "documentContent")
095            DocumentContent getDocumentContent(@WebParam(name = "documentId") String documentId)
096                throws RiceIllegalArgumentException;
097    
098        /**
099         * 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 = "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        * Gets a list of all {@link ActionTaken} of a {@link Document} with the given documentId
165        *
166        * @since 2.0.2
167        *
168        * @param documentId the unique id of a document
169        *
170        * @return the list of ActionTakens (both current and not) for a given documentId
171        *
172        * @throws RiceIllegalArgumentException if {@code documentId} is null
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         * Gets a {@link DocumentDetail} of a {@link Document} with the given documentTypeName and appId
184         *
185         * @param documentTypeName the name of the DocumentType
186         * @param appId the unique id of the application
187         *
188         * @return a {@link DocumentDetail} for with the given documentTypeName and appId
189         *
190         * @throws RiceIllegalArgumentException if {@code documentTypeName} is null
191         * @throws RiceIllegalArgumentException if {@code appId} is null
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         * Gets a {@link DocumentDetail} of a {@link Document} with the given documentId
201         *
202         * @param documentId the unique id of the Document
203         *
204         * @return a {@link DocumentDetail} for with the given documentId
205         *
206         * @throws RiceIllegalArgumentException if {@code documentId} is null
207         */
208        @WebMethod(operationName = "getDocumentDetail")
209        @WebResult(name = "documentDetail")
210            DocumentDetail getDocumentDetail(@WebParam(name = "documentId") String documentId);
211    
212    
213        /**
214         * Gets a {@link RouteNodeInstance} with the given nodeInstanceId
215         *
216         * @param routeNodeInstanceId the unique id of the {@link RouteNodeInstance}
217         *
218         * @return a {@link DocumentDetail} for with the given documentId
219         *
220         * @throws RiceIllegalArgumentException if {@code nodeInstanceId} is null
221         */
222        @WebMethod(operationName = "getRouteNodeInstance")
223        @WebResult(name = "routeNodeInstance")
224            RouteNodeInstance getRouteNodeInstance(@WebParam(name = "routeNodeInstanceId") String routeNodeInstanceId)
225                throws RiceIllegalArgumentException;
226    
227        /**
228         * Gets a value application document id of a {@link Document} with the given documentId
229         *
230         * @param documentId the unique id of the Document
231         *
232         * @return the value of the applicationDocumentId for the {@link Document} with the given documentId
233         *
234         * @throws RiceIllegalArgumentException if {@code documentId} is null
235         */
236        @WebMethod(operationName = "getApplicationDocumentId")
237        @WebResult(name = "applicationDocumentId")
238            String getApplicationDocumentId(@WebParam(name = "documentId") String documentId)
239                throws RiceIllegalArgumentException;
240    
241        /**
242         * Executes a search for workflow documents using the given criteria and as the principal with the given id.  Since
243         * documents can define security which permits access to view certain search results, the given principal id will
244         * be used when evaluating which documents should be filtered from the results because of lack of access.
245         *
246         * @param principalId the id of the principal to execute the search as, if this value is non-null then security
247         * filtering will be executed against the results, if it is null then no filtering will be performed
248         * @param criteria the criteria to use when executing the search
249         *
250         * @return the results of the search, this will never be null but may contain an empty list of results
251         *
252         * @throws RiceIllegalArgumentException if the given criteria is null
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         * Gets a list of all {@link RouteNodeInstance} for a {@link Document} with the given documentId
263         *
264         * @param documentId the unique id of a Document
265         *
266         * @return the list of {@link RouteNodeInstance}s for the {@link Document} with the given documentId
267         *
268         * @throws RiceIllegalArgumentException if {@code documentId} is null
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         * Gets a list of active {@link RouteNodeInstance} for a {@link Document} with the given documentId
279         *
280         * @param documentId the unique id of a Document
281         *
282         * @return the list of active {@link RouteNodeInstance}s for the {@link Document} with the given documentId
283         *
284         * @throws RiceIllegalArgumentException if {@code documentId} is null
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         * Gets a list of terminal {@link RouteNodeInstance}s for a {@link Document} with the given documentId
295         *
296         * @param documentId the unique id of a Document
297         *
298         * @return the list of terminal {@link RouteNodeInstance}s for the {@link Document} with the given documentId
299         *
300         * @throws RiceIllegalArgumentException if {@code documentId} is null
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         * Gets a list of current {@link RouteNodeInstance}s for a {@link Document} with the given documentId
311         *
312         * @param documentId the unique id of a Document
313         *
314         * @return the list of current {@link RouteNodeInstance}s for the {@link Document} with the given documentId
315         *
316         * @throws RiceIllegalArgumentException if {@code documentId} is null
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         * Gets a list of all previous {@link RouteNodeInstance}'s node names for a {@link Document} with the given documentId
327         *
328         * @param documentId the unique id of a Document
329         *
330         * @return the list of all previous {@link RouteNodeInstance}'s node names for the {@link Document} with the
331         * given documentId
332         *
333         * @throws RiceIllegalArgumentException if {@code documentId} is null
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         * Gets the status value for a {@link Document} with the given documentId
344         *
345         * @param documentId the unique id of a Document
346         *
347         * @return the current status of the {@link Document} with the
348         * given documentId
349         *
350         * @throws RiceIllegalArgumentException if {@code documentId} is null
351         */
352        @WebMethod(operationName = "getDocumentStatus")
353        @WebResult(name = "documentStatus")
354            DocumentStatus getDocumentStatus(@WebParam(name = "documentId") String documentId)
355                throws RiceIllegalArgumentException;
356    
357    
358        /**
359         * Gets a list of principalId values for a {@link Document} with the given documentId
360         * and action request code that have pending action requests
361         *
362         * @param actionRequestedCd code for the pending action requested
363         * @param documentId the unique id of a Document
364         *
365         * @return a list of principalIds for the {@link Document} with the
366         * given parameters and have a pending action request
367         *
368         * @throws RiceIllegalArgumentException if {@code documentId} is null
369         * @throws RiceIllegalArgumentException if {@code actionRequestCd} is null
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         * Gets the {@link Document} initiator's principalId with the given documentId
383         *
384         * @param documentId the unique id of a Document
385         *
386         * @return the {@link Document} initiator's principalId
387         *
388         * @throws RiceIllegalArgumentException if {@code documentId} is null
389         */
390        @WebMethod(operationName = "getDocumentInitiatorPrincipalId")
391        @WebResult(name = "principalId")
392            String getDocumentInitiatorPrincipalId(@WebParam(name = "documentId") String documentId)
393                throws RiceIllegalArgumentException;
394    
395        /**
396         * Gets the {@link Document}'s 'routed by' principalId with the given documentId
397         * Returns null if the document is not found
398         *
399         * @param documentId the unique id of a Document
400         *
401         * @return the {@link Document}'s 'routed by' principalId
402         *
403         * @throws RiceIllegalArgumentException if {@code documentId} is null
404         */
405        @WebMethod(operationName = "getRoutedByPrincipalIdByDocumentId")
406        @WebResult(name = "principalId")
407            String getRoutedByPrincipalIdByDocumentId(@WebParam(name = "documentId") String documentId)
408                throws RiceIllegalArgumentException;
409    
410        /**
411         * Does a direct search for searchableAttributes without going through the document search
412         * This returns a list of String values for String searchableAttributes
413         *
414         * @param documentId the unique id of a Document
415         * @param key the searchableAttributes key value
416         *
417         * @return a list of String values for the {@link Document} with the
418         * given documentId and searchable attribute key
419         *
420         * @throws RiceIllegalArgumentException if {@code documentId} is null
421         * @throws RiceIllegalArgumentException if {@code key} is null
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         * Does a direct search for searchableAttributes without going through the document search
433         * This returns a list of DateTime values for date/time searchableAttributes
434         *
435         * @param documentId the unique id of a Document
436         * @param key the searchableAttributes key value
437         *
438         * @return a list of DateTime values for the {@link Document} with the
439         * given documentId and searchable attribute key
440         *
441         * @throws RiceIllegalArgumentException if {@code documentId} is null
442         * @throws RiceIllegalArgumentException if {@code key} is null
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         * Does a direct search for searchableAttributes without going through the document search
455         * This returns a list of BigDecimal values for decimal searchableAttributes
456         *
457         * @param documentId the unique id of a Document
458         * @param key the searchableAttributes key value
459         *
460         * @return a list of BigDecimal values for the {@link Document} with the
461         * given documentId and searchable attribute key
462         *
463         * @throws RiceIllegalArgumentException if {@code documentId} is null
464         * @throws RiceIllegalArgumentException if {@code key} is null
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         * Does a direct search for searchableAttributes without going through the document search
476         * This returns a list of Long values for long searchableAttributes
477         *
478         * @param documentId the unique id of a Document
479         * @param key the searchableAttributes key value
480         *
481         * @return a list of BigDecimal values for the {@link Document} with the
482         * given documentId and searchable attribute key
483         *
484         * @throws RiceIllegalArgumentException if {@code documentId} is null
485         * @throws RiceIllegalArgumentException if {@code key} is null
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         * Gets a list of DocumentStatusTransitions for the {@link Document} with the given documentId
497         *
498         * @param documentId the unique id of a Document
499         *
500         * @return a list of DocumentStatusTransitions for the {@link Document} with the
501         * given documentId
502         *
503         * @throws RiceIllegalArgumentException if {@code documentId} is null
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         * Saves the passed in {@link DocumentLink}.  If the {@link DocumentLink}'s id field is created.  This method
515         * actually creates two different links in the database (one from the document being
516             * linked to the target and vice-versa).  If the links already exist, then the call is ignored.
517         *
518         * @param documentLink the unique id of a Document
519         *
520         * @return the newly saved {@link DocumentLink}
521         *
522         * @throws RiceIllegalArgumentException if {@code documentLink} is null
523         * @throws RiceIllegalArgumentException if {@code documentLink}'s is id value is populated
524         */
525        @WebMethod(operationName = "addDocumentLink")
526        @WebResult(name = "documentLink")
527            DocumentLink addDocumentLink(@WebParam(name = "documentLink") DocumentLink documentLink) throws RiceIllegalArgumentException;
528    
529        /**
530         * Removes the  {@link DocumentLink} with the given documentLinkId.
531         *
532         * @param documentLinkId the unique id of a Document
533         *
534         * @return the deleted {@link DocumentLink}
535         *
536         * @throws RiceIllegalArgumentException if {@code documentLink} is null
537         * @throws RiceIllegalStateException if no DocumentLink with the passed in{@code documentLink} exist
538         */
539        @WebMethod(operationName = "deleteDocumentLink")
540        @WebResult(name = "documentLink")
541            DocumentLink deleteDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException;
542    
543    
544        /**
545         * Removes all {@link DocumentLink}s for the given {@link Document} with the given originatingDocumentId.
546         *
547         * @param originatingDocumentId the unique id of the originating Document of the document links to delete
548         *
549         * @return a list of the deleted {@link DocumentLink}s
550         *
551         * @throws RiceIllegalArgumentException if {@code documentLink} is null
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         * Gets a list of all {@link DocumentLink}s for outgoing links from the {@link Document} with the given documentId.
561         *
562         * @param originatingDocumentId the unique id of the originating Document of the document links to retrieve
563         *
564         * @return a list of the outgoing {@link DocumentLink}s for the originating document
565         *
566         * @throws RiceIllegalArgumentException if {@code originatingDocumentId} is null
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         * Gets a list of all {@link DocumentLink}s for incoming links from the {@link Document} with the given documentId.
576         *
577         * @param originatingDocumentId the unique id of the incoming Document of the document links to retrieve
578         *
579         * @return a list of the outgoing {@link DocumentLink}s for the incoming document
580         *
581         * @throws RiceIllegalArgumentException if {@code originatingDocumentId} is null
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         * Gets the {@link DocumentLink} for  with the given documentLinkId.
591         *
592         * @param documentLinkId the unique id of the {@link DocumentLink} to retrieve
593         *
594         * @return a {@link DocumentLink} with the passed in documentLinkId
595         *
596         * @throws RiceIllegalArgumentException if {@code documentLinkId} is null
597         */
598        @WebMethod(operationName = "getDocumentLink")
599        @WebResult(name = "documentLinks")
600        DocumentLink getDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException;
601    
602    }