1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.kernel.jbi;
21  
22  import java.util.List;
23  import java.util.Map;
24  
25  /**
26   * <a href="WorkflowComponent.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Charles May
29   *
30   */
31  public interface WorkflowComponent {
32  
33      public String deploy(String xml) throws WorkflowComponentException;
34  
35      public List getCurrentTasks(long instanceId, long tokenId)
36          throws WorkflowComponentException;
37  
38      public String getCurrentTasksXml(long instanceId, long tokenId)
39          throws WorkflowComponentException;
40  
41      public Object getDefinition(long definitionId)
42          throws WorkflowComponentException;
43  
44      public List getDefinitions(
45              long definitionId, String name, int start, int end)
46          throws WorkflowComponentException;
47  
48      public String getDefinitionsXml(
49              long definitionId, String name, int start, int end)
50          throws WorkflowComponentException;
51  
52      public int getDefinitionsCount(long definitionId, String name)
53          throws WorkflowComponentException;
54  
55      public String getDefinitionsCountXml(long definitionId, String name)
56          throws WorkflowComponentException;
57  
58      public String getDefinitionXml(long definitionId)
59          throws WorkflowComponentException;
60  
61      public List getInstances(
62              long definitionId, long instanceId, String definitionName,
63              String definitionVersion, String startDateGT, String startDateLT,
64              String endDateGT, String endDateLT, boolean hideEndedTasks,
65              boolean retrieveUserInstances, boolean andOperator, int start,
66              int end)
67          throws WorkflowComponentException;
68  
69      public int getInstancesCount(
70              long definitionId, long instanceId, String definitionName,
71              String definitionVersion, String startDateGT, String startDateLT,
72              String endDateGT, String endDateLT, boolean hideEndedTasks,
73              boolean retrieveUserInstances, boolean andOperator)
74          throws WorkflowComponentException;
75  
76      public String getInstancesCountXml(
77              long definitionId, long instanceId, String definitionName,
78              String definitionVersion, String startDateGT, String startDateLT,
79              String endDateGT, String endDateLT, boolean hideEndedTasks,
80              boolean retrieveUserInstances, boolean andOperator)
81          throws WorkflowComponentException;
82  
83      public String getInstancesXml(
84              long definitionId, long instanceId, String definitionName,
85              String definitionVersion, String startDateGT, String startDateLT,
86              String endDateGT, String endDateLT, boolean hideEndedTasks,
87              boolean retrieveUserInstances, boolean andOperator, int start,
88              int end)
89          throws WorkflowComponentException;
90  
91      public List getTaskFormElements(long taskId)
92          throws WorkflowComponentException;
93  
94      public String getTaskFormElementsXml(long taskId)
95          throws WorkflowComponentException;
96  
97      public List getTaskTransitions(long taskId)
98          throws WorkflowComponentException;
99  
100     public String getTaskTransitionsXml(long taskId)
101         throws WorkflowComponentException;
102 
103     public List getUserTasks(
104             long instanceId, String taskName, String definitionName,
105             String assignedTo, String createDateGT, String createDateLT,
106             String startDateGT, String startDateLT, String endDateGT,
107             String endDateLT, boolean hideEndedTasks, boolean andOperator,
108             int start, int end)
109         throws WorkflowComponentException;
110 
111     public int getUserTasksCount(
112             long instanceId, String taskName, String definitionName,
113             String assignedTo, String createDateGT, String createDateLT,
114             String startDateGT, String startDateLT, String endDateGT,
115             String endDateLT, boolean hideEndedTasks, boolean andOperator)
116         throws WorkflowComponentException;
117 
118     public String getUserTasksCountXml(
119             long instanceId, String taskName, String definitionName,
120             String assignedTo, String createDateGT, String createDateLT,
121             String startDateGT, String startDateLT, String endDateGT,
122             String endDateLT, boolean hideEndedTasks, boolean andOperator)
123         throws WorkflowComponentException;
124 
125     public String getUserTasksXml(
126             long instanceId, String taskName, String definitionName,
127             String assignedTo, String createDateGT, String createDateLT,
128             String startDateGT, String startDateLT, String endDateGT,
129             String endDateLT, boolean hideEndedTasks, boolean andOperator,
130             int start, int end)
131         throws WorkflowComponentException;
132 
133     public void signalInstance(long instanceId)
134         throws WorkflowComponentException;
135 
136     public void signalToken(long instanceId, long tokenId)
137         throws WorkflowComponentException;
138 
139     public String startWorkflow(long definitionId)
140         throws WorkflowComponentException;
141 
142     public Map updateTask(long taskId, String transition, Map parameterMap)
143         throws WorkflowComponentException;
144 
145     public String updateTaskXml(
146             long taskId, String transition, Map parameterMap)
147         throws WorkflowComponentException;
148 
149 }