001
014
015 package com.liferay.taglib.staging;
016
017 import com.liferay.taglib.util.IncludeTag;
018
019 import java.util.Map;
020
021 import javax.servlet.http.HttpServletRequest;
022
023
026 public class ContentTag extends IncludeTag {
027
028 public void setDisableInputs(boolean disableInputs) {
029 _disableInputs = disableInputs;
030 }
031
032 public void setParameterMap(Map<String, String[]> parameterMap) {
033 _parameterMap = parameterMap;
034 }
035
036 public void setType(String type) {
037 _type = type;
038 }
039
040 @Override
041 protected void cleanUp() {
042 _disableInputs = false;
043 _parameterMap = null;
044 _type = null;
045 }
046
047 @Override
048 protected String getPage() {
049 return _PAGE;
050 }
051
052 @Override
053 protected void setAttributes(HttpServletRequest request) {
054 request.setAttribute(
055 "liferay-staging:content:disableInputs", _disableInputs);
056 request.setAttribute(
057 "liferay-staging:content:parameterMap", _parameterMap);
058 request.setAttribute(
059 "liferay-staging:content:renderRequest",
060 pageContext.getAttribute("renderRequest"));
061 request.setAttribute("liferay-staging:content:type", _type);
062 }
063
064 private static final String _PAGE = "/html/taglib/staging/content/page.jsp";
065
066 private boolean _disableInputs;
067 private Map<String, String[]> _parameterMap;
068 private String _type;
069
070 }