*/
@Override
public void doBuild(PipelineData pipelineData)
throws Exception
{
RunData data = getRunData(pipelineData);
// Get the context needed by Velocity.
Context context = TurbineVelocity.getContext(pipelineData);
// variable for the screen in the layout template
context.put(TurbineConstants.SCREEN_PLACEHOLDER,
new TemplateScreen(data));
// variable to reference the navigation screen in the layout template
context.put(TurbineConstants.NAVIGATION_PLACEHOLDER,
new TemplateNavigation(data));
// Grab the layout template set in the VelocityPage.
// If null, then use the default layout template
// (done by the TemplateInfo object)
String templateName = data.getTemplateInfo().getLayoutTemplate();
// Set the locale and content type
data.getResponse().setLocale(data.getLocale());
data.getResponse().setContentType(data.getContentType());
log.debug("Now trying to render layout " + templateName);
// Finally, generate the layout template and send it to the browser
TurbineVelocity.handleRequest(context,
prefix + templateName, data.getResponse().getOutputStream());
}