001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.workflow;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
020    import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
021    import com.liferay.portlet.asset.model.AssetRenderer;
022    import com.liferay.portlet.asset.model.AssetRendererFactory;
023    
024    import java.io.Serializable;
025    
026    import java.util.Locale;
027    import java.util.Map;
028    
029    import javax.portlet.PortletURL;
030    import javax.portlet.RenderRequest;
031    import javax.portlet.RenderResponse;
032    
033    /**
034     * @author Bruno Farache
035     * @author Macerllus Tavares
036     * @author Juan Fernández
037     * @author Julio Camarero
038     */
039    public interface WorkflowHandler {
040    
041            public AssetRenderer getAssetRenderer(long classPK)
042                    throws PortalException, SystemException;
043    
044            public AssetRendererFactory getAssetRendererFactory();
045    
046            public String getClassName();
047    
048            public String getIconPath(LiferayPortletRequest liferayPortletRequest);
049    
050            public String getSummary(long classPK);
051    
052            public String getTitle(long classPK);
053    
054            public String getType(Locale locale);
055    
056            public PortletURL getURLEdit(
057                    long classPK, LiferayPortletRequest liferayPortletRequest,
058                    LiferayPortletResponse liferayPortletResponse);
059    
060            public String getURLViewInContext(
061                    long classPK, LiferayPortletRequest liferayPortletRequest,
062                    LiferayPortletResponse liferayPortletResponse,
063                    String noSuchEntryRedirect);
064    
065            public String render(
066                    long classPK, RenderRequest renderRequest,
067                    RenderResponse renderResponse, String template);
068    
069            public void startWorkflowInstance(
070                            long companyId, long groupId, long userId, long classPK,
071                            Object model, Map<String, Serializable> workflowContext)
072                    throws PortalException, SystemException;
073    
074            public Object updateStatus(
075                            int status, Map<String, Serializable> workflowContext)
076                    throws PortalException, SystemException;
077    
078    }