org.apache.cocoon.producer
Class ProducerFromFile
java.lang.Object
|
+--org.apache.cocoon.framework.AbstractActor
|
+--org.apache.cocoon.producer.AbstractProducer
|
+--org.apache.cocoon.producer.ProducerFromFile
- All Implemented Interfaces:
- Actor, Cacheable, Changeable, Defaults, Producer, Status
- public class ProducerFromFile
- extends AbstractProducer
- implements Status, Cacheable
This class implements the producer interface in order to produce a document
based on its tranlated path.
- Version:
- $Revision: 1.10 $ $Date: 2000/11/20 01:43:59 $
- Author:
- Stefano Mazzocchi
Fields inherited from interface org.apache.cocoon.Defaults |
BROWSERS_PROP, CACHE_DEFAULT, CACHE_PROP, COCOON_FORMAT_PI, COCOON_PROCESS_PI, DEFAULT_BROWSER, DISABLE_CACHING_PI, ERROR_INTERNALLY, FORMATTER_PROP, HOME, INIT_ARG, INTERPRETER_PROP, LOG, LOG_LEVEL, LOOPS, NAME, OUTPUTTING, PARSER_DEFAULT, PARSER_PROP, PROCESSOR_PROP, PRODUCER_PROP, PROFILER_DEFAULT, PROFILER_PROP, PROPERTIES, SHOW_STATUS, STATUS_URL, STATUS_URL_DEFAULT, STORE_DEFAULT, STORE_PROP, STYLESHEET_PI, TRANSFORMER_DEFAULT, TRANSFORMER_PROP, VERSION, WHOLE_REQUEST, YEAR |
Method Summary |
org.w3c.dom.Document |
getDocument(javax.servlet.http.HttpServletRequest request)
This method is the only one called by the Cocoon engine. |
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.lang.String |
getStatus()
Returns information about the status of the implementing class. |
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. |
boolean |
hasChanged(java.lang.Object context)
This method always returns true to reduce the evaluation overhead to
a minimum. |
boolean |
isCacheable(javax.servlet.http.HttpServletRequest request)
Returns whether this request is suitable for cacheing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProducerFromFile
public ProducerFromFile()
getDocument
public org.w3c.dom.Document getDocument(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
- Description copied from class:
AbstractProducer
- This method is the only one called by the Cocoon engine. Producers
are allowed to create streams and this class "mediates"
translating these streams into DOM trees. For producers willing
to generate DOM trees automatically, they should override this method
and may well ignore to implement the getStream() method since it's
never called directly by Cocoon.
- Overrides:
getDocument
in class AbstractProducer
getStream
public java.io.Reader getStream(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
- Description copied from interface:
Producer
- 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.
getPath
public java.lang.String getPath(javax.servlet.http.HttpServletRequest request)
- Description copied from interface:
Producer
- 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.
hasChanged
public boolean hasChanged(java.lang.Object context)
- Description copied from class:
AbstractProducer
- This method always returns true to reduce the evaluation overhead to
a minimum. Producer are highly encouradged to overwrite this method
if they can provide a fast way to evaluate the response change.
- Overrides:
hasChanged
in class AbstractProducer
isCacheable
public boolean isCacheable(javax.servlet.http.HttpServletRequest request)
- Description copied from interface:
Cacheable
- Returns whether this request is suitable for cacheing.
- Specified by:
isCacheable
in interface Cacheable
getStatus
public java.lang.String getStatus()
- Description copied from interface:
Status
- Returns information about the status of the implementing class.
Note: this is use instead of the usual
toString()
method because some of these methods are declared final in some
classes in JDK 1.1.
- Specified by:
getStatus
in interface Status
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.