org.melati.template.velocity
Class WebMacroClasspathResourceLoader
java.lang.Object
org.apache.velocity.runtime.resource.loader.ResourceLoader
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
org.melati.template.velocity.WebMacroClasspathResourceLoader
public class WebMacroClasspathResourceLoader
- extends org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
Loads templates from the classpath, mungs them if they are WM
templates.
NOTE This does not allow modern WebMacro syntax with
optional #begin in #foreach.
NOTE Only if a curly bracket is at the start of a line will it not be turned into an #end
- Author:
- Tim Pizey based on work by Jason van Zyl and Tim Joyce.
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
className, isCachingOn, log, modificationCheckInterval, rsvc |
Methods inherited from class org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader |
getLastModified, init, isSourceModified |
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 |
WebMacroClasspathResourceLoader
public WebMacroClasspathResourceLoader()
getResourceStream
public InputStream getResourceStream(String templateName)
throws org.apache.velocity.exception.ResourceNotFoundException
- Get an InputStream so that the Runtime can build a
template with it, munge it if it is a WM template.
- Overrides:
getResourceStream
in class org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
- Parameters:
templateName
- name of template to get
- Returns:
- InputStream containing the template
- Throws:
org.apache.velocity.exception.ResourceNotFoundException
- if template not found
in the file template path.- See Also:
ResourceLoader
Copyright © 2000-2010 PanEris. All Rights Reserved.