| java.lang.Object org.apache.cocoon.webapps.portal.context.SessionContextImpl
SessionContextImpl | final public class SessionContextImpl implements SessionContext(Code) | | The portal context
This context allows access to various parts of a portal profile.
The context provides reading of the following xml, if the current
resource is running inside a portal module:
<layout>
<portal>
...
</portal>
<coplets>
...
</coplets>
</layout>
<configuration>
...
</configuration>
author: Carsten Ziegeler version: CVS $Id: SessionContextImpl.java 433543 2006-08-22 06:22:54Z crossley $ |
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 Request | getRequest() | 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 load, String save) | public synchronized boolean | streamXML(String path, ContentHandler contentHandler, LexicalHandler lexicalHandler) Stream the XML directly to the handler. |
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.
|
|
|