org.apache.velocity.runtime.resource.loader
public abstract class ResourceLoader extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
className
Class name for this loader, for logging/debuggin
purposes.
|
protected boolean |
isCachingOn
Does this loader want templates produced with it
cached in the Runtime.
|
protected long |
modificationCheckInterval
This property will be passed on to the templates
that are created with this loader.
|
protected RuntimeServices |
rsvc |
Constructor and Description |
---|
ResourceLoader() |
Modifier and Type | Method and Description |
---|---|
void |
commonInit(RuntimeServices rs,
org.apache.commons.collections.ExtendedProperties configuration)
This initialization is used by all resource
loaders and must be called to set up common
properties shared by all resource loaders
|
java.lang.String |
getClassName()
Return the class name of this resource Loader
|
abstract long |
getLastModified(Resource resource)
Get the last modified time of the InputStream source
that was used to create the template.
|
long |
getModificationCheckInterval()
Get the interval at which the InputStream source
should be checked for modifications.
|
abstract java.io.InputStream |
getResourceStream(java.lang.String source)
Get the InputStream that the Runtime will parse
to create a template.
|
abstract void |
init(org.apache.commons.collections.ExtendedProperties configuration)
Initialize the template loader with a
a resources class.
|
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 boolean |
isSourceModified(Resource resource)
Given a template, check to see if the source of InputStream
has been modified.
|
void |
setCachingOn(boolean value)
Set the caching state.
|
void |
setModificationCheckInterval(long modificationCheckInterval)
Set the interval at which the InputStream source
should be checked for modifications.
|
protected boolean isCachingOn
protected long modificationCheckInterval
protected java.lang.String className
protected RuntimeServices rsvc
public void commonInit(RuntimeServices rs, org.apache.commons.collections.ExtendedProperties configuration)
public abstract void init(org.apache.commons.collections.ExtendedProperties configuration)
public abstract java.io.InputStream getResourceStream(java.lang.String source) throws ResourceNotFoundException
ResourceNotFoundException
public abstract boolean isSourceModified(Resource resource)
public abstract long getLastModified(Resource resource)
public java.lang.String getClassName()
public void setCachingOn(boolean value)
public boolean isCachingOn()
public void setModificationCheckInterval(long modificationCheckInterval)
public long getModificationCheckInterval()
Copyright ? 2002 Apache Software Foundation. All Rights Reserved.