public abstract class AbstractTemplateProcessor extends Object implements DOMElementVisitor, Producer
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractTemplateProcessor.Action |
static class |
AbstractTemplateProcessor.ActionDecoder |
Modifier and Type | Field and Description |
---|---|
static String |
TEMPLATE_SPLIT_PI
Template split point processing instruction.
|
Constructor and Description |
---|
AbstractTemplateProcessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
applyTemplateBefore() |
protected AbstractTemplateProcessor.Action |
getAction() |
BeanId |
getBindBeanId() |
String |
getBindId() |
Charset |
getEncoding() |
String |
getOutputStreamResource() |
Set<String> |
getProducts()
Get the set of products produced by this producer instance.
|
void |
initialize() |
protected abstract void |
loadTemplate(SmooksResourceConfiguration config) |
protected void |
processTemplateAction(Element element,
Node templatingResult,
ExecutionContext executionContext) |
protected void |
processTemplateAction(Element element,
NodeList templatingResultNodeList,
ExecutionContext executionContext) |
protected void |
setTemplatingConfiguration(TemplatingConfiguration templatingConfiguration) |
protected abstract void |
visit(Element element,
ExecutionContext executionContext) |
void |
visitAfter(Element element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitBefore(Element element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
public static final String TEMPLATE_SPLIT_PI
@Initialize public void initialize()
protected void setTemplatingConfiguration(TemplatingConfiguration templatingConfiguration)
protected abstract void loadTemplate(SmooksResourceConfiguration config) throws IOException, TransformerConfigurationException
public boolean applyTemplateBefore()
public Set<String> getProducts()
Producer
getProducts
in interface Producer
protected AbstractTemplateProcessor.Action getAction()
public Charset getEncoding()
public String getBindId()
public String getOutputStreamResource()
protected void processTemplateAction(Element element, Node templatingResult, ExecutionContext executionContext)
protected void processTemplateAction(Element element, NodeList templatingResultNodeList, ExecutionContext executionContext)
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitBefore
visitBefore
in interface DOMVisitBefore
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitAfter
visitAfter
in interface DOMVisitAfter
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.protected abstract void visit(Element element, ExecutionContext executionContext) throws SmooksException
SmooksException
public BeanId getBindBeanId()
Copyright © 2020. All rights reserved.