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
057 @Deprecated
058 public String getIconPath(LiferayPortletRequest liferayPortletRequest);
059
060
064 @Deprecated
065 public String getSummary(long classPK, Locale locale);
066
067 public String getSummary(
068 long classPK, PortletRequest portletRequest,
069 PortletResponse portletResponse);
070
071 public String getTitle(long classPK, Locale locale);
072
073 public String getType(Locale locale);
074
075 public PortletURL getURLEdit(
076 long classPK, LiferayPortletRequest liferayPortletRequest,
077 LiferayPortletResponse liferayPortletResponse);
078
079 public String getURLEditWorkflowTask(
080 long workflowTaskId, ServiceContext serviceContext)
081 throws PortalException;
082
083 public PortletURL getURLViewDiffs(
084 long classPK, LiferayPortletRequest liferayPortletRequest,
085 LiferayPortletResponse liferayPortletResponse);
086
087 public String getURLViewInContext(
088 long classPK, LiferayPortletRequest liferayPortletRequest,
089 LiferayPortletResponse liferayPortletResponse,
090 String noSuchEntryRedirect);
091
092 public WorkflowDefinitionLink getWorkflowDefinitionLink(
093 long companyId, long groupId, long classPK)
094 throws PortalException;
095
096 public boolean include(
097 long classPK, HttpServletRequest request, HttpServletResponse response,
098 String template);
099
100 public boolean isAssetTypeSearchable();
101
102 public boolean isScopeable();
103
104 public boolean isVisible();
105
106 public void startWorkflowInstance(
107 long companyId, long groupId, long userId, long classPK, T model,
108 Map<String, Serializable> workflowContext)
109 throws PortalException;
110
111 public T updateStatus(int status, Map<String, Serializable> workflowContext)
112 throws PortalException;
113
114 }