org.apache.cocoon.generation
Class VelocityGenerator.TemplateLoader
java.lang.Object
|
+--org.apache.velocity.runtime.resource.loader.ResourceLoader
|
+--org.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
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
className, isCachingOn, modificationCheckInterval, rsvc |
Method Summary |
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource)
|
java.io.InputStream |
getResourceStream(java.lang.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 |
VelocityGenerator.TemplateLoader
public VelocityGenerator.TemplateLoader()
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.
- Overrides:
init
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
- Parameters:
config
- the properties to configure this resource.- Throws:
java.lang.IllegalArgumentException
- thrown if the required
'context' property is not set.java.lang.ClassCastException
- if the 'context' property is not
of type Context
.- See Also:
ResourceLoader.init(org.apache.commons.collections.ExtendedProperties)
getResourceStream
public java.io.InputStream getResourceStream(java.lang.String systemId)
throws org.apache.velocity.exception.ResourceNotFoundException
- Overrides:
getResourceStream
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
- Parameters:
systemId
- the path to the resource- See Also:
ResourceLoader.getResourceStream(java.lang.String)
isSourceModified
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
- Overrides:
isSourceModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
- See Also:
ResourceLoader.isSourceModified(org.apache.velocity.runtime.resource.Resource)
getLastModified
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
- Overrides:
getLastModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
- See Also:
ResourceLoader.getLastModified(org.apache.velocity.runtime.resource.Resource)
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.