001: /*
002: * Copyright 2005-2007 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.server;
018:
019: import java.rmi.RemoteException;
020:
021: import javax.xml.namespace.QName;
022:
023: import edu.iu.uis.eden.KEWServiceLocator;
024: import edu.iu.uis.eden.SpringLoader;
025: import edu.iu.uis.eden.clientapp.vo.ActionRequestVO;
026: import edu.iu.uis.eden.clientapp.vo.ActionTakenVO;
027: import edu.iu.uis.eden.clientapp.vo.DocumentContentVO;
028: import edu.iu.uis.eden.clientapp.vo.DocumentDetailVO;
029: import edu.iu.uis.eden.clientapp.vo.DocumentTypeVO;
030: import edu.iu.uis.eden.clientapp.vo.ReportCriteriaVO;
031: import edu.iu.uis.eden.clientapp.vo.RouteHeaderVO;
032: import edu.iu.uis.eden.clientapp.vo.RouteNodeInstanceVO;
033: import edu.iu.uis.eden.clientapp.vo.RouteTemplateEntryVO;
034: import edu.iu.uis.eden.clientapp.vo.RuleReportCriteriaVO;
035: import edu.iu.uis.eden.clientapp.vo.RuleVO;
036: import edu.iu.uis.eden.clientapp.vo.UserIdVO;
037: import edu.iu.uis.eden.clientapp.vo.UserVO;
038: import edu.iu.uis.eden.clientapp.vo.WorkflowAttributeDefinitionVO;
039: import edu.iu.uis.eden.clientapp.vo.WorkflowAttributeValidationErrorVO;
040: import edu.iu.uis.eden.clientapp.vo.WorkgroupIdVO;
041: import edu.iu.uis.eden.clientapp.vo.WorkgroupVO;
042: import edu.iu.uis.eden.exception.WorkflowException;
043:
044: /**
045: * @workflow.webservice name="WorkflowUtility"
046: */
047: public class WorkflowUtilityServiceEndpoint implements WorkflowUtility {
048:
049: private WorkflowUtility utility;
050:
051: public void init(Object context) {
052: // fetch the service directly from the SpringLoader to gaurantee we are fetching the local, in-memory service
053: this .utility = (WorkflowUtility) SpringLoader
054: .getInstance()
055: .getService(
056: new QName(
057: KEWServiceLocator.WORKFLOW_UTILITY_SERVICE));
058: // this.utility = ;
059: }
060:
061: public void destroy() {
062: }
063:
064: public ActionRequestVO[] getActionRequests(Long routeHeaderId)
065: throws RemoteException, WorkflowException {
066: return utility.getActionRequests(routeHeaderId);
067: }
068:
069: public ActionRequestVO[] getActionRequests(Long routeHeaderId,
070: String nodeName, UserIdVO userId) throws RemoteException,
071: WorkflowException {
072: return utility.getActionRequests(routeHeaderId, nodeName,
073: userId);
074: }
075:
076: public WorkflowAttributeValidationErrorVO[] validateWorkflowAttributeDefinitionVO(
077: WorkflowAttributeDefinitionVO definition)
078: throws RemoteException, WorkflowException {
079: return utility
080: .validateWorkflowAttributeDefinitionVO(definition);
081: }
082:
083: public ActionTakenVO[] getActionsTaken(Long routeHeaderId)
084: throws RemoteException, WorkflowException {
085: return utility.getActionsTaken(routeHeaderId);
086: }
087:
088: public RouteTemplateEntryVO[] getDocRoute(String docName)
089: throws RemoteException, WorkflowException {
090: return utility.getDocRoute(docName);
091: }
092:
093: public DocumentTypeVO getDocumentType(Long documentTypeId)
094: throws RemoteException, WorkflowException {
095: return utility.getDocumentType(documentTypeId);
096: }
097:
098: public DocumentTypeVO getDocumentTypeByName(String documentTypeName)
099: throws RemoteException, WorkflowException {
100: return utility.getDocumentTypeByName(documentTypeName);
101: }
102:
103: public Long getNewResponsibilityId() throws RemoteException,
104: WorkflowException {
105: return utility.getNewResponsibilityId();
106: }
107:
108: public RouteHeaderVO getRouteHeader(Long routeHeaderId)
109: throws RemoteException, WorkflowException {
110: return utility.getRouteHeader(routeHeaderId);
111: }
112:
113: public RouteHeaderVO getRouteHeaderWithUser(UserIdVO userId,
114: Long routeHeaderId) throws RemoteException,
115: WorkflowException {
116: return utility.getRouteHeaderWithUser(userId, routeHeaderId);
117: }
118:
119: public WorkgroupVO[] getUserWorkgroups(UserIdVO userId)
120: throws RemoteException, WorkflowException {
121: return utility.getUserWorkgroups(userId);
122: }
123:
124: public UserVO getWorkflowUser(UserIdVO userId)
125: throws RemoteException, WorkflowException {
126: return utility.getWorkflowUser(userId);
127: }
128:
129: public WorkgroupVO getWorkgroup(WorkgroupIdVO workgroupId)
130: throws RemoteException, WorkflowException {
131: return utility.getWorkgroup(workgroupId);
132: }
133:
134: public boolean isFinalApprover(Long routeHeaderId, UserIdVO userId)
135: throws RemoteException, WorkflowException {
136: return utility.isFinalApprover(routeHeaderId, userId);
137: }
138:
139: public boolean isLastApproverInRouteLevel(Long routeHeaderId,
140: UserIdVO userId, Integer routeLevel)
141: throws RemoteException, WorkflowException {
142: return utility.isLastApproverInRouteLevel(routeHeaderId,
143: userId, routeLevel);
144: }
145:
146: public boolean isLastApproverAtNode(Long routeHeaderId,
147: UserIdVO userId, String nodeName) throws RemoteException,
148: WorkflowException {
149: return utility.isLastApproverAtNode(routeHeaderId, userId,
150: nodeName);
151: }
152:
153: public boolean isUserInRouteLog(Long routeHeaderId,
154: UserIdVO userId, boolean lookFuture)
155: throws RemoteException, WorkflowException {
156: return utility.isUserInRouteLog(routeHeaderId, userId,
157: lookFuture);
158: }
159:
160: public void reResolveRoleByDocumentId(Long documentId,
161: String roleName, String qualifiedRoleNameLabel)
162: throws RemoteException, WorkflowException {
163: utility.reResolveRoleByDocumentId(documentId, roleName,
164: qualifiedRoleNameLabel);
165: }
166:
167: public void reResolveRole(String documentTypeName, String roleName,
168: String qualifiedRoleNameLabel) throws RemoteException,
169: WorkflowException {
170: utility.reResolveRole(documentTypeName, roleName,
171: qualifiedRoleNameLabel);
172: }
173:
174: public boolean routeLevelHasApproverActionRequest(String docType,
175: String docContent, Integer routeLevel)
176: throws RemoteException, WorkflowException {
177: return utility.routeLevelHasApproverActionRequest(docType,
178: docContent, routeLevel);
179: }
180:
181: public boolean routeNodeHasApproverActionRequest(String docType,
182: String docContent, String nodeName) throws RemoteException,
183: WorkflowException {
184: return utility.routeNodeHasApproverActionRequest(docType,
185: docContent, nodeName);
186: }
187:
188: public DocumentDetailVO routingReport(
189: ReportCriteriaVO reportCriteria) throws RemoteException,
190: WorkflowException {
191: return utility.routingReport(reportCriteria);
192: }
193:
194: public RouteNodeInstanceVO[] getDocumentRouteNodeInstances(
195: Long routeHeaderId) throws RemoteException,
196: WorkflowException {
197: return utility.getDocumentRouteNodeInstances(routeHeaderId);
198: }
199:
200: public DocumentDetailVO getDocumentDetail(Long documentId)
201: throws RemoteException, WorkflowException {
202: return utility.getDocumentDetail(documentId);
203: }
204:
205: public RouteNodeInstanceVO getNodeInstance(Long nodeInstanceId)
206: throws RemoteException, WorkflowException {
207: return utility.getNodeInstance(nodeInstanceId);
208: }
209:
210: public RouteNodeInstanceVO[] getActiveNodeInstances(Long documentId)
211: throws RemoteException, WorkflowException {
212: return utility.getActiveNodeInstances(documentId);
213: }
214:
215: public RouteNodeInstanceVO[] getTerminalNodeInstances(
216: Long documentId) throws RemoteException, WorkflowException {
217: return utility.getTerminalNodeInstances(documentId);
218: }
219:
220: public DocumentContentVO getDocumentContent(Long routeHeaderId)
221: throws RemoteException, WorkflowException {
222: return utility.getDocumentContent(routeHeaderId);
223: }
224:
225: public boolean isSuperUserForDocumentType(UserIdVO userId,
226: Long documentTypeId) throws RemoteException,
227: WorkflowException {
228: return utility.isSuperUserForDocumentType(userId,
229: documentTypeId);
230: }
231:
232: public String[] getPreviousRouteNodeNames(Long documentId)
233: throws RemoteException, WorkflowException {
234: return utility.getPreviousRouteNodeNames(documentId);
235: }
236:
237: public RuleVO[] ruleReport(RuleReportCriteriaVO ruleReportCriteria)
238: throws RemoteException, WorkflowException {
239: return utility.ruleReport(ruleReportCriteria);
240: }
241:
242: public boolean documentWillHaveAtLeastOneActionRequest(
243: ReportCriteriaVO reportCriteriaVO,
244: String[] actionRequestedCodes) throws RemoteException {
245: return utility.documentWillHaveAtLeastOneActionRequest(
246: reportCriteriaVO, actionRequestedCodes);
247: }
248: }
|