org.codehaus.plexus.velocity
Class SiteResourceLoader

java.lang.Object
  extended by org.apache.velocity.runtime.resource.loader.ResourceLoader
      extended by org.codehaus.plexus.velocity.SiteResourceLoader

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

Alloww you to dynamically add resources that you want to be processed by Velocity. For example if you want ot generate a site and pull in some random files to be interpolated by Velocity you can use this resource loader.

Author:
Jason van Zyl

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, modificationCheckInterval, rsvc
 
Constructor Summary
SiteResourceLoader()
           
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
           
 java.io.InputStream getResourceStream(java.lang.String name)
           
 void init(org.apache.commons.collections.ExtendedProperties p)
           
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
           
static void setResource(java.lang.String staticResource)
           
 
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
 

Constructor Detail

SiteResourceLoader

public SiteResourceLoader()
Method Detail

setResource

public static void setResource(java.lang.String staticResource)

init

public void init(org.apache.commons.collections.ExtendedProperties p)
Specified by:
init in class org.apache.velocity.runtime.resource.loader.ResourceLoader

getResourceStream

public java.io.InputStream getResourceStream(java.lang.String name)
                                      throws org.apache.velocity.exception.ResourceNotFoundException
Specified by:
getResourceStream 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)
Specified by:
isSourceModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader

getLastModified

public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Specified by:
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader


Copyright © 2001-2009 Codehaus. All Rights Reserved.