/characterEncoding
/contentLength
/contentType
/protocol
/remoteAddress
/remoteHost
/scheme
/serverName
/serverPort
/method
/contextPath
/pathInfo
/pathTranslated
/remoteUser
/requestedSessionId
/requestURI
/servletPath
/isRequestedSessionIdFromCookie
/isRequestedSessionIdFromCookie
/isRequestedSessionIdValid
The following attributes of the servlet api 2.2 are missing:
- getUserPrincipal()
- getLocale()
- getLocales()
- getAuthType()
- Version:
- CVS $Id: RequestSessionContext.java 306577 2005-10-06 10:23:21Z cziegeler $
- Author:
- Carsten Ziegeler
- See Also:
- Serialized Form
Method Summary |
void |
appendXML(String path,
DocumentFragment fragment)
Append a document fragment is not possible for the request context. |
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. |
String |
getParameter(String parameterName)
Get the request parameter as a String |
DocumentFragment |
getParameterAsXML(String parameterName)
Get the request parameter as xml |
Request |
getRequest()
Get the request object |
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 from the request object |
void |
loadXML(String path,
SourceParameters parameters)
Try to load XML into the context.
|
void |
removeXML(String path)
Removing is not possible for the request context. |
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(Map objectModel,
ServiceManager manager,
XPathProcessor processor)
Set the Request |
void |
setup(String value,
String loadResource,
String saveResource)
Setup this context |
void |
setValueOfNode(String path,
String value)
Setting of xml is not possible for the request context |
void |
setXML(String path,
DocumentFragment fragment)
Setting of xml is not possible for the request context |
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 |
logger
protected Logger logger
- The logger.
RequestSessionContext
public RequestSessionContext(Logger logger)
setup
public void setup(String value,
String loadResource,
String saveResource)
- Setup this context
- Specified by:
setup
in interface SessionContext
setup
public void setup(Map objectModel,
ServiceManager manager,
XPathProcessor processor)
throws ProcessingException
- Set the Request
- Throws:
ProcessingException
getName
public String getName()
- Get the name of the context
- Specified by:
getName
in interface SessionContext
getRequest
public Request getRequest()
- Get the request object
getXML
public DocumentFragment getXML(String path)
throws ProcessingException
- Get the XML from the request object
- Specified by:
getXML
in interface SessionContext
- Throws:
ProcessingException
setXML
public void setXML(String path,
DocumentFragment fragment)
throws ProcessingException
- Setting of xml is not possible for the request context
- Specified by:
setXML
in interface SessionContext
- Throws:
ProcessingException
setValueOfNode
public void setValueOfNode(String path,
String value)
throws ProcessingException
- Setting of xml is not possible for the request context
- Specified by:
setValueOfNode
in interface SessionContext
- Throws:
ProcessingException
appendXML
public void appendXML(String path,
DocumentFragment fragment)
throws ProcessingException
- Append a document fragment is not possible for the request context.
- Specified by:
appendXML
in interface SessionContext
- Throws:
ProcessingException
removeXML
public void removeXML(String path)
throws ProcessingException
- Removing is not possible for the request context.
- Specified by:
removeXML
in interface SessionContext
- Throws:
ProcessingException
setAttribute
public void setAttribute(String key,
Object value)
throws ProcessingException
- Set a context attribute. If value is null the attribute is removed.
- Specified by:
setAttribute
in interface SessionContext
- Throws:
ProcessingException
getAttribute
public Object getAttribute(String key)
throws ProcessingException
- Get a context attribute. If the attribute is not available return null
- Specified by:
getAttribute
in interface SessionContext
- Throws:
ProcessingException
getAttribute
public Object getAttribute(String key,
Object defaultObject)
throws ProcessingException
- Get a context attribute. If the attribute is not available the defaultObject is returned
- Specified by:
getAttribute
in interface SessionContext
- Throws:
ProcessingException
getSingleNode
public Node getSingleNode(String path)
throws ProcessingException
- Get a copy the first node specified by the path.
- Specified by:
getSingleNode
in interface SessionContext
- Throws:
ProcessingException
getNodeList
public NodeList getNodeList(String path)
throws ProcessingException
- Get a copy all the nodes specified by the path.
- Specified by:
getNodeList
in interface SessionContext
- Throws:
ProcessingException
setNode
public void setNode(String path,
Node node)
throws ProcessingException
- Set the value of a node. The node is copied before insertion.
- Specified by:
setNode
in interface SessionContext
- Throws:
ProcessingException
getValueOfNode
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.
- Specified by:
getValueOfNode
in interface SessionContext
- Throws:
ProcessingException
streamXML
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
- Specified by:
streamXML
in interface SessionContext
- Throws:
SAXException
ProcessingException
getParameterAsXML
public DocumentFragment getParameterAsXML(String parameterName)
throws ProcessingException
- Get the request parameter as xml
- Throws:
ProcessingException
getParameter
public String getParameter(String parameterName)
- Get the request parameter as a String
loadXML
public void loadXML(String path,
SourceParameters parameters)
throws SAXException,
ProcessingException,
IOException
- Try to load XML into the context.
If the context does not provide the ability of loading,
an exception is thrown.
- Specified by:
loadXML
in interface SessionContext
- Throws:
SAXException
ProcessingException
IOException
saveXML
public void saveXML(String path,
SourceParameters parameters)
throws SAXException,
ProcessingException,
IOException
- Try to save XML from the context.
If the context does not provide the ability of saving,
an exception is thrown.
- Specified by:
saveXML
in interface SessionContext
- Throws:
SAXException
ProcessingException
IOException
Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.