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.portlet.layoutconfiguration.util;
016    
017    import com.liferay.portal.model.Portlet;
018    import com.liferay.portlet.layoutconfiguration.util.xml.RuntimeLogic;
019    
020    import javax.portlet.RenderRequest;
021    import javax.portlet.RenderResponse;
022    
023    import javax.servlet.ServletContext;
024    import javax.servlet.http.HttpServletRequest;
025    import javax.servlet.http.HttpServletResponse;
026    import javax.servlet.jsp.JspWriter;
027    import javax.servlet.jsp.PageContext;
028    
029    /**
030     * @author Brian Wing Shun Chan
031     * @author Raymond Augé
032     * @author Shuyang Zhou
033     */
034    public interface RuntimePortlet {
035    
036            public String processCustomizationSettings(
037                            ServletContext servletContext, HttpServletRequest request,
038                            HttpServletResponse response, PageContext pageContext,
039                            String velocityTemplateId, String velocityTemplateContent)
040                    throws Exception;
041    
042            public String processPortlet(
043                            ServletContext servletContext, HttpServletRequest request,
044                            HttpServletResponse response, RenderRequest renderRequest,
045                            RenderResponse renderResponse, String portletId, String queryString,
046                            boolean writeOutput)
047                    throws Exception;
048    
049            public String processPortlet(
050                            ServletContext servletContext, HttpServletRequest request,
051                            HttpServletResponse response, RenderRequest renderRequest,
052                            RenderResponse renderResponse, String portletId, String queryString,
053                            String columnId, Integer columnPos, Integer columnCount,
054                            boolean writeOutput)
055                    throws Exception;
056    
057            public String processPortlet(
058                            ServletContext servletContext, HttpServletRequest request,
059                            HttpServletResponse response, Portlet portlet, String queryString,
060                            String columnId, Integer columnPos, Integer columnCount,
061                            String path, boolean writeOutput)
062                    throws Exception;
063    
064            public String processPortlet(
065                            ServletContext servletContext, HttpServletRequest request,
066                            HttpServletResponse response, RenderRequest renderRequest,
067                            RenderResponse renderResponse, Portlet portlet, String portletId,
068                            String queryString, String columnId, Integer columnPos,
069                            Integer columnCount, String path, boolean writeOutput)
070                    throws Exception;
071    
072            public void processTemplate(
073                            ServletContext servletContext, HttpServletRequest request,
074                            HttpServletResponse response, PageContext pageContext,
075                            JspWriter jspWriter, String velocityTemplateId,
076                            String velocityTemplateContent)
077                    throws Exception;
078    
079            public void processTemplate(
080                            ServletContext servletContext, HttpServletRequest request,
081                            HttpServletResponse response, PageContext pageContext,
082                            JspWriter jspWriter, String portletId, String velocityTemplateId,
083                            String velocityTemplateContent)
084                    throws Exception;
085    
086            public String processXML(
087                            HttpServletRequest request, String content,
088                            RuntimeLogic runtimeLogic)
089                    throws Exception;
090    
091    }