|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.opensagres.xdocreport.template.AbstractTemplateEngine fr.opensagres.xdocreport.template.velocity.internal.VelocityTemplateEngine
public class VelocityTemplateEngine
Velocity template engine implementation.
Field Summary |
---|
Fields inherited from interface fr.opensagres.xdocreport.template.velocity.VelocityConstants |
---|
DESCRIPTION_DISCOVERY, ID_DISCOVERY, VELOCITY_TEMPLATE_ENGINE_KEY |
Constructor Summary | |
---|---|
VelocityTemplateEngine(Properties velocityEngineProperties)
|
Method Summary | |
---|---|
IContext |
createContext()
Create a new context to register Java model. |
IContext |
createContext(Map<String,Object> contextMap)
Create a new context to register Java model from the given Map. |
void |
extractFields(Reader reader,
String entryName,
FieldsExtractor extractor)
|
IDocumentFormatter |
getDocumentFormatter()
|
String |
getId()
Return the identifier of the template engine. |
String |
getKind()
Returns the template engien kind (Freemarker, Velocity..) |
protected org.apache.velocity.app.VelocityEngine |
getVelocityEngine()
|
void |
initializeVelocityEngine(Properties velocityEngineProperties)
|
boolean |
isFieldNameStartsWithUpperCase()
|
void |
process(String templateName,
IContext context,
Writer writer)
Merge Java model coming from the given context with the given template name and register the merge result in the given writer. |
protected void |
processNoCache(String entryName,
IContext context,
Reader reader,
Writer writer)
|
protected void |
processWithCache(String templateName,
IContext context,
Writer writer)
|
void |
setConfiguration(ITemplateEngineConfiguration configuration)
|
Methods inherited from class fr.opensagres.xdocreport.template.AbstractTemplateEngine |
---|
extractFields, getConfiguration, getTemplateCacheInfoProvider, isUseTemplateCache, process, process, process, setTemplateCacheInfoProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VelocityTemplateEngine(Properties velocityEngineProperties)
Method Detail |
---|
public String getKind()
ITemplateEngine
getKind
in interface ITemplateEngine
public String getId()
ITemplateEngine
getId
in interface ITemplateEngine
public IContext createContext()
ITemplateEngine
createContext
in interface ITemplateEngine
public IContext createContext(Map<String,Object> contextMap)
ITemplateEngine
createContext
in interface ITemplateEngine
protected void processWithCache(String templateName, IContext context, Writer writer) throws XDocReportException, IOException
processWithCache
in class AbstractTemplateEngine
XDocReportException
IOException
protected void processNoCache(String entryName, IContext context, Reader reader, Writer writer) throws XDocReportException, IOException
processNoCache
in class AbstractTemplateEngine
XDocReportException
IOException
protected org.apache.velocity.app.VelocityEngine getVelocityEngine() throws XDocReportException
XDocReportException
public void initializeVelocityEngine(Properties velocityEngineProperties) throws XDocReportException
XDocReportException
public void setConfiguration(ITemplateEngineConfiguration configuration)
setConfiguration
in interface ITemplateEngine
setConfiguration
in class AbstractTemplateEngine
public IDocumentFormatter getDocumentFormatter()
getDocumentFormatter
in interface ITemplateEngine
public void extractFields(Reader reader, String entryName, FieldsExtractor extractor) throws XDocReportException
extractFields
in interface ITemplateEngine
XDocReportException
public void process(String templateName, IContext context, Writer writer) throws IOException, XDocReportException
ITemplateEngine
process
in interface ITemplateEngine
templateName
- template namecontext
- Java model contextwriter
- merge result writer
IOException
XDocReportException
public boolean isFieldNameStartsWithUpperCase()
isFieldNameStartsWithUpperCase
in interface ITemplateEngine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |