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.io.InputStream;
22  
23  import java.util.List;
24  
25  @MessagingProxy(mode = ProxyMode.SYNC)
26  /**
27   * <a href="WorkflowDefinitionManager.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Micha Kiener
30   * @author Shuyang Zhou
31   * @author Brian Wing Shun Chan
32   */
33  public interface WorkflowDefinitionManager {
34  
35      public WorkflowDefinition deployWorkflowDefinition(
36              long companyId, long userId, String name,
37              InputStream inputStream)
38          throws WorkflowException;
39  
40      public WorkflowDefinition getWorkflowDefinition(
41              long companyId, String name, int version)
42          throws WorkflowException;
43  
44      public int getWorkflowDefinitionCount(long companyId)
45          throws WorkflowException;
46  
47      public int getWorkflowDefinitionCount(long companyId, String name)
48          throws WorkflowException;
49  
50      public List<WorkflowDefinition> getWorkflowDefinitions(
51              long companyId, int start, int end,
52              OrderByComparator orderByComparator)
53          throws WorkflowException;
54  
55      public List<WorkflowDefinition> getWorkflowDefinitions(
56              long companyId, String name, int start, int end,
57              OrderByComparator orderByComparator)
58          throws WorkflowException;
59  
60      public void undeployWorkflowDefinition(
61              long companyId, long userId, String name, int version)
62          throws WorkflowException;
63  
64  }