| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_191) on Wed Jan 29 19:07:50 CET 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Resource (Apache Velocity 2.2 API)</title> |
| <meta name="date" content="2020-01-29"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Resource (Apache Velocity 2.2 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":6,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Resource.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/velocity/runtime/resource/ContentResource.html" title="class in org.apache.velocity.runtime.resource"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html" title="interface in org.apache.velocity.runtime.resource"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/velocity/runtime/resource/Resource.html" target="_top">Frames</a></li> |
| <li><a href="Resource.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.velocity.runtime.resource</div> |
| <h2 title="Class Resource" class="title">Class Resource</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.velocity.runtime.resource.Resource</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <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> |
| <br> |
| <pre>public abstract class <span class="typeNameLabel">Resource</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">This class represent a general text resource that |
| may have been retrieved from any number of possible |
| sources.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Version:</span></dt> |
| <dd>$Id: Resource.java 1855206 2019-03-11 11:09:53Z cbrisson $</dd> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd><a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>, <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#data">data</a></span></code> |
| <div class="block">Resource might require ancillary storage of some kind</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#encoding">encoding</a></span></code> |
| <div class="block">Character encoding of this resource</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#lastModified">lastModified</a></span></code> |
| <div class="block">The file modification time (in milliseconds) for the cached template.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected org.slf4j.Logger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#log">log</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#MILLIS_PER_SECOND">MILLIS_PER_SECOND</a></span></code> |
| <div class="block">The number of milliseconds in a minute, used to calculate the |
| check interval.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#modificationCheckInterval">modificationCheckInterval</a></span></code> |
| <div class="block">How often the file modification time is checked (in seconds).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#name">name</a></span></code> |
| <div class="block">Name of the resource</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#nextCheck">nextCheck</a></span></code> |
| <div class="block">The next time the file modification time will be checked (in |
| milliseconds).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">ResourceLoader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#resourceLoader">resourceLoader</a></span></code> |
| <div class="block">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.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../org/apache/velocity/runtime/RuntimeServices.html" title="interface in org.apache.velocity.runtime">RuntimeServices</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#rsvc">rsvc</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#type">type</a></span></code> |
| <div class="block">Resource type (RESOURCE_TEMPLATE or RESOURCE_CONTENT)</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#Resource--">Resource</a></span>()</code> |
| <div class="block">Default constructor</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#getData--">getData</a></span>()</code> |
| <div class="block">Get arbitrary data object that might be used |
| by the resource.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#getEncoding--">getEncoding</a></span>()</code> |
| <div class="block">get the encoding of this resource |
| for example, "ISO-8859-1"</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#getLastModified--">getLastModified</a></span>()</code> |
| <div class="block">Return the lastModifed time of this |
| resource.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#getName--">getName</a></span>()</code> |
| <div class="block">Get the name of this template.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">ResourceLoader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#getResourceLoader--">getResourceLoader</a></span>()</code> |
| <div class="block">Return the template loader that pulled |
| in the template stream</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#getType--">getType</a></span>()</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#isSourceModified--">isSourceModified</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#process--">process</a></span>()</code> |
| <div class="block">Perform any subsequent processing that might need |
| to be done by a resource.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#requiresChecking--">requiresChecking</a></span>()</code> |
| <div class="block">Is it time to check to see if the resource |
| source has been updated?</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setData-java.lang.Object-">setData</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> data)</code> |
| <div class="block">Set arbitrary data object that might be used |
| by the resource.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setEncoding-java.lang.String-">setEncoding</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encoding)</code> |
| <div class="block">set the encoding of this resource |
| for example, "ISO-8859-1"</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setLastModified-long-">setLastModified</a></span>(long lastModified)</code> |
| <div class="block">Set the last modified time for this |
| resource.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setModificationCheckInterval-long-">setModificationCheckInterval</a></span>(long modificationCheckInterval)</code> |
| <div class="block">Set the modification check interval.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setName-java.lang.String-">setName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> |
| <div class="block">Set the name of this resource, for example |
| test.vm.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setResourceLoader-org.apache.velocity.runtime.resource.loader.ResourceLoader-">setResourceLoader</a></span>(<a href="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">ResourceLoader</a> resourceLoader)</code> |
| <div class="block">Set the template loader for this template.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setRuntimeServices-org.apache.velocity.runtime.RuntimeServices-">setRuntimeServices</a></span>(<a href="../../../../../org/apache/velocity/runtime/RuntimeServices.html" title="interface in org.apache.velocity.runtime">RuntimeServices</a> rs)</code> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#setType-int-">setType</a></span>(int type)</code> |
| <div class="block">Sets the type of this Resource (RESOURCE_TEMPLATE or RESOURCE_CONTENT)</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/runtime/resource/Resource.html#touch--">touch</a></span>()</code> |
| <div class="block">'Touch' this template and thereby resetting |
| the nextCheck field.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="rsvc"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rsvc</h4> |
| <pre>protected <a href="../../../../../org/apache/velocity/runtime/RuntimeServices.html" title="interface in org.apache.velocity.runtime">RuntimeServices</a> rsvc</pre> |
| </li> |
| </ul> |
| <a name="log"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>log</h4> |
| <pre>protected org.slf4j.Logger log</pre> |
| </li> |
| </ul> |
| <a name="resourceLoader"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>resourceLoader</h4> |
| <pre>protected <a href="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">ResourceLoader</a> resourceLoader</pre> |
| <div class="block">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.</div> |
| </li> |
| </ul> |
| <a name="MILLIS_PER_SECOND"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MILLIS_PER_SECOND</h4> |
| <pre>protected static final long MILLIS_PER_SECOND</pre> |
| <div class="block">The number of milliseconds in a minute, used to calculate the |
| check interval.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.velocity.runtime.resource.Resource.MILLIS_PER_SECOND">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="modificationCheckInterval"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>modificationCheckInterval</h4> |
| <pre>protected long modificationCheckInterval</pre> |
| <div class="block">How often the file modification time is checked (in seconds).</div> |
| </li> |
| </ul> |
| <a name="lastModified"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lastModified</h4> |
| <pre>protected long lastModified</pre> |
| <div class="block">The file modification time (in milliseconds) for the cached template.</div> |
| </li> |
| </ul> |
| <a name="nextCheck"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>nextCheck</h4> |
| <pre>protected long nextCheck</pre> |
| <div class="block">The next time the file modification time will be checked (in |
| milliseconds).</div> |
| </li> |
| </ul> |
| <a name="name"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>name</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name</pre> |
| <div class="block">Name of the resource</div> |
| </li> |
| </ul> |
| <a name="encoding"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>encoding</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encoding</pre> |
| <div class="block">Character encoding of this resource</div> |
| </li> |
| </ul> |
| <a name="data"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>data</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> data</pre> |
| <div class="block">Resource might require ancillary storage of some kind</div> |
| </li> |
| </ul> |
| <a name="type"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>type</h4> |
| <pre>protected int type</pre> |
| <div class="block">Resource type (RESOURCE_TEMPLATE or RESOURCE_CONTENT)</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="Resource--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Resource</h4> |
| <pre>public Resource()</pre> |
| <div class="block">Default constructor</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setRuntimeServices-org.apache.velocity.runtime.RuntimeServices-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setRuntimeServices</h4> |
| <pre>public void setRuntimeServices(<a href="../../../../../org/apache/velocity/runtime/RuntimeServices.html" title="interface in org.apache.velocity.runtime">RuntimeServices</a> rs)</pre> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rs</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="process--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>process</h4> |
| <pre>public abstract boolean process() |
| 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> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <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.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <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> |
| <dd><code><a href="../../../../../org/apache/velocity/exception/ParseErrorException.html" title="class in org.apache.velocity.exception">ParseErrorException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSourceModified--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSourceModified</h4> |
| <pre>public boolean isSourceModified()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>True if source has been modified.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setModificationCheckInterval-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setModificationCheckInterval</h4> |
| <pre>public void setModificationCheckInterval(long modificationCheckInterval)</pre> |
| <div class="block">Set the modification check interval.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>modificationCheckInterval</code> - The interval (in seconds).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="requiresChecking--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>requiresChecking</h4> |
| <pre>public boolean requiresChecking()</pre> |
| <div class="block">Is it time to check to see if the resource |
| source has been updated?</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>True if resource must be checked.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="touch--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>touch</h4> |
| <pre>public void touch()</pre> |
| <div class="block">'Touch' this template and thereby resetting |
| the nextCheck field.</div> |
| </li> |
| </ul> |
| <a name="setName-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setName</h4> |
| <pre>public void setName(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> |
| <div class="block">Set the name of this resource, for example |
| test.vm.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getName()</pre> |
| <div class="block">Get the name of this template.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The name of this template.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setEncoding-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setEncoding</h4> |
| <pre>public void setEncoding(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encoding)</pre> |
| <div class="block">set the encoding of this resource |
| for example, "ISO-8859-1"</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>encoding</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getEncoding--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEncoding</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getEncoding()</pre> |
| <div class="block">get the encoding of this resource |
| for example, "ISO-8859-1"</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The encoding of this resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLastModified--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastModified</h4> |
| <pre>public long getLastModified()</pre> |
| <div class="block">Return the lastModifed time of this |
| resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The lastModifed time of this resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setLastModified-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLastModified</h4> |
| <pre>public void setLastModified(long lastModified)</pre> |
| <div class="block">Set the last modified time for this |
| resource.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>lastModified</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getResourceLoader--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResourceLoader</h4> |
| <pre>public <a href="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">ResourceLoader</a> getResourceLoader()</pre> |
| <div class="block">Return the template loader that pulled |
| in the template stream</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The resource loader for this resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setResourceLoader-org.apache.velocity.runtime.resource.loader.ResourceLoader-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setResourceLoader</h4> |
| <pre>public void setResourceLoader(<a href="../../../../../org/apache/velocity/runtime/resource/loader/ResourceLoader.html" title="class in org.apache.velocity.runtime.resource.loader">ResourceLoader</a> resourceLoader)</pre> |
| <div class="block">Set the template loader for this template. Set |
| when the Runtime determines where this template |
| came from the list of possible sources.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resourceLoader</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setData-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setData</h4> |
| <pre>public void setData(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> data)</pre> |
| <div class="block">Set arbitrary data object that might be used |
| by the resource.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>data</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getData--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getData</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getData()</pre> |
| <div class="block">Get arbitrary data object that might be used |
| by the resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The data object for this resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setType-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setType</h4> |
| <pre>public void setType(int type)</pre> |
| <div class="block">Sets the type of this Resource (RESOURCE_TEMPLATE or RESOURCE_CONTENT)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - RESOURCE_TEMPLATE or RESOURCE_CONTENT</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getType--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getType</h4> |
| <pre>public int getType()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>type code of the Resource</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Resource.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/velocity/runtime/resource/ContentResource.html" title="class in org.apache.velocity.runtime.resource"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/velocity/runtime/resource/ResourceCache.html" title="interface in org.apache.velocity.runtime.resource"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/velocity/runtime/resource/Resource.html" target="_top">Frames</a></li> |
| <li><a href="Resource.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2000–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |