|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TemplateEngine
The interface that all templates engines used within AndroMDA must implement. It allows us to plug-in the template engine to use for processing of templates used by the system.
| Method Summary | |
|---|---|
void |
addMacroLibrary(java.lang.String macroLibrary)
Adds a a macro library for use within this template engine. |
java.lang.String |
getEvaluatedExpression(java.lang.String expression,
java.util.Map templateObjects)
Evaluates the expression contained within the template
being processed and returns the result. |
java.util.List |
getMacroLibraries()
Returns the list of macro libraries used within this template engine. |
void |
initialize(java.lang.String namespace)
Initializes the TempateEngine. |
void |
processTemplate(java.lang.String templateFile,
java.util.Map templateObjects,
java.io.Writer output)
Processes a template. |
void |
setMergeLocation(java.lang.String mergeLocation)
Sets the location of merge templates. |
void |
shutdown()
Shuts down the template engine. |
| Method Detail |
|---|
void initialize(java.lang.String namespace)
throws java.lang.Exception
namespace - The name of a namespace this can be used for whatever the
template engine implementation likes. For example, it can help
determine the name of the log file to which output is logged.
java.lang.Exception
void processTemplate(java.lang.String templateFile,
java.util.Map templateObjects,
java.io.Writer output)
throws java.lang.Exception
templateFile - the path to the template file that will be processed.templateObjects - any additional objects we wish to make available
to the translation template that is processedoutput - the Writer to which to write the output of the processing.
java.lang.Exception - any exception that may occurvoid shutdown()
java.util.List getMacroLibraries()
void addMacroLibrary(java.lang.String macroLibrary)
macroLibrary - void setMergeLocation(java.lang.String mergeLocation)
merge templates. These are templates
that will be merged into cartridges during processing from an external
location. This allows the ability to define templates external to plugins
so that these templates can override plugin templates in order to provide
customization.
the - location of the merge files.
java.lang.String getEvaluatedExpression(java.lang.String expression,
java.util.Map templateObjects)
expression contained within the template
being processed and returns the result.
expression - the expression to evaluate.templateObjects - any additional objects we wish to make available
to the template engine when the expression is evaluted. It this is null
there will be nothing to be evaluated and therefore this operation will return
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||