001
014
015 package com.liferay.portal.kernel.workflow;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
019 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
020 import com.liferay.portal.model.WorkflowDefinitionLink;
021 import com.liferay.portal.service.ServiceContext;
022 import com.liferay.portlet.asset.model.AssetRenderer;
023 import com.liferay.portlet.asset.model.AssetRendererFactory;
024
025 import java.io.Serializable;
026
027 import java.util.Locale;
028 import java.util.Map;
029
030 import javax.portlet.PortletRequest;
031 import javax.portlet.PortletResponse;
032 import javax.portlet.PortletURL;
033
034 import javax.servlet.http.HttpServletRequest;
035 import javax.servlet.http.HttpServletResponse;
036
037
043 public interface WorkflowHandler<T> {
044
045 public AssetRenderer<T> getAssetRenderer(long classPK)
046 throws PortalException;
047
048 public AssetRendererFactory<T> getAssetRendererFactory();
049
050 public String getClassName();
051
052 public String getIconCssClass();
053
054 public String getIconPath(LiferayPortletRequest liferayPortletRequest);
055
056
060 @Deprecated
061 public String getSummary(long classPK, Locale locale);
062
063 public String getSummary(
064 long classPK, PortletRequest portletRequest,
065 PortletResponse portletResponse);
066
067 public String getTitle(long classPK, Locale locale);
068
069 public String getType(Locale locale);
070
071 public PortletURL getURLEdit(
072 long classPK, LiferayPortletRequest liferayPortletRequest,
073 LiferayPortletResponse liferayPortletResponse);
074
075 public String getURLEditWorkflowTask(
076 long workflowTaskId, ServiceContext serviceContext)
077 throws PortalException;
078
079 public PortletURL getURLViewDiffs(
080 long classPK, LiferayPortletRequest liferayPortletRequest,
081 LiferayPortletResponse liferayPortletResponse);
082
083 public String getURLViewInContext(
084 long classPK, LiferayPortletRequest liferayPortletRequest,
085 LiferayPortletResponse liferayPortletResponse,
086 String noSuchEntryRedirect);
087
088 public WorkflowDefinitionLink getWorkflowDefinitionLink(
089 long companyId, long groupId, long classPK)
090 throws PortalException;
091
092 public boolean include(
093 long classPK, HttpServletRequest request, HttpServletResponse response,
094 String template);
095
096 public boolean isAssetTypeSearchable();
097
098 public boolean isScopeable();
099
100 public boolean isVisible();
101
102 public void startWorkflowInstance(
103 long companyId, long groupId, long userId, long classPK, T model,
104 Map<String, Serializable> workflowContext)
105 throws PortalException;
106
107 public T updateStatus(int status, Map<String, Serializable> workflowContext)
108 throws PortalException;
109
110 }