|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.webmacro.servlet.TemplateTool
This is an experimental context tool that allows templates to be used as macros. The tool places a MacroTemplateFactory instance into the context that can be referenced as $Template in WMScript. The factory has two methods, each of which returns a MacroTemplate object, created either from a string or a file.
Nested Class Summary | |
class |
TemplateTool.MacroTemplate
Encapsulates a template and a context, allowing a template to be used like a function or "macro". |
class |
TemplateTool.MacroTemplateFactory
A factory class for creating MacroTemplate objects. |
Constructor Summary | |
TemplateTool()
Creates new TemplateTool |
Method Summary | |
void |
destroy(java.lang.Object o)
Invoked when the context is freed after its request/response has been completed. |
java.lang.Object |
init(Context c)
Create a factory object that can be accessed from WMScript as $Template for creating MacroTemplate objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TemplateTool()
Method Detail |
public void destroy(java.lang.Object o)
destroy
in interface ContextTool
o
- the MacroTemplateFactory that is ready to be destroyed.public java.lang.Object init(Context c) throws PropertyException
init
in interface ContextTool
c
- The context of the current request.
PropertyException
- From the ContextTool interface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |