public class FreeMarkerTemplateProcessor extends AbstractTemplateProcessor implements org.milyn.delivery.sax.SAXElementVisitor, org.milyn.delivery.ordering.Consumer
FreeMarkerContentHandlerFactory.
NOTE that this visitor supports the extra "useNodeModel" parameter when
using DOM based filtering. When set to true (default=false), the targeted
DOM element will be attached to the model that is passed to the FreeMarker
templating engine. This allows the DOM model to be referenced from within
the FreeMarker template, with the targeted element name being the "root"
name when forming expressions. See freemarker.org
for more info.AbstractTemplateProcessor.Action, AbstractTemplateProcessor.ActionDecoderTEMPLATE_SPLIT_PI| Modifier | Constructor and Description |
|---|---|
protected |
FreeMarkerTemplateProcessor()
Default constructor.
|
|
FreeMarkerTemplateProcessor(TemplatingConfiguration templatingConfiguration)
Programmatically configure the FreeMarker Templating Visitor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
consumes(Object object) |
protected void |
loadTemplate(org.milyn.cdr.SmooksResourceConfiguration config) |
void |
onChildElement(org.milyn.delivery.sax.SAXElement element,
org.milyn.delivery.sax.SAXElement childElement,
org.milyn.container.ExecutionContext executionContext) |
void |
onChildText(org.milyn.delivery.sax.SAXElement element,
org.milyn.delivery.sax.SAXText childText,
org.milyn.container.ExecutionContext executionContext) |
protected void |
visit(Element element,
org.milyn.container.ExecutionContext executionContext)
Apply the template for DOM.
|
void |
visitAfter(Element element,
org.milyn.container.ExecutionContext executionContext) |
void |
visitAfter(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext) |
void |
visitBefore(Element element,
org.milyn.container.ExecutionContext executionContext) |
void |
visitBefore(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext) |
applyTemplateBefore, getAction, getBindBeanId, getBindId, getEncoding, getOutputStreamResource, getProducts, initialize, processTemplateAction, processTemplateAction, setTemplatingConfigurationprotected FreeMarkerTemplateProcessor()
public FreeMarkerTemplateProcessor(TemplatingConfiguration templatingConfiguration)
templatingConfiguration - The templating configuration.protected void loadTemplate(org.milyn.cdr.SmooksResourceConfiguration config)
throws IOException
loadTemplate in class AbstractTemplateProcessorIOExceptionpublic boolean consumes(Object object)
consumes in interface org.milyn.delivery.ordering.Consumerpublic void visitBefore(Element element, org.milyn.container.ExecutionContext executionContext) throws org.milyn.SmooksException
visitBefore in interface org.milyn.delivery.dom.DOMVisitBeforevisitBefore in class AbstractTemplateProcessororg.milyn.SmooksExceptionpublic void visitAfter(Element element, org.milyn.container.ExecutionContext executionContext) throws org.milyn.SmooksException
visitAfter in interface org.milyn.delivery.dom.DOMVisitAftervisitAfter in class AbstractTemplateProcessororg.milyn.SmooksExceptionprotected void visit(Element element, org.milyn.container.ExecutionContext executionContext) throws org.milyn.SmooksException
visit in class AbstractTemplateProcessorelement - The targeted DOM Element.executionContext - The Smooks execution context.org.milyn.SmooksException - Failed to apply template. See cause.public void visitBefore(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext)
throws org.milyn.SmooksException,
IOException
visitBefore in interface org.milyn.delivery.sax.SAXVisitBeforeorg.milyn.SmooksExceptionIOExceptionpublic void onChildText(org.milyn.delivery.sax.SAXElement element,
org.milyn.delivery.sax.SAXText childText,
org.milyn.container.ExecutionContext executionContext)
throws org.milyn.SmooksException,
IOException
onChildText in interface org.milyn.delivery.sax.SAXVisitChildrenorg.milyn.SmooksExceptionIOExceptionpublic void onChildElement(org.milyn.delivery.sax.SAXElement element,
org.milyn.delivery.sax.SAXElement childElement,
org.milyn.container.ExecutionContext executionContext)
throws org.milyn.SmooksException,
IOException
onChildElement in interface org.milyn.delivery.sax.SAXVisitChildrenorg.milyn.SmooksExceptionIOExceptionpublic void visitAfter(org.milyn.delivery.sax.SAXElement element,
org.milyn.container.ExecutionContext executionContext)
throws org.milyn.SmooksException,
IOException
visitAfter in interface org.milyn.delivery.sax.SAXVisitAfterorg.milyn.SmooksExceptionIOExceptionCopyright © 2016. All rights reserved.