|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.webmacro.Context
org.webmacro.engine.BuildContext
Contains data structures which are manipulated during the builder phase of parsing. It extends Map so that user provided directives can store information in it during the builder phase. Although WebMacro's built in directives make no use of this hashtable (they use the other structures added in the derived class), other user provided directives might. Therefore you should adopt a sensible naming scheme for your keys, to avoid conflicting with keys inserted by someone else.
Nested Class Summary |
Nested classes inherited from class org.webmacro.Context |
Context.TemplateEvaluationContext |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Constructor Summary | |
BuildContext(Broker b)
|
Method Summary | |
void |
addFilter(Variable var,
Filter ft)
Register a new filter, adding it to the chain for the supplied name. |
void |
clearFilters(Variable var)
Clear all the filtered for the supplied name. |
Macro |
getFilterMacro(Variable v)
Get the filter that applies to a specific variable. |
MacroDefinition |
getMacro(java.lang.String name)
Search for a MacroDefinition in the build context |
java.util.Map |
getMacros()
Return the map of MacroDefinitions |
Parser |
getParser(java.lang.String pname)
|
java.lang.Object |
getVariableType(java.lang.String name)
Find out whether the named variable is a tool, local variable, or property variable. |
void |
mergeConstants(Template t)
Add #macros and #params from the specified Template to this bulid context |
void |
putMacro(java.lang.String name,
MacroDefinition macro)
Add a MacroDefinition to the build context |
void |
setVariableType(java.lang.String name,
java.lang.Object type)
Declare whether the named variable is to be treated as a tool, local variable, or property variable type. |
Methods inherited from class org.webmacro.Context |
clear, clone, cloneContext, containsKey, containsValue, entrySet, get, getBroker, getCurrentLocation, getEvaluationExceptionHandler, getLog, getLog, getMap, getPool, getProperty, getProperty, getTemplateEvaluationContext, internalGet, internalGet, isEmpty, isTiming, keySet, loadTools, put, put, put, put, put, put, put, put, put, put, putAll, putFunction, putGlobalFunction, recycle, remove, set, setEvaluationExceptionHandler, setMap, setPool, setProperty, setProperty, size, startTiming, startTiming, startTiming, startTiming, startTiming, stopTiming, toString, values |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Constructor Detail |
public BuildContext(Broker b)
Method Detail |
public final Parser getParser(java.lang.String pname) throws NotFoundException
NotFoundException
public java.lang.Object getVariableType(java.lang.String name)
public void setVariableType(java.lang.String name, java.lang.Object type)
public void addFilter(Variable var, Filter ft)
var
- the top level property name that is being filteredft
- the Filter which will handle this propertypublic void clearFilters(Variable var)
public Macro getFilterMacro(Variable v)
public void putMacro(java.lang.String name, MacroDefinition macro)
public MacroDefinition getMacro(java.lang.String name)
public void mergeConstants(Template t)
public java.util.Map getMacros()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |