org.apache.cocoon
Class Cocoon

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.Cocoon
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.logger.LogKitManageable, Modifiable, Processor, org.apache.avalon.framework.thread.ThreadSafe

public class Cocoon
extends org.apache.avalon.framework.logger.AbstractLoggable
implements org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable, Modifiable, Processor, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.component.Composable, org.apache.avalon.excalibur.logger.LogKitManageable

The Cocoon Object is the main Kernel for the entire Cocoon system.

Version:
CVS $Revision: 1.9.2.22 $ $Date: 2001/10/11 08:56:04 $
Author:
Pierpaolo Fumagalli (Apache Software Foundation, Exoffice Technologies), Stefano Mazzocchi, Leo Sutic

Field Summary
 org.apache.avalon.excalibur.component.ExcaliburComponentManager componentManager
          The component manager.
 org.apache.avalon.framework.component.ComponentManager parentComponentManager
          The parent component manager.
 
Fields inherited from interface org.apache.cocoon.Processor
ROLE
 
Constructor Summary
Cocoon()
          Create a new Cocoon instance.
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Get the parent component manager.
 org.apache.avalon.framework.configuration.Configuration configure(org.apache.avalon.excalibur.component.ExcaliburComponentManager startupManager)
          Configure this Cocoon instance.
 void contextualize(org.apache.avalon.framework.context.Context context)
           
protected  void debug(Environment environment, StreamPipeline pipeline, EventPipeline eventPipeline)
          Log debug information about the current environment
 void dispose()
           
 void generateSitemap(Environment environment)
          Process the given Environment to generate the sitemap.
 void generateXSP(java.lang.String fileName, Environment environment)
          Process the given Environment to generate Java code for specified XSP files.
 void initialize()
           
 boolean modifiedSince(long date)
          Queries the class to estimate its ergodic period termination.
 boolean process(Environment environment)
          Process the given Environment to produce the output.
 boolean process(Environment environment, StreamPipeline pipeline, EventPipeline eventPipeline)
          Process the given Environment to assemble a StreamPipeline and an EventPipeline.
 void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logKitManager)
           
protected  void setSystemProperties()
          Sets required system properties .
 
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
 

Field Detail

componentManager

public org.apache.avalon.excalibur.component.ExcaliburComponentManager componentManager
The component manager.

parentComponentManager

public org.apache.avalon.framework.component.ComponentManager parentComponentManager
The parent component manager.
Constructor Detail

Cocoon

public Cocoon()
       throws org.apache.avalon.framework.configuration.ConfigurationException
Create a new Cocoon instance.
Method Detail

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
Get the parent component manager. For purposes of avoiding extra method calls, the manager parameter may be null.
Specified by:
compose in interface org.apache.avalon.framework.component.Composable
Parameters:
manager - the parent component manager. May be null

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable

setLogKitManager

public void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logKitManager)
Specified by:
setLogKitManager in interface org.apache.avalon.excalibur.logger.LogKitManageable

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable

configure

public org.apache.avalon.framework.configuration.Configuration configure(org.apache.avalon.excalibur.component.ExcaliburComponentManager startupManager)
                                                                  throws org.apache.avalon.framework.configuration.ConfigurationException,
                                                                         org.apache.avalon.framework.context.ContextException
Configure this Cocoon instance.

modifiedSince

public boolean modifiedSince(long date)
Queries the class to estimate its ergodic period termination.
Specified by:
modifiedSince in interface Modifiable
Following copied from interface: org.apache.cocoon.Modifiable
Returns:
true if the class ergodic period is over and the class would behave differently if processed again, false if the resource is still ergodic so that it doesn't require reprocessing.

setSystemProperties

protected void setSystemProperties()
Sets required system properties .

dispose

public void dispose()
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable

debug

protected void debug(Environment environment,
                     StreamPipeline pipeline,
                     EventPipeline eventPipeline)
Log debug information about the current environment

process

public boolean process(Environment environment)
                throws java.lang.Exception
Process the given Environment to produce the output.
Specified by:
process in interface Processor
Following copied from interface: org.apache.cocoon.Processor
Returns:
If the processing is successfull true is returned. If not match is found in the sitemap false is returned.
Throws:
ResourceNotFoundException - If a sitemap component tries to access a resource which can not be found, e.g. the generator ConnectionResetException If the connection was reset

process

public boolean process(Environment environment,
                       StreamPipeline pipeline,
                       EventPipeline eventPipeline)
                throws java.lang.Exception
Process the given Environment to assemble a StreamPipeline and an EventPipeline.
Specified by:
process in interface Processor

generateSitemap

public void generateSitemap(Environment environment)
                     throws java.lang.Exception
Process the given Environment to generate the sitemap.

generateXSP

public void generateXSP(java.lang.String fileName,
                        Environment environment)
                 throws java.lang.Exception
Process the given Environment to generate Java code for specified XSP files.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.