org.webmacro
Interface ContextTool

All Known Implementing Classes:
CGITool, CookieTool, FormListTool, FormTool, ListTool, LocaleTool, MathTool, RequestTool, ResponseTool, SessionTool, TemplateTool, TextTool, TypeTool, URLTool, VariableTool

public interface ContextTool

This interface is used to attach utilities to a context to assist with the generation of views.


Method Summary
 void destroy(java.lang.Object o)
          At the end of processing this method will be called to return the object generated by init(), in case it needs to be recycled or otherwise cleaned up.
 java.lang.Object init(Context c)
          A new tool object will be instantiated per-request by calling this method.
 

Method Detail

init

public java.lang.Object init(Context c)
                      throws PropertyException
A new tool object will be instantiated per-request by calling this method. A ContextTool is effectively a factory used to create objects for use in templates. Some tools may simply return themselves from this method; others may instantiate new objects to hold the per-request state.

Throws:
PropertyException

destroy

public void destroy(java.lang.Object o)
At the end of processing this method will be called to return the object generated by init(), in case it needs to be recycled or otherwise cleaned up.