프로퍼티 | 타입 | 설명 | |
---|---|---|---|
CreateNewParser |
메소드 | 설명 | |
---|---|---|
AddProperty ( String key, Object value ) : void |
Add a property to the configuration. If it already exists then the value stated here will be added to the configuration entry. For example, if
|
|
AddVelocimacro ( String name, String macro, String argArray, String sourceTemplate ) : bool |
Adds a new Velocimacro. Usually called by Macro only while parsing.
|
|
ClearProperty ( String key ) : void |
Clear the values pertaining to a particular property.
|
|
Debug ( Object message ) : void |
Log a debug message.
|
|
DumpVMNamespace ( String ns ) : bool |
Tells the vmFactory to dump the specified namespace. This is to support clearing the VM list when in inline-VM-local-scope mode
|
|
Error ( Object message ) : void |
Log an error message.
|
|
GetApplicationAttribute ( Object key ) : Object |
IRuntimeServices.GetApplicationAttribute
|
|
GetBoolean ( String key, bool def ) : bool |
Boolean property accessor method to hide the configuration implementation.
|
|
GetContent ( String name ) : ContentResource |
Returns a static content resource from the resource manager. Uses the current value if INPUT_ENCODING as the character encoding. *
|
|
GetContent ( String name, String encoding ) : ContentResource |
Returns a static content resource from the resource manager. *
|
|
GetInt ( String key ) : int |
Int property accessor method to hide the configuration implementation.
|
|
GetInt ( String key, int defaultValue ) : int |
Int property accessor method to hide the configuration implementation.
|
|
GetLoaderNameForResource ( String resourceName ) : String |
Determines is a template exists, and returns name of the loader that provides it. This is a slightly less hokey way to support the Velocity.templateExists() utility method, which was broken when per-template encoding was introduced. We can revisit this. *
|
|
GetProperty ( String key ) : Object |
Allows an external caller to get a property. The calling routine is required to know the type, as this routine will return an Object, as that is what properties can be.
|
|
GetString ( String key ) : String |
String property accessor method to hide the configuration implementation.
|
|
GetTemplate ( String name ) : Template |
Returns a
|
|
GetTemplate ( String name, String encoding ) : Template |
Returns a
|
|
GetVelocimacro ( String vmName, String templateName ) : |
Returns the appropriate VelocimacroProxy object if vmName is a valid current Velocimacro.
|
|
Info ( Object message ) : void |
Log an info message.
|
|
Init ( ) : void |
This is the primary initialization method in the Velocity Runtime. The systems that are setup/initialized here are as follows:
|
|
Init ( |
Initialize the Velocity Runtime with an ExtendedProperties object.
|
|
Init ( String configurationFile ) : void |
Initialize the Velocity Runtime with a configuration file.
|
|
IsVelocimacro ( String vmName, String templateName ) : bool |
Checks to see if a VM exists
|
|
Parse ( |
Parse the input and return the root of AST node structure. In the event that it runs out of parsers in the pool, it will create and let them be GC'd dynamically, logging that it has to do that. This is considered an exceptional condition. It is expected that the user will set the PARSER_POOL_SIZE property appropriately for their application. We will revisit this. |
|
Parse ( |
Parse the input and return the root of the AST node structure.
|
|
SetProperty ( String key, Object value ) : void |
Allows an external system to set a property in the Velocity Runtime.
|
|
Warn ( Object message ) : void |
Log a warning message.
|
|
getString ( String key, String defaultValue ) : String |
String property accessor method with default to hide the configuration implementation.
|
메소드 | 설명 | |
---|---|---|
CreateNewParser ( ) : |
Returns a JavaCC generated Parser.
|
public static AddProperty ( String key, Object value ) : void | ||
key | String | key |
value | Object | value |
리턴 | void |
public static AddVelocimacro ( String name, String macro, String argArray, String sourceTemplate ) : bool | ||
name | String | Name of velocimacro |
macro | String | String form of macro body |
argArray | String | Array of strings, containing the
/// #macro() arguments. The 0th is the name.
/// |
sourceTemplate | String | Source template |
리턴 | bool |
public static ClearProperty ( String key ) : void | ||
key | String | key of property to clear |
리턴 | void |
public static Debug ( Object message ) : void | ||
message | Object | message to log |
리턴 | void |
public static Error ( Object message ) : void | ||
message | Object | message to log |
리턴 | void |
public static GetApplicationAttribute ( Object key ) : Object | ||
key | Object | key |
리턴 | Object |
public static GetBoolean ( String key, bool def ) : bool | ||
key | String | property key |
def | bool | default value if property not found |
리턴 | bool |
public static GetContent ( String name ) : ContentResource | ||
name | String | Name of content resource to get /// |
리턴 | ContentResource |
public static GetContent ( String name, String encoding ) : ContentResource | ||
name | String | Name of content resource to get /// |
encoding | String | Character encoding to use /// |
리턴 | ContentResource |
public static GetInt ( String key, int defaultValue ) : int | ||
key | String | property key |
defaultValue | int | default value |
리턴 | int |
public static GetLoaderNameForResource ( String resourceName ) : String | ||
resourceName | String | Name of template or content resource /// |
리턴 | String |
public static GetProperty ( String key ) : Object | ||
key | String | property to return |
리턴 | Object |
public static GetString ( String key ) : String | ||
key | String | property key |
리턴 | String |
public static GetTemplate ( String name ) : Template | ||
name | String | The file name of the desired template. /// |
리턴 | Template |
public static GetTemplate ( String name, String encoding ) : Template | ||
name | String | The name of the desired template. /// |
encoding | String | Character encoding of the template /// |
리턴 | Template |
public static GetVelocimacro ( String vmName, String templateName ) : |
||
vmName | String | Name of velocimacro requested |
templateName | String | Template Name |
리턴 |
public static Info ( Object message ) : void | ||
message | Object | message to log |
리턴 | void |
public static Init ( |
||
p | Properties | |
리턴 | void |
public static Init ( String configurationFile ) : void | ||
configurationFile | String | configuration file |
리턴 | void |
public static IsVelocimacro ( String vmName, String templateName ) : bool | ||
vmName | String | Name of velocimacro |
templateName | String | Template Name |
리턴 | bool |
public static Parse ( |
||
reader | TextReader retrieved by a resource loader | |
templateName | String | name of the template being parsed |
리턴 | NVelocity.Runtime.Parser.Node.SimpleNode |
public static Parse ( |
||
reader | TextReader retrieved by a resource loader | |
templateName | String | name of the template being parsed |
dumpNamespace | bool | flag to dump the Velocimacro namespace for this template |
리턴 | NVelocity.Runtime.Parser.Node.SimpleNode |
public static SetProperty ( String key, Object value ) : void | ||
key | String | property key |
value | Object | property value |
리턴 | void |
public static Warn ( Object message ) : void | ||
message | Object | message to log |
리턴 | void |
public static getString ( String key, String defaultValue ) : String | ||
key | String | property key /// |
defaultValue | String | default value to return if key not /// found in resource manager. /// |
리턴 | String |