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.portal.kernel.jbi;
24  
25  import java.util.List;
26  import java.util.Map;
27  
28  /**
29   * <a href="WorkflowComponent.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Charles May
32   *
33   */
34  public interface WorkflowComponent {
35  
36      public String deploy(String xml) throws WorkflowComponentException;
37  
38      public List getCurrentTasks(long instanceId, long tokenId)
39          throws WorkflowComponentException;
40  
41      public String getCurrentTasksXml(long instanceId, long tokenId)
42          throws WorkflowComponentException;
43  
44      public Object getDefinition(long definitionId)
45          throws WorkflowComponentException;
46  
47      public List getDefinitions(
48              long definitionId, String name, int start, int end)
49          throws WorkflowComponentException;
50  
51      public String getDefinitionsXml(
52              long definitionId, String name, int start, int end)
53          throws WorkflowComponentException;
54  
55      public int getDefinitionsCount(long definitionId, String name)
56          throws WorkflowComponentException;
57  
58      public String getDefinitionsCountXml(long definitionId, String name)
59          throws WorkflowComponentException;
60  
61      public String getDefinitionXml(long definitionId)
62          throws WorkflowComponentException;
63  
64      public List getInstances(
65              long definitionId, long instanceId, String definitionName,
66              String definitionVersion, String startDateGT, String startDateLT,
67              String endDateGT, String endDateLT, boolean hideEndedTasks,
68              boolean retrieveUserInstances, boolean andOperator, int start,
69              int end)
70          throws WorkflowComponentException;
71  
72      public int getInstancesCount(
73              long definitionId, long instanceId, String definitionName,
74              String definitionVersion, String startDateGT, String startDateLT,
75              String endDateGT, String endDateLT, boolean hideEndedTasks,
76              boolean retrieveUserInstances, boolean andOperator)
77          throws WorkflowComponentException;
78  
79      public String getInstancesCountXml(
80              long definitionId, long instanceId, String definitionName,
81              String definitionVersion, String startDateGT, String startDateLT,
82              String endDateGT, String endDateLT, boolean hideEndedTasks,
83              boolean retrieveUserInstances, boolean andOperator)
84          throws WorkflowComponentException;
85  
86      public String getInstancesXml(
87              long definitionId, long instanceId, String definitionName,
88              String definitionVersion, String startDateGT, String startDateLT,
89              String endDateGT, String endDateLT, boolean hideEndedTasks,
90              boolean retrieveUserInstances, boolean andOperator, int start,
91              int end)
92          throws WorkflowComponentException;
93  
94      public List getTaskFormElements(long taskId)
95          throws WorkflowComponentException;
96  
97      public String getTaskFormElementsXml(long taskId)
98          throws WorkflowComponentException;
99  
100     public List getTaskTransitions(long taskId)
101         throws WorkflowComponentException;
102 
103     public String getTaskTransitionsXml(long taskId)
104         throws WorkflowComponentException;
105 
106     public List getUserTasks(
107             long instanceId, String taskName, String definitionName,
108             String assignedTo, String createDateGT, String createDateLT,
109             String startDateGT, String startDateLT, String endDateGT,
110             String endDateLT, boolean hideEndedTasks, boolean andOperator,
111             int start, int end)
112         throws WorkflowComponentException;
113 
114     public int getUserTasksCount(
115             long instanceId, String taskName, String definitionName,
116             String assignedTo, String createDateGT, String createDateLT,
117             String startDateGT, String startDateLT, String endDateGT,
118             String endDateLT, boolean hideEndedTasks, boolean andOperator)
119         throws WorkflowComponentException;
120 
121     public String getUserTasksCountXml(
122             long instanceId, String taskName, String definitionName,
123             String assignedTo, String createDateGT, String createDateLT,
124             String startDateGT, String startDateLT, String endDateGT,
125             String endDateLT, boolean hideEndedTasks, boolean andOperator)
126         throws WorkflowComponentException;
127 
128     public String getUserTasksXml(
129             long instanceId, String taskName, String definitionName,
130             String assignedTo, String createDateGT, String createDateLT,
131             String startDateGT, String startDateLT, String endDateGT,
132             String endDateLT, boolean hideEndedTasks, boolean andOperator,
133             int start, int end)
134         throws WorkflowComponentException;
135 
136     public void signalInstance(long instanceId)
137         throws WorkflowComponentException;
138 
139     public void signalToken(long instanceId, long tokenId)
140         throws WorkflowComponentException;
141 
142     public String startWorkflow(long definitionId)
143         throws WorkflowComponentException;
144 
145     public Map updateTask(long taskId, String transition, Map parameterMap)
146         throws WorkflowComponentException;
147 
148     public String updateTaskXml(
149             long taskId, String transition, Map parameterMap)
150         throws WorkflowComponentException;
151 
152 }