|
||||||||||
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.FileResourceLoader
public class FileResourceLoader
A loader for templates stored on the file system. Treats the template as relative to the configured root path. If the root path is empty treats the template name as an absolute path.
Field Summary |
---|
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
---|
className, isCachingOn, log, modificationCheckInterval, rsvc |
Constructor Summary | |
---|---|
FileResourceLoader()
|
Method Summary | |
---|---|
long |
getLastModified(Resource resource)
Get the last modified time of the InputStream source that was used to create the template. |
InputStream |
getResourceStream(String templateName)
Get an InputStream so that the Runtime can build a template with it. |
void |
init(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. |
boolean |
resourceExists(String name)
Overrides superclass for better performance. |
Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
---|
commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileResourceLoader()
Method Detail |
---|
public void init(ExtendedProperties configuration)
ResourceLoader
init
in class ResourceLoader
ResourceLoader.init(org.apache.commons.collections.ExtendedProperties)
public InputStream getResourceStream(String templateName) throws ResourceNotFoundException
getResourceStream
in class ResourceLoader
templateName
- name of template to get
ResourceNotFoundException
- if template not found
in the file template path.public boolean resourceExists(String name)
resourceExists
in class ResourceLoader
name
- The name of a resource.
public boolean isSourceModified(Resource resource)
isSourceModified
in class ResourceLoader
resource
-
public long getLastModified(Resource resource)
ResourceLoader
getLastModified
in class ResourceLoader
ResourceLoader.getLastModified(org.apache.velocity.runtime.resource.Resource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |