| <!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.5.0_09) on Tue Mar 06 19:35:23 CET 2007 --> |
| <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <TITLE> |
| Resource (Apache Velocity 1.5 API) |
| </TITLE> |
| |
| <META NAME="keywords" CONTENT="org.apache.velocity.runtime.resource.Resource class"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| parent.document.title="Resource (Apache Velocity 1.5 API)"; |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </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=2 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/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" title="class in org.apache.velocity.runtime.resource"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html" title="interface in org.apache.velocity.runtime.resource"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/velocity/runtime/resource/Resource.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="Resource.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 Resource</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.Resource</B> |
| </PRE> |
| <DL> |
| <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/velocity/runtime/resource/ContentResource.html" title="class in org.apache.velocity.runtime.resource">ContentResource</A>, <A HREF="../../../../../org/apache/velocity/Template.html" title="class in org.apache.velocity">Template</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public abstract class <B>Resource</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></DL> |
| </PRE> |
| |
| <P> |
| This class represent a general text resource that |
| may have been retrieved from any number of possible |
| sources. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Version:</B></DT> |
| <DD>$Id: Resource.java 463298 2006-10-12 16:10:32Z henning $</DD> |
| <DT><B>Author:</B></DT> |
| <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> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TH> |
| </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/lang/Object.html" title="class or interface in java.lang">Object</A></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 <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/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 <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/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" title="class in org.apache.velocity.runtime.resource.loader">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" title="interface in org.apache.velocity.runtime">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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TH> |
| </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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </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/Object.html" title="class or interface in java.lang">Object</A></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> <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/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 |
| resource.</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/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" title="class in org.apache.velocity.runtime.resource.loader">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>(<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> 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>(<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> |
| 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 |
| 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#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>(<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> 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" title="class in org.apache.velocity.runtime.resource.loader">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" title="interface in org.apache.velocity.runtime">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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><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></TH> |
| </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"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <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> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="resourceLoader"><!-- --></A><H3> |
| resourceLoader</H3> |
| <PRE> |
| protected <A HREF="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">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. |
| <P> |
| <DL> |
| </DL> |
| </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. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.runtime.resource.Resource.MILLIS_PER_SECOND">Constant Field Values</A></DL> |
| </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). |
| <P> |
| <DL> |
| </DL> |
| </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. |
| <P> |
| <DL> |
| </DL> |
| </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). |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="name"><!-- --></A><H3> |
| name</H3> |
| <PRE> |
| protected <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>name</B></PRE> |
| <DL> |
| <DD>Name of the resource |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="encoding"><!-- --></A><H3> |
| encoding</H3> |
| <PRE> |
| protected <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>encoding</B></PRE> |
| <DL> |
| <DD>Character encoding of this resource |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="data"><!-- --></A><H3> |
| data</H3> |
| <PRE> |
| protected <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>data</B></PRE> |
| <DL> |
| <DD>Resource might require ancillary storage of some kind |
| <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"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="Resource()"><!-- --></A><H3> |
| Resource</H3> |
| <PRE> |
| public <B>Resource</B>()</PRE> |
| <DL> |
| <DD>Default constructor |
| <P> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </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" title="interface in org.apache.velocity.runtime">RuntimeServices</A> rs)</PRE> |
| <DL> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>rs</CODE> - </DL> |
| </DD> |
| </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" 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>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. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>Whether the resource could be processed successfully. |
| For a <A HREF="../../../../../org/apache/velocity/Template.html" title="class in org.apache.velocity"><CODE>Template</CODE></A> or <A HREF="../../../../../org/apache/velocity/runtime/resource/ContentResource.html" title="class in org.apache.velocity.runtime.resource"><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" title="class in org.apache.velocity.exception">ResourceNotFoundException</A></CODE> - Similar in semantics as |
| returning <code>false</code>. |
| <DD><CODE><A HREF="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</A></CODE> |
| <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></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isSourceModified()"><!-- --></A><H3> |
| isSourceModified</H3> |
| <PRE> |
| public boolean <B>isSourceModified</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>True if source has been modified.</DL> |
| </DD> |
| </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. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>modificationCheckInterval</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? |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>True if resource must be checked.</DL> |
| </DD> |
| </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. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setName(java.lang.String)"><!-- --></A><H3> |
| setName</H3> |
| <PRE> |
| public void <B>setName</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> name)</PRE> |
| <DL> |
| <DD>Set the name of this resource, for example |
| test.vm. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getName()"><!-- --></A><H3> |
| getName</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>getName</B>()</PRE> |
| <DL> |
| <DD>Get the name of this template. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>The name of this template.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setEncoding(java.lang.String)"><!-- --></A><H3> |
| setEncoding</H3> |
| <PRE> |
| public void <B>setEncoding</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> encoding)</PRE> |
| <DL> |
| <DD>set the encoding of this resource |
| for example, "ISO-8859-1" |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>encoding</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getEncoding()"><!-- --></A><H3> |
| getEncoding</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>getEncoding</B>()</PRE> |
| <DL> |
| <DD>get the encoding of this resource |
| for example, "ISO-8859-1" |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>The encoding of this resource.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastModified()"><!-- --></A><H3> |
| getLastModified</H3> |
| <PRE> |
| public long <B>getLastModified</B>()</PRE> |
| <DL> |
| <DD>Return the lastModifed time of this |
| resource. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>The lastModifed time of this resource.</DL> |
| </DD> |
| </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 |
| resource. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>lastModified</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getResourceLoader()"><!-- --></A><H3> |
| getResourceLoader</H3> |
| <PRE> |
| public <A HREF="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">ResourceLoader</A> <B>getResourceLoader</B>()</PRE> |
| <DL> |
| <DD>Return the template loader that pulled |
| in the template stream |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>The resource loader for this resource.</DL> |
| </DD> |
| </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" title="class in org.apache.velocity.runtime.resource.loader">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. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>resourceLoader</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setData(java.lang.Object)"><!-- --></A><H3> |
| setData</H3> |
| <PRE> |
| public void <B>setData</B>(<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> data)</PRE> |
| <DL> |
| <DD>Set arbitrary data object that might be used |
| by the resource. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>data</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getData()"><!-- --></A><H3> |
| getData</H3> |
| <PRE> |
| public <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>getData</B>()</PRE> |
| <DL> |
| <DD>Get arbitrary data object that might be used |
| by the resource. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>The data object for this resource.</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=2 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/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" title="class in org.apache.velocity.runtime.resource"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html" title="interface in org.apache.velocity.runtime.resource"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/velocity/runtime/resource/Resource.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="Resource.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-2007 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |