1 16 17 package org.apache.jetspeed.modules.actions.portlets; 18 19 import org.apache.jetspeed.portal.Portlet; 21 22 24 import org.apache.turbine.util.RunData; 25 26 import org.apache.velocity.context.Context; 27 28 47 public abstract class JspPortletAction extends GenericMVCAction 48 { 49 50 53 protected void buildConfigureContext(Portlet portlet, Context context, RunData rundata) 54 throws Exception 55 { 56 57 buildConfigureContext(portlet, rundata); 58 if (rundata.getRequest().getAttribute("_" + portlet.getID() + "_noConfigureContext") 59 != null) 60 { 61 super.buildConfigureContext(portlet, context, rundata); 62 } 63 } 64 65 74 protected void buildConfigureContext(Portlet portlet, RunData rundata) throws Exception 75 { 76 77 rundata.getRequest().setAttribute("_" + portlet.getID() + "_noConfigureContext", " "); 79 } 80 81 84 protected void buildMaximizedContext(Portlet portlet, Context context, RunData rundata) 85 throws Exception 86 { 87 buildMaximizedContext(portlet, rundata); 88 if (rundata.getRequest().getAttribute("_" + portlet.getID() + "_noMaximizedContext") 89 != null) 90 { 91 super.buildMaximizedContext(portlet, context, rundata); 92 } 93 } 94 95 104 protected void buildMaximizedContext(Portlet portlet, RunData rundata) throws Exception 105 { 106 rundata.getRequest().setAttribute("_" + portlet.getID() + "_noMaximizedContext", " "); 108 } 109 110 113 protected void buildNormalContext(Portlet portlet, Context context, RunData data) 114 throws Exception 115 { 116 buildNormalContext(portlet, data); 117 } 118 119 123 protected abstract void buildNormalContext(Portlet portlet, RunData rundata) throws Exception ; 124 125 129 public void setTemplate(RunData data, Portlet portlet, String template) 130 131 { 132 if(template != null) 133 { 134 super.setTemplate(data, template, true); 135 } 136 else 137 { 138 super.resetTemplate(data); 139 } 140 } 141 142 } 143 | Popular Tags |