| java.lang.Object org.apache.velocity.runtime.resource.loader.ResourceLoader
All known Subclasses: org.apache.velocity.runtime.resource.loader.URLResourceLoader, org.apache.velocity.tools.view.servlet.WebappLoader, org.apache.velocity.runtime.resource.loader.FileResourceLoader, org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader, org.apache.velocity.runtime.resource.loader.JarResourceLoader, org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader, org.apache.velocity.runtime.resource.loader.StringResourceLoader, org.apache.velocity.test.misc.ExceptionGeneratingResourceLoader,
ResourceLoader | abstract public class ResourceLoader (Code) | | This is abstract class the all text resource loaders should
extend.
author: Jason van Zyl author: Geir Magnusson Jr. version: $Id: ResourceLoader.java 463298 2006-10-12 16:10:32Z henning $ |
Method Summary | |
public void | commonInit(RuntimeServices rs, ExtendedProperties configuration) | public String | getClassName() | abstract public long | getLastModified(Resource resource) Get the last modified time of the InputStream source
that was used to create the template. | public long | getModificationCheckInterval() Get the interval at which the InputStream source
should be checked for modifications. | abstract public InputStream | getResourceStream(String source) Get the InputStream that the Runtime will parse
to create a template. | abstract public void | init(ExtendedProperties configuration) Initialize the template loader with a
a resources class. | public boolean | isCachingOn() The Runtime uses this to find out whether this
template loader wants the Runtime to cache
templates created with InputStreams provided
by this loader. | abstract public boolean | isSourceModified(Resource resource) Given a template, check to see if the source of InputStream
has been modified. | public void | setCachingOn(boolean value) Set the caching state. | public void | setModificationCheckInterval(long modificationCheckInterval) Set the interval at which the InputStream source
should be checked for modifications. |
className | protected String className(Code) | | Class name for this loader, for logging/debuggin
purposes.
|
isCachingOn | protected boolean isCachingOn(Code) | | Does this loader want templates produced with it
cached in the Runtime.
|
modificationCheckInterval | protected long modificationCheckInterval(Code) | | This property will be passed on to the templates
that are created with this loader.
|
commonInit | public void commonInit(RuntimeServices rs, ExtendedProperties configuration)(Code) | | This initialization is used by all resource
loaders and must be called to set up common
properties shared by all resource loaders
Parameters: rs - Parameters: configuration - |
getClassName | public String getClassName()(Code) | | Return the class name of this resource Loader
Class name of the resource loader. |
getLastModified | abstract public long getLastModified(Resource resource)(Code) | | Get the last modified time of the InputStream source
that was used to create the template. We need the template
here because we have to extract the name of the template
in order to locate the InputStream source.
Parameters: resource - Time in millis when the resource has been modified. |
getModificationCheckInterval | public long getModificationCheckInterval()(Code) | | Get the interval at which the InputStream source
should be checked for modifications.
The modification check interval. |
init | abstract public void init(ExtendedProperties configuration)(Code) | | Initialize the template loader with a
a resources class.
Parameters: configuration - |
isCachingOn | public boolean isCachingOn()(Code) | | The Runtime uses this to find out whether this
template loader wants the Runtime to cache
templates created with InputStreams provided
by this loader.
True if this resource loader caches. |
isSourceModified | abstract public boolean isSourceModified(Resource resource)(Code) | | Given a template, check to see if the source of InputStream
has been modified.
Parameters: resource - True if the resource has been modified. |
setCachingOn | public void setCachingOn(boolean value)(Code) | | Set the caching state. If true, then this loader
would like the Runtime to cache templates that
have been created with InputStreams provided
by this loader.
Parameters: value - |
setModificationCheckInterval | public void setModificationCheckInterval(long modificationCheckInterval)(Code) | | Set the interval at which the InputStream source
should be checked for modifications.
Parameters: modificationCheckInterval - |
|
|