Class XWikiWebappResourceLoader


  • public class XWikiWebappResourceLoader
    extends org.apache.velocity.runtime.resource.loader.ResourceLoader
    Environment based ResourceLoader. Mostly used to load macros.vm templates from the WAR.
    Since:
    10.6RC1
    Version:
    $Id: c02c03a959cdb3be0c9abf857993f367a678d3ec $
    • Field Summary

      • Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader

        className, isCachingOn, log, modificationCheckInterval, rsvc
    • Constructor Detail

      • XWikiWebappResourceLoader

        public XWikiWebappResourceLoader()
    • Method Detail

      • init

        public void init​(org.apache.velocity.util.ExtProperties configuration)
        Specified by:
        init in class org.apache.velocity.runtime.resource.loader.ResourceLoader
      • getResourceReader

        public Reader getResourceReader​(String source,
                                        String encoding)
                                 throws org.apache.velocity.exception.ResourceNotFoundException
        Specified by:
        getResourceReader in class org.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 class org.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 class org.apache.velocity.runtime.resource.loader.ResourceLoader