public class URLResourceLoader extends ResourceLoader
Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
roots |
protected java.util.Map<java.lang.String,java.lang.String> |
templateRoots |
private int |
timeout |
className, isCachingOn, log, modificationCheckInterval, rsvc
Constructor and Description |
---|
URLResourceLoader() |
Modifier and Type | Method and Description |
---|---|
long |
getLastModified(Resource resource)
Checks to see when a resource was last modified
|
java.io.Reader |
getResourceReader(java.lang.String name,
java.lang.String encoding)
Get a Reader so that the Runtime can build a
template with it.
|
int |
getTimeout()
Returns the current, custom timeout setting.
|
void |
init(ExtProperties configuration)
Initialize the template loader with a
a resources class.
|
boolean |
isSourceModified(Resource resource)
Checks to see if a resource has been deleted, moved or modified.
|
buildReader, commonInit, getClassName, getModificationCheckInterval, isCachingOn, resourceExists, setCachingOn, setModificationCheckInterval
private java.lang.String[] roots
protected java.util.Map<java.lang.String,java.lang.String> templateRoots
private int timeout
public void init(ExtProperties configuration)
ResourceLoader
init
in class ResourceLoader
configuration
- ResourceLoader.init(org.apache.velocity.util.ExtProperties)
public java.io.Reader getResourceReader(java.lang.String name, java.lang.String encoding) throws ResourceNotFoundException
getResourceReader
in class ResourceLoader
name
- name of template to fetch bytestream ofencoding
- asked encodingResourceNotFoundException
- if template not found
in the file template path.public boolean isSourceModified(Resource resource)
isSourceModified
in class ResourceLoader
resource
- Resource The resource to check for modificationpublic long getLastModified(Resource resource)
getLastModified
in class ResourceLoader
resource
- Resource the resource to checkpublic int getTimeout()