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.ResourceLoaderA 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 longgetLastModified(org.apache.velocity.runtime.resource.Resource resource)java.io.ReadergetResourceReader(java.lang.String templateName, java.lang.String encoding)Get a Reader so that the Runtime can build a template with it.voidinit(org.apache.velocity.util.ExtProperties configuration)booleanisSourceModified(org.apache.velocity.runtime.resource.Resource resource)
-
-
-
Method Detail
-
init
public void init(org.apache.velocity.util.ExtProperties configuration)
- Specified by:
initin 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.ResourceNotFoundExceptionGet a Reader so that the Runtime can build a template with it.- Specified by:
getResourceReaderin 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:
isSourceModifiedin 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:
getLastModifiedin classorg.apache.velocity.runtime.resource.loader.ResourceLoader- See Also:
ResourceLoader.getLastModified(org.apache.velocity.runtime.resource.Resource)
-
-