public class ReportFileResourceLoader
extends org.apache.velocity.runtime.resource.loader.FileResourceLoader
Constructor and Description |
---|
ReportFileResourceLoader() |
Modifier and Type | Method and Description |
---|---|
protected java.io.InputStream |
findTemplate(java.lang.String path,
java.lang.String template)
Try to find a template given a normalized path.
|
protected java.io.File |
getFile(java.lang.String path,
java.lang.String template)
Create a File based on either a relative path if given, or absolute path otherwise
|
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource) |
java.util.List |
getPaths()
Get paths
|
java.io.InputStream |
getResourceStream(java.lang.String templateName)
Get an InputStream so that the Runtime can build a
template with it.
|
java.util.Map |
getTemplatePaths()
Get template paths
|
void |
init(org.apache.commons.collections.ExtendedProperties configuration) |
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
How to keep track of all the modified times
across the paths.
|
boolean |
isUnicode()
Return true if it is unicode files, otherwise false
|
boolean |
resourceExists(java.lang.String name)
Overrides superclass for better performance.
|
void |
setPaths(java.util.List paths)
Set paths
|
void |
setTemplatePaths(java.util.Map templatePaths)
Set template path
|
void |
setUnicode(boolean unicode)
Set is unicode file
|
public java.util.List getPaths()
public void setPaths(java.util.List paths)
paths
- pathspublic java.util.Map getTemplatePaths()
public void setTemplatePaths(java.util.Map templatePaths)
templatePaths
- template pathpublic boolean isUnicode()
public void setUnicode(boolean unicode)
unicode
- true if it is unicode files, otherwise falsepublic void init(org.apache.commons.collections.ExtendedProperties configuration)
init
in class org.apache.velocity.runtime.resource.loader.FileResourceLoader
ResourceLoader.init(org.apache.commons.collections.ExtendedProperties)
public java.io.InputStream getResourceStream(java.lang.String templateName) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceStream
in class org.apache.velocity.runtime.resource.loader.FileResourceLoader
templateName
- name of template to getorg.apache.velocity.exception.ResourceNotFoundException
- if template not found
in the file template path.public boolean resourceExists(java.lang.String name)
resourceExists
in class org.apache.velocity.runtime.resource.loader.FileResourceLoader
protected java.io.InputStream findTemplate(java.lang.String path, java.lang.String template) throws java.io.IOException
path
- a normalized pathtemplate
- name of template to findjava.io.IOException
- i/o problempublic boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified
in class org.apache.velocity.runtime.resource.loader.FileResourceLoader
resource
- a filepublic long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified
in class org.apache.velocity.runtime.resource.loader.FileResourceLoader
ResourceLoader.getLastModified(org.apache.velocity.runtime.resource.Resource)
protected java.io.File getFile(java.lang.String path, java.lang.String template)
path
- path to be foundtemplate
- template file name or pathCopyright © 2010 - No Magic Asia