001
014
015 package com.liferay.portal.layoutconfiguration.util;
016
017 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018 import com.liferay.portal.kernel.template.TemplateResource;
019 import com.liferay.portal.kernel.util.StringBundler;
020 import com.liferay.portal.layoutconfiguration.util.xml.RuntimeLogic;
021
022 import javax.servlet.http.HttpServletRequest;
023 import javax.servlet.http.HttpServletResponse;
024 import javax.servlet.jsp.PageContext;
025
026
031 public class RuntimePageUtil {
032
033 public static StringBundler getProcessedTemplate(
034 PageContext pageContext, String portletId,
035 TemplateResource templateResource)
036 throws Exception {
037
038 return getRuntimePage().getProcessedTemplate(
039 pageContext, portletId, templateResource);
040 }
041
042 public static RuntimePage getRuntimePage() {
043 PortalRuntimePermission.checkGetBeanProperty(RuntimePageUtil.class);
044
045 return _runtimePage;
046 }
047
048 public static void processCustomizationSettings(
049 PageContext pageContext, TemplateResource templateResource)
050 throws Exception {
051
052 getRuntimePage().processCustomizationSettings(
053 pageContext, templateResource);
054 }
055
056 public static void processTemplate(
057 PageContext pageContext, String portletId,
058 TemplateResource templateResource)
059 throws Exception {
060
061 getRuntimePage().processTemplate(
062 pageContext, portletId, templateResource);
063 }
064
065 public static void processTemplate(
066 PageContext pageContext, TemplateResource templateResource)
067 throws Exception {
068
069 getRuntimePage().processTemplate(pageContext, templateResource);
070 }
071
072 public static String processXML(
073 HttpServletRequest request, HttpServletResponse response,
074 String content)
075 throws Exception {
076
077 return getRuntimePage().processXML(request, response, content);
078 }
079
080 public static String processXML(
081 HttpServletRequest request, String content,
082 RuntimeLogic runtimeLogic)
083 throws Exception {
084
085 return getRuntimePage().processXML(request, content, runtimeLogic);
086 }
087
088 public void setRuntimePage(RuntimePage runtimePage) {
089 PortalRuntimePermission.checkSetBeanProperty(getClass());
090
091 _runtimePage = runtimePage;
092 }
093
094 private static RuntimePage _runtimePage;
095
096 }