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