public class FileResourceLoader extends ResourceLoader
| Modifier and Type | Field and Description |
|---|---|
private java.util.Vector |
paths
The paths to search for templates.
|
private java.util.Hashtable |
templatePaths
Used to map the path that a template was found on
so that we can properly check the modification
times of the files.
|
className, isCachingOn, modificationCheckInterval, rsvc| Constructor and Description |
|---|
FileResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
private java.io.InputStream |
findTemplate(java.lang.String path,
java.lang.String template)
Try to find a template given a normalized path.
|
long |
getLastModified(Resource resource)
Get the last modified time of the InputStream source
that was used to create the template.
|
java.io.InputStream |
getResourceStream(java.lang.String templateName)
Get an InputStream so that the Runtime can build a
template with it.
|
void |
init(org.apache.commons.collections.ExtendedProperties configuration)
Initialize the template loader with a
a resources class.
|
boolean |
isSourceModified(Resource resource)
How to keep track of all the modified times
across the paths.
|
commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckIntervalprivate java.util.Vector paths
private java.util.Hashtable templatePaths
public void init(org.apache.commons.collections.ExtendedProperties configuration)
ResourceLoaderinit in class ResourceLoaderpublic java.io.InputStream getResourceStream(java.lang.String templateName)
throws ResourceNotFoundException
getResourceStream in class ResourceLoadername - name of template to getResourceNotFoundException - if template not found
in the file template path.private java.io.InputStream findTemplate(java.lang.String path,
java.lang.String template)
String - a normalized pathpublic boolean isSourceModified(Resource resource)
isSourceModified in class ResourceLoaderpublic long getLastModified(Resource resource)
ResourceLoadergetLastModified in class ResourceLoaderCopyright ? 2002 Apache Software Foundation. All Rights Reserved.