1   /**
2    * Copyright (c) 2000-2008 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.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  
28  import com.liferay.portlet.workflow.service.WorkflowComponentServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="WorkflowComponentServiceSoap.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * <p>
41   * This class provides a SOAP utility for the
42   * <code>com.liferay.portlet.workflow.service.WorkflowComponentServiceUtil</code> service
43   * utility. The static methods of this class calls the same methods of the
44   * service utility. However, the signatures are different because it is
45   * difficult for SOAP to support certain types.
46   * </p>
47   *
48   * <p>
49   * ServiceBuilder follows certain rules in translating the methods. For example,
50   * if the method in the service utility returns a <code>java.util.List</code>,
51   * that is translated to an array of
52   * <code>com.liferay.portlet.workflow.model.WorkflowComponentSoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.workflow.model.WorkflowComponent</code>,
54   * that is translated to a <code>com.liferay.portlet.workflow.model.WorkflowComponentSoap</code>.
55   * Methods that SOAP cannot safely wire are skipped.
56   * </p>
57   *
58   * <p>
59   * The benefits of using the SOAP utility is that it is cross platform
60   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
61   * even Perl, to call the generated services. One drawback of SOAP is that it is
62   * slow because it needs to serialize all calls into a text format (XML).
63   * </p>
64   *
65   * <p>
66   * You can see a list of services at
67   * http://localhost:8080/tunnel-web/secure/axis. Set the property
68   * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
69   * security.
70   * </p>
71   *
72   * <p>
73   * The SOAP utility is only generated for remote services.
74   * </p>
75   *
76   * @author Brian Wing Shun Chan
77   *
78   * @see com.liferay.portlet.workflow.service.WorkflowComponentServiceUtil
79   * @see com.liferay.portlet.workflow.service.http.WorkflowComponentServiceHttp
80   * @see com.liferay.portlet.workflow.service.model.WorkflowComponentSoap
81   *
82   */
83  public class WorkflowComponentServiceSoap {
84      public static java.util.List getCurrentTasks(long instanceId, long tokenId)
85          throws RemoteException {
86          try {
87              java.util.List returnValue = WorkflowComponentServiceUtil.getCurrentTasks(instanceId,
88                      tokenId);
89  
90              return returnValue;
91          }
92          catch (Exception e) {
93              _log.error(e, e);
94  
95              throw new RemoteException(e.getMessage());
96          }
97      }
98  
99      public static java.lang.String getCurrentTasksXml(long instanceId,
100         long tokenId) throws RemoteException {
101         try {
102             java.lang.String returnValue = WorkflowComponentServiceUtil.getCurrentTasksXml(instanceId,
103                     tokenId);
104 
105             return returnValue;
106         }
107         catch (Exception e) {
108             _log.error(e, e);
109 
110             throw new RemoteException(e.getMessage());
111         }
112     }
113 
114     public static java.lang.String deploy(java.lang.String xml)
115         throws RemoteException {
116         try {
117             java.lang.String returnValue = WorkflowComponentServiceUtil.deploy(xml);
118 
119             return returnValue;
120         }
121         catch (Exception e) {
122             _log.error(e, e);
123 
124             throw new RemoteException(e.getMessage());
125         }
126     }
127 
128     public static java.lang.Object getDefinition(long definitionId)
129         throws RemoteException {
130         try {
131             java.lang.Object returnValue = WorkflowComponentServiceUtil.getDefinition(definitionId);
132 
133             return returnValue;
134         }
135         catch (Exception e) {
136             _log.error(e, e);
137 
138             throw new RemoteException(e.getMessage());
139         }
140     }
141 
142     public static java.util.List getDefinitions(long definitionId,
143         java.lang.String name, int start, int end) throws RemoteException {
144         try {
145             java.util.List returnValue = WorkflowComponentServiceUtil.getDefinitions(definitionId,
146                     name, start, end);
147 
148             return returnValue;
149         }
150         catch (Exception e) {
151             _log.error(e, e);
152 
153             throw new RemoteException(e.getMessage());
154         }
155     }
156 
157     public static java.lang.String getDefinitionsXml(long definitionId,
158         java.lang.String name, int start, int end) throws RemoteException {
159         try {
160             java.lang.String returnValue = WorkflowComponentServiceUtil.getDefinitionsXml(definitionId,
161                     name, start, end);
162 
163             return returnValue;
164         }
165         catch (Exception e) {
166             _log.error(e, e);
167 
168             throw new RemoteException(e.getMessage());
169         }
170     }
171 
172     public static int getDefinitionsCount(long definitionId,
173         java.lang.String name) throws RemoteException {
174         try {
175             int returnValue = WorkflowComponentServiceUtil.getDefinitionsCount(definitionId,
176                     name);
177 
178             return returnValue;
179         }
180         catch (Exception e) {
181             _log.error(e, e);
182 
183             throw new RemoteException(e.getMessage());
184         }
185     }
186 
187     public static java.lang.String getDefinitionsCountXml(long definitionId,
188         java.lang.String name) throws RemoteException {
189         try {
190             java.lang.String returnValue = WorkflowComponentServiceUtil.getDefinitionsCountXml(definitionId,
191                     name);
192 
193             return returnValue;
194         }
195         catch (Exception e) {
196             _log.error(e, e);
197 
198             throw new RemoteException(e.getMessage());
199         }
200     }
201 
202     public static java.lang.String getDefinitionXml(long definitionId)
203         throws RemoteException {
204         try {
205             java.lang.String returnValue = WorkflowComponentServiceUtil.getDefinitionXml(definitionId);
206 
207             return returnValue;
208         }
209         catch (Exception e) {
210             _log.error(e, e);
211 
212             throw new RemoteException(e.getMessage());
213         }
214     }
215 
216     public static java.util.List getInstances(long definitionId,
217         long instanceId, java.lang.String definitionName,
218         java.lang.String definitionVersion, java.lang.String startDateGT,
219         java.lang.String startDateLT, java.lang.String endDateGT,
220         java.lang.String endDateLT, boolean hideEndedTasks,
221         boolean retrieveUserInstances, boolean andOperator, int start, int end)
222         throws RemoteException {
223         try {
224             java.util.List returnValue = WorkflowComponentServiceUtil.getInstances(definitionId,
225                     instanceId, definitionName, definitionVersion, startDateGT,
226                     startDateLT, endDateGT, endDateLT, hideEndedTasks,
227                     retrieveUserInstances, andOperator, start, end);
228 
229             return returnValue;
230         }
231         catch (Exception e) {
232             _log.error(e, e);
233 
234             throw new RemoteException(e.getMessage());
235         }
236     }
237 
238     public static int getInstancesCount(long definitionId, long instanceId,
239         java.lang.String definitionName, java.lang.String definitionVersion,
240         java.lang.String startDateGT, java.lang.String startDateLT,
241         java.lang.String endDateGT, java.lang.String endDateLT,
242         boolean hideEndedTasks, boolean retrieveUserInstances,
243         boolean andOperator) throws RemoteException {
244         try {
245             int returnValue = WorkflowComponentServiceUtil.getInstancesCount(definitionId,
246                     instanceId, definitionName, definitionVersion, startDateGT,
247                     startDateLT, endDateGT, endDateLT, hideEndedTasks,
248                     retrieveUserInstances, andOperator);
249 
250             return returnValue;
251         }
252         catch (Exception e) {
253             _log.error(e, e);
254 
255             throw new RemoteException(e.getMessage());
256         }
257     }
258 
259     public static java.lang.String getInstancesCountXml(long definitionId,
260         long instanceId, java.lang.String definitionName,
261         java.lang.String definitionVersion, java.lang.String startDateGT,
262         java.lang.String startDateLT, java.lang.String endDateGT,
263         java.lang.String endDateLT, boolean hideEndedTasks,
264         boolean retrieveUserInstances, boolean andOperator)
265         throws RemoteException {
266         try {
267             java.lang.String returnValue = WorkflowComponentServiceUtil.getInstancesCountXml(definitionId,
268                     instanceId, definitionName, definitionVersion, startDateGT,
269                     startDateLT, endDateGT, endDateLT, hideEndedTasks,
270                     retrieveUserInstances, andOperator);
271 
272             return returnValue;
273         }
274         catch (Exception e) {
275             _log.error(e, e);
276 
277             throw new RemoteException(e.getMessage());
278         }
279     }
280 
281     public static java.lang.String getInstancesXml(long definitionId,
282         long instanceId, java.lang.String definitionName,
283         java.lang.String definitionVersion, java.lang.String startDateGT,
284         java.lang.String startDateLT, java.lang.String endDateGT,
285         java.lang.String endDateLT, boolean hideEndedTasks,
286         boolean retrieveUserInstances, boolean andOperator, int start, int end)
287         throws RemoteException {
288         try {
289             java.lang.String returnValue = WorkflowComponentServiceUtil.getInstancesXml(definitionId,
290                     instanceId, definitionName, definitionVersion, startDateGT,
291                     startDateLT, endDateGT, endDateLT, hideEndedTasks,
292                     retrieveUserInstances, andOperator, start, end);
293 
294             return returnValue;
295         }
296         catch (Exception e) {
297             _log.error(e, e);
298 
299             throw new RemoteException(e.getMessage());
300         }
301     }
302 
303     public static com.liferay.portlet.workflow.model.WorkflowTask getTask(
304         long taskId) throws RemoteException {
305         try {
306             com.liferay.portlet.workflow.model.WorkflowTask returnValue = WorkflowComponentServiceUtil.getTask(taskId);
307 
308             return returnValue;
309         }
310         catch (Exception e) {
311             _log.error(e, e);
312 
313             throw new RemoteException(e.getMessage());
314         }
315     }
316 
317     public static java.lang.String getTaskXml(long taskId)
318         throws RemoteException {
319         try {
320             java.lang.String returnValue = WorkflowComponentServiceUtil.getTaskXml(taskId);
321 
322             return returnValue;
323         }
324         catch (Exception e) {
325             _log.error(e, e);
326 
327             throw new RemoteException(e.getMessage());
328         }
329     }
330 
331     public static java.util.List getTaskFormElements(long taskId)
332         throws RemoteException {
333         try {
334             java.util.List returnValue = WorkflowComponentServiceUtil.getTaskFormElements(taskId);
335 
336             return returnValue;
337         }
338         catch (Exception e) {
339             _log.error(e, e);
340 
341             throw new RemoteException(e.getMessage());
342         }
343     }
344 
345     public static java.lang.String getTaskFormElementsXml(long taskId)
346         throws RemoteException {
347         try {
348             java.lang.String returnValue = WorkflowComponentServiceUtil.getTaskFormElementsXml(taskId);
349 
350             return returnValue;
351         }
352         catch (Exception e) {
353             _log.error(e, e);
354 
355             throw new RemoteException(e.getMessage());
356         }
357     }
358 
359     public static java.util.List getTaskTransitions(long taskId)
360         throws RemoteException {
361         try {
362             java.util.List returnValue = WorkflowComponentServiceUtil.getTaskTransitions(taskId);
363 
364             return returnValue;
365         }
366         catch (Exception e) {
367             _log.error(e, e);
368 
369             throw new RemoteException(e.getMessage());
370         }
371     }
372 
373     public static java.lang.String getTaskTransitionsXml(long taskId)
374         throws RemoteException {
375         try {
376             java.lang.String returnValue = WorkflowComponentServiceUtil.getTaskTransitionsXml(taskId);
377 
378             return returnValue;
379         }
380         catch (Exception e) {
381             _log.error(e, e);
382 
383             throw new RemoteException(e.getMessage());
384         }
385     }
386 
387     public static java.util.List getUserTasks(long instanceId,
388         java.lang.String taskName, java.lang.String definitionName,
389         java.lang.String assignedTo, java.lang.String createDateGT,
390         java.lang.String createDateLT, java.lang.String startDateGT,
391         java.lang.String startDateLT, java.lang.String endDateGT,
392         java.lang.String endDateLT, boolean hideEndedTasks,
393         boolean andOperator, int start, int end) throws RemoteException {
394         try {
395             java.util.List returnValue = WorkflowComponentServiceUtil.getUserTasks(instanceId,
396                     taskName, definitionName, assignedTo, createDateGT,
397                     createDateLT, startDateGT, startDateLT, endDateGT,
398                     endDateLT, hideEndedTasks, andOperator, start, end);
399 
400             return returnValue;
401         }
402         catch (Exception e) {
403             _log.error(e, e);
404 
405             throw new RemoteException(e.getMessage());
406         }
407     }
408 
409     public static int getUserTasksCount(long instanceId,
410         java.lang.String taskName, java.lang.String definitionName,
411         java.lang.String assignedTo, java.lang.String createDateGT,
412         java.lang.String createDateLT, java.lang.String startDateGT,
413         java.lang.String startDateLT, java.lang.String endDateGT,
414         java.lang.String endDateLT, boolean hideEndedTasks, boolean andOperator)
415         throws RemoteException {
416         try {
417             int returnValue = WorkflowComponentServiceUtil.getUserTasksCount(instanceId,
418                     taskName, definitionName, assignedTo, createDateGT,
419                     createDateLT, startDateGT, startDateLT, endDateGT,
420                     endDateLT, hideEndedTasks, andOperator);
421 
422             return returnValue;
423         }
424         catch (Exception e) {
425             _log.error(e, e);
426 
427             throw new RemoteException(e.getMessage());
428         }
429     }
430 
431     public static java.lang.String getUserTasksCountXml(long instanceId,
432         java.lang.String taskName, java.lang.String definitionName,
433         java.lang.String assignedTo, java.lang.String createDateGT,
434         java.lang.String createDateLT, java.lang.String startDateGT,
435         java.lang.String startDateLT, java.lang.String endDateGT,
436         java.lang.String endDateLT, boolean hideEndedTasks, boolean andOperator)
437         throws RemoteException {
438         try {
439             java.lang.String returnValue = WorkflowComponentServiceUtil.getUserTasksCountXml(instanceId,
440                     taskName, definitionName, assignedTo, createDateGT,
441                     createDateLT, startDateGT, startDateLT, endDateGT,
442                     endDateLT, hideEndedTasks, andOperator);
443 
444             return returnValue;
445         }
446         catch (Exception e) {
447             _log.error(e, e);
448 
449             throw new RemoteException(e.getMessage());
450         }
451     }
452 
453     public static java.lang.String getUserTasksXml(long instanceId,
454         java.lang.String taskName, java.lang.String definitionName,
455         java.lang.String assignedTo, java.lang.String createDateGT,
456         java.lang.String createDateLT, java.lang.String startDateGT,
457         java.lang.String startDateLT, java.lang.String endDateGT,
458         java.lang.String endDateLT, boolean hideEndedTasks,
459         boolean andOperator, int start, int end) throws RemoteException {
460         try {
461             java.lang.String returnValue = WorkflowComponentServiceUtil.getUserTasksXml(instanceId,
462                     taskName, definitionName, assignedTo, createDateGT,
463                     createDateLT, startDateGT, startDateLT, endDateGT,
464                     endDateLT, hideEndedTasks, andOperator, start, end);
465 
466             return returnValue;
467         }
468         catch (Exception e) {
469             _log.error(e, e);
470 
471             throw new RemoteException(e.getMessage());
472         }
473     }
474 
475     public static void signalInstance(long instanceId)
476         throws RemoteException {
477         try {
478             WorkflowComponentServiceUtil.signalInstance(instanceId);
479         }
480         catch (Exception e) {
481             _log.error(e, e);
482 
483             throw new RemoteException(e.getMessage());
484         }
485     }
486 
487     public static void signalToken(long instanceId, long tokenId)
488         throws RemoteException {
489         try {
490             WorkflowComponentServiceUtil.signalToken(instanceId, tokenId);
491         }
492         catch (Exception e) {
493             _log.error(e, e);
494 
495             throw new RemoteException(e.getMessage());
496         }
497     }
498 
499     public static java.lang.String startWorkflow(long definitionId)
500         throws RemoteException {
501         try {
502             java.lang.String returnValue = WorkflowComponentServiceUtil.startWorkflow(definitionId);
503 
504             return returnValue;
505         }
506         catch (Exception e) {
507             _log.error(e, e);
508 
509             throw new RemoteException(e.getMessage());
510         }
511     }
512 
513     private static Log _log = LogFactoryUtil.getLog(WorkflowComponentServiceSoap.class);
514 }