Google

Cocoon API: Class XSPProcessor

org.apache.cocoon.processor.xsp
Class XSPProcessor

java.lang.Object
  |
  +--org.apache.cocoon.framework.AbstractActor
        |
        +--org.apache.cocoon.processor.xsp.XSPProcessor
All Implemented Interfaces:
Actor, Cacheable, Changeable, Configurable, Processor, Status

public class XSPProcessor
extends AbstractActor
implements Processor, Configurable, Status, Cacheable

This class implements the XSP engine.

Version:
$Revision: 1.39 $ $Date: 2001/01/23 02:01:31 $
Author:
Ricardo Rocha

Inner Class Summary
 class XSPProcessor.PageEntry
           
 
Field Summary
protected  java.util.Hashtable byNamespace
           
static java.lang.String DEFAULT_LANGUAGE
           
protected  java.lang.String encoding
           
protected  Factory factory
           
protected  XSPGlobal global
           
protected  java.util.Hashtable languages
           
protected  Logger logger
           
static java.lang.String LOGICSHEET_PI
           
protected  Monitor monitor
           
protected  Parser parser
           
protected  java.io.File repositoryFile
           
protected  javax.servlet.ServletContext servletContext
           
protected  Store store
           
protected  Transformer transformer
           
 
Fields inherited from class org.apache.cocoon.framework.AbstractActor
director
 
Constructor Summary
XSPProcessor()
           
 
Method Summary
protected  XSPGlobal getGlobal()
           
protected  XSPProcessor.PageEntry getPageEntry(java.lang.Object context)
           
protected  javax.servlet.ServletContext getServletContext()
           
 java.lang.String getStatus()
          Returns information about the status of the implementing class.
protected  java.lang.String getStoreKey(java.lang.Object context)
           
 boolean hasChanged(java.lang.Object context)
          Returns false if the requested resource hasn't changed, true otherwise.
 void init(Configurations conf)
          Initialize the class by passing its configurations.
 void init(Director director)
          Initialize the actor by indicating their director.
 boolean isCacheable(javax.servlet.http.HttpServletRequest request)
          Returns whether this request is suitable for cacheing.
protected  XSPPage loadPage(XSPLanguageProcessor languageProcessor, XSPProcessor.PageEntry pageEntry, java.lang.String filename)
           
 org.w3c.dom.Document process(org.w3c.dom.Document document, java.util.Dictionary parameters)
          Process the DOM tree.
static java.lang.String version()
          Version of XSP spec in use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LANGUAGE

public static final java.lang.String DEFAULT_LANGUAGE

LOGICSHEET_PI

public static final java.lang.String LOGICSHEET_PI

factory

protected Factory factory

parser

protected Parser parser

transformer

protected Transformer transformer

languages

protected java.util.Hashtable languages

repositoryFile

protected java.io.File repositoryFile

encoding

protected java.lang.String encoding

store

protected Store store

monitor

protected Monitor monitor

byNamespace

protected java.util.Hashtable byNamespace

logger

protected Logger logger

global

protected XSPGlobal global

servletContext

protected javax.servlet.ServletContext servletContext
Constructor Detail

XSPProcessor

public XSPProcessor()
Method Detail

version

public static java.lang.String version()
Version of XSP spec in use.

init

public void init(Director director)
Description copied from interface: Actor
Initialize the actor by indicating their director.
Specified by:
init in interface Actor
Overrides:
init in class AbstractActor

init

public void init(Configurations conf)
Description copied from interface: Configurable
Initialize the class by passing its configurations.
Specified by:
init in interface Configurable

process

public org.w3c.dom.Document process(org.w3c.dom.Document document,
                                    java.util.Dictionary parameters)
                             throws java.lang.Exception
Description copied from interface: Processor
Process the DOM tree. The returned tree is allowed to be either a copy or the modified input tree.
Specified by:
process in interface Processor

loadPage

protected XSPPage loadPage(XSPLanguageProcessor languageProcessor,
                           XSPProcessor.PageEntry pageEntry,
                           java.lang.String filename)
                    throws java.lang.Exception

getServletContext

protected javax.servlet.ServletContext getServletContext()

getGlobal

protected XSPGlobal getGlobal()

getStoreKey

protected java.lang.String getStoreKey(java.lang.Object context)

getPageEntry

protected XSPProcessor.PageEntry getPageEntry(java.lang.Object context)

hasChanged

public boolean hasChanged(java.lang.Object context)
Description copied from interface: Changeable
Returns false if the requested resource hasn't changed, true otherwise. This method is called by the cache system to ensure the validity of the cached response. It is the producer responsibility to provide the fastest possible implementation of this method or, whether this is not possible and the costs of the change evaluation is comparable to the production costs, to return true directly with no further delay, thus reducing the evaluation overhead to a minimum. This method is guaranteed to be called after at least a single call to any production methods getStream or getDocument. The context is the trigger of the changeable point and may differ between implementations.
Specified by:
hasChanged in interface Changeable

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.