1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.workflow.service;
24  
25  /**
26   * <a href="WorkflowComponentServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.workflow.service.WorkflowComponentService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.workflow.service.WorkflowComponentServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.workflow.service.WorkflowComponentService
48   * @see com.liferay.portlet.workflow.service.WorkflowComponentServiceFactory
49   *
50   */
51  public class WorkflowComponentServiceUtil {
52      public static java.util.List getCurrentTasks(long instanceId, long tokenId)
53          throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
54              java.rmi.RemoteException {
55          WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
56  
57          return workflowComponentService.getCurrentTasks(instanceId, tokenId);
58      }
59  
60      public static java.lang.String getCurrentTasksXml(long instanceId,
61          long tokenId)
62          throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
63              java.rmi.RemoteException {
64          WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
65  
66          return workflowComponentService.getCurrentTasksXml(instanceId, tokenId);
67      }
68  
69      public static java.lang.String deploy(java.lang.String xml)
70          throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
71              java.rmi.RemoteException {
72          WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
73  
74          return workflowComponentService.deploy(xml);
75      }
76  
77      public static java.lang.Object getDefinition(long definitionId)
78          throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
79              java.rmi.RemoteException {
80          WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
81  
82          return workflowComponentService.getDefinition(definitionId);
83      }
84  
85      public static java.util.List getDefinitions(long definitionId,
86          java.lang.String name, int begin, int end)
87          throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
88              java.rmi.RemoteException {
89          WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
90  
91          return workflowComponentService.getDefinitions(definitionId, name,
92              begin, end);
93      }
94  
95      public static java.lang.String getDefinitionsXml(long definitionId,
96          java.lang.String name, int begin, int end)
97          throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
98              java.rmi.RemoteException {
99          WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
100 
101         return workflowComponentService.getDefinitionsXml(definitionId, name,
102             begin, end);
103     }
104 
105     public static int getDefinitionsCount(long definitionId,
106         java.lang.String name)
107         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
108             java.rmi.RemoteException {
109         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
110 
111         return workflowComponentService.getDefinitionsCount(definitionId, name);
112     }
113 
114     public static java.lang.String getDefinitionsCountXml(long definitionId,
115         java.lang.String name)
116         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
117             java.rmi.RemoteException {
118         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
119 
120         return workflowComponentService.getDefinitionsCountXml(definitionId,
121             name);
122     }
123 
124     public static java.lang.String getDefinitionXml(long definitionId)
125         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
126             java.rmi.RemoteException {
127         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
128 
129         return workflowComponentService.getDefinitionXml(definitionId);
130     }
131 
132     public static java.util.List getInstances(long definitionId,
133         long instanceId, java.lang.String definitionName,
134         java.lang.String definitionVersion, java.lang.String startDateGT,
135         java.lang.String startDateLT, java.lang.String endDateGT,
136         java.lang.String endDateLT, boolean hideEndedTasks,
137         boolean andOperator, int begin, int end)
138         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
139             java.rmi.RemoteException {
140         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
141 
142         return workflowComponentService.getInstances(definitionId, instanceId,
143             definitionName, definitionVersion, startDateGT, startDateLT,
144             endDateGT, endDateLT, hideEndedTasks, andOperator, begin, end);
145     }
146 
147     public static int getInstancesCount(long definitionId, long instanceId,
148         java.lang.String definitionName, java.lang.String definitionVersion,
149         java.lang.String startDateGT, java.lang.String startDateLT,
150         java.lang.String endDateGT, java.lang.String endDateLT,
151         boolean hideEndedTasks, boolean andOperator)
152         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
153             java.rmi.RemoteException {
154         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
155 
156         return workflowComponentService.getInstancesCount(definitionId,
157             instanceId, definitionName, definitionVersion, startDateGT,
158             startDateLT, endDateGT, endDateLT, hideEndedTasks, andOperator);
159     }
160 
161     public static java.lang.String getInstancesCountXml(long definitionId,
162         long instanceId, java.lang.String definitionName,
163         java.lang.String definitionVersion, java.lang.String startDateGT,
164         java.lang.String startDateLT, java.lang.String endDateGT,
165         java.lang.String endDateLT, boolean hideEndedTasks, boolean andOperator)
166         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
167             java.rmi.RemoteException {
168         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
169 
170         return workflowComponentService.getInstancesCountXml(definitionId,
171             instanceId, definitionName, definitionVersion, startDateGT,
172             startDateLT, endDateGT, endDateLT, hideEndedTasks, andOperator);
173     }
174 
175     public static java.lang.String getInstancesXml(long definitionId,
176         long instanceId, java.lang.String definitionName,
177         java.lang.String definitionVersion, java.lang.String startDateGT,
178         java.lang.String startDateLT, java.lang.String endDateGT,
179         java.lang.String endDateLT, boolean hideEndedTasks,
180         boolean andOperator, int begin, int end)
181         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
182             java.rmi.RemoteException {
183         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
184 
185         return workflowComponentService.getInstancesXml(definitionId,
186             instanceId, definitionName, definitionVersion, startDateGT,
187             startDateLT, endDateGT, endDateLT, hideEndedTasks, andOperator,
188             begin, end);
189     }
190 
191     public static java.util.List getTaskFormElements(long taskId)
192         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
193             java.rmi.RemoteException {
194         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
195 
196         return workflowComponentService.getTaskFormElements(taskId);
197     }
198 
199     public static java.lang.String getTaskFormElementsXml(long taskId)
200         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
201             java.rmi.RemoteException {
202         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
203 
204         return workflowComponentService.getTaskFormElementsXml(taskId);
205     }
206 
207     public static java.util.List getTaskTransitions(long taskId)
208         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
209             java.rmi.RemoteException {
210         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
211 
212         return workflowComponentService.getTaskTransitions(taskId);
213     }
214 
215     public static java.lang.String getTaskTransitionsXml(long taskId)
216         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
217             java.rmi.RemoteException {
218         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
219 
220         return workflowComponentService.getTaskTransitionsXml(taskId);
221     }
222 
223     public static java.util.List getUserTasks(long instanceId,
224         java.lang.String taskName, java.lang.String definitionName,
225         java.lang.String assignedTo, java.lang.String createDateGT,
226         java.lang.String createDateLT, java.lang.String startDateGT,
227         java.lang.String startDateLT, java.lang.String endDateGT,
228         java.lang.String endDateLT, boolean hideEndedTasks,
229         boolean andOperator, int begin, int end)
230         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
231             java.rmi.RemoteException {
232         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
233 
234         return workflowComponentService.getUserTasks(instanceId, taskName,
235             definitionName, assignedTo, createDateGT, createDateLT,
236             startDateGT, startDateLT, endDateGT, endDateLT, hideEndedTasks,
237             andOperator, begin, end);
238     }
239 
240     public static int getUserTasksCount(long instanceId,
241         java.lang.String taskName, java.lang.String definitionName,
242         java.lang.String assignedTo, java.lang.String createDateGT,
243         java.lang.String createDateLT, java.lang.String startDateGT,
244         java.lang.String startDateLT, java.lang.String endDateGT,
245         java.lang.String endDateLT, boolean hideEndedTasks, boolean andOperator)
246         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
247             java.rmi.RemoteException {
248         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
249 
250         return workflowComponentService.getUserTasksCount(instanceId, taskName,
251             definitionName, assignedTo, createDateGT, createDateLT,
252             startDateGT, startDateLT, endDateGT, endDateLT, hideEndedTasks,
253             andOperator);
254     }
255 
256     public static java.lang.String getUserTasksCountXml(long instanceId,
257         java.lang.String taskName, java.lang.String definitionName,
258         java.lang.String assignedTo, java.lang.String createDateGT,
259         java.lang.String createDateLT, java.lang.String startDateGT,
260         java.lang.String startDateLT, java.lang.String endDateGT,
261         java.lang.String endDateLT, boolean hideEndedTasks, boolean andOperator)
262         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
263             java.rmi.RemoteException {
264         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
265 
266         return workflowComponentService.getUserTasksCountXml(instanceId,
267             taskName, definitionName, assignedTo, createDateGT, createDateLT,
268             startDateGT, startDateLT, endDateGT, endDateLT, hideEndedTasks,
269             andOperator);
270     }
271 
272     public static java.lang.String getUserTasksXml(long instanceId,
273         java.lang.String taskName, java.lang.String definitionName,
274         java.lang.String assignedTo, java.lang.String createDateGT,
275         java.lang.String createDateLT, java.lang.String startDateGT,
276         java.lang.String startDateLT, java.lang.String endDateGT,
277         java.lang.String endDateLT, boolean hideEndedTasks,
278         boolean andOperator, int begin, int end)
279         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
280             java.rmi.RemoteException {
281         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
282 
283         return workflowComponentService.getUserTasksXml(instanceId, taskName,
284             definitionName, assignedTo, createDateGT, createDateLT,
285             startDateGT, startDateLT, endDateGT, endDateLT, hideEndedTasks,
286             andOperator, begin, end);
287     }
288 
289     public static void signalInstance(long instanceId)
290         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
291             java.rmi.RemoteException {
292         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
293         workflowComponentService.signalInstance(instanceId);
294     }
295 
296     public static void signalToken(long instanceId, long tokenId)
297         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
298             java.rmi.RemoteException {
299         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
300         workflowComponentService.signalToken(instanceId, tokenId);
301     }
302 
303     public static java.lang.String startWorkflow(long definitionId)
304         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
305             java.rmi.RemoteException {
306         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
307 
308         return workflowComponentService.startWorkflow(definitionId);
309     }
310 
311     public static java.util.Map updateTask(long taskId,
312         java.lang.String transition, java.util.Map parameterMap)
313         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
314             java.rmi.RemoteException {
315         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
316 
317         return workflowComponentService.updateTask(taskId, transition,
318             parameterMap);
319     }
320 
321     public static java.lang.String updateTaskXml(long taskId,
322         java.lang.String transition, java.util.Map parameterMap)
323         throws com.liferay.portal.kernel.jbi.WorkflowComponentException, 
324             java.rmi.RemoteException {
325         WorkflowComponentService workflowComponentService = WorkflowComponentServiceFactory.getService();
326 
327         return workflowComponentService.updateTaskXml(taskId, transition,
328             parameterMap);
329     }
330 }