public class WebappLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
paths
The root paths for templates (relative to webapp's root).
|
protected ServletContext |
servletContext |
protected HashMap |
templatePaths |
| Constructor and Description |
|---|
WebappLoader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Checks to see when a resource was last modified
|
InputStream |
getResourceStream(String name)
Get an InputStream so that the Runtime can build a
template with it.
|
void |
init(org.apache.commons.collections.ExtendedProperties configuration)
This is abstract in the base class, so we need it.
|
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
Checks to see if a resource has been deleted, moved or modified.
|
protected String[] paths
protected HashMap templatePaths
protected ServletContext servletContext
public void init(org.apache.commons.collections.ExtendedProperties configuration)
init in class org.apache.velocity.runtime.resource.loader.ResourceLoaderconfiguration - the ExtendedProperties associated with
this resource loader.public InputStream getResourceStream(String name) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceStream in class org.apache.velocity.runtime.resource.loader.ResourceLoadername - name of template to getorg.apache.velocity.exception.ResourceNotFoundException - if template not found
in classpath.public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified in class org.apache.velocity.runtime.resource.loader.ResourceLoaderresource - Resource The resource to check for modificationpublic long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoaderresource - Resource the resource to checkCopyright © 2003-2014 Sakai Project. All Rights Reserved.