|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.webapps.portal.context.SessionContextImpl
public final class SessionContextImpl
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>
Field Summary | |
---|---|
static ThreadLocal |
copletInfo
|
Constructor Summary | |
---|---|
SessionContextImpl(String name,
Map objectModel,
PortalManager portal,
XPathProcessor xpathProcessor)
|
Method Summary | |
---|---|
void |
appendXML(String path,
DocumentFragment fragment)
Append a document fragment at the given path. |
Object |
getAttribute(String key)
Get a context attribute. |
Object |
getAttribute(String key,
Object defaultObject)
Get a context attribute. |
String |
getName()
Get the name of the context |
NodeList |
getNodeList(String path)
Get a copy all the nodes specified by the path. |
Request |
getRequest()
|
Node |
getSingleNode(String path)
Get a copy the first node specified by the path. |
String |
getValueOfNode(String path)
Get the value of this node. |
DocumentFragment |
getXML(String path)
Get the xml fragment |
void |
loadXML(String path,
SourceParameters parameters)
Try to load XML into the context. |
void |
removeXML(String path)
Remove nodes |
void |
saveXML(String path,
SourceParameters parameters)
Try to save XML from the context. |
void |
setAttribute(String key,
Object value)
Set a context attribute. |
void |
setNode(String path,
Node node)
Set the value of a node. |
void |
setup(String value,
String load,
String save)
Set the name of the context. |
void |
setValueOfNode(String path,
String value)
Set the value of a node. |
void |
setXML(String path,
DocumentFragment fragment)
Set the xml |
boolean |
streamXML(String path,
ContentHandler contentHandler,
LexicalHandler lexicalHandler)
Stream the XML directly to the handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static ThreadLocal copletInfo
Constructor Detail |
---|
public SessionContextImpl(String name, Map objectModel, PortalManager portal, XPathProcessor xpathProcessor) throws IOException, SAXException, ProcessingException
IOException
SAXException
ProcessingException
Method Detail |
---|
public String getName()
getName
in interface SessionContext
public Request getRequest()
public void setup(String value, String load, String save)
SessionContext
setup
in interface SessionContext
public DocumentFragment getXML(String path) throws ProcessingException
getXML
in interface SessionContext
ProcessingException
public void setXML(String path, DocumentFragment fragment) throws ProcessingException
setXML
in interface SessionContext
ProcessingException
public void appendXML(String path, DocumentFragment fragment) throws ProcessingException
appendXML
in interface SessionContext
ProcessingException
public void removeXML(String path) throws ProcessingException
removeXML
in interface SessionContext
ProcessingException
public Node getSingleNode(String path) throws ProcessingException
getSingleNode
in interface SessionContext
ProcessingException
public NodeList getNodeList(String path) throws ProcessingException
getNodeList
in interface SessionContext
ProcessingException
public void setNode(String path, Node node) throws ProcessingException
setNode
in interface SessionContext
ProcessingException
public void setAttribute(String key, Object value)
setAttribute
in interface SessionContext
public Object getAttribute(String key)
getAttribute
in interface SessionContext
public Object getAttribute(String key, Object defaultObject)
getAttribute
in interface SessionContext
public String getValueOfNode(String path) throws ProcessingException
null
is returned.
getValueOfNode
in interface SessionContext
ProcessingException
public void setValueOfNode(String path, String value) throws ProcessingException
setValueOfNode
in interface SessionContext
ProcessingException
public boolean streamXML(String path, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws SAXException, ProcessingException
streamXML
in interface SessionContext
SAXException
ProcessingException
public void loadXML(String path, SourceParameters parameters) throws SAXException, ProcessingException, IOException
loadXML
in interface SessionContext
SAXException
ProcessingException
IOException
public void saveXML(String path, SourceParameters parameters) throws SAXException, ProcessingException, IOException
saveXML
in interface SessionContext
SAXException
ProcessingException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |