org.apache.cocoon.template
Class JXTemplateGenerator

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.template.JXTemplateGenerator
All Implemented Interfaces:
org.apache.cocoon.caching.CacheableProcessingComponent, org.apache.cocoon.generation.Generator, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.xml.XMLProducer

public class JXTemplateGenerator
extends org.apache.cocoon.util.AbstractLogEnabled
implements org.apache.cocoon.generation.Generator, org.apache.cocoon.caching.CacheableProcessingComponent

Provides a generic page template with embedded JSTL and XPath expression substitution to access data sent by Cocoon Flowscripts.

Version:
$Id: JXTemplateGenerator.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static String CACHE_KEY
           
protected  org.apache.cocoon.xml.XMLConsumer consumer
           
protected  Map definitions
           
protected  org.apache.cocoon.xml.util.NamespacesTable namespaces
           
static String NS
          The namespace used by this generator
protected  org.apache.cocoon.el.objectmodel.ObjectModel objectModel
           
protected  Parameters parameters
           
protected  org.apache.cocoon.core.xml.SAXParser saxParser
           
protected  ScriptManager scriptManager
           
protected  String src
           
protected  StartDocument startDocument
           
static String VALIDITY
           
 
Fields inherited from interface org.apache.cocoon.generation.Generator
ROLE
 
Constructor Summary
JXTemplateGenerator()
           
 
Method Summary
 void generate()
           
 Serializable getKey()
           
 org.apache.cocoon.el.objectmodel.ObjectModel getObjectModel()
           
 org.apache.cocoon.core.xml.SAXParser getSaxParser()
           
 ScriptManager getScriptManager()
           
 SourceValidity getValidity()
           
 void performGeneration(Event startEvent, Event endEvent)
           
 void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
           
 void setObjectModel(org.apache.cocoon.el.objectmodel.ObjectModel objectModel)
           
 void setSaxParser(org.apache.cocoon.core.xml.SAXParser saxParser)
           
 void setScriptManager(ScriptManager scriptManager)
           
 void setup(org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String src, Parameters parameters)
           
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NS

public static final String NS
The namespace used by this generator

See Also:
Constant Field Values

CACHE_KEY

public static final String CACHE_KEY
See Also:
Constant Field Values

VALIDITY

public static final String VALIDITY
See Also:
Constant Field Values

objectModel

protected org.apache.cocoon.el.objectmodel.ObjectModel objectModel

namespaces

protected org.apache.cocoon.xml.util.NamespacesTable namespaces

scriptManager

protected ScriptManager scriptManager

startDocument

protected StartDocument startDocument

definitions

protected Map definitions

saxParser

protected org.apache.cocoon.core.xml.SAXParser saxParser

consumer

protected org.apache.cocoon.xml.XMLConsumer consumer

parameters

protected Parameters parameters

src

protected String src
Constructor Detail

JXTemplateGenerator

public JXTemplateGenerator()
Method Detail

getScriptManager

public ScriptManager getScriptManager()

setScriptManager

public void setScriptManager(ScriptManager scriptManager)

getSaxParser

public org.apache.cocoon.core.xml.SAXParser getSaxParser()

setSaxParser

public void setSaxParser(org.apache.cocoon.core.xml.SAXParser saxParser)

getObjectModel

public org.apache.cocoon.el.objectmodel.ObjectModel getObjectModel()

setObjectModel

public void setObjectModel(org.apache.cocoon.el.objectmodel.ObjectModel objectModel)

setConsumer

public void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
Specified by:
setConsumer in interface org.apache.cocoon.xml.XMLProducer

setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters parameters)
           throws org.apache.cocoon.ProcessingException,
                  SAXException,
                  IOException
Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException
See Also:
AbstractGenerator.setup(SourceResolver, Map, String, Parameters)

generate

public void generate()
              throws IOException,
                     SAXException,
                     org.apache.cocoon.ProcessingException
Specified by:
generate in interface org.apache.cocoon.generation.Generator
Throws:
IOException
SAXException
org.apache.cocoon.ProcessingException
See Also:
Generator.generate()

performGeneration

public void performGeneration(Event startEvent,
                              Event endEvent)
                       throws SAXException
Throws:
SAXException

getKey

public Serializable getKey()
Specified by:
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponent
See Also:
CacheableProcessingComponent.getKey()

getValidity

public SourceValidity getValidity()
Specified by:
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponent
See Also:
CacheableProcessingComponent.getValidity()


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.