C# Class NVelocity.Runtime.VelocimacroFactory

VelocimacroFactory.java * manages the set of VMs in a running Velocity engine. *
显示文件 Open project: rasmus-toftdahl-olesen/NVelocity Class Usage Examples

Private Properties

Property Type Description
CanAddVelocimacro bool
LogVMMessageInfo void
LogVMMessageWarn void

Public Methods

Method Description
AddVelocimacro ( String name, String macroBody, String argArray, String sourceTemplate ) : bool

adds a macro to the factory.

DumpVMNamespace ( String ns ) : bool

tells the velocimacroManager to dump the specified namespace

GetVelocimacro ( String vmName, String sourceTemplate ) : Directive

actual factory : creates a Directive that will behave correctly wrt getting the framework to dig out the correct # of args

InitVelocimacro ( ) : void

initialize the factory - setup all permissions load all global libraries.

IsVelocimacro ( String vm, String sourceTemplate ) : bool

Tells the world if a given directive string is a Velocimacro

VelocimacroFactory ( IRuntimeServices rs ) : System

CTOR : requires a runtime services from now on

Private Methods

Method Description
CanAddVelocimacro ( String name, String sourceTemplate ) : bool

determines if a given macro/namespace (name, source) combo is allowed to be added *

LogVMMessageInfo ( String s ) : void

localization of the logging logic

LogVMMessageWarn ( String s ) : void

localization of the logging logic

Method Details

AddVelocimacro() public method

adds a macro to the factory.
public AddVelocimacro ( String name, String macroBody, String argArray, String sourceTemplate ) : bool
name String
macroBody String
argArray String
sourceTemplate String
return bool

DumpVMNamespace() public method

tells the velocimacroManager to dump the specified namespace
public DumpVMNamespace ( String ns ) : bool
ns String
return bool

GetVelocimacro() public method

actual factory : creates a Directive that will behave correctly wrt getting the framework to dig out the correct # of args
public GetVelocimacro ( String vmName, String sourceTemplate ) : Directive
vmName String
sourceTemplate String
return Directive

InitVelocimacro() public method

initialize the factory - setup all permissions load all global libraries.
public InitVelocimacro ( ) : void
return void

IsVelocimacro() public method

Tells the world if a given directive string is a Velocimacro
public IsVelocimacro ( String vm, String sourceTemplate ) : bool
vm String
sourceTemplate String
return bool

VelocimacroFactory() public method

CTOR : requires a runtime services from now on
public VelocimacroFactory ( IRuntimeServices rs ) : System
rs IRuntimeServices
return System