Google

Cocoon API: Interface Producer

org.apache.cocoon.producer
Interface Producer

All Superinterfaces:
Actor, Changeable
All Known Implementing Classes:
AbstractProducer

public interface Producer
extends Actor, Changeable

This interface must be implemented by the classes that produce documents encapsulating resources. These resource wrappers provide a way to call, execute or otherwise access the data contained or generated by these resources and transform it into data models that can be used by the publishing framework for futher processing.

Version:
$Revision: 1.4 $ $Date: 2000/02/13 18:29:41 $
Author:
Stefano Mazzocchi

Method Summary
 org.w3c.dom.Document getDocument(javax.servlet.http.HttpServletRequest request)
          This method is responsible to generate a DOM tree that contains the generated data.
 java.lang.String getPath(javax.servlet.http.HttpServletRequest request)
          Returns the path where the resource is found, or an empty string if no path can be applied to the resource.
 java.io.Reader getStream(javax.servlet.http.HttpServletRequest request)
          This method is responsible to provide an input stream to read the data generated or contained by the resource mapped by this document producer.
 
Methods inherited from interface org.apache.cocoon.framework.Actor
init
 
Methods inherited from interface org.apache.cocoon.framework.Changeable
hasChanged
 

Method Detail

getStream

public java.io.Reader getStream(javax.servlet.http.HttpServletRequest request)
                         throws java.lang.Exception
This method is responsible to provide an input stream to read the data generated or contained by the resource mapped by this document producer. This stream is not guaranteed to be buffered.

getDocument

public org.w3c.dom.Document getDocument(javax.servlet.http.HttpServletRequest request)
                                 throws java.lang.Exception
This method is responsible to generate a DOM tree that contains the generated data.

getPath

public java.lang.String getPath(javax.servlet.http.HttpServletRequest request)
Returns the path where the resource is found, or an empty string if no path can be applied to the resource. Warning, null values are not valid.


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