001    /**
002     * Copyright (c) 2000-2011 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            /**
051             * @deprecated
052             */
053            public String getSummary(long classPK);
054    
055            public String getSummary(long classPK, Locale locale);
056    
057            /**
058             * @deprecated
059             */
060            public String getTitle(long classPK);
061    
062            public String getTitle(long classPK, Locale locale);
063    
064            public String getType(Locale locale);
065    
066            public PortletURL getURLEdit(
067                    long classPK, LiferayPortletRequest liferayPortletRequest,
068                    LiferayPortletResponse liferayPortletResponse);
069    
070            public String getURLViewInContext(
071                    long classPK, LiferayPortletRequest liferayPortletRequest,
072                    LiferayPortletResponse liferayPortletResponse,
073                    String noSuchEntryRedirect);
074    
075            public boolean isScopeable();
076    
077            public String render(
078                    long classPK, RenderRequest renderRequest,
079                    RenderResponse renderResponse, String template);
080    
081            public void startWorkflowInstance(
082                            long companyId, long groupId, long userId, long classPK,
083                            Object model, Map<String, Serializable> workflowContext)
084                    throws PortalException, SystemException;
085    
086            public Object updateStatus(
087                            int status, Map<String, Serializable> workflowContext)
088                    throws PortalException, SystemException;
089    
090    }