public class URLResourceLoader extends ResourceLoader
Modifier and Type | Field and Description |
---|---|
protected HashMap |
templateRoots |
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
|
Reader |
getResourceReader(String name,
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
protected HashMap templateRoots
public void init(ExtProperties configuration)
ResourceLoader
init
in class ResourceLoader
configuration
- ResourceLoader.init(org.apache.velocity.util.ExtProperties)
public Reader getResourceReader(String name, 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()
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.