|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.xml.AbstractXMLProducer | +--org.apache.cocoon.generation.AbstractGenerator | +--org.apache.cocoon.generation.ComposerGenerator | +--org.apache.cocoon.generation.VelocityGenerator
Cocoon Generator
that produces dynamic XML SAX events
from a Velocity template file.
Attributes:
Child Elements:
Default Java objects exported to the Velocity context:
Additional Java objects can be exported from the Cocoon object map to the Velocity context by adding one or more <export-object key="objectMapKey" name="velocityContextName"/> child elements to the generator configuration in the sitemap.
Nested Class Summary | |
static class |
VelocityGenerator.TemplateLoader
Velocity ResourceLoader
implementation to load template resources using Cocoon's
SourceResolver . |
Field Summary |
Fields inherited from class org.apache.cocoon.generation.ComposerGenerator |
manager |
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator |
objectModel, parameters, resolver, source |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.velocity.runtime.log.LogSystem |
DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID |
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Constructor Summary | |
VelocityGenerator()
|
Method Summary | |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Read any additional objects to export to the Velocity context from the configuration. |
void |
generate()
Generate XML data using Velocity template. |
void |
init(org.apache.velocity.runtime.RuntimeServices rs)
This implementation does nothing. |
void |
initialize()
|
void |
logVelocityMessage(int level,
java.lang.String message)
Pass along Velocity log messages to our configured logger. |
void |
recycle()
Free up the VelocityContext associated with the pipeline, and release any Source objects resolved by the resource loader. |
void |
setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters params)
Set the SourceResolver , object model Map ,
the source and sitemap Parameters used to process the request. |
Methods inherited from class org.apache.cocoon.generation.ComposerGenerator |
compose, dispose |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
setConsumer, setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
Constructor Detail |
public VelocityGenerator()
Method Detail |
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configuration
- the class configurations.
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
Initializable.initialize()
public void setup(SourceResolver resolver, java.util.Map objectModel, java.lang.String src, org.apache.avalon.framework.parameters.Parameters params) throws ProcessingException, org.xml.sax.SAXException, java.io.IOException
AbstractGenerator
SourceResolver
, object model Map
,
the source and sitemap Parameters
used to process the request.
setup
in interface SitemapModelComponent
setup
in class AbstractGenerator
ProcessingException
org.xml.sax.SAXException
java.io.IOException
SitemapModelComponent.setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
public void recycle()
recycle
in interface org.apache.avalon.excalibur.pool.Recyclable
recycle
in class AbstractGenerator
Recyclable.recycle()
public void generate() throws java.io.IOException, org.xml.sax.SAXException, ProcessingException
generate
in interface Generator
java.io.IOException
org.xml.sax.SAXException
ProcessingException
Generator.generate()
public void init(org.apache.velocity.runtime.RuntimeServices rs) throws java.lang.Exception
init
in interface org.apache.velocity.runtime.log.LogSystem
java.lang.Exception
LogSystem.init(org.apache.velocity.runtime.RuntimeServices)
public void logVelocityMessage(int level, java.lang.String message)
logVelocityMessage
in interface org.apache.velocity.runtime.log.LogSystem
LogSystem.logVelocityMessage(int, java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |