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.routeheader;
018:
019: import java.util.List;
020: import java.util.Set;
021:
022: import edu.iu.uis.eden.actions.ActionTakenEvent;
023: import edu.iu.uis.eden.actions.AdHocRevoke;
024: import edu.iu.uis.eden.actions.MovePoint;
025: import edu.iu.uis.eden.exception.DocumentTypeNotFoundException;
026: import edu.iu.uis.eden.exception.EdenUserNotFoundException;
027: import edu.iu.uis.eden.exception.InvalidActionTakenException;
028: import edu.iu.uis.eden.exception.WorkflowException;
029: import edu.iu.uis.eden.server.WorkflowDocumentActions;
030: import edu.iu.uis.eden.user.Recipient;
031: import edu.iu.uis.eden.user.WorkflowUser;
032: import edu.iu.uis.eden.workgroup.Workgroup;
033:
034: /**
035: * Service for initiating actions against documents. Uses from the service endpoint
036: * for the client API.
037: *
038: * @see WorkflowDocumentActions
039: * @see ActionTakenEvent
040: *
041: * @author rkirkend
042: * @author ewestfal
043: */
044: public interface WorkflowDocumentService {
045:
046: public DocumentRouteHeaderValue acknowledgeDocument(
047: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
048: String annotation) throws InvalidActionTakenException,
049: EdenUserNotFoundException;
050:
051: public DocumentRouteHeaderValue approveDocument(WorkflowUser user,
052: DocumentRouteHeaderValue routeHeader, String annotation)
053: throws InvalidActionTakenException,
054: EdenUserNotFoundException;
055:
056: public DocumentRouteHeaderValue appSpecificRouteDocument(
057: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
058: String actionRequested, String routeMethodName,
059: String annotation, Recipient rp, String responsibilityDesc,
060: Boolean ignorePrevActions) throws WorkflowException;
061:
062: public DocumentRouteHeaderValue cancelDocument(WorkflowUser user,
063: DocumentRouteHeaderValue routeHeader, String annotation)
064: throws InvalidActionTakenException,
065: EdenUserNotFoundException;
066:
067: public DocumentRouteHeaderValue clearFYIDocument(WorkflowUser user,
068: DocumentRouteHeaderValue routeHeader)
069: throws InvalidActionTakenException,
070: EdenUserNotFoundException;
071:
072: public DocumentRouteHeaderValue completeDocument(WorkflowUser user,
073: DocumentRouteHeaderValue routeHeader, String annotation)
074: throws InvalidActionTakenException,
075: EdenUserNotFoundException;
076:
077: public DocumentRouteHeaderValue createDocument(WorkflowUser user,
078: DocumentRouteHeaderValue routeHeader)
079: throws DocumentTypeNotFoundException, WorkflowException;
080:
081: public DocumentRouteHeaderValue disapproveDocument(
082: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
083: String annotation) throws InvalidActionTakenException,
084: EdenUserNotFoundException;
085:
086: public DocumentRouteHeaderValue routeDocument(WorkflowUser user,
087: DocumentRouteHeaderValue routeHeader, String annotation)
088: throws WorkflowException, InvalidActionTakenException,
089: EdenUserNotFoundException;
090:
091: public DocumentRouteHeaderValue saveRoutingData(WorkflowUser user,
092: DocumentRouteHeaderValue routeHeader);
093:
094: public DocumentRouteHeaderValue saveDocument(WorkflowUser user,
095: DocumentRouteHeaderValue routeHeader, String annotation)
096: throws InvalidActionTakenException,
097: EdenUserNotFoundException;
098:
099: public void deleteDocument(WorkflowUser user,
100: DocumentRouteHeaderValue routeHeader)
101: throws WorkflowException;
102:
103: public void logDocumentAction(WorkflowUser user,
104: DocumentRouteHeaderValue routeHeader, String annotation)
105: throws EdenUserNotFoundException,
106: InvalidActionTakenException;
107:
108: public DocumentRouteHeaderValue super UserActionRequestApproveAction(
109: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
110: Long actionRequestId, String annotation)
111: throws InvalidActionTakenException,
112: EdenUserNotFoundException;
113:
114: public DocumentRouteHeaderValue super UserApprove(WorkflowUser user,
115: DocumentRouteHeaderValue routeHeader, String annotation)
116: throws InvalidActionTakenException,
117: EdenUserNotFoundException;
118:
119: public DocumentRouteHeaderValue super UserCancelAction(
120: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
121: String annotation) throws InvalidActionTakenException,
122: EdenUserNotFoundException;
123:
124: public DocumentRouteHeaderValue super UserDisapproveAction(
125: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
126: String annotation) throws InvalidActionTakenException,
127: EdenUserNotFoundException;
128:
129: // Introduced in 2.1 //
130:
131: /**
132: * @since 2.1
133: */
134: public DocumentRouteHeaderValue blanketApproval(WorkflowUser user,
135: DocumentRouteHeaderValue routeHeader, String annotation,
136: Set nodeNames) throws InvalidActionTakenException,
137: EdenUserNotFoundException;
138:
139: /**
140: * @since 2.1
141: */
142: public DocumentRouteHeaderValue returnDocumentToPreviousNode(
143: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
144: String destinationNodeName, String annotation)
145: throws InvalidActionTakenException,
146: EdenUserNotFoundException;
147:
148: /**
149: * @since 2.1
150: */
151: public DocumentRouteHeaderValue super UserReturnDocumentToPreviousNode(
152: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
153: String nodeName, String annotation)
154: throws InvalidActionTakenException,
155: EdenUserNotFoundException;
156:
157: /**
158: * @since 2.1
159: */
160: public DocumentRouteHeaderValue takeWorkgroupAuthority(
161: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
162: Workgroup workgroup, String annotation)
163: throws InvalidActionTakenException,
164: EdenUserNotFoundException;
165:
166: /**
167: * @since 2.1
168: */
169: public DocumentRouteHeaderValue releaseWorkgroupAuthority(
170: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
171: Workgroup workgroup, String annotation)
172: throws InvalidActionTakenException,
173: EdenUserNotFoundException;
174:
175: /**
176: * @since 2.1
177: */
178: public DocumentRouteHeaderValue super UserNodeApproveAction(
179: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
180: String nodeName, String annotation)
181: throws InvalidActionTakenException,
182: EdenUserNotFoundException;
183:
184: /**
185: * @since 2.1
186: */
187: public DocumentRouteHeaderValue moveDocument(WorkflowUser user,
188: DocumentRouteHeaderValue routeHeader, MovePoint movePoint,
189: String annotation) throws InvalidActionTakenException,
190: EdenUserNotFoundException;
191:
192: // Introduced in 2.2
193:
194: /**
195: * Invokes a List of actions at once. This method will remove the approriate action items from the user's action
196: * list and then schedule the actual processing of the actions.
197: *
198: * @since 2.2
199: */
200: public void takeMassActions(WorkflowUser user,
201: List actionInvocations);
202:
203: /**
204: * @since 2.2
205: */
206: public DocumentRouteHeaderValue super UserReturnDocumentToPreviousNode(
207: WorkflowUser user, Long documentId, String nodeName,
208: String annotation) throws InvalidActionTakenException,
209: EdenUserNotFoundException;
210:
211: // Introduced in 2.2.2
212:
213: /**
214: * @since 2.2.2
215: */
216: public DocumentRouteHeaderValue revokeAdHocRequests(
217: WorkflowUser user, DocumentRouteHeaderValue document,
218: AdHocRevoke revoke, String annotation)
219: throws InvalidActionTakenException,
220: EdenUserNotFoundException;
221:
222: // Deprecated as of 2.1 //
223:
224: /**
225: * @deprecated use blanketApproval which takes a Set of nodeNames instead.
226: */
227: public DocumentRouteHeaderValue blanketApproval(WorkflowUser user,
228: DocumentRouteHeaderValue routeHeader, String annotation,
229: Integer routeLevel) throws InvalidActionTakenException,
230: EdenUserNotFoundException;
231:
232: /**
233: * @deprecated use returnDocumentToPreviousNode instead
234: */
235: public DocumentRouteHeaderValue returnDocumentToPreviousRouteLevel(
236: WorkflowUser user, DocumentRouteHeaderValue routeHeader,
237: Integer destRouteLevel, String annotation)
238: throws InvalidActionTakenException,
239: EdenUserNotFoundException;
240:
241: }
|