Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.roller.presentation.velocity
Class WebappResourceLoader  view WebappResourceLoader download WebappResourceLoader.java

java.lang.Object
  extended byorg.apache.velocity.runtime.resource.loader.ResourceLoader
      extended byorg.roller.presentation.velocity.WebappResourceLoader

public class WebappResourceLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader

Tries to load Velocity resources from the Webapp. This class borrows heavily from org.apache.velocity.tools.view.servlet.WebappLoader http://cvs.apache.org/viewcvs/jakarta-velocity- tools/view/src/java/org/apache/velocity/tools/view/servlet/WebappLoader.java? rev=1.1.1.1&content-type=text/vnd.viewcvs-markup


Field Summary
private static javax.servlet.ServletContext mContext
           
private static org.apache.commons.logging.Log mLogger
           
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, modificationCheckInterval, rsvc
 
Constructor Summary
WebappResourceLoader()
           
 
Method Summary
private  javax.servlet.ServletContext getContext()
           
 long getLastModified(org.apache.velocity.runtime.resource.Resource arg0)
          Defaults to return 0.
 java.io.InputStream getResourceStream(java.lang.String name)
          Get the InputStream that the Runtime will parse to create a template.
 void init(org.apache.commons.collections.ExtendedProperties arg0)
          Initialize the template loader with a a resources class.
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource arg0)
          Defaults to return false.
static void setServletContext(javax.servlet.ServletContext context)
           
 
Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLogger

private static org.apache.commons.logging.Log mLogger

mContext

private static javax.servlet.ServletContext mContext
Constructor Detail

WebappResourceLoader

public WebappResourceLoader()
Method Detail

init

public void init(org.apache.commons.collections.ExtendedProperties arg0)
Description copied from class: org.apache.velocity.runtime.resource.loader.ResourceLoader
Initialize the template loader with a a resources class.


getContext

private javax.servlet.ServletContext getContext()

setServletContext

public static void setServletContext(javax.servlet.ServletContext context)

getResourceStream

public java.io.InputStream getResourceStream(java.lang.String name)
                                      throws org.apache.velocity.exception.ResourceNotFoundException
Description copied from class: org.apache.velocity.runtime.resource.loader.ResourceLoader
Get the InputStream that the Runtime will parse to create a template.


isSourceModified

public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource arg0)
Defaults to return false.


getLastModified

public long getLastModified(org.apache.velocity.runtime.resource.Resource arg0)
Defaults to return 0.