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 setCmd(String cmd) {
029 _cmd = cmd;
030 }
031
032 public void setDisableInputs(boolean disableInputs) {
033 _disableInputs = disableInputs;
034 }
035
036 public void setParameterMap(Map<String, String[]> parameterMap) {
037 _parameterMap = parameterMap;
038 }
039
040 public void setType(String type) {
041 _type = type;
042 }
043
044 @Override
045 protected void cleanUp() {
046 _cmd = null;
047 _disableInputs = false;
048 _parameterMap = null;
049 _type = null;
050 }
051
052 @Override
053 protected String getPage() {
054 return _PAGE;
055 }
056
057 @Override
058 protected void setAttributes(HttpServletRequest request) {
059 request.setAttribute("liferay-staging:content:cmd", _cmd);
060 request.setAttribute(
061 "liferay-staging:content:disableInputs", _disableInputs);
062 request.setAttribute(
063 "liferay-staging:content:parameterMap", _parameterMap);
064 request.setAttribute(
065 "liferay-staging:content:renderRequest",
066 pageContext.getAttribute("renderRequest"));
067 request.setAttribute("liferay-staging:content:type", _type);
068 }
069
070 private static final String _PAGE = "/html/taglib/staging/content/page.jsp";
071
072 private String _cmd;
073 private boolean _disableInputs;
074 private Map<String, String[]> _parameterMap;
075 private String _type;
076
077 }