|
||||||||||
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.freemarker.FreemarkerTemplateEngine
public class FreemarkerTemplateEngine
Freemarker template engine implementation.
Field Summary |
---|
Fields inherited from interface fr.opensagres.xdocreport.template.freemarker.FreemarkerConstants |
---|
DESCRIPTION_DISCOVERY, ID_DISCOVERY |
Constructor Summary | |
---|---|
FreemarkerTemplateEngine()
|
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()
|
freemarker.template.Configuration |
getFreemarkerConfiguration()
|
String |
getId()
Return the identifier of the template engine. |
String |
getKind()
Returns the template engien kind (Freemarker, Velocity..) |
boolean |
isFieldNameStartsWithUpperCase()
|
boolean |
isForceModifyReader()
|
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)
|
void |
setForceModifyReader(boolean forceModifyReader)
|
void |
setFreemarkerConfiguration(freemarker.template.Configuration freemarkerConfiguration)
|
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 FreemarkerTemplateEngine()
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
public freemarker.template.Configuration getFreemarkerConfiguration()
public void setFreemarkerConfiguration(freemarker.template.Configuration freemarkerConfiguration)
public void extractFields(Reader reader, String entryName, FieldsExtractor extractor) throws XDocReportException
extractFields
in interface ITemplateEngine
XDocReportException
public IDocumentFormatter getDocumentFormatter()
getDocumentFormatter
in interface ITemplateEngine
public void setConfiguration(ITemplateEngineConfiguration configuration)
setConfiguration
in interface ITemplateEngine
setConfiguration
in class AbstractTemplateEngine
public void setForceModifyReader(boolean forceModifyReader)
public boolean isForceModifyReader()
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 |