| <!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: Interface RuntimeServices |
| </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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/RuntimeServices.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html"><B>PREV CLASS</B></A> |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="RuntimeServices.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <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.runtime</FONT> |
| <BR> |
| Interface RuntimeServices</H2> |
| <DL> |
| <DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html">RuntimeLogger</A></DD> |
| </DL> |
| <DL> |
| <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/velocity/runtime/RuntimeInstance.html">RuntimeInstance</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT>public interface <B>RuntimeServices</B><DT>extends <A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html">RuntimeLogger</A></DL> |
| |
| <P> |
| Interface for internal runtime services that are needed by the |
| various components w/in Velocity. This was taken from the old |
| Runtime singleton, and anything not necessary was removed. |
| |
| Currently implemented by RuntimeInstance. |
| <P> |
| <DL> |
| <DT><B>Version: </B><DD>$Id: RuntimeServices.java,v 1.7.4.1 2004/03/03 23:22:55 geirm Exp $</DD> |
| <DT><B>Author: </B><DD><a href="mailto:geirm@optonline.net">Geir Magusson Jr.</a></DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- ======== INNER CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| |
| <!-- ========== 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#addProperty(java.lang.String, java.lang.Object)">addProperty</A></B>(java.lang.String key, |
| java.lang.Object value)</CODE> |
| |
| <BR> |
| Add a property to the configuration.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#addVelocimacro(java.lang.String, java.lang.String, java.lang.String[], java.lang.String)">addVelocimacro</A></B>(java.lang.String name, |
| java.lang.String macro, |
| java.lang.String[] argArray, |
| java.lang.String sourceTemplate)</CODE> |
| |
| <BR> |
| Adds a new Velocimacro.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#clearProperty(java.lang.String)">clearProperty</A></B>(java.lang.String key)</CODE> |
| |
| <BR> |
| Clear the values pertaining to a particular |
| property.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#dumpVMNamespace(java.lang.String)">dumpVMNamespace</A></B>(java.lang.String namespace)</CODE> |
| |
| <BR> |
| tells the vmFactory to dump the specified namespace.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getApplicationAttribute(java.lang.Object)">getApplicationAttribute</A></B>(java.lang.Object key)</CODE> |
| |
| <BR> |
| Return the specified applcation attribute.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getBoolean(java.lang.String, boolean)">getBoolean</A></B>(java.lang.String key, |
| boolean def)</CODE> |
| |
| <BR> |
| Boolean property accessor method to hide the configuration implementation.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> org.apache.commons.collections.ExtendedProperties</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getConfiguration()">getConfiguration</A></B>()</CODE> |
| |
| <BR> |
| Return the velocity runtime configuration object.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/runtime/resource/ContentResource.html">ContentResource</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getContent(java.lang.String)">getContent</A></B>(java.lang.String name)</CODE> |
| |
| <BR> |
| Returns a static content resource from the |
| resource manager.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/runtime/resource/ContentResource.html">ContentResource</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getContent(java.lang.String, java.lang.String)">getContent</A></B>(java.lang.String name, |
| java.lang.String encoding)</CODE> |
| |
| <BR> |
| Returns a static content resource from the |
| resource manager.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getInt(java.lang.String)">getInt</A></B>(java.lang.String key)</CODE> |
| |
| <BR> |
| Int property accessor method to hide the configuration implementation.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getInt(java.lang.String, int)">getInt</A></B>(java.lang.String key, |
| int defaultValue)</CODE> |
| |
| <BR> |
| Int property accessor method to hide the configuration implementation.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/util/introspection/Introspector.html">Introspector</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getIntrospector()">getIntrospector</A></B>()</CODE> |
| |
| <BR> |
| Returns the configured method introspection/reflection |
| implemenation.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getLoaderNameForResource(java.lang.String)">getLoaderNameForResource</A></B>(java.lang.String resourceName)</CODE> |
| |
| <BR> |
| Determines is a template exists, and returns name of the loader that |
| provides it.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String key)</CODE> |
| |
| <BR> |
| Allows an external caller to get a property.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getString(java.lang.String)">getString</A></B>(java.lang.String key)</CODE> |
| |
| <BR> |
| String property accessor method to hide the configuration implementation</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getString(java.lang.String, java.lang.String)">getString</A></B>(java.lang.String key, |
| java.lang.String defaultValue)</CODE> |
| |
| <BR> |
| String property accessor method with default to hide the |
| configuration implementation.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/Template.html">Template</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getTemplate(java.lang.String)">getTemplate</A></B>(java.lang.String name)</CODE> |
| |
| <BR> |
| Returns a <code>Template</code> from the resource manager.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/Template.html">Template</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getTemplate(java.lang.String, java.lang.String)">getTemplate</A></B>(java.lang.String name, |
| java.lang.String encoding)</CODE> |
| |
| <BR> |
| Returns a <code>Template</code> from the resource manager</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/util/introspection/Uberspect.html">Uberspect</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getUberspect()">getUberspect</A></B>()</CODE> |
| |
| <BR> |
| Returns the configured class introspection/reflection |
| implemenation.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/runtime/directive/Directive.html">Directive</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#getVelocimacro(java.lang.String, java.lang.String)">getVelocimacro</A></B>(java.lang.String vmName, |
| java.lang.String templateName)</CODE> |
| |
| <BR> |
| Returns the appropriate VelocimacroProxy object if strVMname |
| is a valid current Velocimacro.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#init()">init</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#init(java.util.Properties)">init</A></B>(java.util.Properties p)</CODE> |
| |
| <BR> |
| Initialize the Velocity Runtime with a Properties |
| object.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#init(java.lang.String)">init</A></B>(java.lang.String configurationFile)</CODE> |
| |
| <BR> |
| Initialize the Velocity Runtime with the name of |
| ExtendedProperties object.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#isVelocimacro(java.lang.String, java.lang.String)">isVelocimacro</A></B>(java.lang.String vmName, |
| java.lang.String templateName)</CODE> |
| |
| <BR> |
| Checks to see if a VM exists</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/runtime/parser/node/SimpleNode.html">SimpleNode</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#parse(java.io.Reader, java.lang.String)">parse</A></B>(java.io.Reader reader, |
| java.lang.String templateName)</CODE> |
| |
| <BR> |
| Parse the input and return the root of |
| AST node structure.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/runtime/parser/node/SimpleNode.html">SimpleNode</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#parse(java.io.Reader, java.lang.String, boolean)">parse</A></B>(java.io.Reader reader, |
| java.lang.String templateName, |
| boolean dumpNamespace)</CODE> |
| |
| <BR> |
| Parse the input and return the root of the AST node structure.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#setConfiguration(org.apache.commons.collections.ExtendedProperties)">setConfiguration</A></B>(org.apache.commons.collections.ExtendedProperties configuration)</CODE> |
| |
| <BR> |
| Allow an external system to set an ExtendedProperties |
| object to use.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/runtime/RuntimeServices.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String key, |
| java.lang.Object value)</CODE> |
| |
| <BR> |
| Allows an external system to set a property in |
| the Velocity Runtime.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_org.apache.velocity.runtime.RuntimeLogger"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from interface org.apache.velocity.runtime.<A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html">RuntimeLogger</A></B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html#debug(java.lang.Object)">debug</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html#error(java.lang.Object)">error</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html#info(java.lang.Object)">info</A>, <A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html#warn(java.lang.Object)">warn</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| |
| <!-- ============ 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><DL> |
| </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 key, |
| java.lang.Object value)</PRE> |
| <DL> |
| <DD>Allows an external system to set a property in |
| the Velocity Runtime.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - property key<DD><CODE>String</CODE> - property value</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setConfiguration(org.apache.commons.collections.ExtendedProperties)"><!-- --></A><H3> |
| setConfiguration</H3> |
| <PRE> |
| public void <B>setConfiguration</B>(org.apache.commons.collections.ExtendedProperties configuration)</PRE> |
| <DL> |
| <DD>Allow an external system to set an ExtendedProperties |
| object to use. This is useful where the external |
| system also uses the ExtendedProperties class and |
| the velocity configuration is a subset of |
| parent application's configuration. This is |
| the case with Turbine.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>ExtendedProperties</CODE> - configuration</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 key, |
| java.lang.Object value)</PRE> |
| <DL> |
| <DD>Add a property to the configuration. If it already |
| exists then the value stated here will be added |
| to the configuration entry. For example, if |
| |
| resource.loader = file |
| |
| is already present in the configuration and you |
| |
| addProperty("resource.loader", "classpath") |
| |
| Then you will end up with a Vector like the |
| following: |
| |
| ["file", "classpath"]<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - key<DD><CODE>String</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 key)</PRE> |
| <DL> |
| <DD>Clear the values pertaining to a particular |
| property.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - key of property to clear</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 key)</PRE> |
| <DL> |
| <DD>Allows an external caller to get a property. The calling |
| routine is required to know the type, as this routine |
| will return an Object, as that is what properties can be.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>key</CODE> - property to return</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="init(java.util.Properties)"><!-- --></A><H3> |
| init</H3> |
| <PRE> |
| public void <B>init</B>(java.util.Properties p) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Initialize the Velocity Runtime with a Properties |
| object.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>Properties</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="init(java.lang.String)"><!-- --></A><H3> |
| init</H3> |
| <PRE> |
| public void <B>init</B>(java.lang.String configurationFile) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Initialize the Velocity Runtime with the name of |
| ExtendedProperties object.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>Properties</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parse(java.io.Reader, java.lang.String)"><!-- --></A><H3> |
| parse</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/runtime/parser/node/SimpleNode.html">SimpleNode</A> <B>parse</B>(java.io.Reader reader, |
| java.lang.String templateName) |
| throws <A HREF="../../../../org/apache/velocity/runtime/parser/ParseException.html">ParseException</A></PRE> |
| <DL> |
| <DD>Parse the input and return the root of |
| AST node structure. |
| <br><br> |
| In the event that it runs out of parsers in the |
| pool, it will create and let them be GC'd |
| dynamically, logging that it has to do that. This |
| is considered an exceptional condition. It is |
| expected that the user will set the |
| PARSER_POOL_SIZE property appropriately for their |
| application. We will revisit this.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>InputStream</CODE> - inputstream retrieved by a resource loader<DD><CODE>String</CODE> - name of the template being parsed</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parse(java.io.Reader, java.lang.String, boolean)"><!-- --></A><H3> |
| parse</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/runtime/parser/node/SimpleNode.html">SimpleNode</A> <B>parse</B>(java.io.Reader reader, |
| java.lang.String templateName, |
| boolean dumpNamespace) |
| throws <A HREF="../../../../org/apache/velocity/runtime/parser/ParseException.html">ParseException</A></PRE> |
| <DL> |
| <DD>Parse the input and return the root of the AST node structure.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>InputStream</CODE> - inputstream retrieved by a resource loader<DD><CODE>String</CODE> - name of the template being parsed<DD><CODE>dumpNamespace</CODE> - flag to dump the Velocimacro namespace for this template</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 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 resource manager. |
| This method assumes that the character encoding of the |
| template is set by the <code>input.encoding</code> |
| property. The default is "ISO-8859-1"<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 name, |
| java.lang.String 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 resource manager<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the desired template.<DD><CODE>encoding</CODE> - Character encoding of 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</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getContent(java.lang.String)"><!-- --></A><H3> |
| getContent</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/runtime/resource/ContentResource.html">ContentResource</A> <B>getContent</B>(java.lang.String 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 static content resource from the |
| resource manager. Uses the current value |
| if INPUT_ENCODING as the character encoding.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of content resource to get<DT><B>Returns:</B><DD>parsed ContentResource object ready for use<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.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getContent(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| getContent</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/runtime/resource/ContentResource.html">ContentResource</A> <B>getContent</B>(java.lang.String name, |
| java.lang.String 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 static content resource from the |
| resource manager.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of content resource to get<DD><CODE>encoding</CODE> - Character encoding to use<DT><B>Returns:</B><DD>parsed ContentResource object ready for use<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.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLoaderNameForResource(java.lang.String)"><!-- --></A><H3> |
| getLoaderNameForResource</H3> |
| <PRE> |
| public java.lang.String <B>getLoaderNameForResource</B>(java.lang.String resourceName)</PRE> |
| <DL> |
| <DD>Determines is a template exists, and returns name of the loader that |
| provides it. This is a slightly less hokey way to support |
| the Velocity.templateExists() utility method, which was broken |
| when per-template encoding was introduced. We can revisit this.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>resourceName</CODE> - Name of template or content resource<DT><B>Returns:</B><DD>class name of loader than can provide it</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getString(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| getString</H3> |
| <PRE> |
| public java.lang.String <B>getString</B>(java.lang.String key, |
| java.lang.String defaultValue)</PRE> |
| <DL> |
| <DD>String property accessor method with default to hide the |
| configuration implementation.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - key property key<DD><CODE>String</CODE> - defaultValue default value to return if key not |
| found in resource manager.<DT><B>Returns:</B><DD>String value of key or default</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getVelocimacro(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| getVelocimacro</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/runtime/directive/Directive.html">Directive</A> <B>getVelocimacro</B>(java.lang.String vmName, |
| java.lang.String templateName)</PRE> |
| <DL> |
| <DD>Returns the appropriate VelocimacroProxy object if strVMname |
| is a valid current Velocimacro.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - vmName Name of velocimacro requested<DT><B>Returns:</B><DD>String VelocimacroProxy</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="addVelocimacro(java.lang.String, java.lang.String, java.lang.String[], java.lang.String)"><!-- --></A><H3> |
| addVelocimacro</H3> |
| <PRE> |
| public boolean <B>addVelocimacro</B>(java.lang.String name, |
| java.lang.String macro, |
| java.lang.String[] argArray, |
| java.lang.String sourceTemplate)</PRE> |
| <DL> |
| <DD>Adds a new Velocimacro. Usually called by Macro only while parsing.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - name Name of velocimacro<DD><CODE>String</CODE> - macro String form of macro body<DD><CODE>String</CODE> - argArray Array of strings, containing the |
| #macro() arguments. the 0th is the name.<DT><B>Returns:</B><DD>boolean True if added, false if rejected for some |
| reason (either parameters or permission settings)</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isVelocimacro(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| isVelocimacro</H3> |
| <PRE> |
| public boolean <B>isVelocimacro</B>(java.lang.String vmName, |
| java.lang.String templateName)</PRE> |
| <DL> |
| <DD>Checks to see if a VM exists<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of velocimacro<DT><B>Returns:</B><DD>boolean True if VM by that name exists, false if not</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="dumpVMNamespace(java.lang.String)"><!-- --></A><H3> |
| dumpVMNamespace</H3> |
| <PRE> |
| public boolean <B>dumpVMNamespace</B>(java.lang.String namespace)</PRE> |
| <DL> |
| <DD>tells the vmFactory to dump the specified namespace. This is to support |
| clearing the VM list when in inline-VM-local-scope mode<DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getString(java.lang.String)"><!-- --></A><H3> |
| getString</H3> |
| <PRE> |
| public java.lang.String <B>getString</B>(java.lang.String key)</PRE> |
| <DL> |
| <DD>String property accessor method to hide the configuration implementation<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>key</CODE> - property key<DT><B>Returns:</B><DD>value of key or null</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getInt(java.lang.String)"><!-- --></A><H3> |
| getInt</H3> |
| <PRE> |
| public int <B>getInt</B>(java.lang.String key)</PRE> |
| <DL> |
| <DD>Int property accessor method to hide the configuration implementation.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - key property key<DT><B>Returns:</B><DD>int value</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getInt(java.lang.String, int)"><!-- --></A><H3> |
| getInt</H3> |
| <PRE> |
| public int <B>getInt</B>(java.lang.String key, |
| int defaultValue)</PRE> |
| <DL> |
| <DD>Int property accessor method to hide the configuration implementation.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>key</CODE> - property key<DD><CODE>int</CODE> - default value<DT><B>Returns:</B><DD>int value</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getBoolean(java.lang.String, boolean)"><!-- --></A><H3> |
| getBoolean</H3> |
| <PRE> |
| public boolean <B>getBoolean</B>(java.lang.String key, |
| boolean def)</PRE> |
| <DL> |
| <DD>Boolean property accessor method to hide the configuration implementation.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - key property key<DD><CODE>boolean</CODE> - default default value if property not found<DT><B>Returns:</B><DD>boolean value of key or default value</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getConfiguration()"><!-- --></A><H3> |
| getConfiguration</H3> |
| <PRE> |
| public org.apache.commons.collections.ExtendedProperties <B>getConfiguration</B>()</PRE> |
| <DL> |
| <DD>Return the velocity runtime configuration object.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Returns:</B><DD>ExtendedProperties configuration object which houses |
| the velocity runtime properties.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getApplicationAttribute(java.lang.Object)"><!-- --></A><H3> |
| getApplicationAttribute</H3> |
| <PRE> |
| public java.lang.Object <B>getApplicationAttribute</B>(java.lang.Object key)</PRE> |
| <DL> |
| <DD>Return the specified applcation attribute.<DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>key</CODE> - The name of the attribute to retrieve.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getUberspect()"><!-- --></A><H3> |
| getUberspect</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/util/introspection/Uberspect.html">Uberspect</A> <B>getUberspect</B>()</PRE> |
| <DL> |
| <DD>Returns the configured class introspection/reflection |
| implemenation.<DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getIntrospector()"><!-- --></A><H3> |
| getIntrospector</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/util/introspection/Introspector.html">Introspector</A> <B>getIntrospector</B>()</PRE> |
| <DL> |
| <DD>Returns the configured method introspection/reflection |
| implemenation.<DD><DL> |
| </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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/RuntimeServices.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/velocity/runtime/RuntimeLogger.html"><B>PREV CLASS</B></A> |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="RuntimeServices.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2002 Apache Software Foundation. All Rights Reserved. |
| </BODY> |
| </HTML> |