org.apache.cocoon.generation
Class JellyGenerator

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.xml.AbstractXMLProducer
          extended byorg.apache.cocoon.generation.AbstractGenerator
              extended byorg.apache.cocoon.generation.JellyGenerator
All Implemented Interfaces:
Generator, LogEnabled, Poolable, Recyclable, SitemapModelComponent, XMLProducer

public class JellyGenerator
extends AbstractGenerator

The JellyGenerator executes jelly scripts using the Jakarta Jelly engine as a Cocoon Generator.

Author:
Amal Sirvisetti, Carsten Ziegeler

Field Summary
protected  org.apache.commons.jelly.JellyContext jellyContext
          The Jelly Context
protected  org.apache.commons.jelly.impl.XMLParser jellyParser
          The Jelly Parser
 
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.generation.Generator
ROLE
 
Constructor Summary
JellyGenerator()
           
 
Method Summary
 void generate()
          Generate XML data from Jelly script.
 void recycle()
          Recycle this component.
 void setup(SourceResolver resolver, Map objectModel, String src, Parameters params)
          Set the SourceResolver, object model Map, the source and sitemap Parameters used to process the request.
protected  void updateContext()
          Update JellyContext with variables from request
protected  void updateContext(Parameters params)
          Update JellyContext with variables from sitemap
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, 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
 

Field Detail

jellyContext

protected org.apache.commons.jelly.JellyContext jellyContext
The Jelly Context


jellyParser

protected org.apache.commons.jelly.impl.XMLParser jellyParser
The Jelly Parser

Constructor Detail

JellyGenerator

public JellyGenerator()
Method Detail

recycle

public void recycle()
Recycle this component. All instance variables are set to null.

Specified by:
recycle in interface Recyclable
Overrides:
recycle in class AbstractGenerator

setup

public void setup(SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters params)
           throws ProcessingException,
                  SAXException,
                  IOException
Description copied from class: AbstractGenerator
Set the SourceResolver, object model Map, the source and sitemap Parameters used to process the request.

Specified by:
setup in interface SitemapModelComponent
Overrides:
setup in class AbstractGenerator
Throws:
ProcessingException
SAXException
IOException
See Also:
SitemapModelComponent.setup(SourceResolver, Map, String, Parameters)

generate

public void generate()
              throws IOException,
                     SAXException,
                     ProcessingException
Generate XML data from Jelly script.

Throws:
IOException
SAXException
ProcessingException

updateContext

protected void updateContext(Parameters params)
                      throws ProcessingException
Update JellyContext with variables from sitemap

Throws:
ProcessingException

updateContext

protected void updateContext()
                      throws ProcessingException
Update JellyContext with variables from request

Throws:
ProcessingException


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