* Handles the content generation for this control using Velocity
*/
public ConcreteElement getContent( RunData rundata )
{
Portlet portlet = getPortlet();
JetspeedRunData jdata = (JetspeedRunData)rundata;
// Check to see if the portlet allows view
// If the current security context disallows view,
// do not display the portlet OR the control decorator
if (portlet instanceof PortletWrapper)
{
PortletWrapper wrapper = (PortletWrapper)portlet;
if (!wrapper.getAllowView(rundata))
{
if (JetspeedResources.getBoolean("defaultportletcontrol.hide.decorator", true))
{
return new StringElement("");
}
}
}
// Create a new Velocity context and load default
// application pull tools
Context context = TurbineVelocity.getContext();
context.put("data", rundata );
context.put("actions", buildActionList( rundata, portlet ) );
context.put("conf", getConfig() );
context.put("skin", portlet.getPortletConfig().getPortletSkin() );
// Put the request and session based contexts
TurbinePull.populateContext(context, rundata);
if ( portlet.getName().equals(jdata.getCustomized())
&& (!portlet.providesCustomization()) )
{
context.put("portlet",JetspeedTool.getCustomizer(portlet));
context.put("portlet_instance",JetspeedTool.getCustomizer(portlet));
}