Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
WorkflowDocumentService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2011 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/ecl1.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.kuali.rice.core.api.exception.RiceIllegalArgumentException; | |
19 | import org.kuali.rice.kew.api.action.ActionRequest; | |
20 | import org.kuali.rice.kew.api.action.ActionTaken; | |
21 | import org.kuali.rice.kew.api.document.node.RouteNodeInstance; | |
22 | ||
23 | import javax.jws.WebParam; | |
24 | import java.util.List; | |
25 | ||
26 | /** | |
27 | * TODO ... annotate for JAX-WS! | |
28 | * | |
29 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
30 | */ | |
31 | public interface WorkflowDocumentService { | |
32 | ||
33 | Document getDocument(String documentId); | |
34 | ||
35 | boolean doesDocumentExist(String documentId); | |
36 | ||
37 | DocumentContent getDocumentContent(String documentId); | |
38 | ||
39 | List<ActionRequest> getRootActionRequests(@WebParam(name = "documentId") String documentId); | |
40 | ||
41 | List<ActionRequest> getActionRequests(String documentId, String nodeName, String principalId); | |
42 | ||
43 | List<ActionTaken> getActionsTaken(@WebParam(name = "documentId") String documentId); | |
44 | ||
45 | DocumentDetail getDocumentDetailByAppId(String documentTypeName, String appId); | |
46 | ||
47 | /* public RouteHeaderDTO getRouteHeaderWithPrincipal( | |
48 | @WebParam(name = "principalId") String principalId, | |
49 | @WebParam(name = "documentId") String documentId) | |
50 | throws WorkflowException;*/ | |
51 | // | |
52 | // public RouteHeaderDTO getRouteHeader( | |
53 | // @WebParam(name = "documentId") String documentId) | |
54 | // throws WorkflowException; | |
55 | // | |
56 | ||
57 | DocumentDetail getDocumentDetail(@WebParam(name = "documentId") String documentId); | |
58 | ||
59 | RouteNodeInstance getNodeInstance(@WebParam(name = "nodeInstanceId") String nodeInstanceId); | |
60 | ||
61 | String getNewResponsibilityId(); | |
62 | ||
63 | ||
64 | String getAppDocId(@WebParam(name = "documentId") String documentId); | |
65 | // | |
66 | // | |
67 | // public DocumentSearchResultDTO performDocumentSearch( | |
68 | // @WebParam(name = "criteriaVO") DocumentSearchCriteriaDTO criteriaVO) | |
69 | // throws WorkflowException; | |
70 | // | |
71 | // public DocumentSearchResultDTO performDocumentSearchWithPrincipal( | |
72 | // @WebParam(name = "principalId") String principalId, | |
73 | // @WebParam(name = "criteriaVO") DocumentSearchCriteriaDTO criteriaVO) | |
74 | // throws WorkflowException; | |
75 | // | |
76 | ||
77 | List<RouteNodeInstance> getRouteNodeInstances(String documentId); | |
78 | ||
79 | List<RouteNodeInstance> getActiveRouteNodeInstances( | |
80 | @WebParam(name = "documentId") String documentId); | |
81 | ||
82 | List<RouteNodeInstance> getTerminalNodeInstances( | |
83 | @WebParam(name = "documentId") String documentId); | |
84 | ||
85 | List<String> getPreviousRouteNodeNames(@WebParam(name = "documentId") String documentId); | |
86 | ||
87 | ||
88 | String getDocumentStatus(@WebParam(name = "documentId") String documentId); | |
89 | ||
90 | List<RouteNodeInstance> getCurrentNodeInstances(@WebParam(name = "documentId") String documentId); | |
91 | ||
92 | List<String> getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId( | |
93 | @WebParam(name = "actionRequestedCd") String actionRequestedCd, | |
94 | @WebParam(name = "documentId") String documentId); | |
95 | ||
96 | ||
97 | String getDocumentInitiatorPrincipalId(@WebParam(name = "documentId") String documentId); | |
98 | ||
99 | /** | |
100 | * Returns the principal ID of the user who routed the given document. | |
101 | * <b>null</b> if the document can not be found. | |
102 | */ | |
103 | public String getDocumentRoutedByPrincipalId( | |
104 | @WebParam(name = "documentId") String documentId); | |
105 | // | |
106 | // @XmlJavaTypeAdapter(value = MapStringStringAdapter.class) | |
107 | // public Map<String, String> getActionsRequested( | |
108 | // @WebParam(name = "principalId") String principalId, | |
109 | // @WebParam(name = "documentId") String documentId); | |
110 | // | |
111 | // /** | |
112 | // * | |
113 | // * This method does a direct search for the searchableAttribute without | |
114 | // * going through the doc search. | |
115 | // * | |
116 | // * @param documentId | |
117 | // * @param key | |
118 | // * @return | |
119 | // */ | |
120 | // public String[] getSearchableAttributeStringValuesByKey( | |
121 | // @WebParam(name = "documentId") String documentId, | |
122 | // @WebParam(name = "key") String key); | |
123 | // | |
124 | // /** | |
125 | // * | |
126 | // * This method does a direct search for the searchableAttribute without | |
127 | // * going through the doc search. | |
128 | // * | |
129 | // * @param documentId | |
130 | // * @param key | |
131 | // * @return | |
132 | // */ | |
133 | // @XmlJavaTypeAdapter(value = SqlTimestampAdapter.class) | |
134 | // public Timestamp[] getSearchableAttributeDateTimeValuesByKey( | |
135 | // @WebParam(name = "documentId") String documentId, | |
136 | // @WebParam(name = "key") String key); | |
137 | // | |
138 | // /** | |
139 | // * | |
140 | // * This method does a direct search for the searchableAttribute without | |
141 | // * going through the doc search. | |
142 | // * | |
143 | // * @param documentId | |
144 | // * @param key | |
145 | // * @return | |
146 | // */ | |
147 | // public BigDecimal[] getSearchableAttributeFloatValuesByKey( | |
148 | // @WebParam(name = "documentId") String documentId, | |
149 | // @WebParam(name = "key") String key); | |
150 | // | |
151 | // /** | |
152 | // * | |
153 | // * This method does a direct search for the searchableAttribute without | |
154 | // * going through the doc search. | |
155 | // * | |
156 | // * @param documentId | |
157 | // * @param key | |
158 | // * @return | |
159 | // */ | |
160 | // public Long[] getSearchableAttributeLongValuesByKey( | |
161 | // @WebParam(name = "documentId") String documentId, | |
162 | // @WebParam(name = "key") String key); | |
163 | // | |
164 | // public String getFutureRequestsKey( | |
165 | // @WebParam(name = "principalId") String principalId); | |
166 | // | |
167 | // public String getReceiveFutureRequestsValue(); | |
168 | // | |
169 | // public String getDoNotReceiveFutureRequestsValue(); | |
170 | // | |
171 | // public String getClearFutureRequestsValue(); | |
172 | // | |
173 | // public DocumentStatusTransitionDTO[] getDocumentStatusTransitionHistory( | |
174 | // @WebParam(name = "documentId") String documentId) | |
175 | // throws WorkflowException; | |
176 | // | |
177 | ||
178 | /** | |
179 | * TODO - document that this "ignores" the request to create the link if it already exists, | |
180 | * returning the existing link if there is one | |
181 | * | |
182 | * TODO - also document that this method actually creates two links in the db, one from the document being | |
183 | * linked to the target and vice-versa | |
184 | */ | |
185 | DocumentLink addDocumentLink(DocumentLink documentLink) throws RiceIllegalArgumentException; | |
186 | ||
187 | DocumentLink deleteDocumentLink(String documentLinkId) throws RiceIllegalArgumentException; | |
188 | ||
189 | List<DocumentLink> deleteDocumentLinksByDocumentId(String originatingDocumentId) throws RiceIllegalArgumentException; | |
190 | ||
191 | List<DocumentLink> getOutgoingDocumentLinks(String originatingDocumentId) throws RiceIllegalArgumentException; | |
192 | ||
193 | List<DocumentLink> getIncomingDocumentLinks(String originatingDocumentId) throws RiceIllegalArgumentException; | |
194 | ||
195 | DocumentLink getDocumentLink(String documentLinkId) throws RiceIllegalArgumentException; | |
196 | ||
197 | } |