|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.runtime.resource.loader.ResourceLoader org.apache.velocity.runtime.resource.loader.URLResourceLoader
public class URLResourceLoader
This is a simple URL-based loader.
Field Summary | |
---|---|
protected HashMap |
templateRoots
|
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
---|
className, isCachingOn, log, modificationCheckInterval, rsvc |
Constructor Summary | |
---|---|
URLResourceLoader()
|
Method Summary | |
---|---|
long |
getLastModified(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. |
int |
getTimeout()
Returns the current, custom timeout setting. |
void |
init(ExtendedProperties 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. |
Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
---|
commonInit, getClassName, getModificationCheckInterval, isCachingOn, resourceExists, setCachingOn, setModificationCheckInterval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HashMap templateRoots
Constructor Detail |
---|
public URLResourceLoader()
Method Detail |
---|
public void init(ExtendedProperties configuration)
ResourceLoader
init
in class ResourceLoader
ResourceLoader.init(org.apache.commons.collections.ExtendedProperties)
public InputStream getResourceStream(String name) throws ResourceNotFoundException
getResourceStream
in class ResourceLoader
name
- name of template to fetch bytestream of
ResourceNotFoundException
- 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 modification
public long getLastModified(Resource resource)
getLastModified
in class ResourceLoader
resource
- Resource the resource to check
public int getTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |