| |
|
| java.lang.Object org.apache.velocity.runtime.resource.Resource
All known Subclasses: org.apache.velocity.runtime.resource.ContentResource, org.apache.velocity.Template,
Resource | abstract public class Resource (Code) | | This class represent a general text resource that
may have been retrieved from any number of possible
sources.
author: Jason van Zyl author: Geir Magnusson Jr. version: $Id: Resource.java 463298 2006-10-12 16:10:32Z henning $ |
MILLIS_PER_SECOND | final protected static long MILLIS_PER_SECOND(Code) | | The number of milliseconds in a minute, used to calculate the
check interval.
|
data | protected Object data(Code) | | Resource might require ancillary storage of some kind
|
encoding | protected String encoding(Code) | | Character encoding of this resource
|
lastModified | protected long lastModified(Code) | | The file modification time (in milliseconds) for the cached template.
|
modificationCheckInterval | protected long modificationCheckInterval(Code) | | How often the file modification time is checked (in seconds).
|
nextCheck | protected long nextCheck(Code) | | The next time the file modification time will be checked (in
milliseconds).
|
resourceLoader | protected ResourceLoader resourceLoader(Code) | | 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.
|
Resource | public Resource()(Code) | | Default constructor
|
getData | public Object getData()(Code) | | Get arbitrary data object that might be used
by the resource.
The data object for this resource. |
getEncoding | public String getEncoding()(Code) | | get the encoding of this resource
for example, "ISO-8859-1"
The encoding of this resource. |
getLastModified | public long getLastModified()(Code) | | Return the lastModifed time of this
resource.
The lastModifed time of this resource. |
getName | public String getName()(Code) | | Get the name of this template.
The name of this template. |
getResourceLoader | public ResourceLoader getResourceLoader()(Code) | | Return the template loader that pulled
in the template stream
The resource loader for this resource. |
isSourceModified | public boolean isSourceModified()(Code) | | True if source has been modified. |
requiresChecking | public boolean requiresChecking()(Code) | | Is it time to check to see if the resource
source has been updated?
True if resource must be checked. |
setData | public void setData(Object data)(Code) | | Set arbitrary data object that might be used
by the resource.
Parameters: data - |
setEncoding | public void setEncoding(String encoding)(Code) | | set the encoding of this resource
for example, "ISO-8859-1"
Parameters: encoding - |
setLastModified | public void setLastModified(long lastModified)(Code) | | Set the last modified time for this
resource.
Parameters: lastModified - |
setModificationCheckInterval | public void setModificationCheckInterval(long modificationCheckInterval)(Code) | | Set the modification check interval.
Parameters: modificationCheckInterval - The interval (in seconds). |
setName | public void setName(String name)(Code) | | Set the name of this resource, for example
test.vm.
Parameters: name - |
setResourceLoader | public void setResourceLoader(ResourceLoader resourceLoader)(Code) | | Set the template loader for this template. Set
when the Runtime determines where this template
came from the list of possible sources.
Parameters: resourceLoader - |
touch | public void touch()(Code) | | 'Touch' this template and thereby resetting
the nextCheck field.
|
|
|
|