blob: da0146aaa131c6122ac467f4ec54f0c8d9a6cf22 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Apr 14 08:26:32 EDT 2004 -->
<TITLE>
Velocity 1.4 API: Class VelocityEngine
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/VelocityEngine.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/velocity/app/Velocity.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VelocityEngine.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.velocity.app</FONT>
<BR>
Class VelocityEngine</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.velocity.app.VelocityEngine</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html">RuntimeConstants</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>VelocityEngine</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html">RuntimeConstants</A></DL>
<P>
<p>
This class provides a separate new-able instance of the
Velocity template engine. The alternative model for use
is using the Velocity class which employs the singleton
model.
</p>
<p>
Please ensure that you call one of the init() variants.
This is critical for proper behavior.
</p>
<p> Coming soon : Velocity will call
the parameter-less init() at the first use of this class
if the init() wasn't explicitly called. While this will
ensure that Velocity functions, it almost certainly won't
function in the way you intend, so please make sure to
call init().
</p>
<P>
<DL>
<DT><B>Version: </B><DD>$Id: VelocityEngine.java,v 1.6.4.1 2004/03/03 23:22:53 geirm Exp $</DD>
<DT><B>Author: </B><DD><a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a></DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../../../org/apache/velocity/runtime/RuntimeInstance.html">RuntimeInstance</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#ri">ri</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.velocity.runtime.RuntimeConstants"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from interface org.apache.velocity.runtime.<A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html">RuntimeConstants</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#COUNTER_INITIAL_VALUE">COUNTER_INITIAL_VALUE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#COUNTER_NAME">COUNTER_NAME</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#DEBUG_PREFIX">DEBUG_PREFIX</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#DEFAULT_RUNTIME_DIRECTIVES">DEFAULT_RUNTIME_DIRECTIVES</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#DEFAULT_RUNTIME_PROPERTIES">DEFAULT_RUNTIME_PROPERTIES</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#ENCODING_DEFAULT">ENCODING_DEFAULT</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#ERROR_PREFIX">ERROR_PREFIX</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#ERRORMSG_END">ERRORMSG_END</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#ERRORMSG_START">ERRORMSG_START</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#FILE_RESOURCE_LOADER_CACHE">FILE_RESOURCE_LOADER_CACHE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#FILE_RESOURCE_LOADER_PATH">FILE_RESOURCE_LOADER_PATH</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#INFO_PREFIX">INFO_PREFIX</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#INPUT_ENCODING">INPUT_ENCODING</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#INTERPOLATE_STRINGLITERALS">INTERPOLATE_STRINGLITERALS</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_EMAIL_BUFFER_SIZE">LOGSYSTEM_LOG4J_EMAIL_BUFFER_SIZE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_EMAIL_FROM">LOGSYSTEM_LOG4J_EMAIL_FROM</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_EMAIL_SERVER">LOGSYSTEM_LOG4J_EMAIL_SERVER</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_EMAIL_SUBJECT">LOGSYSTEM_LOG4J_EMAIL_SUBJECT</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_EMAIL_TO">LOGSYSTEM_LOG4J_EMAIL_TO</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_FILE_BACKUPS">LOGSYSTEM_LOG4J_FILE_BACKUPS</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_FILE_SIZE">LOGSYSTEM_LOG4J_FILE_SIZE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_PATTERN">LOGSYSTEM_LOG4J_PATTERN</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_REMOTE_HOST">LOGSYSTEM_LOG4J_REMOTE_HOST</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_REMOTE_PORT">LOGSYSTEM_LOG4J_REMOTE_PORT</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_SYSLOGD_FACILITY">LOGSYSTEM_LOG4J_SYSLOGD_FACILITY</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#LOGSYSTEM_LOG4J_SYSLOGD_HOST">LOGSYSTEM_LOG4J_SYSLOGD_HOST</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#NUMBER_OF_PARSERS">NUMBER_OF_PARSERS</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#OUTPUT_ENCODING">OUTPUT_ENCODING</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#PARSE_DIRECTIVE_MAXDEPTH">PARSE_DIRECTIVE_MAXDEPTH</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#PARSER_POOL_SIZE">PARSER_POOL_SIZE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RESOURCE_LOADER">RESOURCE_LOADER</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RESOURCE_MANAGER_CACHE_CLASS">RESOURCE_MANAGER_CACHE_CLASS</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RESOURCE_MANAGER_CLASS">RESOURCE_MANAGER_CLASS</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RESOURCE_MANAGER_LOGWHENFOUND">RESOURCE_MANAGER_LOGWHENFOUND</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RUNTIME_LOG">RUNTIME_LOG</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RUNTIME_LOG_ERROR_STACKTRACE">RUNTIME_LOG_ERROR_STACKTRACE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RUNTIME_LOG_INFO_STACKTRACE">RUNTIME_LOG_INFO_STACKTRACE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RUNTIME_LOG_LOGSYSTEM">RUNTIME_LOG_LOGSYSTEM</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RUNTIME_LOG_LOGSYSTEM_CLASS">RUNTIME_LOG_LOGSYSTEM_CLASS</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RUNTIME_LOG_REFERENCE_LOG_INVALID">RUNTIME_LOG_REFERENCE_LOG_INVALID</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#RUNTIME_LOG_WARN_STACKTRACE">RUNTIME_LOG_WARN_STACKTRACE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#UBERSPECT_CLASSNAME">UBERSPECT_CLASSNAME</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#UNKNOWN_PREFIX">UNKNOWN_PREFIX</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#VM_CONTEXT_LOCALSCOPE">VM_CONTEXT_LOCALSCOPE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#VM_LIBRARY">VM_LIBRARY</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#VM_LIBRARY_AUTORELOAD">VM_LIBRARY_AUTORELOAD</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#VM_MESSAGES_ON">VM_MESSAGES_ON</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#VM_PERM_ALLOW_INLINE">VM_PERM_ALLOW_INLINE</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL">VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#VM_PERM_INLINE_LOCAL">VM_PERM_INLINE_LOCAL</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html#WARN_PREFIX">WARN_PREFIX</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#VelocityEngine()">VelocityEngine</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#addProperty(java.lang.String, java.lang.Object)">addProperty</A></B>(java.lang.String&nbsp;key,
java.lang.Object&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a Velocity Runtime property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#clearProperty(java.lang.String)">clearProperty</A></B>(java.lang.String&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clear a Velocity Runtime property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#debug(java.lang.Object)">debug</A></B>(java.lang.Object&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log a debug message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#error(java.lang.Object)">error</A></B>(java.lang.Object&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log an error message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.InputStream)">evaluate</A></B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer,
java.lang.String&nbsp;logTag,
java.io.InputStream&nbsp;instream)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.Reader)"><CODE>evaluate( Context context, Writer writer,
String logTag, Reader reader )</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.Reader)">evaluate</A></B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer,
java.lang.String&nbsp;logTag,
java.io.Reader&nbsp;reader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders the input reader using the context into the output writer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.lang.String)">evaluate</A></B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;out,
java.lang.String&nbsp;logTag,
java.lang.String&nbsp;instring)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;renders the input string using the context into the output writer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a Velocity Runtime property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/velocity/Template.html">Template</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#getTemplate(java.lang.String)">getTemplate</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Template</code> from the Velocity
resource management system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/velocity/Template.html">Template</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#getTemplate(java.lang.String, java.lang.String)">getTemplate</A></B>(java.lang.String&nbsp;name,
java.lang.String&nbsp;encoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Template</code> from the Velocity
resource management system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#info(java.lang.Object)">info</A></B>(java.lang.Object&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log an info message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#init()">init</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initialize the Velocity runtime engine, using the default
properties of the Velocity distribution</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#init(java.util.Properties)">init</A></B>(java.util.Properties&nbsp;p)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initialize the Velocity runtime engine, using default properties
plus the properties in the passed in java.util.Properties object</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#init(java.lang.String)">init</A></B>(java.lang.String&nbsp;propsFilename)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initialize the Velocity runtime engine, using default properties
plus the properties in the properties file passed in as the arg</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#invokeVelocimacro(java.lang.String, java.lang.String, java.lang.String[], org.apache.velocity.context.Context, java.io.Writer)">invokeVelocimacro</A></B>(java.lang.String&nbsp;vmName,
java.lang.String&nbsp;logTag,
java.lang.String[]&nbsp;params,
<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invokes a currently registered Velocimacro with the parms provided
and places the rendered stream into the writer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#mergeTemplate(java.lang.String, org.apache.velocity.context.Context, java.io.Writer)">mergeTemplate</A></B>(java.lang.String&nbsp;templateName,
<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;merges a template and puts the rendered stream into the writer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#mergeTemplate(java.lang.String, java.lang.String, org.apache.velocity.context.Context, java.io.Writer)">mergeTemplate</A></B>(java.lang.String&nbsp;templateName,
java.lang.String&nbsp;encoding,
<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;merges a template and puts the rendered stream into the writer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#setApplicationAttribute(java.lang.Object, java.lang.Object)">setApplicationAttribute</A></B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#setConfiguration(org.apache.velocity.runtime.configuration.Configuration)">setConfiguration</A></B>(<A HREF="../../../../org/apache/velocity/runtime/configuration/Configuration.html">Configuration</A>&nbsp;configuration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#setExtendedProperties(org.apache.commons.collections.ExtendedProperties)"><CODE>setExtendedProperties( ExtendedProperties )</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#setExtendedProperties(org.apache.commons.collections.ExtendedProperties)">setExtendedProperties</A></B>(org.apache.commons.collections.ExtendedProperties&nbsp;configuration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set an entire configuration at once.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String&nbsp;key,
java.lang.Object&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a Velocity Runtime property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#templateExists(java.lang.String)">templateExists</A></B>(java.lang.String&nbsp;templateName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines if a template is accessable via the currently
configured resource loaders.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#warn(java.lang.Object)">warn</A></B>(java.lang.Object&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log a warning message.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="ri"><!-- --></A><H3>
ri</H3>
<PRE>
private <A HREF="../../../../org/apache/velocity/runtime/RuntimeInstance.html">RuntimeInstance</A> <B>ri</B></PRE>
<DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="VelocityEngine()"><!-- --></A><H3>
VelocityEngine</H3>
<PRE>
public <B>VelocityEngine</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="init()"><!-- --></A><H3>
init</H3>
<PRE>
public void <B>init</B>()
throws java.lang.Exception</PRE>
<DL>
<DD>initialize the Velocity runtime engine, using the default
properties of the Velocity distribution<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="init(java.lang.String)"><!-- --></A><H3>
init</H3>
<PRE>
public void <B>init</B>(java.lang.String&nbsp;propsFilename)
throws java.lang.Exception</PRE>
<DL>
<DD>initialize the Velocity runtime engine, using default properties
plus the properties in the properties file passed in as the arg<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>propsFilename</CODE> - file containing properties to use to initialize
the Velocity runtime</DL>
</DD>
</DL>
<HR>
<A NAME="init(java.util.Properties)"><!-- --></A><H3>
init</H3>
<PRE>
public void <B>init</B>(java.util.Properties&nbsp;p)
throws java.lang.Exception</PRE>
<DL>
<DD>initialize the Velocity runtime engine, using default properties
plus the properties in the passed in java.util.Properties object<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - Proprties object containing initialization properties</DL>
</DD>
</DL>
<HR>
<A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>
setProperty</H3>
<PRE>
public void <B>setProperty</B>(java.lang.String&nbsp;key,
java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Set a Velocity Runtime property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>String</CODE> - key<DD><CODE>Object</CODE> - value</DL>
</DD>
</DL>
<HR>
<A NAME="addProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>
addProperty</H3>
<PRE>
public void <B>addProperty</B>(java.lang.String&nbsp;key,
java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Add a Velocity Runtime property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>String</CODE> - key<DD><CODE>Object</CODE> - value</DL>
</DD>
</DL>
<HR>
<A NAME="clearProperty(java.lang.String)"><!-- --></A><H3>
clearProperty</H3>
<PRE>
public void <B>clearProperty</B>(java.lang.String&nbsp;key)</PRE>
<DL>
<DD>Clear a Velocity Runtime property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - of property to clear</DL>
</DD>
</DL>
<HR>
<A NAME="setConfiguration(org.apache.velocity.runtime.configuration.Configuration)"><!-- --></A><H3>
setConfiguration</H3>
<PRE>
public void <B>setConfiguration</B>(<A HREF="../../../../org/apache/velocity/runtime/configuration/Configuration.html">Configuration</A>&nbsp;configuration)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#setExtendedProperties(org.apache.commons.collections.ExtendedProperties)"><CODE>setExtendedProperties( ExtendedProperties )</CODE></A></I>
<P>
<DD>Set an entire configuration at once. This is
useful in cases where the parent application uses
the Configuration class and the velocity configuration
is a subset of the parent application's configuration.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>Configuration</CODE> - configuration</DL>
</DD>
</DL>
<HR>
<A NAME="setExtendedProperties(org.apache.commons.collections.ExtendedProperties)"><!-- --></A><H3>
setExtendedProperties</H3>
<PRE>
public void <B>setExtendedProperties</B>(org.apache.commons.collections.ExtendedProperties&nbsp;configuration)</PRE>
<DL>
<DD>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.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ExtendedProperties</CODE> - configuration</DL>
</DD>
</DL>
<HR>
<A NAME="getProperty(java.lang.String)"><!-- --></A><H3>
getProperty</H3>
<PRE>
public java.lang.Object <B>getProperty</B>(java.lang.String&nbsp;key)</PRE>
<DL>
<DD>Get a Velocity Runtime property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - property to retrieve<DT><B>Returns:</B><DD>property value or null if the property
not currently set</DL>
</DD>
</DL>
<HR>
<A NAME="evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.lang.String)"><!-- --></A><H3>
evaluate</H3>
<PRE>
public boolean <B>evaluate</B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;out,
java.lang.String&nbsp;logTag,
java.lang.String&nbsp;instring)
throws <A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A>,
<A HREF="../../../../org/apache/velocity/exception/MethodInvocationException.html">MethodInvocationException</A>,
<A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A>,
java.io.IOException</PRE>
<DL>
<DD>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.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - context to use in rendering input string<DD><CODE>out</CODE> - Writer in which to render the output<DD><CODE>logTag</CODE> - string to be used as the template name for log
messages in case of error<DD><CODE>instring</CODE> - input string containing the VTL to be rendered<DT><B>Returns:</B><DD>true if successful, false otherwise. If false, see
Velocity runtime log</DL>
</DD>
</DL>
<HR>
<A NAME="evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.InputStream)"><!-- --></A><H3>
evaluate</H3>
<PRE>
public boolean <B>evaluate</B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer,
java.lang.String&nbsp;logTag,
java.io.InputStream&nbsp;instream)
throws <A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A>,
<A HREF="../../../../org/apache/velocity/exception/MethodInvocationException.html">MethodInvocationException</A>,
<A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A>,
java.io.IOException</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.Reader)"><CODE>evaluate( Context context, Writer writer,
String logTag, Reader reader )</CODE></A></I>
<P>
<DD>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.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - context to use in rendering input string<DD><CODE>out</CODE> - Writer in which to render the output<DD><CODE>logTag</CODE> - string to be used as the template name for log messages
in case of error<DD><CODE>instream</CODE> - input stream containing the VTL to be rendered<DT><B>Returns:</B><DD>true if successful, false otherwise. If false, see
Velocity runtime log</DL>
</DD>
</DL>
<HR>
<A NAME="evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.Reader)"><!-- --></A><H3>
evaluate</H3>
<PRE>
public boolean <B>evaluate</B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer,
java.lang.String&nbsp;logTag,
java.io.Reader&nbsp;reader)
throws <A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A>,
<A HREF="../../../../org/apache/velocity/exception/MethodInvocationException.html">MethodInvocationException</A>,
<A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A>,
java.io.IOException</PRE>
<DL>
<DD>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.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - context to use in rendering input string<DD><CODE>out</CODE> - Writer in which to render the output<DD><CODE>logTag</CODE> - string to be used as the template name for log messages
in case of error<DD><CODE>reader</CODE> - Reader containing the VTL to be rendered<DT><B>Returns:</B><DD>true if successful, false otherwise. If false, see
Velocity runtime log<DT><B>Since: </B><DD>Velocity v1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="invokeVelocimacro(java.lang.String, java.lang.String, java.lang.String[], org.apache.velocity.context.Context, java.io.Writer)"><!-- --></A><H3>
invokeVelocimacro</H3>
<PRE>
public boolean <B>invokeVelocimacro</B>(java.lang.String&nbsp;vmName,
java.lang.String&nbsp;logTag,
java.lang.String[]&nbsp;params,
<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer)
throws java.lang.Exception</PRE>
<DL>
<DD>Invokes a currently registered Velocimacro with the parms provided
and places the rendered stream into the writer.
Note : currently only accepts args to the VM if they are in the context.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>vmName</CODE> - name of Velocimacro to call<DD><CODE>logTag</CODE> - string to be used for template name in case of error<DD><CODE>params[]</CODE> - args used to invoke Velocimacro. In context key format :
eg "foo","bar" (rather than "$foo","$bar")<DD><CODE>context</CODE> - Context object containing data/objects used for rendering.<DD><CODE>writer</CODE> - Writer for output stream<DT><B>Returns:</B><DD>true if Velocimacro exists and successfully invoked, false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="mergeTemplate(java.lang.String, org.apache.velocity.context.Context, java.io.Writer)"><!-- --></A><H3>
mergeTemplate</H3>
<PRE>
public boolean <B>mergeTemplate</B>(java.lang.String&nbsp;templateName,
<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer)
throws <A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A>,
<A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A>,
<A HREF="../../../../org/apache/velocity/exception/MethodInvocationException.html">MethodInvocationException</A>,
java.lang.Exception</PRE>
<DL>
<DD>merges a template and puts the rendered stream into the writer<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>templateName</CODE> - name of template to be used in merge<DD><CODE>context</CODE> - filled context to be used in merge<DD><CODE>writer</CODE> - writer to write template into<DT><B>Returns:</B><DD>true if successful, false otherwise. Errors
logged to velocity log.
* @deprecated Use
<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html#mergeTemplate(java.lang.String, java.lang.String, org.apache.velocity.context.Context, java.io.Writer)"><CODE>mergeTemplate( String templateName, String encoding,
Context context, Writer writer )</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="mergeTemplate(java.lang.String, java.lang.String, org.apache.velocity.context.Context, java.io.Writer)"><!-- --></A><H3>
mergeTemplate</H3>
<PRE>
public boolean <B>mergeTemplate</B>(java.lang.String&nbsp;templateName,
java.lang.String&nbsp;encoding,
<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A>&nbsp;context,
java.io.Writer&nbsp;writer)
throws <A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A>,
<A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A>,
<A HREF="../../../../org/apache/velocity/exception/MethodInvocationException.html">MethodInvocationException</A>,
java.lang.Exception</PRE>
<DL>
<DD>merges a template and puts the rendered stream into the writer<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>templateName</CODE> - name of template to be used in merge<DD><CODE>encoding</CODE> - encoding used in template<DD><CODE>context</CODE> - filled context to be used in merge<DD><CODE>writer</CODE> - writer to write template into<DT><B>Returns:</B><DD>true if successful, false otherwise. Errors
logged to velocity log<DT><B>Since: </B><DD>Velocity v1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTemplate(java.lang.String)"><!-- --></A><H3>
getTemplate</H3>
<PRE>
public <A HREF="../../../../org/apache/velocity/Template.html">Template</A> <B>getTemplate</B>(java.lang.String&nbsp;name)
throws <A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A>,
<A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A>,
java.lang.Exception</PRE>
<DL>
<DD>Returns a <code>Template</code> from the Velocity
resource management system.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The file name of the desired template.<DT><B>Returns:</B><DD>The template.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A></CODE> - if template not found
from any available source.<DD><CODE><A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A></CODE> - if template cannot be parsed due
to syntax (or other) error.<DD><CODE>java.lang.Exception</CODE> - if an error occurs in template initialization</DL>
</DD>
</DL>
<HR>
<A NAME="getTemplate(java.lang.String, java.lang.String)"><!-- --></A><H3>
getTemplate</H3>
<PRE>
public <A HREF="../../../../org/apache/velocity/Template.html">Template</A> <B>getTemplate</B>(java.lang.String&nbsp;name,
java.lang.String&nbsp;encoding)
throws <A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A>,
<A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A>,
java.lang.Exception</PRE>
<DL>
<DD>Returns a <code>Template</code> from the Velocity
resource management system.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The file name of the desired template.<DD><CODE>encoding</CODE> - The character encoding to use for the template.<DT><B>Returns:</B><DD>The template.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A></CODE> - if template not found
from any available source.<DD><CODE><A HREF="../../../../org/apache/velocity/exception/ParseErrorException.html">ParseErrorException</A></CODE> - if template cannot be parsed due
to syntax (or other) error.<DD><CODE>java.lang.Exception</CODE> - if an error occurs in template initialization<DT><B>Since: </B><DD>Velocity v1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="templateExists(java.lang.String)"><!-- --></A><H3>
templateExists</H3>
<PRE>
public boolean <B>templateExists</B>(java.lang.String&nbsp;templateName)</PRE>
<DL>
<DD>Determines if a template is accessable via the currently
configured resource loaders.
<br><br>
Note that the current implementation will <b>not</b>
change the state of the system in any real way - so this
cannot be used to pre-load the resource cache, as the
previous implementation did as a side-effect.
<br><br>
The previous implementation exhibited extreme lazyness and
sloth, and the author has been flogged.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>templateName</CODE> - name of the temlpate to search for<DT><B>Returns:</B><DD>true if found, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="warn(java.lang.Object)"><!-- --></A><H3>
warn</H3>
<PRE>
public void <B>warn</B>(java.lang.Object&nbsp;message)</PRE>
<DL>
<DD>Log a warning message.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>Object</CODE> - message to log</DL>
</DD>
</DL>
<HR>
<A NAME="info(java.lang.Object)"><!-- --></A><H3>
info</H3>
<PRE>
public void <B>info</B>(java.lang.Object&nbsp;message)</PRE>
<DL>
<DD>Log an info message.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>Object</CODE> - message to log</DL>
</DD>
</DL>
<HR>
<A NAME="error(java.lang.Object)"><!-- --></A><H3>
error</H3>
<PRE>
public void <B>error</B>(java.lang.Object&nbsp;message)</PRE>
<DL>
<DD>Log an error message.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>Object</CODE> - message to log</DL>
</DD>
</DL>
<HR>
<A NAME="debug(java.lang.Object)"><!-- --></A><H3>
debug</H3>
<PRE>
public void <B>debug</B>(java.lang.Object&nbsp;message)</PRE>
<DL>
<DD>Log a debug message.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>Object</CODE> - message to log</DL>
</DD>
</DL>
<HR>
<A NAME="setApplicationAttribute(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
setApplicationAttribute</H3>
<PRE>
public void <B>setApplicationAttribute</B>(java.lang.Object&nbsp;key,
java.lang.Object&nbsp;value)</PRE>
<DL>
<DD><p>
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.
</p>
<p>
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.
</p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - object 'name' under which the object is stored<DD><CODE>value</CODE> - object to store under this key</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/VelocityEngine.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/velocity/app/Velocity.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VelocityEngine.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2002 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>