| java.lang.Object org.apache.cocoon.webapps.session.context.SimpleSessionContext
SimpleSessionContext | final public class SimpleSessionContext implements SessionContext(Code) | | This is a simple implementation of the session context.
author: Carsten Ziegeler version: CVS $Id: SimpleSessionContext.java 485224 2006-12-10 17:24:05Z cziegeler $ |
Constructor Summary | |
public | SimpleSessionContext(XPathProcessor xPathProcessor, SourceResolver resolver) |
Method Summary | |
public synchronized void | appendXML(String path, DocumentFragment fragment) Append a document fragment at the given path. | public synchronized Object | getAttribute(String key) Get a context attribute. | public synchronized Object | getAttribute(String key, Object defaultObject) Get a context attribute. | public String | getName() | public synchronized NodeList | getNodeList(String path) Get a copy all the nodes specified by the path. | public synchronized Node | getSingleNode(String path) Get a copy the first node specified by the path. | public synchronized String | getValueOfNode(String path) Get the value of this node. | public synchronized DocumentFragment | getXML(String path) | public void | loadXML(String path, SourceParameters parameters) Try to load XML into the context. | public synchronized void | removeXML(String path) | public void | saveXML(String path, SourceParameters parameters) Try to save XML from the context. | public synchronized void | setAttribute(String key, Object value) Set a context attribute. | public synchronized void | setNode(String path, Node node) Set the value of a node. | public synchronized void | setValueOfNode(String path, String value) Set the value of a node. | public synchronized void | setXML(String path, DocumentFragment fragment) | public void | setup(String value, String loadResource, String saveResource) | public synchronized boolean | streamXML(String path, ContentHandler contentHandler, LexicalHandler lexicalHandler) Stream the XML directly to the handler. |
SimpleSessionContext | public SimpleSessionContext(XPathProcessor xPathProcessor, SourceResolver resolver) throws ProcessingException(Code) | | Constructor
|
appendXML | public synchronized void appendXML(String path, DocumentFragment fragment) throws ProcessingException(Code) | | Append a document fragment at the given path. The implementation of this
method is context specific.
Usually the children of the fragment are appended as new children of the
node specified by the path.
If the path is not existent it is created.
|
getAttribute | public synchronized Object getAttribute(String key)(Code) | | Get a context attribute. If the attribute is not available return null
|
getAttribute | public synchronized Object getAttribute(String key, Object defaultObject)(Code) | | Get a context attribute. If the attribute is not available the defaultObject is returned
|
getName | public String getName()(Code) | | Get the name of the context
|
getValueOfNode | public synchronized String getValueOfNode(String path) throws ProcessingException(Code) | | Get the value of this node. This is similiar to the xsl:value-of
function. If the node does not exist, null is returned.
|
setAttribute | public synchronized void setAttribute(String key, Object value)(Code) | | Set a context attribute. If value is null the attribute is removed.
|
|
|