Class ButterflyResourceLoader

java.lang.Object
org.apache.velocity.runtime.resource.loader.ResourceLoader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
edu.mit.simile.butterfly.velocity.ButterflyResourceLoader

public class ButterflyResourceLoader extends org.apache.velocity.runtime.resource.loader.FileResourceLoader
This is a velocity resource loader that is aware of the hierarchy of modules and therefore is capable of dealing with concepts such as template overloading and inheritance based on the wiring of Butterfly modules.
  • Field Summary

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    commonInit​(org.apache.velocity.runtime.RuntimeServices rs, org.apache.commons.collections.ExtendedProperties configuration)
     
    long
    getLastModified​(org.apache.velocity.runtime.resource.Resource resource)
     
     
    boolean
    isSourceModified​(org.apache.velocity.runtime.resource.Resource resource)
     

    Methods inherited from class org.apache.velocity.runtime.resource.loader.FileResourceLoader

    init, resourceExists

    Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader

    getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ButterflyResourceLoader

      public ButterflyResourceLoader()
  • Method Details

    • commonInit

      public void commonInit​(org.apache.velocity.runtime.RuntimeServices rs, org.apache.commons.collections.ExtendedProperties configuration)
      Overrides:
      commonInit in class org.apache.velocity.runtime.resource.loader.ResourceLoader
    • getResourceStream

      public InputStream getResourceStream​(String name) throws org.apache.velocity.exception.ResourceNotFoundException
      Overrides:
      getResourceStream in class org.apache.velocity.runtime.resource.loader.FileResourceLoader
      Throws:
      org.apache.velocity.exception.ResourceNotFoundException
    • isSourceModified

      public boolean isSourceModified​(org.apache.velocity.runtime.resource.Resource resource)
      Overrides:
      isSourceModified in class org.apache.velocity.runtime.resource.loader.FileResourceLoader
    • getLastModified

      public long getLastModified​(org.apache.velocity.runtime.resource.Resource resource)
      Overrides:
      getLastModified in class org.apache.velocity.runtime.resource.loader.FileResourceLoader