org.milyn.templating
Class AbstractTemplateProcessor
java.lang.Object
org.milyn.templating.AbstractTemplateProcessor
- All Implemented Interfaces:
- ContentHandler, DOMElementVisitor, DOMVisitAfter, DOMVisitBefore, DOMVisitor, Producer, Visitor
- Direct Known Subclasses:
- FreeMarkerTemplateProcessor, XslTemplateProcessor
public abstract class AbstractTemplateProcessor
- extends Object
- implements DOMElementVisitor, Producer
Abstract template processing unit.
Defines abstract methods for loading the template in question, as well as convienience methods for
processing the template action against the templating result (replace, addto, insertbefore and insertafter).
See implementations.
- Author:
- tfennelly
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEMPLATE_SPLIT_PI
public static final String TEMPLATE_SPLIT_PI
- Template split point processing instruction.
- See Also:
- Constant Field Values
AbstractTemplateProcessor
public AbstractTemplateProcessor()
initialize
@Initialize
public void initialize()
setTemplatingConfiguration
protected void setTemplatingConfiguration(TemplatingConfiguration templatingConfiguration)
loadTemplate
protected abstract void loadTemplate(SmooksResourceConfiguration config)
throws IOException,
TransformerConfigurationException
- Throws:
IOException
TransformerConfigurationException
applyTemplateBefore
public boolean applyTemplateBefore()
getProducts
public Set<String> getProducts()
- Specified by:
getProducts in interface Producer
getAction
protected AbstractTemplateProcessor.Action getAction()
getEncoding
public Charset getEncoding()
getBindId
public String getBindId()
getOutputStreamResource
public String getOutputStreamResource()
processTemplateAction
protected void processTemplateAction(Element element,
Node templatingResult,
ExecutionContext executionContext)
processTemplateAction
protected void processTemplateAction(Element element,
NodeList templatingResultNodeList,
ExecutionContext executionContext)
visitBefore
public void visitBefore(Element element,
ExecutionContext executionContext)
throws SmooksException
- Specified by:
visitBefore in interface DOMVisitBefore
- Throws:
SmooksException
visitAfter
public void visitAfter(Element element,
ExecutionContext executionContext)
throws SmooksException
- Specified by:
visitAfter in interface DOMVisitAfter
- Throws:
SmooksException
visit
protected abstract void visit(Element element,
ExecutionContext executionContext)
throws SmooksException
- Throws:
SmooksException
getBindBeanId
public BeanId getBindBeanId()
- Returns:
- the bindBeanId
Copyright © 2014. All Rights Reserved.