Class TextEngine
java.lang.Object
java.util.Observable
com.nomagic.magicreport.engine.AbstractTemplateEngine
com.nomagic.magicreport.engine.velocity.DefaultTemplateEngine
com.nomagic.magicreport.engine.velocity.TextEngine
- All Implemented Interfaces:
IExtensionTemplateEngine,com.nomagic.magicreport.engine.IRuntimeInstanceVelocityEngine,ITemplateEngine
This class provides an instance of the Velocity template engine.
- Since:
- Jun 11, 2007 10:49:57 PM
- Version:
- 1.0 Jun 11, 2007
-
Field Summary
Fields inherited from class com.nomagic.magicreport.engine.velocity.DefaultTemplateEngine
velocityContextFields inherited from class com.nomagic.magicreport.engine.AbstractTemplateEngine
context, isAborted, preProcessFile, processFile, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMerge a template with current context and rendered stream into the writer.protected voidpreProcess(Template template) Perform a pre-processing before evaluate template.Methods inherited from class com.nomagic.magicreport.engine.velocity.DefaultTemplateEngine
abort, checkFileNotFoundException, clearTools, createComment, createTemplate, createTemplate, createTemplate, destroy, getClassLoader, getFormatter, getResolvedSectionName, handleForPage, handleForRow, handleImport, handleIncludeSection, handleSectionBegin, isNoSpaceException, lineCount, postProcess, process, process, processException, processVelocityException, processVelocityException, setClassLoader, setFormatter, setLatestLocation, setLocation, setProperty, setWriterForEvaluate, translate, trimTrailSpaceMethods inherited from class com.nomagic.magicreport.engine.AbstractTemplateEngine
addContext, addInvalidReferenceHandler, addObserver, addReferenceInsertionHandler, evaluate, getConcurrentToolException, getContext, getCurrentRuntimeInstance, getInvalidReferenceHandler, getProcessSize, getProperties, getProperty, getReferenceInsertionHandler, isMemoryMode, notifyObservers, observers, setConcurrentToolException, setContext, setCurrentRuntimeInstanceMethods inherited from class java.util.Observable
clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
-
Constructor Details
-
TextEngine
public TextEngine()Create instance of engine.
-
-
Method Details
-
preProcess
Perform a pre-processing before evaluate template. This method do nothing. The process will be pass directly to Velocity.- Overrides:
preProcessin classDefaultTemplateEngine- Parameters:
template- template before evaluated.- Throws:
ParseErrorException- if a syntax or other error which prevents it from being parsed.InitializationEngineException- error while initializing engineTemplateException- other error while processing the template- See Also:
-
evaluate
Merge a template with current context and rendered stream into the writer. Overwrite default process so this engine is pure velocity processing.- Specified by:
evaluatein interfaceITemplateEngine- Overrides:
evaluatein classAbstractTemplateEngine- Parameters:
template- Template being evaluated- Throws:
ParseErrorException- if a syntax or other error which prevents it from being parsed.InitializationEngineException- error while initializing engineTemplateException- other error while processing the template- See Also:
-