|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Constructor Summary | |
---|---|
Velocity() Initializes a new instance of the Velocity class. |
Property Summary | |
---|---|
Commons.Collections.ExtendedProperties |
ExtendedProperties
Set an entire configuration at once. This is useful in cases where the parent application uses the ExtendedProperties class and the velocity configuration is a subset of the parent application's configuration. |
Method Summary | |
---|---|
void |
AddProperty(string key, object value_Renamed) Add a Velocity Runtime property. |
void |
ClearProperty(string key) Clear a NVelocity Runtime property. |
void |
Debug(object message) Log a debug message. |
void |
Error(object message) Log an error message. |
bool |
Evaluate(NVelocity.Context.IContext context, System.IO.TextWriter out_Renamed, string logTag, string instring) renders the input string using the context into the output writer. To be used when a template is dynamically constructed, or want to use Velocity as a token replacer. |
bool |
Evaluate(NVelocity.Context.IContext context, System.IO.TextWriter writer, string logTag, System.IO.Stream instream) Renders the input stream using the context into the output writer. To be used when a template is dynamically constructed, or want to use Velocity as a token replacer. |
bool |
Evaluate(NVelocity.Context.IContext context, System.IO.TextWriter writer, string logTag, System.IO.TextReader reader) Renders the input reader using the context into the output writer. To be used when a template is dynamically constructed, or want to use Velocity as a token replacer. |
object |
GetProperty(string key) Get a Velocity Runtime property. |
NVelocity.Template |
GetTemplate(string name) Returns a Templatefrom the Velocity resource management system. |
NVelocity.Template |
GetTemplate(string name, string encoding) Returns a Templatefrom the Velocity resource management system. |
void |
Info(object message) Log an info message. |
void |
Init() initialize the NVelocity runtime engine, using the default properties of the NVelocity distribution |
void |
Init(string propsFilename) initialize the Velocity runtime engine, using default properties plus the properties in the properties file passed in as the arg |
void |
Init(Commons.Collections.ExtendedProperties p) initialize the Velocity runtime engine, using default properties plus the properties in the passed in java.util.Properties object |
bool | InvokeVelocimacro(string vmName, string logTag, string[] params_Renamed, NVelocity.Context.IContext context, System.IO.TextWriter writer) |
bool |
MergeTemplate(string templateName, NVelocity.Context.IContext context, System.IO.TextWriter writer) merges a template and puts the rendered stream into the writer |
bool |
MergeTemplate(string templateName, string encoding, NVelocity.Context.IContext context, System.IO.TextWriter writer) merges a template and puts the rendered stream into the writer |
void |
SetApplicationAttribute(object key, object value_Renamed) Set the an ApplicationAttribue, which is an Object set by the application which is accessable from any component of the system that gets a RuntimeServices. This allows communication between the application environment and custom pluggable components of the Velocity engine, such as loaders and loggers. Note that there is no enfocement or rules for the key used - it is up to the application developer. However, to help make the intermixing of components possible, using the target Class name (e.g. com.foo.bar ) as the key might help avoid collision. |
void |
SetProperty(string key, object value_Renamed) Set a Velocity Runtime property. |
bool | TemplateExists(string templateName) |
void |
Warn(object message) Log a warning message. |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Constructor Detail |
---|
public Velocity()
Initializes a new instance of the Velocity class.
Property Detail |
---|
public Commons.Collections.ExtendedProperties ExtendedProperties
Set an entire configuration at once. This is useful in cases where the parent application uses the ExtendedProperties class and the velocity configuration is a subset of the parent application's configuration.
Parameters:
ExtendedProperties
- configurationMethod Detail |
---|
public void AddProperty(string key, object value_Renamed)
Add a Velocity Runtime property.
Parameters:
String
- keyObject
- valuepublic void ClearProperty(string key)
Clear a NVelocity Runtime property.
Parameters:
key
- of property to clearpublic void Debug(object message)
Log a debug message.
Parameters:
Object
- message to logpublic void Error(object message)
Log an error message.
Parameters:
Object
- message to logpublic bool Evaluate(NVelocity.Context.IContext context, System.IO.TextWriter out_Renamed, string logTag, string instring)
renders the input string using the context into the output writer. To be used when a template is dynamically constructed, or want to use Velocity as a token replacer.
Parameters:
context
- context to use in rendering input string
out
- Writer in which to render the output
logTag
- string to be used as the template name for log
messages in case of error
instring
- input string containing the VTL to be rendered
public bool Evaluate(NVelocity.Context.IContext context, System.IO.TextWriter writer, string logTag, System.IO.Stream instream)
Renders the input stream using the context into the output writer. To be used when a template is dynamically constructed, or want to use Velocity as a token replacer.
Parameters:
context
- context to use in rendering input string
out
- Writer in which to render the output
logTag
- string to be used as the template name for log messages
in case of error
instream
- input stream containing the VTL to be rendered
public bool Evaluate(NVelocity.Context.IContext context, System.IO.TextWriter writer, string logTag, System.IO.TextReader reader)
Renders the input reader using the context into the output writer. To be used when a template is dynamically constructed, or want to use Velocity as a token replacer.
Parameters:
context
- context to use in rendering input stringout
- Writer in which to render the outputlogTag
- string to be used as the template name for log messages in case of errorreader
- Reader containing the VTL to be renderedpublic object GetProperty(string key)
Get a Velocity Runtime property.
Parameters:
key
- property to retrievepublic NVelocity.Template GetTemplate(string name)
Returns a
Templatefrom the Velocity resource management system.
Parameters:
name
- The file name of the desired template.
public NVelocity.Template GetTemplate(string name, string encoding)
Returns a
Templatefrom the Velocity resource management system.
Parameters:
name
- The file name of the desired template.
encoding
- The character encoding to use for the template.
public void Info(object message)
Log an info message.
Parameters:
Object
- message to logpublic void Init()
initialize the NVelocity runtime engine, using the default properties of the NVelocity distribution
public void Init(string propsFilename)
initialize the Velocity runtime engine, using default properties plus the properties in the properties file passed in as the arg
Parameters:
propsFilename
-
file containing properties to use to initialize
the Velocity runtime
public void Init(Commons.Collections.ExtendedProperties p)
initialize the Velocity runtime engine, using default properties plus the properties in the passed in java.util.Properties object
Parameters:
p
-
Proprties object containing initialization properties
public bool InvokeVelocimacro(string vmName, string logTag, string[] params_Renamed, NVelocity.Context.IContext context, System.IO.TextWriter writer)
public bool MergeTemplate(string templateName, NVelocity.Context.IContext context, System.IO.TextWriter writer)
merges a template and puts the rendered stream into the writer
Parameters:
templateName
- name of template to be used in merge
context
- filled context to be used in merge
writer
- writer to write template into
public bool MergeTemplate(string templateName, string encoding, NVelocity.Context.IContext context, System.IO.TextWriter writer)
merges a template and puts the rendered stream into the writer
Parameters:
templateName
- name of template to be used in merge
encoding
- encoding used in template
context
- filled context to be used in merge
writer
- writer to write template into
public void SetApplicationAttribute(object key, object value_Renamed)
Set the an ApplicationAttribue, which is an Object set by the application which is accessable from any component of the system that gets a RuntimeServices. This allows communication between the application environment and custom pluggable components of the Velocity engine, such as loaders and loggers. Note that there is no enfocement or rules for the key used - it is up to the application developer. However, to help make the intermixing of components possible, using the target Class name (e.g. com.foo.bar ) as the key might help avoid collision.
Parameters:
key
- object 'name' under which the object is stored
value
- object to store under this key
public void SetProperty(string key, object value_Renamed)
Set a Velocity Runtime property.
Parameters:
String
- keyObject
- valuepublic bool TemplateExists(string templateName)
public void Warn(object message)
Log a warning message.
Parameters:
Object
- message to log
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |