|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.runtime.VelocimacroManager
public class VelocimacroManager
Manages VMs in namespaces. Currently, two namespace modes are supported:
Method Summary | |
---|---|
boolean |
addVM(String vmName,
String macroBody,
String[] argArray,
String namespace)
Adds a VM definition to the cache. |
boolean |
dumpNamespace(String namespace)
Removes the VMs and the namespace from the manager. |
VelocimacroProxy |
get(String vmName,
String namespace)
gets a new living VelocimacroProxy object by the name / source template duple |
String |
getLibraryName(String vmName,
String namespace)
Return the library name for a given macro. |
void |
setNamespaceUsage(boolean namespaceOn)
public switch to let external user of manager to control namespace usage indep of properties. |
void |
setRegisterFromLib(boolean registerFromLib)
Should macros registered from Libraries be marked special? |
void |
setTemplateLocalInlineVM(boolean inlineLocalMode)
Should macros from the same template be inlined? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean addVM(String vmName, String macroBody, String[] argArray, String namespace)
vmName
- Name of the new VelociMacro.macroBody
- String representation of the macro body.argArray
- Array of macro parameters, first parameter is the macro name.namespace
- The namespace/template from which this macro has been loaded.
public VelocimacroProxy get(String vmName, String namespace)
vmName
- Name of the VelocityMacro to look up.namespace
- Namespace in which to look up the macro.
public boolean dumpNamespace(String namespace)
namespace
- namespace to dump
public void setNamespaceUsage(boolean namespaceOn)
namespaceOn
- True if namespaces should be used.public void setRegisterFromLib(boolean registerFromLib)
registerFromLib
- True if macros from Libs should be marked.public void setTemplateLocalInlineVM(boolean inlineLocalMode)
inlineLocalMode
- True if macros should be inlined on the same template.public String getLibraryName(String vmName, String namespace)
vmName
- Name of the Macro to look up.namespace
- Namespace to look the macro up.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |