public class WebappResourceLoader
extends ResourceLoader
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
paths
The root paths for templates (relative to webapp's root).
|
protected ServletContext |
servletContext |
protected java.util.HashMap |
templatePaths |
Constructor and Description |
---|
WebappResourceLoader() |
Modifier and Type | Method and Description |
---|---|
private java.io.File |
getCachedFile(java.lang.String rootPath,
java.lang.String fileName) |
long |
getLastModified(Resource resource)
Checks to see when a resource was last modified
|
java.io.InputStream |
getResourceStream(java.lang.String name)
Get an InputStream so that the Runtime can build a
template with it.
|
void |
init(ExtendedProperties configuration)
This is abstract in the base class, so we need it.
|
boolean |
isSourceModified(Resource resource)
Checks to see if a resource has been deleted, moved or modified.
|
protected java.lang.String[] paths
protected java.util.HashMap templatePaths
protected ServletContext servletContext
public void init(ExtendedProperties configuration)
configuration
- the ExtendedProperties
associated with
this resource loader.public java.io.InputStream getResourceStream(java.lang.String name) throws ResourceNotFoundException
name
- name of template to getResourceNotFoundException
- if template not found
in classpath.private java.io.File getCachedFile(java.lang.String rootPath, java.lang.String fileName)
public boolean isSourceModified(Resource resource)
resource
- Resource The resource to check for modificationpublic long getLastModified(Resource resource)
resource
- Resource the resource to checkCopyright (c) 2003-2007 Apache Software Foundation