01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.workgroup;
18:
19: import org.kuali.workflow.workgroup.WorkgroupType;
20:
21: import edu.iu.uis.eden.clientapp.WorkflowDocument;
22: import edu.iu.uis.eden.exception.WorkflowException;
23: import edu.iu.uis.eden.web.session.UserSession;
24:
25: /**
26: * Defines a service for routing of Workgroups within Workflow. This interface should be implemented to
27: * provide routing capabilities for a Workgroup implementation.
28: *
29: * @author ewestfal
30: */
31: public interface WorkgroupRoutingService {
32:
33: /**
34: * Return the name of the default DocumentType defining the Workgroup routing process.
35: */
36: public String getDefaultDocumentTypeName();
37:
38: /**
39: * Create a new WorkflowDocument for a Workgroup document type for the given initiator and WorkgroupType
40: */
41: public WorkflowDocument createWorkgroupDocument(
42: UserSession initiator, WorkgroupType workgroupType)
43: throws WorkflowException;
44:
45: /**
46: * Determines whether or not the Workgroup with the given id is locked for routing. If it is locked, then the
47: * id of the Workflow document which causes the document to be locked is returned. Otherwise, null is returned.
48: */
49: public Long getLockingDocumentId(GroupId groupId)
50: throws WorkflowException;
51:
52: /**
53: * Routes the given Workgroup as the specified user.
54: */
55: public void route(Workgroup workgroup, UserSession user,
56: String annotation) throws WorkflowException;
57:
58: /**
59: * Routes the given Workgroup with the blanket approve command.
60: */
61: public void blanketApprove(Workgroup workgroup, UserSession user,
62: String annotation) throws WorkflowException;
63:
64: /**
65: * Invoked after the Workgroup document has finished routing. Effectively activates the routed workgroup by
66: * marking the current version (if there is one) as non-current and the new version as current.
67: */
68: public void activateRoutedWorkgroup(Long documentId)
69: throws WorkflowException;
70:
71: /**
72: * Retrieves the Workgroup which has the given Document ID
73: */
74: public Workgroup findByDocumentId(Long documentId)
75: throws WorkflowException;
76:
77: }
|