Package org.gluu.oxtrust.util.velocity
Class ClasspathPathResourceLoader
- java.lang.Object
-
- org.apache.velocity.runtime.resource.loader.ResourceLoader
-
- org.gluu.oxtrust.util.velocity.ClasspathPathResourceLoader
-
public class ClasspathPathResourceLoader extends org.apache.velocity.runtime.resource.loader.ResourceLoader
A loader for templates stored on the classpath. Treats the template as relative to the configured root path. If the root path is empty treats the template name as an absolute path.
-
-
Constructor Summary
Constructors Constructor Description ClasspathPathResourceLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLastModified(org.apache.velocity.runtime.resource.Resource resource)
java.io.Reader
getResourceReader(java.lang.String templateName, java.lang.String encoding)
Get a Reader so that the Runtime can build a template with it.void
init(org.apache.velocity.util.ExtProperties configuration)
boolean
isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
-
-
-
Method Detail
-
init
public void init(org.apache.velocity.util.ExtProperties configuration)
- Specified by:
init
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
- See Also:
ResourceLoader.init(org.apache.velocity.util.ExtProperties)
-
getResourceReader
public java.io.Reader getResourceReader(java.lang.String templateName, java.lang.String encoding) throws org.apache.velocity.exception.ResourceNotFoundException
Get a Reader so that the Runtime can build a template with it.- Specified by:
getResourceReader
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
- Parameters:
name
- name of template to getencoding
- asked encoding- Returns:
- InputStream containing the template
- Throws:
org.apache.velocity.exception.ResourceNotFoundException
- if template not found in classpath.- Since:
- 2.0
-
isSourceModified
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
- Specified by:
isSourceModified
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
- See Also:
ResourceLoader.isSourceModified(org.apache.velocity.runtime.resource.Resource)
-
getLastModified
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
- Specified by:
getLastModified
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
- See Also:
ResourceLoader.getLastModified(org.apache.velocity.runtime.resource.Resource)
-
-