blob: 6cb430593ec8e751732e92a91be9336d3e6770b9 [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:34 EDT 2004 -->
<TITLE>
Velocity 1.4 API: Class ResourceManagerImpl
</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/ResourceManagerImpl.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/runtime/resource/ResourceFactory.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="ResourceManagerImpl.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.runtime.resource</FONT>
<BR>
Class ResourceManagerImpl</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.velocity.runtime.resource.ResourceManagerImpl</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html">ResourceManager</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>ResourceManagerImpl</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html">ResourceManager</A></DL>
<P>
Class to manage the text resource for the Velocity
Runtime.
<P>
<DL>
<DT><B>Version: </B><DD>$Id: ResourceManagerImpl.java,v 1.7.4.1 2004/03/03 23:23:01 geirm Exp $</DD>
<DT><B>Author: </B><DD><a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>, <a href="mailto:paulo.gaspar@krankikom.de">Paulo Gaspar</a>, <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>protected &nbsp;<A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html">ResourceCache</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#globalCache">globalCache</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object implementing ResourceCache to
be our resource manager's Resource cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#logWhenFound">logWhenFound</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;switch to turn off log notice when a resource is found for
the first time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#RESOURCE_CONTENT">RESOURCE_CONTENT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A static content resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#RESOURCE_LOADER_IDENTIFIER">RESOURCE_LOADER_IDENTIFIER</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;token used to identify the loader internally</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#RESOURCE_TEMPLATE">RESOURCE_TEMPLATE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A template resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#resourceLoaderInitializersActive">resourceLoaderInitializersActive</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Each loader needs a configuration object for
its initialization, this flags keeps track of whether
or not the configuration objects have been created
for the resource loaders.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.ArrayList</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#resourceLoaders">resourceLoaders</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The List of templateLoaders that the Runtime will
use to locate the InputStream source of a template.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html">RuntimeServices</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#rsvc">rsvc</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.util.ArrayList</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#sourceInitializerList">sourceInitializerList</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is a list of the template input stream source
initializers, basically properties for a particular
template stream source.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#sourceInitializerMap">sourceInitializerMap</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is a map of public name of the template
stream source to it's initializer.</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/runtime/resource/ResourceManagerImpl.html#ResourceManagerImpl()">ResourceManagerImpl</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>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#assembleResourceLoaderInitializers()">assembleResourceLoaderInitializers</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This will produce a List of Hashtables, each
hashtable contains the intialization info for
a particular resource loader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#getLoaderNameForResource(java.lang.String)">getLoaderNameForResource</A></B>(java.lang.String&nbsp;resourceName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#getResource(java.lang.String, int)">getResource</A></B>(java.lang.String&nbsp;resourceName,
int&nbsp;resourceType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#getResource(java.lang.String, int, java.lang.String)"><CODE>getResource(String resourceName, int resourceType,
String encoding )</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#getResource(java.lang.String, int, java.lang.String)">getResource</A></B>(java.lang.String&nbsp;resourceName,
int&nbsp;resourceType,
java.lang.String&nbsp;encoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the named resource.</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/runtime/resource/ResourceManagerImpl.html#initialize(org.apache.velocity.runtime.RuntimeServices)">initialize</A></B>(<A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html">RuntimeServices</A>&nbsp;rs)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the ResourceManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#loadResource(java.lang.String, int, java.lang.String)">loadResource</A></B>(java.lang.String&nbsp;resourceName,
int&nbsp;resourceType,
java.lang.String&nbsp;encoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a resource from the current set of resource loaders</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#refreshResource(org.apache.velocity.runtime.resource.Resource, java.lang.String)">refreshResource</A></B>(<A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A>&nbsp;resource,
java.lang.String&nbsp;encoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Takes an existing resource, and 'refreshes' it.</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="RESOURCE_TEMPLATE"><!-- --></A><H3>
RESOURCE_TEMPLATE</H3>
<PRE>
public static final int <B>RESOURCE_TEMPLATE</B></PRE>
<DL>
<DD>A template resources.</DL>
<HR>
<A NAME="RESOURCE_CONTENT"><!-- --></A><H3>
RESOURCE_CONTENT</H3>
<PRE>
public static final int <B>RESOURCE_CONTENT</B></PRE>
<DL>
<DD>A static content resource.</DL>
<HR>
<A NAME="RESOURCE_LOADER_IDENTIFIER"><!-- --></A><H3>
RESOURCE_LOADER_IDENTIFIER</H3>
<PRE>
private static final java.lang.String <B>RESOURCE_LOADER_IDENTIFIER</B></PRE>
<DL>
<DD>token used to identify the loader internally</DL>
<HR>
<A NAME="globalCache"><!-- --></A><H3>
globalCache</H3>
<PRE>
protected <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html">ResourceCache</A> <B>globalCache</B></PRE>
<DL>
<DD>Object implementing ResourceCache to
be our resource manager's Resource cache.</DL>
<HR>
<A NAME="resourceLoaders"><!-- --></A><H3>
resourceLoaders</H3>
<PRE>
protected java.util.ArrayList <B>resourceLoaders</B></PRE>
<DL>
<DD>The List of templateLoaders that the Runtime will
use to locate the InputStream source of a template.</DL>
<HR>
<A NAME="sourceInitializerList"><!-- --></A><H3>
sourceInitializerList</H3>
<PRE>
private java.util.ArrayList <B>sourceInitializerList</B></PRE>
<DL>
<DD>This is a list of the template input stream source
initializers, basically properties for a particular
template stream source. The order in this list
reflects numbering of the properties i.e.
<loader-id>.resource.loader.<property> = <value></DL>
<HR>
<A NAME="sourceInitializerMap"><!-- --></A><H3>
sourceInitializerMap</H3>
<PRE>
private java.util.Hashtable <B>sourceInitializerMap</B></PRE>
<DL>
<DD>This is a map of public name of the template
stream source to it's initializer. This is so
that clients of velocity can set properties of
a template source stream with its public name.
So for example, a client could set the
File.resource.path property and this would
change the resource.path property for the
file template stream source.</DL>
<HR>
<A NAME="resourceLoaderInitializersActive"><!-- --></A><H3>
resourceLoaderInitializersActive</H3>
<PRE>
private boolean <B>resourceLoaderInitializersActive</B></PRE>
<DL>
<DD>Each loader needs a configuration object for
its initialization, this flags keeps track of whether
or not the configuration objects have been created
for the resource loaders.</DL>
<HR>
<A NAME="logWhenFound"><!-- --></A><H3>
logWhenFound</H3>
<PRE>
private boolean <B>logWhenFound</B></PRE>
<DL>
<DD>switch to turn off log notice when a resource is found for
the first time.</DL>
<HR>
<A NAME="rsvc"><!-- --></A><H3>
rsvc</H3>
<PRE>
protected <A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html">RuntimeServices</A> <B>rsvc</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="ResourceManagerImpl()"><!-- --></A><H3>
ResourceManagerImpl</H3>
<PRE>
public <B>ResourceManagerImpl</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="initialize(org.apache.velocity.runtime.RuntimeServices)"><!-- --></A><H3>
initialize</H3>
<PRE>
public void <B>initialize</B>(<A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html">RuntimeServices</A>&nbsp;rs)
throws java.lang.Exception</PRE>
<DL>
<DD>Initialize the ResourceManager.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html#initialize(org.apache.velocity.runtime.RuntimeServices)">initialize</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html">ResourceManager</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="assembleResourceLoaderInitializers()"><!-- --></A><H3>
assembleResourceLoaderInitializers</H3>
<PRE>
private void <B>assembleResourceLoaderInitializers</B>()</PRE>
<DL>
<DD>This will produce a List of Hashtables, each
hashtable contains the intialization info for
a particular resource loader. This Hastable
will be passed in when initializing the
the template loader.<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getResource(java.lang.String, int, java.lang.String)"><!-- --></A><H3>
getResource</H3>
<PRE>
public <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A> <B>getResource</B>(java.lang.String&nbsp;resourceName,
int&nbsp;resourceType,
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>Gets the named resource. Returned class type corresponds to specified type
(i.e. <code>Template</code> to <code>RESOURCE_TEMPLATE</code>).<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html#getResource(java.lang.String, int, java.lang.String)">getResource</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html">ResourceManager</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resourceName</CODE> - The name of the resource to retrieve.<DD><CODE>resourceType</CODE> - The type of resource (<code>RESOURCE_TEMPLATE</code>,
<code>RESOURCE_CONTENT</code>, etc.).<DD><CODE>encoding</CODE> - The character encoding to use.<DT><B>Returns:</B><DD>Resource with the template parsed and ready.<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 a problem in parse</DL>
</DD>
</DL>
<HR>
<A NAME="loadResource(java.lang.String, int, java.lang.String)"><!-- --></A><H3>
loadResource</H3>
<PRE>
protected <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A> <B>loadResource</B>(java.lang.String&nbsp;resourceName,
int&nbsp;resourceType,
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>Loads a resource from the current set of resource loaders<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resourceName</CODE> - The name of the resource to retrieve.<DD><CODE>resourceType</CODE> - The type of resource (<code>RESOURCE_TEMPLATE</code>,
<code>RESOURCE_CONTENT</code>, etc.).<DD><CODE>encoding</CODE> - The character encoding to use.<DT><B>Returns:</B><DD>Resource with the template parsed and ready.<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 a problem in parse</DL>
</DD>
</DL>
<HR>
<A NAME="refreshResource(org.apache.velocity.runtime.resource.Resource, java.lang.String)"><!-- --></A><H3>
refreshResource</H3>
<PRE>
protected void <B>refreshResource</B>(<A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A>&nbsp;resource,
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>Takes an existing resource, and 'refreshes' it. This
generally means that the source of the resource is checked
for changes according to some cache/check algorithm
and if the resource changed, then the resource data is
reloaded and re-parsed.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resource</CODE> - resource to refresh<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A></CODE> - if template not found
from current source for this Resource<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 a problem in parse</DL>
</DD>
</DL>
<HR>
<A NAME="getResource(java.lang.String, int)"><!-- --></A><H3>
getResource</H3>
<PRE>
public <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html">Resource</A> <B>getResource</B>(java.lang.String&nbsp;resourceName,
int&nbsp;resourceType)
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><B>Deprecated.</B>&nbsp;<I>Use
<A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#getResource(java.lang.String, int, java.lang.String)"><CODE>getResource(String resourceName, int resourceType,
String encoding )</CODE></A></I>
<P>
<DD>Gets the named resource. Returned class type corresponds to specified type
(i.e. <code>Template</code> to <code>RESOURCE_TEMPLATE</code>).<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resourceName</CODE> - The name of the resource to retrieve.<DD><CODE>resourceType</CODE> - The type of resource (<code>RESOURCE_TEMPLATE</code>,
<code>RESOURCE_CONTENT</code>, etc.).<DT><B>Returns:</B><DD>Resource with the template parsed and ready.<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 a problem in parse</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&nbsp;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>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html#getLoaderNameForResource(java.lang.String)">getLoaderNameForResource</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html">ResourceManager</A></CODE></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>
<!-- ========= 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/ResourceManagerImpl.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/runtime/resource/ResourceFactory.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="ResourceManagerImpl.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>