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.portlet.LiferayPortletRequest;
18  import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
19  
20  import javax.portlet.PortletURL;
21  
22  /**
23   * <a href="WorkflowHandler.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Bruno Farache
26   * @author Macerllus Tavares
27   */
28  public interface WorkflowHandler {
29  
30      public static final String TYPE_CONTENT = "content";
31  
32      public static final String TYPE_DOCUMENT = "document";
33  
34      public static final String TYPE_UNKNOWN = "unknown";
35  
36      public String getClassName();
37  
38      public String getTitle(long classPK) throws Exception;
39  
40      public String getType();
41  
42      public PortletURL getURLEdit(
43              long classPK, LiferayPortletRequest liferayPortletRequest,
44              LiferayPortletResponse liferayPortletResponse)
45          throws Exception;
46  
47      public void startWorkflowInstance(
48              long companyId, long groupId, long userId, long classPK,
49              Object model)
50          throws Exception;
51  
52      public Object updateStatus(
53              long companyId, long groupId, long userId, long classPK, int status)
54          throws Exception;
55  
56  }