<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_16) on Fri Nov 19 12:15:46 PST 2010 --> <TITLE> ResourceManagerImpl (Velocity 1.7 API) </TITLE> <META NAME="keywords" CONTENT="org.apache.velocity.runtime.resource.ResourceManagerImpl class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="ResourceManagerImpl (Velocity 1.7 API)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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/ResourceManagerImpl.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/resource/ResourceFactory.html" title="class in org.apache.velocity.runtime.resource"><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="ResourceManagerImpl.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.velocity.runtime.resource</FONT> <BR> Class ResourceManagerImpl</H2> <PRE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><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" title="interface in org.apache.velocity.runtime.resource">ResourceManager</A></DD> </DL> <HR> <DL> <DT>public class <B>ResourceManagerImpl</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManager.html" title="interface in org.apache.velocity.runtime.resource">ResourceManager</A></DL> <P> Class to manage the text resource for the Velocity Runtime. <P> <P> <DL> <DT><B>Version:</B></DT> <DD>$Id: ResourceManagerImpl.java 745757 2009-02-19 06:48:10Z nbubna $</DD> <DT><B>Author:</B></DT> <DD><a href="mailto:wglass@forio.com">Will Glass-Husain</a>, <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>, <a href="mailto:henning@apache.org">Henning P. Schmiedehausen</a></DD> </DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <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 <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html" title="interface in org.apache.velocity.runtime.resource">ResourceCache</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#globalCache">globalCache</A></B></CODE> <BR> 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>protected <A HREF="../../../../../org/apache/velocity/runtime/log/Log.html" title="class in org.apache.velocity.runtime.log">Log</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#log">log</A></B></CODE> <BR> Logging.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#RESOURCE_CONTENT">RESOURCE_CONTENT</A></B></CODE> <BR> A static content resource.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#RESOURCE_TEMPLATE">RESOURCE_TEMPLATE</A></B></CODE> <BR> A template resources.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html" title="class or interface in java.util">List</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#resourceLoaders">resourceLoaders</A></B></CODE> <BR> 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 <A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html" title="interface in org.apache.velocity.runtime">RuntimeServices</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#rsvc">rsvc</A></B></CODE> <BR> The internal RuntimeServices object.</TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <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> </TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <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>protected <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">Resource</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#createResource(java.lang.String, int)">createResource</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType)</CODE> <BR> Create a new Resource of the specified type.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceManagerImpl.html#getLoaderNameForResource(java.lang.String)">getLoaderNameForResource</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName)</CODE> <BR> Determines if 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> <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">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>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType)</CODE> <BR> <B>Deprecated.</B> <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> <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">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>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding)</CODE> <BR> Gets the named resource.</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/resource/ResourceManagerImpl.html#initialize(org.apache.velocity.runtime.RuntimeServices)">initialize</A></B>(<A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html" title="interface in org.apache.velocity.runtime">RuntimeServices</A> rsvc)</CODE> <BR> Initialize the ResourceManager.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">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>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding)</CODE> <BR> 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 <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">Resource</A></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" title="class in org.apache.velocity.runtime.resource">Resource</A> resource, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding)</CODE> <BR> Takes an existing resource, and 'refreshes' it.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <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. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.runtime.resource.ResourceManagerImpl.RESOURCE_TEMPLATE">Constant Field Values</A></DL> </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. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.runtime.resource.ResourceManagerImpl.RESOURCE_CONTENT">Constant Field Values</A></DL> </DL> <HR> <A NAME="globalCache"><!-- --></A><H3> globalCache</H3> <PRE> protected <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html" title="interface in org.apache.velocity.runtime.resource">ResourceCache</A> <B>globalCache</B></PRE> <DL> <DD>Object implementing ResourceCache to be our resource manager's Resource cache. <P> <DL> </DL> </DL> <HR> <A NAME="resourceLoaders"><!-- --></A><H3> resourceLoaders</H3> <PRE> protected final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>resourceLoaders</B></PRE> <DL> <DD>The List of templateLoaders that the Runtime will use to locate the InputStream source of a template. <P> <DL> </DL> </DL> <HR> <A NAME="rsvc"><!-- --></A><H3> rsvc</H3> <PRE> protected <A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html" title="interface in org.apache.velocity.runtime">RuntimeServices</A> <B>rsvc</B></PRE> <DL> <DD>The internal RuntimeServices object. <P> <DL> </DL> </DL> <HR> <A NAME="log"><!-- --></A><H3> log</H3> <PRE> protected <A HREF="../../../../../org/apache/velocity/runtime/log/Log.html" title="class in org.apache.velocity.runtime.log">Log</A> <B>log</B></PRE> <DL> <DD>Logging. <P> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <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" title="interface in org.apache.velocity.runtime">RuntimeServices</A> rsvc)</PRE> <DL> <DD>Initialize the ResourceManager. <P> <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" title="interface in org.apache.velocity.runtime.resource">ResourceManager</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>rsvc</CODE> - The Runtime Services object which is associated with this Resource Manager.</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" title="class in org.apache.velocity.runtime.resource">Resource</A> <B>getResource</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding) throws <A HREF="../../../../../org/apache/velocity/exception/ResourceNotFoundException.html" title="class in org.apache.velocity.exception">ResourceNotFoundException</A>, <A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></PRE> <DL> <DD>Gets the named resource. Returned class type corresponds to specified type (i.e. <code>Template</code> to <code> RESOURCE_TEMPLATE</code>). This method is now unsynchronized which requires that ResourceCache implementations be thread safe (as the default is). <P> <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" title="interface in org.apache.velocity.runtime.resource">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" title="class in org.apache.velocity.exception">ResourceNotFoundException</A></CODE> - if template not found from any available source. <DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></CODE> - if template cannot be parsed due to syntax (or other) error.</DL> </DD> </DL> <HR> <A NAME="createResource(java.lang.String, int)"><!-- --></A><H3> createResource</H3> <PRE> protected <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">Resource</A> <B>createResource</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType)</PRE> <DL> <DD>Create a new Resource of the specified type. <P> <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>new instance of appropriate resource type<DT><B>Since:</B></DT> <DD>1.6</DD> </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" title="class in org.apache.velocity.runtime.resource">Resource</A> <B>loadResource</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding) throws <A HREF="../../../../../org/apache/velocity/exception/ResourceNotFoundException.html" title="class in org.apache.velocity.exception">ResourceNotFoundException</A>, <A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></PRE> <DL> <DD>Loads a resource from the current set of resource loaders. <P> <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" title="class in org.apache.velocity.exception">ResourceNotFoundException</A></CODE> - if template not found from any available source. <DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></CODE> - if template cannot be parsed due to syntax (or other) error.</DL> </DD> </DL> <HR> <A NAME="refreshResource(org.apache.velocity.runtime.resource.Resource, java.lang.String)"><!-- --></A><H3> refreshResource</H3> <PRE> protected <A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">Resource</A> <B>refreshResource</B>(<A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html" title="class in org.apache.velocity.runtime.resource">Resource</A> resource, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding) throws <A HREF="../../../../../org/apache/velocity/exception/ResourceNotFoundException.html" title="class in org.apache.velocity.exception">ResourceNotFoundException</A>, <A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></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. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>resource</CODE> - resource to refresh<DD><CODE>encoding</CODE> - character encoding of the resource to refresh. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ResourceNotFoundException.html" title="class in org.apache.velocity.exception">ResourceNotFoundException</A></CODE> - if template not found from current source for this Resource <DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></CODE> - if template cannot be parsed due to syntax (or other) error.</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" title="class in org.apache.velocity.runtime.resource">Resource</A> <B>getResource</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName, int resourceType) throws <A HREF="../../../../../org/apache/velocity/exception/ResourceNotFoundException.html" title="class in org.apache.velocity.exception">ResourceNotFoundException</A>, <A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE> <DL> <DD><B>Deprecated.</B> <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>). <P> <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" title="class in org.apache.velocity.exception">ResourceNotFoundException</A></CODE> - if template not found from any available source. <DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></CODE> - if template cannot be parsed due to syntax (or other) error. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - if a problem in parse</DL> </DD> </DL> <HR> <A NAME="getLoaderNameForResource(java.lang.String)"><!-- --></A><H3> getLoaderNameForResource</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getLoaderNameForResource</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> resourceName)</PRE> <DL> <DD>Determines if 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. <P> <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" title="interface in org.apache.velocity.runtime.resource">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 BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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/ResourceManagerImpl.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/resource/ResourceFactory.html" title="class in org.apache.velocity.runtime.resource"><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="ResourceManagerImpl.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright © 2000-2010 <a href=http://www.apache.org/>Apache Software Foundation</a>. All Rights Reserved. </BODY> </HTML>