Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » sunshine » context » [javadoc | source]
org.apache.cocoon.sunshine.context
public final class: ResponseSessionContext [javadoc | source]
java.lang.Object
   org.apache.cocoon.sunshine.context.ResponseSessionContext

All Implemented Interfaces:
    SessionContext

A SessionContext which encapsulates the current Response object. The following XML for setXML and appendXML is allowed: /header/ - The content is the value of the header /cookie - The content is the cookie: gsdgsdg - name of the cookie gdgdgdgs - cookie value optional: true or false Using setXML uses setHeader() and appendXML uses addHeader. Despite this they both have the same effect.
    author: < - a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler
    version: CVS - $Id: ResponseSessionContext.java,v 1.2.2.1 2002/06/07 09:34:25 cziegeler Exp $
Method from org.apache.cocoon.sunshine.context.ResponseSessionContext Summary:
appendXML,   getAttribute,   getAttribute,   getName,   getNodeList,   getSingleNode,   getValueOfNode,   getXML,   loadXML,   removeXML,   saveXML,   setAttribute,   setNode,   setValueOfNode,   setXML,   setup,   setup,   streamXML
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.sunshine.context.ResponseSessionContext Detail:
 public  void appendXML(String path,
    DocumentFragment fragment) throws ProcessingException 
    Append a document fragment at the given path. The implementation of this method is context specific.
 public Object getAttribute(String key) throws ProcessingException 
    Get a context attribute.
 public Object getAttribute(String key,
    Object defaultObject) throws ProcessingException 
    Get a context attribute.
 public String getName() 
    Get the name of the context
 public NodeList getNodeList(String path) throws ProcessingException 
    Get a copy all the nodes specified by the path.
 public Node getSingleNode(String path) throws ProcessingException 
    Get a copy the first node specified by the path.
 public String getValueOfNode(String path) throws ProcessingException 
    Get the value of this node. This is similiar to the xsl:value-of function. If the node does not exist, null is returned.
 public DocumentFragment getXML(String path) throws ProcessingException 
    Get the XML from the response object
 public  void loadXML(String path,
    SourceParameters parameters,
    Map objectModel,
    SourceResolver resolver,
    ComponentManager manager) throws IOException, SAXException, ProcessingException 
    Try to load XML into the context. If the context does not provide the ability of loading, an exception is thrown.
 public  void removeXML(String path) throws ProcessingException 
 public  void saveXML(String path,
    SourceParameters parameters,
    Map objectModel,
    SourceResolver resolver,
    ComponentManager manager) throws IOException, SAXException, ProcessingException 
    Try to save XML from the context. If the context does not provide the ability of saving, an exception is thrown.
 public  void setAttribute(String key,
    Object value) throws ProcessingException 
    Set a context attribute.
 public  void setNode(String path,
    Node node) throws ProcessingException 
    Set the value of a node. The node is copied before insertion.
 public  void setValueOfNode(String path,
    String value) throws ProcessingException 
    Set the value of this node.
 public  void setXML(String path,
    DocumentFragment fragment) throws ProcessingException 
 public  void setup(Map objectModel) 
 public  void setup(String value,
    Resource load,
    Resource save) 
 public boolean streamXML(String path,
    ContentHandler contentHandler,
    LexicalHandler lexicalHandler) throws SAXException, ProcessingException 
    Stream the XML directly to the handler. This streams the contents of getXML() to the given handler without creating a DocumentFragment containing a copy of the data