/* (non-Javadoc)
* @see org.apache.jetspeed.aggregator.Aggregator#build(org.apache.jetspeed.request.RequestContext)
*/
public void build(RequestContext context) throws JetspeedException, IOException
{
Fragment fragment = new FragmentImpl(); // TODO: fragment factory
fragment.setType(Fragment.PORTLET);
fragment.setName(context.getRequestParameter(PortalReservedParameters.PORTLET));
String entity = context.getRequestParameter(PortalReservedParameters.PORTLET_ENTITY);
if (entity == null)
{
entity = (String)context.getAttribute(PortalReservedParameters.PORTLET_ENTITY);
}
fragment.setId(entity);
String decorator = fragment.getDecorator();
if( decorator == null)
{
// decorator = context.getPage().getDefaultDecorator(fragment.getType());
log.debug("No sepecific decorator portlet so using page default: "+decorator);
}
ContentDispatcher dispatcher = renderer.getDispatcher(context, false);
renderer.renderNow(fragment, context);
// dispatcher.include(fragment);
context.getResponse().getWriter().write(fragment.getRenderedContent());
}