1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.workflow;
16  
17  import com.liferay.portal.kernel.messaging.proxy.MessagingProxy;
18  import com.liferay.portal.kernel.messaging.proxy.ProxyMode;
19  import com.liferay.portal.kernel.util.OrderByComparator;
20  
21  import java.util.List;
22  import java.util.Map;
23  
24  @MessagingProxy(mode = ProxyMode.SYNC)
25  /**
26   * <a href="WorkflowTaskManager.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Micha Kiener
29   * @author Shuyang Zhou
30   * @author Brian Wing Shun Chan
31   */
32  public interface WorkflowTaskManager {
33  
34      public WorkflowTask assignWorkflowTaskToRole(
35              long companyId, long userId, long workflowTaskId,
36              long roleId, String comment, Map<String, Object> context)
37          throws WorkflowException;
38  
39      public WorkflowTask assignWorkflowTaskToUser(
40              long companyId, long userId, long workflowTaskId,
41              long assigneeUserId, String comment, Map<String, Object> context)
42          throws WorkflowException;
43  
44      public WorkflowTask completeWorkflowTask(
45              long companyId, long userId, long workflowTaskId,
46              String transitionName, String comment, Map<String, Object> context)
47          throws WorkflowException;
48  
49      public List<String> getNextTransitionNames(
50              long companyId, long userId, long workflowTaskId)
51          throws WorkflowException;
52  
53      public long[] getPooledActorsIds(long companyId, long workflowTaskId)
54          throws WorkflowException;
55  
56      public WorkflowTask getWorkflowTask(long companyId, long workflowTaskId)
57          throws WorkflowException;
58  
59      public int getWorkflowTaskCount(long companyId, Boolean completed)
60          throws WorkflowException;
61  
62      public int getWorkflowTaskCountByRole(
63              long companyId, long roleId, Boolean completed)
64          throws WorkflowException;
65  
66      public int getWorkflowTaskCountByUser(
67              long companyId, long userId, Boolean completed)
68          throws WorkflowException;
69  
70      public int getWorkflowTaskCountByUserRoles(
71              long companyId, long userId, Boolean completed)
72          throws WorkflowException;
73  
74      public int getWorkflowTaskCountByWorkflowInstance(
75              long companyId, long workflowInstanceId, Boolean completed)
76          throws WorkflowException;
77  
78      public List<WorkflowTask> getWorkflowTasks(
79              long companyId, Boolean completed, int start, int end,
80              OrderByComparator orderByComparator)
81          throws WorkflowException;
82  
83      public List<WorkflowTask> getWorkflowTasksByRole(
84              long companyId, long roleId, Boolean completed, int start, int end,
85              OrderByComparator orderByComparator)
86          throws WorkflowException;
87  
88      public List<WorkflowTask> getWorkflowTasksByUser(
89              long companyId, long userId, Boolean completed, int start, int end,
90              OrderByComparator orderByComparator)
91          throws WorkflowException;
92  
93      public List<WorkflowTask> getWorkflowTasksByUserRoles(
94              long companyId, long userId, Boolean completed, int start, int end,
95              OrderByComparator orderByComparator)
96          throws WorkflowException;
97  
98      public List<WorkflowTask> getWorkflowTasksByWorkflowInstance(
99              long companyId, long workflowInstanceId,
100             Boolean completed, int start, int end,
101             OrderByComparator orderByComparator)
102         throws WorkflowException;
103 
104 }