001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.workflow.service;
022:
023: /**
024: * <a href="WorkflowComponentServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.workflow.service.WorkflowComponentService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.workflow.service.WorkflowComponentServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.workflow.service.WorkflowComponentService
047: * @see com.liferay.portlet.workflow.service.WorkflowComponentServiceFactory
048: *
049: */
050: public class WorkflowComponentServiceUtil {
051: public static java.util.List getCurrentTasks(long instanceId,
052: long tokenId)
053: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
054: java.rmi.RemoteException {
055: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
056: .getService();
057:
058: return workflowComponentService.getCurrentTasks(instanceId,
059: tokenId);
060: }
061:
062: public static java.lang.String getCurrentTasksXml(long instanceId,
063: long tokenId)
064: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
065: java.rmi.RemoteException {
066: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
067: .getService();
068:
069: return workflowComponentService.getCurrentTasksXml(instanceId,
070: tokenId);
071: }
072:
073: public static java.lang.String deploy(java.lang.String xml)
074: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
075: java.rmi.RemoteException {
076: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
077: .getService();
078:
079: return workflowComponentService.deploy(xml);
080: }
081:
082: public static java.lang.Object getDefinition(long definitionId)
083: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
084: java.rmi.RemoteException {
085: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
086: .getService();
087:
088: return workflowComponentService.getDefinition(definitionId);
089: }
090:
091: public static java.util.List getDefinitions(long definitionId,
092: java.lang.String name, int begin, int end)
093: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
094: java.rmi.RemoteException {
095: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
096: .getService();
097:
098: return workflowComponentService.getDefinitions(definitionId,
099: name, begin, end);
100: }
101:
102: public static java.lang.String getDefinitionsXml(long definitionId,
103: java.lang.String name, int begin, int end)
104: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
105: java.rmi.RemoteException {
106: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
107: .getService();
108:
109: return workflowComponentService.getDefinitionsXml(definitionId,
110: name, begin, end);
111: }
112:
113: public static int getDefinitionsCount(long definitionId,
114: java.lang.String name)
115: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
116: java.rmi.RemoteException {
117: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
118: .getService();
119:
120: return workflowComponentService.getDefinitionsCount(
121: definitionId, name);
122: }
123:
124: public static java.lang.String getDefinitionsCountXml(
125: long definitionId, java.lang.String name)
126: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
127: java.rmi.RemoteException {
128: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
129: .getService();
130:
131: return workflowComponentService.getDefinitionsCountXml(
132: definitionId, name);
133: }
134:
135: public static java.lang.String getDefinitionXml(long definitionId)
136: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
137: java.rmi.RemoteException {
138: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
139: .getService();
140:
141: return workflowComponentService.getDefinitionXml(definitionId);
142: }
143:
144: public static java.util.List getInstances(long definitionId,
145: long instanceId, java.lang.String definitionName,
146: java.lang.String definitionVersion,
147: java.lang.String startDateGT, java.lang.String startDateLT,
148: java.lang.String endDateGT, java.lang.String endDateLT,
149: boolean hideEndedTasks, boolean retrieveUserInstances,
150: boolean andOperator, int begin, int end)
151: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
152: java.rmi.RemoteException {
153: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
154: .getService();
155:
156: return workflowComponentService.getInstances(definitionId,
157: instanceId, definitionName, definitionVersion,
158: startDateGT, startDateLT, endDateGT, endDateLT,
159: hideEndedTasks, retrieveUserInstances, andOperator,
160: begin, end);
161: }
162:
163: public static int getInstancesCount(long definitionId,
164: long instanceId, java.lang.String definitionName,
165: java.lang.String definitionVersion,
166: java.lang.String startDateGT, java.lang.String startDateLT,
167: java.lang.String endDateGT, java.lang.String endDateLT,
168: boolean hideEndedTasks, boolean retrieveUserInstances,
169: boolean andOperator)
170: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
171: java.rmi.RemoteException {
172: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
173: .getService();
174:
175: return workflowComponentService.getInstancesCount(definitionId,
176: instanceId, definitionName, definitionVersion,
177: startDateGT, startDateLT, endDateGT, endDateLT,
178: hideEndedTasks, retrieveUserInstances, andOperator);
179: }
180:
181: public static java.lang.String getInstancesCountXml(
182: long definitionId, long instanceId,
183: java.lang.String definitionName,
184: java.lang.String definitionVersion,
185: java.lang.String startDateGT, java.lang.String startDateLT,
186: java.lang.String endDateGT, java.lang.String endDateLT,
187: boolean hideEndedTasks, boolean retrieveUserInstances,
188: boolean andOperator)
189: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
190: java.rmi.RemoteException {
191: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
192: .getService();
193:
194: return workflowComponentService.getInstancesCountXml(
195: definitionId, instanceId, definitionName,
196: definitionVersion, startDateGT, startDateLT, endDateGT,
197: endDateLT, hideEndedTasks, retrieveUserInstances,
198: andOperator);
199: }
200:
201: public static java.lang.String getInstancesXml(long definitionId,
202: long instanceId, java.lang.String definitionName,
203: java.lang.String definitionVersion,
204: java.lang.String startDateGT, java.lang.String startDateLT,
205: java.lang.String endDateGT, java.lang.String endDateLT,
206: boolean hideEndedTasks, boolean retrieveUserInstances,
207: boolean andOperator, int begin, int end)
208: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
209: java.rmi.RemoteException {
210: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
211: .getService();
212:
213: return workflowComponentService.getInstancesXml(definitionId,
214: instanceId, definitionName, definitionVersion,
215: startDateGT, startDateLT, endDateGT, endDateLT,
216: hideEndedTasks, retrieveUserInstances, andOperator,
217: begin, end);
218: }
219:
220: public static com.liferay.portlet.workflow.model.WorkflowTask getTask(
221: long taskId)
222: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
223: java.rmi.RemoteException {
224: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
225: .getService();
226:
227: return workflowComponentService.getTask(taskId);
228: }
229:
230: public static java.lang.String getTaskXml(long taskId)
231: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
232: java.rmi.RemoteException {
233: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
234: .getService();
235:
236: return workflowComponentService.getTaskXml(taskId);
237: }
238:
239: public static java.util.List getTaskFormElements(long taskId)
240: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
241: java.rmi.RemoteException {
242: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
243: .getService();
244:
245: return workflowComponentService.getTaskFormElements(taskId);
246: }
247:
248: public static java.lang.String getTaskFormElementsXml(long taskId)
249: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
250: java.rmi.RemoteException {
251: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
252: .getService();
253:
254: return workflowComponentService.getTaskFormElementsXml(taskId);
255: }
256:
257: public static java.util.List getTaskTransitions(long taskId)
258: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
259: java.rmi.RemoteException {
260: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
261: .getService();
262:
263: return workflowComponentService.getTaskTransitions(taskId);
264: }
265:
266: public static java.lang.String getTaskTransitionsXml(long taskId)
267: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
268: java.rmi.RemoteException {
269: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
270: .getService();
271:
272: return workflowComponentService.getTaskTransitionsXml(taskId);
273: }
274:
275: public static java.util.List getUserTasks(long instanceId,
276: java.lang.String taskName, java.lang.String definitionName,
277: java.lang.String assignedTo, java.lang.String createDateGT,
278: java.lang.String createDateLT,
279: java.lang.String startDateGT, java.lang.String startDateLT,
280: java.lang.String endDateGT, java.lang.String endDateLT,
281: boolean hideEndedTasks, boolean andOperator, int begin,
282: int end)
283: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
284: java.rmi.RemoteException {
285: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
286: .getService();
287:
288: return workflowComponentService.getUserTasks(instanceId,
289: taskName, definitionName, assignedTo, createDateGT,
290: createDateLT, startDateGT, startDateLT, endDateGT,
291: endDateLT, hideEndedTasks, andOperator, begin, end);
292: }
293:
294: public static int getUserTasksCount(long instanceId,
295: java.lang.String taskName, java.lang.String definitionName,
296: java.lang.String assignedTo, java.lang.String createDateGT,
297: java.lang.String createDateLT,
298: java.lang.String startDateGT, java.lang.String startDateLT,
299: java.lang.String endDateGT, java.lang.String endDateLT,
300: boolean hideEndedTasks, boolean andOperator)
301: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
302: java.rmi.RemoteException {
303: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
304: .getService();
305:
306: return workflowComponentService.getUserTasksCount(instanceId,
307: taskName, definitionName, assignedTo, createDateGT,
308: createDateLT, startDateGT, startDateLT, endDateGT,
309: endDateLT, hideEndedTasks, andOperator);
310: }
311:
312: public static java.lang.String getUserTasksCountXml(
313: long instanceId, java.lang.String taskName,
314: java.lang.String definitionName,
315: java.lang.String assignedTo, java.lang.String createDateGT,
316: java.lang.String createDateLT,
317: java.lang.String startDateGT, java.lang.String startDateLT,
318: java.lang.String endDateGT, java.lang.String endDateLT,
319: boolean hideEndedTasks, boolean andOperator)
320: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
321: java.rmi.RemoteException {
322: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
323: .getService();
324:
325: return workflowComponentService.getUserTasksCountXml(
326: instanceId, taskName, definitionName, assignedTo,
327: createDateGT, createDateLT, startDateGT, startDateLT,
328: endDateGT, endDateLT, hideEndedTasks, andOperator);
329: }
330:
331: public static java.lang.String getUserTasksXml(long instanceId,
332: java.lang.String taskName, java.lang.String definitionName,
333: java.lang.String assignedTo, java.lang.String createDateGT,
334: java.lang.String createDateLT,
335: java.lang.String startDateGT, java.lang.String startDateLT,
336: java.lang.String endDateGT, java.lang.String endDateLT,
337: boolean hideEndedTasks, boolean andOperator, int begin,
338: int end)
339: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
340: java.rmi.RemoteException {
341: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
342: .getService();
343:
344: return workflowComponentService.getUserTasksXml(instanceId,
345: taskName, definitionName, assignedTo, createDateGT,
346: createDateLT, startDateGT, startDateLT, endDateGT,
347: endDateLT, hideEndedTasks, andOperator, begin, end);
348: }
349:
350: public static void signalInstance(long instanceId)
351: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
352: java.rmi.RemoteException {
353: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
354: .getService();
355:
356: workflowComponentService.signalInstance(instanceId);
357: }
358:
359: public static void signalToken(long instanceId, long tokenId)
360: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
361: java.rmi.RemoteException {
362: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
363: .getService();
364:
365: workflowComponentService.signalToken(instanceId, tokenId);
366: }
367:
368: public static java.lang.String startWorkflow(long definitionId)
369: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
370: java.rmi.RemoteException {
371: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
372: .getService();
373:
374: return workflowComponentService.startWorkflow(definitionId);
375: }
376:
377: public static java.util.Map updateTask(long taskId,
378: java.lang.String transition, java.util.Map parameterMap)
379: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
380: java.rmi.RemoteException {
381: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
382: .getService();
383:
384: return workflowComponentService.updateTask(taskId, transition,
385: parameterMap);
386: }
387:
388: public static java.lang.String updateTaskXml(long taskId,
389: java.lang.String transition, java.util.Map parameterMap)
390: throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
391: java.rmi.RemoteException {
392: WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory
393: .getService();
394:
395: return workflowComponentService.updateTaskXml(taskId,
396: transition, parameterMap);
397: }
398: }
|