Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » generation » [javadoc | source]
org.apache.cocoon.generation
public class: ServerPagesGenerator [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLProducer
         org.apache.cocoon.generation.AbstractGenerator
            org.apache.cocoon.generation.ComposerGenerator
               org.apache.cocoon.generation.ServletGenerator
                  org.apache.cocoon.generation.ServerPagesGenerator

All Implemented Interfaces:
    CacheableProcessingComponent, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.component.Composable, Generator, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer

This class acts as a proxy to a dynamically loadedGenerator delegating actual SAX event generation.

It has a single configuration item : <autocomplete-documents>true|false<autocomplete-documents> (default is false).

This tells the generator to automatically close all elements that weren't properly closed by the XSP, such as when a return statement is used to prematurely end processing. Activating this feature sensibly increases CPU-usage and should therefore be used only if really needed (it's better to have clean XSP pages that don't break abruptly generation flow).

Nested Class Summary:
public class  ServerPagesGenerator.CompletionPipe   
Field Summary
protected  ProgramGenerator programGenerator    The sitemap-defined server pages program generator 
protected  AbstractServerPage generator     
protected  String markupLanguage    The loaded generator's MarkupLanguage 
protected  String programmingLanguage    The loaded generator's ProgrammingLanguage 
public static final  String DEFAULT_MARKUP_LANGUAGE    The default MarkupLanguage 
public static final  String DEFAULT_PROGRAMMING_LANGUAGE    The default ProgrammingLanguage 
Fields inherited from org.apache.cocoon.generation.ServletGenerator:
request,  response,  context
Fields inherited from org.apache.cocoon.generation.ComposerGenerator:
manager
Fields inherited from org.apache.cocoon.generation.AbstractGenerator:
resolver,  objectModel,  parameters,  source
Fields inherited from org.apache.cocoon.xml.AbstractXMLProducer:
EMPTY_CONTENT_HANDLER,  xmlConsumer,  contentHandler,  lexicalHandler
Method from org.apache.cocoon.generation.ServerPagesGenerator Summary:
compose,   configure,   dispose,   generate,   getKey,   getValidity,   recycle,   setup
Methods from org.apache.cocoon.generation.ServletGenerator:
recycle,   setup
Methods from org.apache.cocoon.generation.ComposerGenerator:
compose,   dispose
Methods from org.apache.cocoon.generation.AbstractGenerator:
recycle,   setup
Methods from org.apache.cocoon.xml.AbstractXMLProducer:
recycle,   setConsumer,   setContentHandler,   setLexicalHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.generation.ServerPagesGenerator Detail:
 public  void compose(ComponentManager manager) throws ComponentException 
    Set the global component manager. This method sets the sitemap-defined program generator
 public  void configure(Configuration config) throws ConfigurationException 
 public  void dispose() 
    dispose
 public  void generate() throws IOException, SAXException, ProcessingException 
    Generate XML data. This method loads a server pages generator associated with its (file) input source and delegates SAX event generator to it taking care of "closing" any event left open by the loaded generator as a result of its possible "premature" return (a common situation in server pages)
 public Serializable getKey() 
    Generate the unique key. This key must be unique inside the space of this component. This method must be invoked before the generateValidity() method.
 public SourceValidity getValidity() 
    Generate the validity object. Before this method can be invoked the generateKey() method must be invoked.
 public  void recycle() 
    Recycle the generator by removing references
 public  void setup(SourceResolver resolver,
    Map objectModel,
    String src,
    Parameters par) throws IOException, SAXException, ProcessingException