| <!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 Resource |
| </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/Resource.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/ContentResource.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCacheImpl.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="Resource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <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> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.velocity.runtime.resource</FONT> |
| <BR> |
| Class Resource</H2> |
| <PRE> |
| java.lang.Object |
| | |
| +--<B>org.apache.velocity.runtime.resource.Resource</B> |
| </PRE> |
| <DL> |
| <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/velocity/runtime/resource/ContentResource.html">ContentResource</A>, <A HREF="../../../../../org/apache/velocity/Template.html">Template</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT>public abstract class <B>Resource</B><DT>extends java.lang.Object</DL> |
| |
| <P> |
| This class represent a general text resource that |
| may have been retrieved from any number of possible |
| sources. |
| <P> |
| <DL> |
| <DT><B>Version: </B><DD>$Id: Resource.java,v 1.12.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: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 java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#data">data</A></B></CODE> |
| |
| <BR> |
| Resource might require ancillary storage of some kind</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#encoding">encoding</A></B></CODE> |
| |
| <BR> |
| Character encoding of this resource</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#lastModified">lastModified</A></B></CODE> |
| |
| <BR> |
| The file modification time (in milliseconds) for the cached template.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected static long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#MILLIS_PER_SECOND">MILLIS_PER_SECOND</A></B></CODE> |
| |
| <BR> |
| The number of milliseconds in a minute, used to calculate the |
| check interval.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#modificationCheckInterval">modificationCheckInterval</A></B></CODE> |
| |
| <BR> |
| How often the file modification time is checked (in seconds).</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#name">name</A></B></CODE> |
| |
| <BR> |
| Name of the resource</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#nextCheck">nextCheck</A></B></CODE> |
| |
| <BR> |
| The next time the file modification time will be checked (in |
| milliseconds).</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/loader/ResourceLoader.html">ResourceLoader</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#resourceLoader">resourceLoader</A></B></CODE> |
| |
| <BR> |
| The template loader that initially loaded the input |
| stream for this template, and knows how to check the |
| source of the input stream for modification.</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">RuntimeServices</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#rsvc">rsvc</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== 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/Resource.html#Resource()">Resource</A></B>()</CODE> |
| |
| <BR> |
| Default constructor</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== 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> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#getData()">getData</A></B>()</CODE> |
| |
| <BR> |
| Get arbitrary data object that might be used |
| by the resource.</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/resource/Resource.html#getEncoding()">getEncoding</A></B>()</CODE> |
| |
| <BR> |
| get the encoding of this resource |
| for example, "ISO-8859-1"</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#getLastModified()">getLastModified</A></B>()</CODE> |
| |
| <BR> |
| Return the lastModifed time of this |
| template.</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/resource/Resource.html#getName()">getName</A></B>()</CODE> |
| |
| <BR> |
| Get the name of this template.</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/loader/ResourceLoader.html">ResourceLoader</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#getResourceLoader()">getResourceLoader</A></B>()</CODE> |
| |
| <BR> |
| Return the template loader that pulled |
| in the template stream</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/resource/Resource.html#isSourceModified()">isSourceModified</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>abstract boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/velocity/runtime/resource/Resource.html#process()">process</A></B>()</CODE> |
| |
| <BR> |
| Perform any subsequent processing that might need |
| to be done by a resource.</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/resource/Resource.html#requiresChecking()">requiresChecking</A></B>()</CODE> |
| |
| <BR> |
| Is it time to check to see if the resource |
| source has been updated?</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/Resource.html#setData(java.lang.Object)">setData</A></B>(java.lang.Object data)</CODE> |
| |
| <BR> |
| Set arbitrary data object that might be used |
| by the 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/Resource.html#setEncoding(java.lang.String)">setEncoding</A></B>(java.lang.String encoding)</CODE> |
| |
| <BR> |
| set the encoding of this resource |
| for example, "ISO-8859-1"</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/Resource.html#setLastModified(long)">setLastModified</A></B>(long lastModified)</CODE> |
| |
| <BR> |
| Set the last modified time for this |
| template.</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/Resource.html#setModificationCheckInterval(long)">setModificationCheckInterval</A></B>(long modificationCheckInterval)</CODE> |
| |
| <BR> |
| Set the modification check interval.</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/Resource.html#setName(java.lang.String)">setName</A></B>(java.lang.String name)</CODE> |
| |
| <BR> |
| Set the name of this resource, for example |
| test.vm.</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/Resource.html#setResourceLoader(org.apache.velocity.runtime.resource.loader.ResourceLoader)">setResourceLoader</A></B>(<A HREF="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html">ResourceLoader</A> resourceLoader)</CODE> |
| |
| <BR> |
| Set the template loader for this template.</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/Resource.html#setRuntimeServices(org.apache.velocity.runtime.RuntimeServices)">setRuntimeServices</A></B>(<A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html">RuntimeServices</A> rs)</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/resource/Resource.html#touch()">touch</A></B>()</CODE> |
| |
| <BR> |
| 'Touch' this template and thereby resetting |
| the nextCheck field.</TD> |
| </TR> |
| </TABLE> |
| <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> |
| |
| <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="rsvc"><!-- --></A><H3> |
| rsvc</H3> |
| <PRE> |
| protected <A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html">RuntimeServices</A> <B>rsvc</B></PRE> |
| <DL> |
| </DL> |
| <HR> |
| |
| <A NAME="resourceLoader"><!-- --></A><H3> |
| resourceLoader</H3> |
| <PRE> |
| protected <A HREF="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html">ResourceLoader</A> <B>resourceLoader</B></PRE> |
| <DL> |
| <DD>The template loader that initially loaded the input |
| stream for this template, and knows how to check the |
| source of the input stream for modification.</DL> |
| <HR> |
| |
| <A NAME="MILLIS_PER_SECOND"><!-- --></A><H3> |
| MILLIS_PER_SECOND</H3> |
| <PRE> |
| protected static final long <B>MILLIS_PER_SECOND</B></PRE> |
| <DL> |
| <DD>The number of milliseconds in a minute, used to calculate the |
| check interval.</DL> |
| <HR> |
| |
| <A NAME="modificationCheckInterval"><!-- --></A><H3> |
| modificationCheckInterval</H3> |
| <PRE> |
| protected long <B>modificationCheckInterval</B></PRE> |
| <DL> |
| <DD>How often the file modification time is checked (in seconds).</DL> |
| <HR> |
| |
| <A NAME="lastModified"><!-- --></A><H3> |
| lastModified</H3> |
| <PRE> |
| protected long <B>lastModified</B></PRE> |
| <DL> |
| <DD>The file modification time (in milliseconds) for the cached template.</DL> |
| <HR> |
| |
| <A NAME="nextCheck"><!-- --></A><H3> |
| nextCheck</H3> |
| <PRE> |
| protected long <B>nextCheck</B></PRE> |
| <DL> |
| <DD>The next time the file modification time will be checked (in |
| milliseconds).</DL> |
| <HR> |
| |
| <A NAME="name"><!-- --></A><H3> |
| name</H3> |
| <PRE> |
| protected java.lang.String <B>name</B></PRE> |
| <DL> |
| <DD>Name of the resource</DL> |
| <HR> |
| |
| <A NAME="encoding"><!-- --></A><H3> |
| encoding</H3> |
| <PRE> |
| protected java.lang.String <B>encoding</B></PRE> |
| <DL> |
| <DD>Character encoding of this resource</DL> |
| <HR> |
| |
| <A NAME="data"><!-- --></A><H3> |
| data</H3> |
| <PRE> |
| protected java.lang.Object <B>data</B></PRE> |
| <DL> |
| <DD>Resource might require ancillary storage of some kind</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="Resource()"><!-- --></A><H3> |
| Resource</H3> |
| <PRE> |
| public <B>Resource</B>()</PRE> |
| <DL> |
| <DD>Default constructor</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="setRuntimeServices(org.apache.velocity.runtime.RuntimeServices)"><!-- --></A><H3> |
| setRuntimeServices</H3> |
| <PRE> |
| public void <B>setRuntimeServices</B>(<A HREF="../../../../../org/apache/velocity/runtime/RuntimeServices.html">RuntimeServices</A> rs)</PRE> |
| <DL> |
| </DL> |
| <HR> |
| |
| <A NAME="process()"><!-- --></A><H3> |
| process</H3> |
| <PRE> |
| public abstract boolean <B>process</B>() |
| 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>Perform any subsequent processing that might need |
| to be done by a resource. In the case of a template |
| the actual parsing of the input stream needs to be |
| performed.<DD><DL> |
| <DT><B>Returns:</B><DD>Whether the resource could be processed successfully. |
| For a <A HREF="../../../../../org/apache/velocity/Template.html"><CODE>Template</CODE></A> or <A HREF="../../../../../org/apache/velocity/runtime/resource/ContentResource.html"><CODE>ContentResource</CODE></A>, this |
| indicates whether the resource could be read.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ResourceNotFoundException.html">ResourceNotFoundException</A></CODE> - Similar in semantics as |
| returning <code>false</code>.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isSourceModified()"><!-- --></A><H3> |
| isSourceModified</H3> |
| <PRE> |
| public boolean <B>isSourceModified</B>()</PRE> |
| <DL> |
| </DL> |
| <HR> |
| |
| <A NAME="setModificationCheckInterval(long)"><!-- --></A><H3> |
| setModificationCheckInterval</H3> |
| <PRE> |
| public void <B>setModificationCheckInterval</B>(long modificationCheckInterval)</PRE> |
| <DL> |
| <DD>Set the modification check interval.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>interval</CODE> - The interval (in seconds).</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="requiresChecking()"><!-- --></A><H3> |
| requiresChecking</H3> |
| <PRE> |
| public boolean <B>requiresChecking</B>()</PRE> |
| <DL> |
| <DD>Is it time to check to see if the resource |
| source has been updated?</DL> |
| <HR> |
| |
| <A NAME="touch()"><!-- --></A><H3> |
| touch</H3> |
| <PRE> |
| public void <B>touch</B>()</PRE> |
| <DL> |
| <DD>'Touch' this template and thereby resetting |
| the nextCheck field.</DL> |
| <HR> |
| |
| <A NAME="setName(java.lang.String)"><!-- --></A><H3> |
| setName</H3> |
| <PRE> |
| public void <B>setName</B>(java.lang.String name)</PRE> |
| <DL> |
| <DD>Set the name of this resource, for example |
| test.vm.</DL> |
| <HR> |
| |
| <A NAME="getName()"><!-- --></A><H3> |
| getName</H3> |
| <PRE> |
| public java.lang.String <B>getName</B>()</PRE> |
| <DL> |
| <DD>Get the name of this template.</DL> |
| <HR> |
| |
| <A NAME="setEncoding(java.lang.String)"><!-- --></A><H3> |
| setEncoding</H3> |
| <PRE> |
| public void <B>setEncoding</B>(java.lang.String encoding)</PRE> |
| <DL> |
| <DD>set the encoding of this resource |
| for example, "ISO-8859-1"</DL> |
| <HR> |
| |
| <A NAME="getEncoding()"><!-- --></A><H3> |
| getEncoding</H3> |
| <PRE> |
| public java.lang.String <B>getEncoding</B>()</PRE> |
| <DL> |
| <DD>get the encoding of this resource |
| for example, "ISO-8859-1"</DL> |
| <HR> |
| |
| <A NAME="getLastModified()"><!-- --></A><H3> |
| getLastModified</H3> |
| <PRE> |
| public long <B>getLastModified</B>()</PRE> |
| <DL> |
| <DD>Return the lastModifed time of this |
| template.</DL> |
| <HR> |
| |
| <A NAME="setLastModified(long)"><!-- --></A><H3> |
| setLastModified</H3> |
| <PRE> |
| public void <B>setLastModified</B>(long lastModified)</PRE> |
| <DL> |
| <DD>Set the last modified time for this |
| template.</DL> |
| <HR> |
| |
| <A NAME="getResourceLoader()"><!-- --></A><H3> |
| getResourceLoader</H3> |
| <PRE> |
| public <A HREF="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html">ResourceLoader</A> <B>getResourceLoader</B>()</PRE> |
| <DL> |
| <DD>Return the template loader that pulled |
| in the template stream</DL> |
| <HR> |
| |
| <A NAME="setResourceLoader(org.apache.velocity.runtime.resource.loader.ResourceLoader)"><!-- --></A><H3> |
| setResourceLoader</H3> |
| <PRE> |
| public void <B>setResourceLoader</B>(<A HREF="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html">ResourceLoader</A> resourceLoader)</PRE> |
| <DL> |
| <DD>Set the template loader for this template. Set |
| when the Runtime determines where this template |
| came from the list of possible sources.</DL> |
| <HR> |
| |
| <A NAME="setData(java.lang.Object)"><!-- --></A><H3> |
| setData</H3> |
| <PRE> |
| public void <B>setData</B>(java.lang.Object data)</PRE> |
| <DL> |
| <DD>Set arbitrary data object that might be used |
| by the resource.</DL> |
| <HR> |
| |
| <A NAME="getData()"><!-- --></A><H3> |
| getData</H3> |
| <PRE> |
| public java.lang.Object <B>getData</B>()</PRE> |
| <DL> |
| <DD>Get arbitrary data object that might be used |
| by the resource.</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/Resource.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/ContentResource.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCacheImpl.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="Resource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <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> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2002 Apache Software Foundation. All Rights Reserved. |
| </BODY> |
| </HTML> |