org.apache.cocoon.generation
Class VelocityGenerator.TemplateLoader

java.lang.Object
  extended byorg.apache.velocity.runtime.resource.loader.ResourceLoader
      extended byorg.apache.cocoon.generation.VelocityGenerator.TemplateLoader
Enclosing class:
VelocityGenerator

public static class VelocityGenerator.TemplateLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader

Velocity ResourceLoader implementation to load template resources using Cocoon's SourceResolver. This class is created by the Velocity framework via the ResourceLoaderFactory.

See Also:
ResourceLoader

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, modificationCheckInterval, rsvc
 
Constructor Summary
VelocityGenerator.TemplateLoader()
           
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
           
 InputStream getResourceStream(String systemId)
           
 void init(org.apache.commons.collections.ExtendedProperties config)
          Initialize this resource loader.
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
           
 
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

VelocityGenerator.TemplateLoader

public VelocityGenerator.TemplateLoader()
Method Detail

init

public void init(org.apache.commons.collections.ExtendedProperties config)
Initialize this resource loader. The 'context' property is required and must be of type Context. The context is used to pass the Cocoon SourceResolver for the current pipeline.

Parameters:
config - the properties to configure this resource.
Throws:
IllegalArgumentException - thrown if the required 'context' property is not set.
ClassCastException - if the 'context' property is not of type Context.
See Also:
ResourceLoader.init(ExtendedProperties)

getResourceStream

public InputStream getResourceStream(String systemId)
                              throws org.apache.velocity.exception.ResourceNotFoundException
Parameters:
systemId - the path to the resource
Throws:
org.apache.velocity.exception.ResourceNotFoundException
See Also:
ResourceLoader.getResourceStream(String)

isSourceModified

public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
See Also:
ResourceLoader.isSourceModified(Resource)

getLastModified

public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
See Also:
ResourceLoader.getLastModified(Resource)


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.