1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  public interface WorkflowComponent {
34  
35      public String deploy(String xml) throws WorkflowComponentException;
36  
37      public List getCurrentTasks(long instanceId, long tokenId)
38          throws WorkflowComponentException;
39  
40      public String getCurrentTasksXml(long instanceId, long tokenId)
41          throws WorkflowComponentException;
42  
43      public Object getDefinition(long definitionId)
44          throws WorkflowComponentException;
45  
46      public List getDefinitions(
47              long definitionId, String name, int start, int end)
48          throws WorkflowComponentException;
49  
50      public String getDefinitionsXml(
51              long definitionId, String name, int start, int end)
52          throws WorkflowComponentException;
53  
54      public int getDefinitionsCount(long definitionId, String name)
55          throws WorkflowComponentException;
56  
57      public String getDefinitionsCountXml(long definitionId, String name)
58          throws WorkflowComponentException;
59  
60      public String getDefinitionXml(long definitionId)
61          throws WorkflowComponentException;
62  
63      public List getInstances(
64              long definitionId, long instanceId, String definitionName,
65              String definitionVersion, String startDateGT, String startDateLT,
66              String endDateGT, String endDateLT, boolean hideEndedTasks,
67              boolean retrieveUserInstances, boolean andOperator, int start,
68              int end)
69          throws WorkflowComponentException;
70  
71      public int getInstancesCount(
72              long definitionId, long instanceId, String definitionName,
73              String definitionVersion, String startDateGT, String startDateLT,
74              String endDateGT, String endDateLT, boolean hideEndedTasks,
75              boolean retrieveUserInstances, boolean andOperator)
76          throws WorkflowComponentException;
77  
78      public String getInstancesCountXml(
79              long definitionId, long instanceId, String definitionName,
80              String definitionVersion, String startDateGT, String startDateLT,
81              String endDateGT, String endDateLT, boolean hideEndedTasks,
82              boolean retrieveUserInstances, boolean andOperator)
83          throws WorkflowComponentException;
84  
85      public String getInstancesXml(
86              long definitionId, long instanceId, String definitionName,
87              String definitionVersion, String startDateGT, String startDateLT,
88              String endDateGT, String endDateLT, boolean hideEndedTasks,
89              boolean retrieveUserInstances, boolean andOperator, int start,
90              int end)
91          throws WorkflowComponentException;
92  
93      public List getTaskFormElements(long taskId)
94          throws WorkflowComponentException;
95  
96      public String getTaskFormElementsXml(long taskId)
97          throws WorkflowComponentException;
98  
99      public List getTaskTransitions(long taskId)
100         throws WorkflowComponentException;
101 
102     public String getTaskTransitionsXml(long taskId)
103         throws WorkflowComponentException;
104 
105     public List getUserTasks(
106             long instanceId, String taskName, String definitionName,
107             String assignedTo, String createDateGT, String createDateLT,
108             String startDateGT, String startDateLT, String endDateGT,
109             String endDateLT, boolean hideEndedTasks, boolean andOperator,
110             int start, int end)
111         throws WorkflowComponentException;
112 
113     public int getUserTasksCount(
114             long instanceId, String taskName, String definitionName,
115             String assignedTo, String createDateGT, String createDateLT,
116             String startDateGT, String startDateLT, String endDateGT,
117             String endDateLT, boolean hideEndedTasks, boolean andOperator)
118         throws WorkflowComponentException;
119 
120     public String getUserTasksCountXml(
121             long instanceId, String taskName, String definitionName,
122             String assignedTo, String createDateGT, String createDateLT,
123             String startDateGT, String startDateLT, String endDateGT,
124             String endDateLT, boolean hideEndedTasks, boolean andOperator)
125         throws WorkflowComponentException;
126 
127     public String getUserTasksXml(
128             long instanceId, String taskName, String definitionName,
129             String assignedTo, String createDateGT, String createDateLT,
130             String startDateGT, String startDateLT, String endDateGT,
131             String endDateLT, boolean hideEndedTasks, boolean andOperator,
132             int start, int end)
133         throws WorkflowComponentException;
134 
135     public void signalInstance(long instanceId)
136         throws WorkflowComponentException;
137 
138     public void signalToken(long instanceId, long tokenId)
139         throws WorkflowComponentException;
140 
141     public String startWorkflow(long definitionId)
142         throws WorkflowComponentException;
143 
144     public Map updateTask(long taskId, String transition, Map parameterMap)
145         throws WorkflowComponentException;
146 
147     public String updateTaskXml(
148             long taskId, String transition, Map parameterMap)
149         throws WorkflowComponentException;
150 
151 }