Package org.xwiki.velocity
Class XWikiWebappResourceLoader
- java.lang.Object
-
- org.apache.velocity.runtime.resource.loader.ResourceLoader
-
- org.xwiki.velocity.XWikiWebappResourceLoader
-
public class XWikiWebappResourceLoader extends org.apache.velocity.runtime.resource.loader.ResourceLoader
Environment
basedResourceLoader
. Mostly used to load macros.vm templates from the WAR.- Since:
- 10.6RC1
- Version:
- $Id: c02c03a959cdb3be0c9abf857993f367a678d3ec $
-
-
Constructor Summary
Constructors Constructor Description XWikiWebappResourceLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Reader
getResourceReader(String source, String encoding)
void
init(org.apache.velocity.util.ExtProperties configuration)
boolean
isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
Checks to see if a resource has been deleted, moved or modified.
-
-
-
Method Detail
-
init
public void init(org.apache.velocity.util.ExtProperties configuration)
- Specified by:
init
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
-
getResourceReader
public Reader getResourceReader(String source, String encoding) throws org.apache.velocity.exception.ResourceNotFoundException
- Specified by:
getResourceReader
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
- Throws:
org.apache.velocity.exception.ResourceNotFoundException
-
isSourceModified
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
Checks to see if a resource has been deleted, moved or modified.- Specified by:
isSourceModified
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
- Parameters:
resource
- Resource The resource to check for modification- Returns:
- boolean True if the resource has been modified
-
getLastModified
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
- Specified by:
getLastModified
in classorg.apache.velocity.runtime.resource.loader.ResourceLoader
-
-