com.infodesire.infobit.render.velocity
Class AdvancedClasspathLoader

java.lang.Object
  |
  +--org.apache.velocity.runtime.resource.loader.ResourceLoader
        |
        +--com.infodesire.infobit.render.velocity.AdvancedClasspathLoader

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

advanced loader for classpath to overcome various velocity bottlenecks

Version:
$Revision: 1.1 $
Author:
konstantin

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, modificationCheckInterval, rsvc
 
Constructor Summary
AdvancedClasspathLoader()
           
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
          Defaults to return 0
static java.net.URL getResource(java.lang.String resourceName)
          Gets the Resource attribute of the AdvancedClasspathLoader class
 java.io.InputStream getResourceStream(java.lang.String name)
          Get an InputStream so that the Runtime can build a template with it.
 void init(org.apache.commons.collections.ExtendedProperties configuration)
          DOCUMENT METHOD
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
          Defaults to return false.
 
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

AdvancedClasspathLoader

public AdvancedClasspathLoader()
Method Detail

getResource

public static java.net.URL getResource(java.lang.String resourceName)
Gets the Resource attribute of the AdvancedClasspathLoader class

Parameters:
resourceName - Description of Parameter
Returns:
The Resource value

getResourceStream

public java.io.InputStream getResourceStream(java.lang.String name)
                                      throws org.apache.velocity.exception.ResourceNotFoundException
Get an InputStream so that the Runtime can build a template with it.

Specified by:
getResourceStream in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Parameters:
name - name of template to get
Returns:
InputStream containing the template
Throws:
org.apache.velocity.exception.ResourceNotFoundException - if template not found in classpath.

isSourceModified

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

Specified by:
isSourceModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Parameters:
resource - Description of Parameter
Returns:
The SourceModified value

getLastModified

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

Specified by:
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Parameters:
resource - Description of Parameter
Returns:
The LastModified value

init

public void init(org.apache.commons.collections.ExtendedProperties configuration)
DOCUMENT METHOD

Specified by:
init in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Parameters:
configuration - Description of Parameter


Copyright © 2003 Information Desire GmbH. All Rights Reserved.