001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.layoutconfiguration.util;
016    
017    import com.liferay.portal.kernel.util.StringBundler;
018    import com.liferay.portal.model.Portlet;
019    import com.liferay.portlet.layoutconfiguration.util.xml.RuntimeLogic;
020    
021    import javax.portlet.RenderRequest;
022    import javax.portlet.RenderResponse;
023    
024    import javax.servlet.ServletContext;
025    import javax.servlet.http.HttpServletRequest;
026    import javax.servlet.http.HttpServletResponse;
027    import javax.servlet.jsp.JspWriter;
028    import javax.servlet.jsp.PageContext;
029    
030    /**
031     * @author Brian Wing Shun Chan
032     * @author Raymond Aug??
033     * @author Shuyang Zhou
034     */
035    public interface RuntimePortlet {
036    
037            public StringBundler getProcessedTemplate(
038                            ServletContext servletContext, HttpServletRequest request,
039                            HttpServletResponse response, PageContext pageContext,
040                            JspWriter jspWriter, String portletId, String velocityTemplateId,
041                            String velocityTemplateContent)
042                    throws Exception;
043    
044            public String processCustomizationSettings(
045                            ServletContext servletContext, HttpServletRequest request,
046                            HttpServletResponse response, PageContext pageContext,
047                            String velocityTemplateId, String velocityTemplateContent)
048                    throws Exception;
049    
050            public String processPortlet(
051                            ServletContext servletContext, HttpServletRequest request,
052                            HttpServletResponse response, Portlet portlet, String queryString,
053                            String columnId, Integer columnPos, Integer columnCount,
054                            String path, boolean writeOutput)
055                    throws Exception;
056    
057            public String processPortlet(
058                            ServletContext servletContext, HttpServletRequest request,
059                            HttpServletResponse response, RenderRequest renderRequest,
060                            RenderResponse renderResponse, Portlet portlet, String portletId,
061                            String queryString, String columnId, Integer columnPos,
062                            Integer columnCount, String path, boolean writeOutput)
063                    throws Exception;
064    
065            public String processPortlet(
066                            ServletContext servletContext, HttpServletRequest request,
067                            HttpServletResponse response, RenderRequest renderRequest,
068                            RenderResponse renderResponse, String portletId, String queryString,
069                            boolean writeOutput)
070                    throws Exception;
071    
072            public String processPortlet(
073                            ServletContext servletContext, HttpServletRequest request,
074                            HttpServletResponse response, RenderRequest renderRequest,
075                            RenderResponse renderResponse, String portletId, String queryString,
076                            String columnId, Integer columnPos, Integer columnCount,
077                            boolean writeOutput)
078                    throws Exception;
079    
080            public void processTemplate(
081                            ServletContext servletContext, HttpServletRequest request,
082                            HttpServletResponse response, PageContext pageContext,
083                            JspWriter jspWriter, String velocityTemplateId,
084                            String velocityTemplateContent)
085                    throws Exception;
086    
087            public void processTemplate(
088                            ServletContext servletContext, HttpServletRequest request,
089                            HttpServletResponse response, PageContext pageContext,
090                            JspWriter jspWriter, String portletId, String velocityTemplateId,
091                            String velocityTemplateContent)
092                    throws Exception;
093    
094            public String processXML(
095                            HttpServletRequest request, String content,
096                            RuntimeLogic runtimeLogic)
097                    throws Exception;
098    
099            public String processXML(
100                            ServletContext servletContext, HttpServletRequest request,
101                            HttpServletResponse response, RenderRequest renderRequest,
102                            RenderResponse renderResponse, String content)
103                    throws Exception;
104    
105    }