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 java.io.Serializable;
23  
24  import java.util.Map;
25  
26  import javax.portlet.PortletURL;
27  
28  /**
29   * <a href="WorkflowHandler.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Bruno Farache
32   * @author Macerllus Tavares
33   * @author Juan Fernández
34   */
35  public interface WorkflowHandler {
36  
37      public static final String TYPE_CONTENT = "content";
38  
39      public static final String TYPE_DOCUMENT = "document";
40  
41      public static final String TYPE_UNKNOWN = "unknown";
42  
43      public String getClassName();
44  
45      public String getIconPath(LiferayPortletRequest liferayPortletRequest);
46  
47      public String getTitle(long classPK);
48  
49      public String getType();
50  
51      public PortletURL getURLEdit(
52          long classPK, LiferayPortletRequest liferayPortletRequest,
53          LiferayPortletResponse liferayPortletResponse);
54  
55      public void startWorkflowInstance(
56              long companyId, long groupId, long userId, long classPK,
57              Object model, Map<String, Serializable> workflowContext)
58          throws PortalException, SystemException;
59  
60      public Object updateStatus(
61              int status, Map<String, Serializable> workflowContext)
62          throws PortalException, SystemException;
63  
64  }