blob: 5171551fab508a6219543025b961d814bea2e2b3 [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 Velocity
</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/Velocity.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/FieldMethodizer.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Velocity.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;FIELD&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;FIELD&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 Velocity</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.velocity.app.Velocity</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>Velocity</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/apache/velocity/runtime/RuntimeConstants.html">RuntimeConstants</A></DL>
<P>
This class provides services to the application
developer, such as :
<ul>
<li> Simple Velocity Runtime engine initialization methods.
<li> Functions to apply the template engine to streams and strings
to allow embedding and dynamic template generation.
<li> Methods to access Velocimacros directly.
</ul>
<br><br>
While the most common way to use Velocity is via templates, as
Velocity is a general-purpose template engine, there are other
uses that Velocity is well suited for, such as processing dynamically
created templates, or processing content streams.
<br><br>
The methods herein were developed to allow easy access to the Velocity
facilities without direct spelunking of the internals. If there is
something you feel is necessary to add here, please, send a patch.
<P>
<DL>
<DT><B>Version: </B><DD>$Id: Velocity.java,v 1.30.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>, <a href="mailto:Christoph.Reck@dlr.de">Christoph Reck</a>, <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a></DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<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/Velocity.html#Velocity()">Velocity</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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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/Velocity.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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;<A HREF="../../../../org/apache/velocity/Template.html">Template</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;<A HREF="../../../../org/apache/velocity/Template.html">Template</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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;<B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../org/apache/velocity/app/Velocity.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></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.html#resourceExists(java.lang.String)">resourceExists</A></B>(java.lang.String&nbsp;resourceName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether a resource 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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.html#templateExists(java.lang.String)">templateExists</A></B>(java.lang.String&nbsp;resourceName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use resourceExists(String) instead.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/velocity/app/Velocity.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 =========== -->
<!-- ========= 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="Velocity()"><!-- --></A><H3>
Velocity</H3>
<PRE>
public <B>Velocity</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 static 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 static 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 static 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 static 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 static 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 static 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 static 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/Velocity.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 static 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 static 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 static 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 static 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/Velocity.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 static 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 static 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)</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 static 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><B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../org/apache/velocity/app/Velocity.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></I>
<P>
<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.</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 static 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 static <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 static <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="resourceExists(java.lang.String)"><!-- --></A><H3>
resourceExists</H3>
<PRE>
public static boolean <B>resourceExists</B>(java.lang.String&nbsp;resourceName)</PRE>
<DL>
<DD><p>Determines whether a resource is accessable via the
currently configured resource loaders. <A HREF="../../../../org/apache/velocity/runtime/resource/Resource.html"><CODE>Resource</CODE></A> is the generic
description of templates, static content, etc.</p>
<p>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.</p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resourceName</CODE> - The name of the resource to search for.<DT><B>Returns:</B><DD>Whether the resource was located.</DL>
</DD>
</DL>
<HR>
<A NAME="warn(java.lang.Object)"><!-- --></A><H3>
warn</H3>
<PRE>
public static 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 static 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 static 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 static 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 static 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>
<HR>
<A NAME="templateExists(java.lang.String)"><!-- --></A><H3>
templateExists</H3>
<PRE>
public static boolean <B>templateExists</B>(java.lang.String&nbsp;resourceName)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use resourceExists(String) instead.</I>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also: </B><DD><A HREF="../../../../org/apache/velocity/app/Velocity.html#resourceExists(java.lang.String)"><CODE>resourceExists(String)</CODE></A></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/Velocity.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/FieldMethodizer.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Velocity.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;FIELD&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;FIELD&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>