org.apache.cocoon.components.language.markup.xsp
Class JSGenerator

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.ServletGenerator
                  extended byorg.apache.cocoon.generation.AbstractServerPage
                      extended byorg.apache.cocoon.components.language.markup.xsp.XSPGenerator
                          extended byorg.apache.cocoon.components.language.markup.xsp.JSGenerator
All Implemented Interfaces:
CacheableProcessingComponent, CompiledComponent, Configurable, Contextualizable, Disposable, Generator, Initializable, LogEnabled, Modifiable, Poolable, Recyclable, Serviceable, SitemapModelComponent, XMLProducer

public class JSGenerator
extends XSPGenerator
implements Configurable, Initializable

Class representing interpreted XSP-generated ServerPagesGenerator programs written in Javascript language

Version:
CVS $Id: JSGenerator.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
Vadim Gritsenko

Field Summary
 
Fields inherited from class org.apache.cocoon.components.language.markup.xsp.XSPGenerator
avalonContext
 
Fields inherited from class org.apache.cocoon.generation.AbstractServerPage
dateCreated, dependencies
 
Fields inherited from class org.apache.cocoon.generation.ServletGenerator
context, manager, request, response
 
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
JSGenerator()
           
 
Method Summary
 void addDateHeader(String name, Date date)
           
 void addDateHeader(String name, long date)
           
 void addDateHeader(String name, String date)
           
 void addDateHeader(String name, String date, DateFormat format)
           
 void addDateHeader(String name, String date, String format)
           
 void configure(Configuration configuration)
           
 void dispose()
           
 void generate()
          Generate the XML and stream it into the pipeline
 String[] getAttributeNames()
           
 void getAttributeNames(ContentHandler contentHandler)
           
 Date getDateHeader(String name)
           
 String getDateHeader(String name, String format)
           
 String[] getHeaderNames()
           
 void getHeaderNamesAsXML()
           
 String[] getHeaders(String name)
           
 void getHeadersAsXML(String name)
           
 void getLocale()
           
 Locale[] getLocalesAsArray()
           
 void getLocalesAsXML()
           
 String getParameter(String name, String defaultValue)
           
 String getParameter(String name, String defaultValue, String form_encoding, String container_encoding)
           
 void getParameterAsXML(String name, String defaultValue, String form_encoding, String container_encoding)
           
 String[] getParameterNames()
           
 void getParameterNamesAsXML()
           
 String[] getParameterValues(String name, String form_encoding, String container_encoding)
           
 void getParameterValuesAsXML(String name, String form_encoding, String container_encoding)
           
 String getRequestedURL()
           
 Object getSessionAttribute(Session session, String name, Object defaultValue)
           
 String[] getSessionAttributeNames(Session session)
           
 void initialize()
           
 boolean modifiedSince(long date)
          Determines whether this generator's source files have changed
 void recycle()
          Recycle the generator by removing references
 void responseGetLocale()
           
 void setDateHeader(String name, Date date)
           
 void setDateHeader(String name, long date)
           
 void setDateHeader(String name, String date)
           
 void setDateHeader(String name, String date, DateFormat format)
           
 void setDateHeader(String name, String date, String format)
           
 void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
          Set the SourceResolver, object model Map, the source and sitemap Parameters used to process the request.
 
Methods inherited from class org.apache.cocoon.components.language.markup.xsp.XSPGenerator
contextualize, xspCharacters, xspComment, xspExpr
 
Methods inherited from class org.apache.cocoon.generation.AbstractServerPage
attribute, characters, comment, end, getKey, getValidity, hasContentChanged, start
 
Methods inherited from class org.apache.cocoon.generation.ServletGenerator
service
 
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
 

Constructor Detail

JSGenerator

public JSGenerator()
Method Detail

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException

modifiedSince

public boolean modifiedSince(long date)
Determines whether this generator's source files have changed

Specified by:
modifiedSince in interface Modifiable
Overrides:
modifiedSince in class AbstractServerPage
Returns:
Whether any of the files this generator depends on has changed since it was created

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception

setup

public void setup(SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters par)
           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 ServletGenerator
Throws:
ProcessingException
SAXException
IOException

generate

public void generate()
              throws IOException,
                     ProcessingException
Description copied from interface: Generator
Generate the XML and stream it into the pipeline

Specified by:
generate in interface Generator
Throws:
IOException
ProcessingException

recycle

public void recycle()
Description copied from class: AbstractGenerator
Recycle the generator by removing references

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

dispose

public void dispose()
Specified by:
dispose in interface Disposable
Overrides:
dispose in class ServletGenerator

getLocale

public void getLocale()
               throws SAXException
Throws:
SAXException

getLocalesAsArray

public Locale[] getLocalesAsArray()

getLocalesAsXML

public void getLocalesAsXML()
                     throws SAXException
Throws:
SAXException

getParameter

public String getParameter(String name,
                           String defaultValue)

getParameter

public String getParameter(String name,
                           String defaultValue,
                           String form_encoding,
                           String container_encoding)

getParameterAsXML

public void getParameterAsXML(String name,
                              String defaultValue,
                              String form_encoding,
                              String container_encoding)
                       throws SAXException
Throws:
SAXException

getParameterValuesAsXML

public void getParameterValuesAsXML(String name,
                                    String form_encoding,
                                    String container_encoding)
                             throws SAXException
Throws:
SAXException

getParameterValues

public String[] getParameterValues(String name,
                                   String form_encoding,
                                   String container_encoding)

getParameterNames

public String[] getParameterNames()

getParameterNamesAsXML

public void getParameterNamesAsXML()
                            throws SAXException
Throws:
SAXException

getHeaderNamesAsXML

public void getHeaderNamesAsXML()
                         throws SAXException
Throws:
SAXException

getHeaderNames

public String[] getHeaderNames()

getHeaders

public String[] getHeaders(String name)

getHeadersAsXML

public void getHeadersAsXML(String name)
                     throws SAXException
Throws:
SAXException

getDateHeader

public Date getDateHeader(String name)

getDateHeader

public String getDateHeader(String name,
                            String format)

getAttributeNames

public void getAttributeNames(ContentHandler contentHandler)
                       throws SAXException
Throws:
SAXException

getAttributeNames

public String[] getAttributeNames()

getRequestedURL

public String getRequestedURL()

responseGetLocale

public void responseGetLocale()
                       throws SAXException
Throws:
SAXException

addDateHeader

public void addDateHeader(String name,
                          long date)

addDateHeader

public void addDateHeader(String name,
                          Date date)

addDateHeader

public void addDateHeader(String name,
                          String date)
                   throws ParseException
Throws:
ParseException

addDateHeader

public void addDateHeader(String name,
                          String date,
                          String format)
                   throws ParseException
Throws:
ParseException

addDateHeader

public void addDateHeader(String name,
                          String date,
                          DateFormat format)
                   throws ParseException
Throws:
ParseException

setDateHeader

public void setDateHeader(String name,
                          long date)

setDateHeader

public void setDateHeader(String name,
                          Date date)

setDateHeader

public void setDateHeader(String name,
                          String date)
                   throws ParseException
Throws:
ParseException

setDateHeader

public void setDateHeader(String name,
                          String date,
                          String format)
                   throws ParseException
Throws:
ParseException

setDateHeader

public void setDateHeader(String name,
                          String date,
                          DateFormat format)
                   throws ParseException
Throws:
ParseException

getSessionAttribute

public Object getSessionAttribute(Session session,
                                  String name,
                                  Object defaultValue)

getSessionAttributeNames

public String[] getSessionAttributeNames(Session session)


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