Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
KualiWorkflowInfo |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2005-2007 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.kns.workflow.service; | |
17 | ||
18 | import java.rmi.RemoteException; | |
19 | import java.util.List; | |
20 | ||
21 | import org.kuali.rice.kew.dto.ActionRequestDTO; | |
22 | import org.kuali.rice.kew.dto.ActionTakenDTO; | |
23 | import org.kuali.rice.kew.dto.DocumentSearchCriteriaDTO; | |
24 | import org.kuali.rice.kew.dto.DocumentSearchResultDTO; | |
25 | import org.kuali.rice.kew.dto.DocumentTypeDTO; | |
26 | import org.kuali.rice.kew.dto.ReportCriteriaDTO; | |
27 | import org.kuali.rice.kew.dto.RouteHeaderDTO; | |
28 | import org.kuali.rice.kew.exception.WorkflowException; | |
29 | ||
30 | ||
31 | /** | |
32 | * | |
33 | * This class... | |
34 | * | |
35 | * | |
36 | */ | |
37 | public interface KualiWorkflowInfo { | |
38 | public abstract RouteHeaderDTO getRouteHeader(String principalId, Long routeHeaderId) throws WorkflowException; | |
39 | ||
40 | public abstract RouteHeaderDTO getRouteHeader(Long routeHeaderId) throws WorkflowException; | |
41 | ||
42 | public abstract DocumentTypeDTO getDocType(Long documentTypeId) throws WorkflowException; | |
43 | ||
44 | public abstract DocumentTypeDTO getDocType(String documentTypeName) throws WorkflowException; | |
45 | ||
46 | public abstract Long getNewResponsibilityId() throws WorkflowException; | |
47 | ||
48 | public abstract ActionRequestDTO[] getActionRequests(Long routeHeaderId) throws WorkflowException; | |
49 | ||
50 | public abstract ActionRequestDTO[] getActionRequests(Long routeHeaderId, String nodeName, String principalId) throws WorkflowException; | |
51 | ||
52 | public abstract ActionTakenDTO[] getActionsTaken(Long routeHeaderId) throws WorkflowException; | |
53 | ||
54 | public abstract void reResolveRole(String documentTypeName, String roleName, String qualifiedRoleNameLabel) throws WorkflowException; | |
55 | ||
56 | public abstract void reResolveRole(Long routeHeaderId, String roleName, String qualifiedRoleNameLabel) throws WorkflowException; | |
57 | ||
58 | /** | |
59 | * | |
60 | * Determines whether the given routeHeaderId (also known as a documentNumber, or a docHeaderId) exists and is | |
61 | * retrievable in workflow. | |
62 | * | |
63 | * @param routeHeaderId The docHeaderId/finDocNumber you would like to test. | |
64 | * @return True if the document exists in workflow and is retrievable without errors, False otherwise. | |
65 | * | |
66 | */ | |
67 | public abstract boolean routeHeaderExists(Long routeHeaderId); | |
68 | ||
69 | /** | |
70 | * Determines if a document generated (or retrieved) using the given criteria has (or will have) an action request using | |
71 | * one of the given action request codes. User may or may not pass in a target node name inside the ReportCriteriaDTO object. | |
72 | * | |
73 | * @param reportCriteriaDTO - Holds either a document type name or a document id as well as other data to help simulate routing | |
74 | * @param actionRequestedCodes - List of Action Request Codes from the Workflow system | |
75 | * @param ignoreCurrentlyActiveRequests determines if method should look only at simulation generated requests | |
76 | * or both simulation generated requests and requests that are currently active on the document | |
77 | * @return true if the document has or will have at least one request that matches the criteria and has a requested code that matches one of the given codes | |
78 | * @throws WorkflowException | |
79 | */ | |
80 | public boolean documentWillHaveAtLeastOneActionRequest(ReportCriteriaDTO reportCriteriaDTO, String[] actionRequestedCodes, boolean ignoreCurrentlyActiveRequests) throws WorkflowException; | |
81 | ||
82 | /** | |
83 | * @deprecated use {@link #documentWillHaveAtLeastOneActionRequest(ReportCriteriaDTO, String[], boolean)} instead | |
84 | * | |
85 | * Use of this method passes the value 'false' in for the <code>ignoreCurrentlyActiveRequests</code> parameter of {@link #documentWillHaveAtLeastOneActionRequest(ReportCriteriaDTO, String[], boolean)} | |
86 | */ | |
87 | public boolean documentWillHaveAtLeastOneActionRequest(ReportCriteriaDTO reportCriteriaDTO, String[] actionRequestedCodes) throws WorkflowException; | |
88 | ||
89 | public boolean isCurrentActiveDocumentType( String documentTypeName ) throws WorkflowException; | |
90 | ||
91 | /** | |
92 | * This method returns a list of Universal User Ids that have approval or completion requested of them for the document represented by the routeHeaderId parameter | |
93 | * | |
94 | * @param routeHeaderId - the id of the document to check | |
95 | * @return a list of Universal User Ids that have approval or completion requested of them for the document with the given route header id | |
96 | * @throws WorkflowException | |
97 | */ | |
98 | public List<String> getApprovalRequestedUsers(Long routeHeaderId) throws WorkflowException; | |
99 | ||
100 | /** | |
101 | * This method allows a document search to be executed just as would occur from the User Interface | |
102 | * | |
103 | * @param criteriaVO - criteria to use for the search | |
104 | * @return a {@link DocumentSearchResultDTO} object containing a list of search result columns and data rows | |
105 | * @throws RemoteException | |
106 | * @throws WorkflowException | |
107 | */ | |
108 | public DocumentSearchResultDTO performDocumentSearch(DocumentSearchCriteriaDTO criteriaVO) throws WorkflowException; | |
109 | ||
110 | public DocumentSearchResultDTO performDocumentSearch(String principalId, DocumentSearchCriteriaDTO criteriaVO) throws RemoteException, WorkflowException; | |
111 | } |