| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| WorkflowDocumentService |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2005-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/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 for a given documentId, nodeName and principalId | |
| 116 | * | |
| 117 | * @param documentId the unique id of a document | |
| 118 | * @param nodeName the name of a RouteNode | |
| 119 | * @param principalId the unique id of a principal | |
| 120 | * | |
| 121 | * @return the list of ActionRequests for a given documentId, nodeName, and principalId | |
| 122 | * | |
| 123 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 124 | */ | |
| 125 | @WebMethod(operationName = "getActionRequestsForPrincipalAtNode") | |
| 126 | @XmlElementWrapper(name = "actionRequests", required = true) | |
| 127 | @XmlElement(name = "actionRequests", required = false) | |
| 128 | @WebResult(name = "actionRequests") | |
| 129 | List<ActionRequest> getActionRequestsForPrincipalAtNode(@WebParam(name = "documentId") String documentId, | |
| 130 | @WebParam(name = "nodeName") String nodeName, @WebParam(name = "principalId") String principalId) | |
| 131 | throws RiceIllegalArgumentException; | |
| 132 | ||
| 133 | /** | |
| 134 | * Gets a list of past {@link ActionTaken} of a {@link Document} with the given documentId | |
| 135 | * | |
| 136 | * @param documentId the unique id of a document | |
| 137 | * | |
| 138 | * @return the list of past ActionTakens for a given documentId | |
| 139 | * | |
| 140 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 141 | */ | |
| 142 | @WebMethod(operationName = "getActionRequests") | |
| 143 | @XmlElementWrapper(name = "actionsTaken", required = true) | |
| 144 | @XmlElement(name = "actionTaken", required = false) | |
| 145 | @WebResult(name = "actionsTaken") | |
| 146 | List<ActionTaken> getActionsTaken(@WebParam(name = "documentId") String documentId) | |
| 147 | throws RiceIllegalArgumentException; | |
| 148 | ||
| 149 | ||
| 150 | /** | |
| 151 | * Gets a {@link DocumentDetail} of a {@link Document} with the given documentTypeName and appId | |
| 152 | * | |
| 153 | * @param documentTypeName the name of the DocumentType | |
| 154 | * @param appId the unique id of the application | |
| 155 | * | |
| 156 | * @return a {@link DocumentDetail} for with the given documentTypeName and appId | |
| 157 | * | |
| 158 | * @throws RiceIllegalArgumentException if {@code documentTypeName} is null | |
| 159 | * @throws RiceIllegalArgumentException if {@code appId} is null | |
| 160 | */ | |
| 161 | @WebMethod(operationName = "getDocumentDetailByAppId") | |
| 162 | @WebResult(name = "documentDetail") | |
| 163 | DocumentDetail getDocumentDetailByAppId(@WebParam(name = "documentTypeName") String documentTypeName, | |
| 164 | @WebParam(name = "appId") String appId) | |
| 165 | throws RiceIllegalArgumentException; | |
| 166 | ||
| 167 | /** | |
| 168 | * Gets a {@link DocumentDetail} of a {@link Document} with the given documentId | |
| 169 | * | |
| 170 | * @param documentId the unique id of the Document | |
| 171 | * | |
| 172 | * @return a {@link DocumentDetail} for with the given documentId | |
| 173 | * | |
| 174 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 175 | */ | |
| 176 | @WebMethod(operationName = "getDocumentDetail") | |
| 177 | @WebResult(name = "documentDetail") | |
| 178 | DocumentDetail getDocumentDetail(@WebParam(name = "documentId") String documentId); | |
| 179 | ||
| 180 | ||
| 181 | /** | |
| 182 | * Gets a {@link RouteNodeInstance} with the given nodeInstanceId | |
| 183 | * | |
| 184 | * @param routeNodeInstanceId the unique id of the {@link RouteNodeInstance} | |
| 185 | * | |
| 186 | * @return a {@link DocumentDetail} for with the given documentId | |
| 187 | * | |
| 188 | * @throws RiceIllegalArgumentException if {@code nodeInstanceId} is null | |
| 189 | */ | |
| 190 | @WebMethod(operationName = "getRouteNodeInstance") | |
| 191 | @WebResult(name = "routeNodeInstance") | |
| 192 | RouteNodeInstance getRouteNodeInstance(@WebParam(name = "routeNodeInstanceId") String routeNodeInstanceId) | |
| 193 | throws RiceIllegalArgumentException; | |
| 194 | ||
| 195 | /** | |
| 196 | * Gets a value application document id of a {@link Document} with the given documentId | |
| 197 | * | |
| 198 | * @param documentId the unique id of the Document | |
| 199 | * | |
| 200 | * @return the value of the applicationDocumentId for the {@link Document} with the given documentId | |
| 201 | * | |
| 202 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 203 | */ | |
| 204 | @WebMethod(operationName = "getApplicationDocumentId") | |
| 205 | @WebResult(name = "applicationDocumentId") | |
| 206 | String getApplicationDocumentId(@WebParam(name = "documentId") String documentId) | |
| 207 | throws RiceIllegalArgumentException; | |
| 208 | ||
| 209 | /** | |
| 210 | * Executes a search for workflow documents using the given criteria and as the principal with the given id. Since | |
| 211 | * documents can define security which permits access to view certain search results, the given principal id will | |
| 212 | * be used when evaluating which documents should be filtered from the results because of lack of access. | |
| 213 | * | |
| 214 | * @param principalId the id of the principal to execute the search as, if this value is non-null then security | |
| 215 | * filtering will be executed against the results, if it is null then no filtering will be performed | |
| 216 | * @param criteria the criteria to use when executing the search | |
| 217 | * | |
| 218 | * @return the results of the search, this will never be null but may contain an empty list of results | |
| 219 | * | |
| 220 | * @throws RiceIllegalArgumentException if the given criteria is null | |
| 221 | */ | |
| 222 | @WebMethod(operationName = "documentSearch") | |
| 223 | @WebResult(name = "documentSearchResults") | |
| 224 | DocumentSearchResults documentSearch( | |
| 225 | @WebParam(name = "principalId") String principalId, | |
| 226 | @WebParam(name = "criteria") DocumentSearchCriteria criteria) | |
| 227 | throws RiceIllegalArgumentException; | |
| 228 | ||
| 229 | /** | |
| 230 | * Gets a list of all {@link RouteNodeInstance} for a {@link Document} with the given documentId | |
| 231 | * | |
| 232 | * @param documentId the unique id of a Document | |
| 233 | * | |
| 234 | * @return the list of {@link RouteNodeInstance}s for the {@link Document} with the given documentId | |
| 235 | * | |
| 236 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 237 | */ | |
| 238 | @WebMethod(operationName = "getRouteNodeInstances") | |
| 239 | @XmlElementWrapper(name = "routeNodeInstances", required = true) | |
| 240 | @XmlElement(name = "routeNodeInstance", required = false) | |
| 241 | @WebResult(name = "routeNodeInstances") | |
| 242 | List<RouteNodeInstance> getRouteNodeInstances(@WebParam(name = "documentId") String documentId) | |
| 243 | throws RiceIllegalArgumentException; | |
| 244 | ||
| 245 | /** | |
| 246 | * Gets a list of active {@link RouteNodeInstance} for a {@link Document} with the given documentId | |
| 247 | * | |
| 248 | * @param documentId the unique id of a Document | |
| 249 | * | |
| 250 | * @return the list of active {@link RouteNodeInstance}s for the {@link Document} with the given documentId | |
| 251 | * | |
| 252 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 253 | */ | |
| 254 | @WebMethod(operationName = "getActiveRouteNodeInstances") | |
| 255 | @XmlElementWrapper(name = "routeNodeInstances", required = true) | |
| 256 | @XmlElement(name = "routeNodeInstance", required = false) | |
| 257 | @WebResult(name = "routeNodeInstances") | |
| 258 | List<RouteNodeInstance> getActiveRouteNodeInstances(@WebParam(name = "documentId") String documentId) | |
| 259 | throws RiceIllegalArgumentException; | |
| 260 | ||
| 261 | /** | |
| 262 | * Gets a list of terminal {@link RouteNodeInstance}s for a {@link Document} with the given documentId | |
| 263 | * | |
| 264 | * @param documentId the unique id of a Document | |
| 265 | * | |
| 266 | * @return the list of terminal {@link RouteNodeInstance}s for the {@link Document} with the given documentId | |
| 267 | * | |
| 268 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 269 | */ | |
| 270 | @WebMethod(operationName = "getTerminalRouteNodeInstances") | |
| 271 | @XmlElementWrapper(name = "routeNodeInstances", required = true) | |
| 272 | @XmlElement(name = "routeNodeInstance", required = false) | |
| 273 | @WebResult(name = "routeNodeInstances") | |
| 274 | List<RouteNodeInstance> getTerminalRouteNodeInstances(@WebParam(name = "documentId") String documentId) | |
| 275 | throws RiceIllegalArgumentException; | |
| 276 | ||
| 277 | /** | |
| 278 | * Gets a list of current {@link RouteNodeInstance}s for a {@link Document} with the given documentId | |
| 279 | * | |
| 280 | * @param documentId the unique id of a Document | |
| 281 | * | |
| 282 | * @return the list of current {@link RouteNodeInstance}s for the {@link Document} with the given documentId | |
| 283 | * | |
| 284 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 285 | */ | |
| 286 | @WebMethod(operationName = "getCurrentRouteNodeInstances") | |
| 287 | @XmlElementWrapper(name = "routeNodeInstances", required = true) | |
| 288 | @XmlElement(name = "routeNodeInstance", required = false) | |
| 289 | @WebResult(name = "routeNodeInstances") | |
| 290 | List<RouteNodeInstance> getCurrentRouteNodeInstances(@WebParam(name = "documentId") String documentId) | |
| 291 | throws RiceIllegalArgumentException; | |
| 292 | ||
| 293 | /** | |
| 294 | * Gets a list of all previous {@link RouteNodeInstance}'s node names for a {@link Document} with the given documentId | |
| 295 | * | |
| 296 | * @param documentId the unique id of a Document | |
| 297 | * | |
| 298 | * @return the list of all previous {@link RouteNodeInstance}'s node names for the {@link Document} with the | |
| 299 | * given documentId | |
| 300 | * | |
| 301 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 302 | */ | |
| 303 | @WebMethod(operationName = "getPreviousRouteNodeNames") | |
| 304 | @XmlElementWrapper(name = "previousRouteNodeNames", required = true) | |
| 305 | @XmlElement(name = "previousRouteNodeName", required = false) | |
| 306 | @WebResult(name = "previousRouteNodeNames") | |
| 307 | List<String> getPreviousRouteNodeNames(@WebParam(name = "documentId") String documentId) | |
| 308 | throws RiceIllegalArgumentException; | |
| 309 | ||
| 310 | /** | |
| 311 | * Gets the status value for a {@link Document} with the given documentId | |
| 312 | * | |
| 313 | * @param documentId the unique id of a Document | |
| 314 | * | |
| 315 | * @return the status value for the {@link Document} with the | |
| 316 | * given documentId | |
| 317 | * | |
| 318 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 319 | */ | |
| 320 | @WebMethod(operationName = "getDocumentStatus") | |
| 321 | @WebResult(name = "documentStatus") | |
| 322 | String getDocumentStatus(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentException; | |
| 323 | ||
| 324 | ||
| 325 | /** | |
| 326 | * Gets a list of principalId values for a {@link Document} with the given documentId | |
| 327 | * and action request code that have pending action requests | |
| 328 | * | |
| 329 | * @param actionRequestedCd code for the pending action requested | |
| 330 | * @param documentId the unique id of a Document | |
| 331 | * | |
| 332 | * @return a list of principalIds for the {@link Document} with the | |
| 333 | * given parameters and have a pending action request | |
| 334 | * | |
| 335 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 336 | * @throws RiceIllegalArgumentException if {@code actionRequestCd} is null | |
| 337 | */ | |
| 338 | @WebMethod(operationName = "getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId") | |
| 339 | @XmlElementWrapper(name = "principalIds", required = true) | |
| 340 | @XmlElement(name = "principalId", required = false) | |
| 341 | @WebResult(name = "principalIds") | |
| 342 | List<String> getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId( | |
| 343 | @WebParam(name = "actionRequestedCd") String actionRequestedCd, | |
| 344 | @WebParam(name = "documentId") String documentId) | |
| 345 | throws RiceIllegalArgumentException; | |
| 346 | ||
| 347 | ||
| 348 | /** | |
| 349 | * Gets the {@link Document} initiator's principalId with the given documentId | |
| 350 | * | |
| 351 | * @param documentId the unique id of a Document | |
| 352 | * | |
| 353 | * @return the {@link Document} initiator's principalId | |
| 354 | * | |
| 355 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 356 | */ | |
| 357 | @WebMethod(operationName = "getDocumentInitiatorPrincipalId") | |
| 358 | @WebResult(name = "principalId") | |
| 359 | String getDocumentInitiatorPrincipalId(@WebParam(name = "documentId") String documentId) | |
| 360 | throws RiceIllegalArgumentException; | |
| 361 | ||
| 362 | /** | |
| 363 | * Gets the {@link Document}'s 'routed by' principalId with the given documentId | |
| 364 | * Returns null if the document is not found | |
| 365 | * | |
| 366 | * @param documentId the unique id of a Document | |
| 367 | * | |
| 368 | * @return the {@link Document}'s 'routed by' principalId | |
| 369 | * | |
| 370 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 371 | */ | |
| 372 | @WebMethod(operationName = "getRoutedByPrincipalIdByDocumentId") | |
| 373 | @WebResult(name = "principalId") | |
| 374 | String getRoutedByPrincipalIdByDocumentId(@WebParam(name = "documentId") String documentId) | |
| 375 | throws RiceIllegalArgumentException; | |
| 376 | ||
| 377 | ||
| 378 | /** | |
| 379 | * Gets a map of actions requested for a given principalId and documentId | |
| 380 | * The action request code is filled for the key value of the map, and a string representation | |
| 381 | * of a boolean value is the value. | |
| 382 | * | |
| 383 | * @param documentId the unique id of a Document | |
| 384 | * | |
| 385 | * @return the {@link Document}'s 'routed by' principalId | |
| 386 | * | |
| 387 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 388 | */ | |
| 389 | @WebMethod(operationName = "getActionsRequested") | |
| 390 | @WebResult(name = "actionsRequested") | |
| 391 | @XmlJavaTypeAdapter(value = MapStringStringAdapter.class) | |
| 392 | Map<String, String> getActionsRequested(@WebParam(name = "principalId") String principalId, | |
| 393 | @WebParam(name = "documentId") String documentId) | |
| 394 | throws RiceIllegalArgumentException; | |
| 395 | ||
| 396 | ||
| 397 | /** | |
| 398 | * Does a direct search for searchableAttributes without going through the document search | |
| 399 | * This returns a list of String values for String searchableAttributes | |
| 400 | * | |
| 401 | * @param documentId the unique id of a Document | |
| 402 | * @param key the searchableAttributes key value | |
| 403 | * | |
| 404 | * @return a list of String values for the {@link Document} with the | |
| 405 | * given documentId and searchable attribute key | |
| 406 | * | |
| 407 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 408 | * @throws RiceIllegalArgumentException if {@code key} is null | |
| 409 | */ | |
| 410 | @WebMethod(operationName = "getSearchableAttributeStringValuesByKey") | |
| 411 | @XmlElementWrapper(name = "searchableAttributeStringValues", required = true) | |
| 412 | @XmlElement(name = "searchableAttributeStringValue", required = false) | |
| 413 | @WebResult(name = "searchableAttributeStringValues") | |
| 414 | List<String> getSearchableAttributeStringValuesByKey(@WebParam(name = "documentId") String documentId, | |
| 415 | @WebParam(name = "key") String key) | |
| 416 | throws RiceIllegalArgumentException; | |
| 417 | ||
| 418 | /** | |
| 419 | * Does a direct search for searchableAttributes without going through the document search | |
| 420 | * This returns a list of DateTime values for date/time searchableAttributes | |
| 421 | * | |
| 422 | * @param documentId the unique id of a Document | |
| 423 | * @param key the searchableAttributes key value | |
| 424 | * | |
| 425 | * @return a list of DateTime values for the {@link Document} with the | |
| 426 | * given documentId and searchable attribute key | |
| 427 | * | |
| 428 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 429 | * @throws RiceIllegalArgumentException if {@code key} is null | |
| 430 | */ | |
| 431 | @WebMethod(operationName = "getSearchableAttributeDateTimeValuesByKey") | |
| 432 | @XmlElementWrapper(name = "searchableAttributeDateTimeValues", required = true) | |
| 433 | @XmlElement(name = "searchableAttributeDateTimeValue", required = false) | |
| 434 | @WebResult(name = "searchableAttributeDateTimeValues") | |
| 435 | @XmlJavaTypeAdapter(value = DateTimeAdapter.class) | |
| 436 | List<DateTime> getSearchableAttributeDateTimeValuesByKey(@WebParam(name = "documentId") String documentId, | |
| 437 | @WebParam(name = "key") String key) | |
| 438 | throws RiceIllegalArgumentException; | |
| 439 | ||
| 440 | /** | |
| 441 | * Does a direct search for searchableAttributes without going through the document search | |
| 442 | * This returns a list of BigDecimal values for decimal searchableAttributes | |
| 443 | * | |
| 444 | * @param documentId the unique id of a Document | |
| 445 | * @param key the searchableAttributes key value | |
| 446 | * | |
| 447 | * @return a list of BigDecimal values for the {@link Document} with the | |
| 448 | * given documentId and searchable attribute key | |
| 449 | * | |
| 450 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 451 | * @throws RiceIllegalArgumentException if {@code key} is null | |
| 452 | */ | |
| 453 | @WebMethod(operationName = "getSearchableAttributeFloatValuesByKey") | |
| 454 | @XmlElementWrapper(name = "searchableAttributeBigDecimalValues", required = true) | |
| 455 | @XmlElement(name = "searchableAttributeBigDecimalValue", required = false) | |
| 456 | @WebResult(name = "searchableAttributeBigDecimalValues") | |
| 457 | List<BigDecimal> getSearchableAttributeFloatValuesByKey(@WebParam(name = "documentId") String documentId, | |
| 458 | @WebParam(name = "key") String key) | |
| 459 | throws RiceIllegalArgumentException; | |
| 460 | ||
| 461 | /** | |
| 462 | * Does a direct search for searchableAttributes without going through the document search | |
| 463 | * This returns a list of Long values for long searchableAttributes | |
| 464 | * | |
| 465 | * @param documentId the unique id of a Document | |
| 466 | * @param key the searchableAttributes key value | |
| 467 | * | |
| 468 | * @return a list of BigDecimal values for the {@link Document} with the | |
| 469 | * given documentId and searchable attribute key | |
| 470 | * | |
| 471 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 472 | * @throws RiceIllegalArgumentException if {@code key} is null | |
| 473 | */ | |
| 474 | @WebMethod(operationName = "getSearchableAttributeLongValuesByKey") | |
| 475 | @XmlElementWrapper(name = "searchableAttributeLongValues", required = true) | |
| 476 | @XmlElement(name = "searchableAttributeLongValue", required = false) | |
| 477 | @WebResult(name = "searchableAttributeLongValues") | |
| 478 | List<Long> getSearchableAttributeLongValuesByKey(@WebParam(name = "documentId") String documentId, | |
| 479 | @WebParam(name = "key") String key) | |
| 480 | throws RiceIllegalArgumentException; | |
| 481 | ||
| 482 | /** | |
| 483 | * Gets a list of DocumentStatusTransitions for the {@link Document} with the given documentId | |
| 484 | * | |
| 485 | * @param documentId the unique id of a Document | |
| 486 | * | |
| 487 | * @return a list of DocumentStatusTransitions for the {@link Document} with the | |
| 488 | * given documentId | |
| 489 | * | |
| 490 | * @throws RiceIllegalArgumentException if {@code documentId} is null | |
| 491 | */ | |
| 492 | @WebMethod(operationName = "getDocumentStatusTransitionHistory") | |
| 493 | @XmlElementWrapper(name = "documentStatusTransitions", required = true) | |
| 494 | @XmlElement(name = "documentStatusTransition", required = false) | |
| 495 | @WebResult(name = "documentStatusTransitions") | |
| 496 | List<DocumentStatusTransition> getDocumentStatusTransitionHistory(@WebParam(name = "documentId") String documentId) | |
| 497 | throws RiceIllegalArgumentException; | |
| 498 | ||
| 499 | ||
| 500 | /** | |
| 501 | * Saves the passed in {@link DocumentLink}. If the {@link DocumentLink}'s id field is created. This method | |
| 502 | * actually creates two different links in the database (one from the document being | |
| 503 | * linked to the target and vice-versa). If the links already exist, then the call is ignored. | |
| 504 | * | |
| 505 | * @param documentLink the unique id of a Document | |
| 506 | * | |
| 507 | * @return the newly saved {@link DocumentLink} | |
| 508 | * | |
| 509 | * @throws RiceIllegalArgumentException if {@code documentLink} is null | |
| 510 | * @throws RiceIllegalArgumentException if {@code documentLink}'s is id value is populated | |
| 511 | */ | |
| 512 | @WebMethod(operationName = "addDocumentLink") | |
| 513 | @WebResult(name = "documentLink") | |
| 514 | DocumentLink addDocumentLink(@WebParam(name = "documentLink") DocumentLink documentLink) throws RiceIllegalArgumentException; | |
| 515 | ||
| 516 | /** | |
| 517 | * Removes the {@link DocumentLink} with the given documentLinkId. | |
| 518 | * | |
| 519 | * @param documentLinkId the unique id of a Document | |
| 520 | * | |
| 521 | * @return the deleted {@link DocumentLink} | |
| 522 | * | |
| 523 | * @throws RiceIllegalArgumentException if {@code documentLink} is null | |
| 524 | * @throws RiceIllegalStateException if no DocumentLink with the passed in{@code documentLink} exist | |
| 525 | */ | |
| 526 | @WebMethod(operationName = "deleteDocumentLink") | |
| 527 | @WebResult(name = "documentLink") | |
| 528 | DocumentLink deleteDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException; | |
| 529 | ||
| 530 | ||
| 531 | /** | |
| 532 | * Removes all {@link DocumentLink}s for the given {@link Document} with the given originatingDocumentId. | |
| 533 | * | |
| 534 | * @param originatingDocumentId the unique id of the originating Document of the document links to delete | |
| 535 | * | |
| 536 | * @return a list of the deleted {@link DocumentLink}s | |
| 537 | * | |
| 538 | * @throws RiceIllegalArgumentException if {@code documentLink} is null | |
| 539 | */ | |
| 540 | @WebMethod(operationName = "deleteDocumentLinksByDocumentId") | |
| 541 | @XmlElementWrapper(name = "documentLinks", required = true) | |
| 542 | @XmlElement(name = "documentLink", required = false) | |
| 543 | @WebResult(name = "documentLinks") | |
| 544 | List<DocumentLink> deleteDocumentLinksByDocumentId(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException; | |
| 545 | ||
| 546 | /** | |
| 547 | * Gets a list of all {@link DocumentLink}s for outgoing links from the {@link Document} with the given documentId. | |
| 548 | * | |
| 549 | * @param originatingDocumentId the unique id of the originating Document of the document links to retrieve | |
| 550 | * | |
| 551 | * @return a list of the outgoing {@link DocumentLink}s for the originating document | |
| 552 | * | |
| 553 | * @throws RiceIllegalArgumentException if {@code originatingDocumentId} is null | |
| 554 | */ | |
| 555 | @WebMethod(operationName = "getOutgoingDocumentLinks") | |
| 556 | @XmlElementWrapper(name = "documentLinks", required = true) | |
| 557 | @XmlElement(name = "documentLink", required = false) | |
| 558 | @WebResult(name = "documentLinks") | |
| 559 | List<DocumentLink> getOutgoingDocumentLinks(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException; | |
| 560 | ||
| 561 | /** | |
| 562 | * Gets a list of all {@link DocumentLink}s for incoming links from the {@link Document} with the given documentId. | |
| 563 | * | |
| 564 | * @param originatingDocumentId the unique id of the incoming Document of the document links to retrieve | |
| 565 | * | |
| 566 | * @return a list of the outgoing {@link DocumentLink}s for the incoming document | |
| 567 | * | |
| 568 | * @throws RiceIllegalArgumentException if {@code originatingDocumentId} is null | |
| 569 | */ | |
| 570 | @WebMethod(operationName = "getIncomingDocumentLinks") | |
| 571 | @XmlElementWrapper(name = "documentLinks", required = true) | |
| 572 | @XmlElement(name = "documentLink", required = false) | |
| 573 | @WebResult(name = "documentLinks") | |
| 574 | List<DocumentLink> getIncomingDocumentLinks(@WebParam(name = "originatingDocumentId") String originatingDocumentId) throws RiceIllegalArgumentException; | |
| 575 | ||
| 576 | /** | |
| 577 | * Gets the {@link DocumentLink} for with the given documentLinkId. | |
| 578 | * | |
| 579 | * @param documentLinkId the unique id of the {@link DocumentLink} to retrieve | |
| 580 | * | |
| 581 | * @return a {@link DocumentLink} with the passed in documentLinkId | |
| 582 | * | |
| 583 | * @throws RiceIllegalArgumentException if {@code documentLinkId} is null | |
| 584 | */ | |
| 585 | @WebMethod(operationName = "getDocumentLink") | |
| 586 | @WebResult(name = "documentLinks") | |
| 587 | DocumentLink getDocumentLink(@WebParam(name = "documentLinkId") String documentLinkId) throws RiceIllegalArgumentException; | |
| 588 | ||
| 589 | } |