001: /*
002: * Copyright 2005-2006 The Kuali Foundation.
003: *
004: *
005: * Licensed under the Educational Community License, Version 1.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.opensource.org/licenses/ecl1.php
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package edu.iu.uis.eden.actionrequests;
018:
019: import java.util.Collection;
020: import java.util.List;
021: import java.util.Set;
022:
023: import edu.iu.uis.eden.actiontaken.ActionTakenValue;
024: import edu.iu.uis.eden.engine.ActivationContext;
025: import edu.iu.uis.eden.engine.node.RouteNodeInstance;
026: import edu.iu.uis.eden.exception.EdenUserNotFoundException;
027: import edu.iu.uis.eden.routeheader.DocumentRouteHeaderValue;
028: import edu.iu.uis.eden.user.Recipient;
029: import edu.iu.uis.eden.user.WorkflowUser;
030: import edu.iu.uis.eden.workgroup.Workgroup;
031:
032: /**
033: * Service to handle the building, sorting, saving, activating and deactivating of action request graphs. These lists are
034: * what determine role and delegation behaviors in graphs of action requests.
035: *
036: * Fetching that is being done is also taking into account the 'weight' of action request codes.
037: *
038: * @author ewestfal
039: * @author rkirkend
040: */
041: public interface ActionRequestService {
042:
043: public ActionRequestValue initializeActionRequestGraph(
044: ActionRequestValue actionRequest,
045: DocumentRouteHeaderValue document,
046: RouteNodeInstance nodeInstance);
047:
048: public void deactivateRequest(ActionTakenValue actionTaken,
049: ActionRequestValue actionRequest);
050:
051: public void deactivateRequests(ActionTakenValue actionTaken,
052: List actionRequests);
053:
054: public void deactivateRequest(ActionTakenValue actionTaken,
055: ActionRequestValue actionRequest, boolean simulate);
056:
057: public void deactivateRequest(ActionTakenValue actionTaken,
058: ActionRequestValue actionRequest,
059: ActivationContext activationContext);
060:
061: public void deactivateRequests(ActionTakenValue actionTaken,
062: List actionRequests, boolean simulate);
063:
064: public void deactivateRequests(ActionTakenValue actionTaken,
065: List actionRequests, ActivationContext activationContext);
066:
067: public void deleteActionRequestGraph(
068: ActionRequestValue actionRequest);
069:
070: public List findAllValidRequests(WorkflowUser user,
071: Long routeHeaderId, String requestCode)
072: throws EdenUserNotFoundException;
073:
074: public List findAllValidRequests(WorkflowUser user,
075: Collection actionRequests, String requestCode)
076: throws EdenUserNotFoundException;
077:
078: public List findPendingByDoc(Long routeHeaderId);
079:
080: public void saveActionRequest(ActionRequestValue actionRequest)
081: throws EdenUserNotFoundException;
082:
083: public void activateRequest(ActionRequestValue actionRequest)
084: throws EdenUserNotFoundException;
085:
086: public void activateRequest(ActionRequestValue actionRequest,
087: boolean simulate) throws EdenUserNotFoundException;
088:
089: public void activateRequest(ActionRequestValue actionRequest,
090: ActivationContext activationContext)
091: throws EdenUserNotFoundException;
092:
093: public void activateRequests(Collection actionRequests)
094: throws EdenUserNotFoundException;
095:
096: public void activateRequests(Collection actionRequests,
097: boolean simulate) throws EdenUserNotFoundException;
098:
099: public void activateRequests(Collection actionRequests,
100: ActivationContext activationContext)
101: throws EdenUserNotFoundException;
102:
103: public List activateRequestNoNotification(
104: ActionRequestValue actionRequest, boolean simulate)
105: throws EdenUserNotFoundException;
106:
107: public List activateRequestNoNotification(
108: ActionRequestValue actionRequest,
109: ActivationContext activationContext)
110: throws EdenUserNotFoundException;
111:
112: public ActionRequestValue findByActionRequestId(Long actionRequestId);
113:
114: public List findPendingRootRequestsByDocId(Long routeHeaderId);
115:
116: public List findPendingRootRequestsByDocIdAtRouteLevel(
117: Long routeHeaderId, Integer routeLevel);
118:
119: public List findPendingByDocIdAtOrBelowRouteLevel(
120: Long routeHeaderId, Integer routeLevel);
121:
122: public List findPendingRootRequestsByDocIdAtOrBelowRouteLevel(
123: Long routeHeaderId, Integer routeLevel);
124:
125: public List findPendingRootRequestsByDocumentType(
126: Long documentTypeId);
127:
128: public List findAllActionRequestsByRouteHeaderId(Long routeHeaderId);
129:
130: public List findPendingByActionRequestedAndDocId(
131: String actionRequestedCdCd, Long routeHeaderId);
132:
133: public List findByStatusAndDocId(String statusCd, Long routeHeaderId);
134:
135: public void alterActionRequested(List actionRequests,
136: String actionRequestCd) throws EdenUserNotFoundException;
137:
138: public List findByRouteHeaderIdIgnoreCurrentInd(Long routeHeaderId);
139:
140: public List findActivatedByWorkgroup(Workgroup workgroup);
141:
142: public void updateActionRequestsForResponsibilityChange(
143: Set responsibilityIds);
144:
145: public ActionRequestValue getRoot(ActionRequestValue actionRequest);
146:
147: public List getRootRequests(Collection actionRequests);
148:
149: public boolean isDuplicateRequest(ActionRequestValue actionRequest);
150:
151: public List findPendingByDocRequestCdRouteLevel(Long routeHeaderId,
152: String requestCode, Integer routeLevel);
153:
154: public List findPendingByDocRequestCdNodeName(Long routeHeaderId,
155: String requestCode, String nodeName);
156:
157: /**
158: * Returns the highest priority delegator in the list of action requests.
159: */
160: public Recipient findDelegator(List actionRequests)
161: throws EdenUserNotFoundException;
162:
163: /**
164: * Returns the closest delegator for the given ActionRequest
165: */
166: public Recipient findDelegator(ActionRequestValue actionRequest)
167: throws EdenUserNotFoundException;
168:
169: public ActionRequestValue findDelegatorRequest(
170: ActionRequestValue actionRequest);
171:
172: public void deleteByRouteHeaderId(Long routeHeaderId);
173:
174: public void deleteByActionRequestId(Long actionRequestId);
175:
176: public void validateActionRequest(ActionRequestValue actionRequest);
177:
178: public List<ActionRequestValue> findPendingRootRequestsByDocIdAtRouteNode(
179: Long routeHeaderId, Long nodeInstanceId);
180:
181: public List findRootRequestsByDocIdAtRouteNode(Long documentId,
182: Long nodeInstanceId);
183:
184: public List getDelegateRequests(ActionRequestValue actionRequest);
185:
186: /**
187: * If this is a role request, then this method returns a List of the action request for each recipient within the
188: * role. Otherwise, it will return a List with just the original action request.
189: */
190: public List getTopLevelRequests(ActionRequestValue actionRequest);
191:
192: public boolean isValidActionRequestCode(String actionRequestCode);
193:
194: }
|