| java.lang.Object org.apache.velocity.runtime.VelocimacroFactory
VelocimacroFactory | public class VelocimacroFactory (Code) | | VelocimacroFactory.java
manages the set of VMs in a running Velocity engine.
author: Geir Magnusson Jr. version: $Id: VelocimacroFactory.java 469919 2006-11-01 14:35:46Z henning $ |
Method Summary | |
public boolean | addVelocimacro(String name, String macroBody, String argArray, String sourceTemplate) adds a macro to the factory.
Parameters: name - Name of the Macro to add. Parameters: macroBody - String representation of the macro. Parameters: argArray - Macro arguments. | public boolean | dumpVMNamespace(String namespace) tells the vmManager to dump the specified namespace
Parameters: namespace - Namespace to dump. | public Directive | getVelocimacro(String vmName, String sourceTemplate) actual factory : creates a Directive that will
behave correctly wrt getting the framework to
dig out the correct # of args
Parameters: vmName - Name of the Macro. Parameters: sourceTemplate - Source template from which the macro should be loaded. | public void | initVelocimacro() initialize the factory - setup all permissions
load all global libraries. | public boolean | isVelocimacro(String vm, String sourceTemplate) Tells the world if a given directive string is a Velocimacro
Parameters: vm - Name of the Macro. Parameters: sourceTemplate - Source template from which the macro should be loaded. |
VelocimacroFactory | public VelocimacroFactory(RuntimeServices rsvc)(Code) | | C'tor for the VelociMacro factory.
Parameters: rsvc - Reference to a runtime services object. |
addVelocimacro | public boolean addVelocimacro(String name, String macroBody, String argArray, String sourceTemplate)(Code) | | adds a macro to the factory.
Parameters: name - Name of the Macro to add. Parameters: macroBody - String representation of the macro. Parameters: argArray - Macro arguments. First element is the macro name. Parameters: sourceTemplate - Source template from which the macro gets registered. True if Macro was registered successfully. |
dumpVMNamespace | public boolean dumpVMNamespace(String namespace)(Code) | | tells the vmManager to dump the specified namespace
Parameters: namespace - Namespace to dump. True if namespace has been dumped successfully. |
getVelocimacro | public Directive getVelocimacro(String vmName, String sourceTemplate)(Code) | | actual factory : creates a Directive that will
behave correctly wrt getting the framework to
dig out the correct # of args
Parameters: vmName - Name of the Macro. Parameters: sourceTemplate - Source template from which the macro should be loaded. A directive representing the Macro. |
initVelocimacro | public void initVelocimacro()(Code) | | initialize the factory - setup all permissions
load all global libraries.
|
isVelocimacro | public boolean isVelocimacro(String vm, String sourceTemplate)(Code) | | Tells the world if a given directive string is a Velocimacro
Parameters: vm - Name of the Macro. Parameters: sourceTemplate - Source template from which the macro should be loaded. True if the given name is a macro. |
|
|