com.ibm.xdms.xcap
Class XcapServerRequestWrapper

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by com.ibm.xdms.xcap.XcapServerRequestWrapper
All Implemented Interfaces:
XcapServerRequest, javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class XcapServerRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
implements XcapServerRequest

Provides a convenient implementation of the XcapServerRequest interface that can be subclassed by developers wishing to adapt the request to a XcapFilter. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.

See Also:
XcapServerRequest

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
XcapServerRequestWrapper(XcapServerRequest request)
          Constructs a request object wrapping the given request.
 
Method Summary
 ApplicationUsage getApplicationUsage()
          Default behavior is to return getApplicationUsage() on the wrapped request
 java.lang.String getAuid()
          Default behavior is to return getAuid() on the wrapped request
 com.ibm.xcap.DocumentSelector getDocumentSelector()
          Default behavior is to return getDocumentSelector() on the wrapped request
 com.ibm.xcap.NodeSelector getNodeSelector()
          Default behavior is to return getNodeSelector() on the wrapped request
 XcapCaps getXcapCaps()
          Default behavior is to return getXcapCaps() on the wrapped request
 java.lang.String getXcapRoot()
          Default behavior is to return getXcapRoot() on the wrapped request
 java.net.URL getXcapURI()
          Default behavior is to return getXcapURI() on the wrapped request
 java.lang.String getXml()
          Default behavior is to return getXml() on the wrapped request
 java.lang.String getXmlName()
          Default behavior is to return getXmlName() on the wrapped request
 java.lang.String getXui()
          Default behavior is to return getXui() on the wrapped request
 boolean isGlobalDocument()
          Default behavior is to return isGlobalDocument() on the wrapped request
 void setXcapURI(java.lang.String xcapURI)
          Default behavior is to call setXcapURI() on the wrapped request
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.xdms.xcap.XcapServerRequest
getContentType
 
Methods inherited from interface javax.servlet.http.HttpServletRequest
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Constructor Detail

XcapServerRequestWrapper

public XcapServerRequestWrapper(XcapServerRequest request)
Constructs a request object wrapping the given request.

Parameters:
request - XcapServletRequest to wrap
Throws:
java.lang.IllegalArgumentException - if the request is null
Method Detail

getApplicationUsage

public ApplicationUsage getApplicationUsage()
Default behavior is to return getApplicationUsage() on the wrapped request

Specified by:
getApplicationUsage in interface XcapServerRequest
Returns:
Returns the current ApplicationUsage associated with the AUID.
See Also:
XcapServerRequest.getApplicationUsage()

getAuid

public java.lang.String getAuid()
Default behavior is to return getAuid() on the wrapped request

Specified by:
getAuid in interface XcapServerRequest
Returns:
String
See Also:
XcapServerRequest.getAuid()

getDocumentSelector

public com.ibm.xcap.DocumentSelector getDocumentSelector()
Default behavior is to return getDocumentSelector() on the wrapped request

Specified by:
getDocumentSelector in interface XcapServerRequest
Returns:
Returns the Document Selector for this request
See Also:
XcapServerRequest.getDocumentSelector()

getNodeSelector

public com.ibm.xcap.NodeSelector getNodeSelector()
Default behavior is to return getNodeSelector() on the wrapped request

Specified by:
getNodeSelector in interface XcapServerRequest
Returns:
NodeSelector
See Also:
XcapServerRequest.getNodeSelector()

getXcapCaps

public XcapCaps getXcapCaps()
Default behavior is to return getXcapCaps() on the wrapped request

Specified by:
getXcapCaps in interface XcapServerRequest
Returns:
Returns the XcapCaps object containing information from the xcap-caps.xml for this XDMS.
See Also:
XcapServerRequest.getXcapCaps()

getXcapRoot

public java.lang.String getXcapRoot()
Default behavior is to return getXcapRoot() on the wrapped request

Specified by:
getXcapRoot in interface XcapServerRequest
Returns:
String
See Also:
XcapServerRequest.getXcapRoot()

getXcapURI

public java.net.URL getXcapURI()
Default behavior is to return getXcapURI() on the wrapped request

Specified by:
getXcapURI in interface XcapServerRequest
Returns:
XCAP URI, as a URL Object
See Also:
XcapServerRequest.getXcapURI()

getXml

public java.lang.String getXml()
Default behavior is to return getXml() on the wrapped request

Specified by:
getXml in interface XcapServerRequest
Returns:
String
See Also:
XcapServerRequest.getXml()

getXmlName

public java.lang.String getXmlName()
Default behavior is to return getXmlName() on the wrapped request

Specified by:
getXmlName in interface XcapServerRequest
Returns:
String
See Also:
XcapServerRequest.getXmlName()

getXui

public java.lang.String getXui()
Default behavior is to return getXui() on the wrapped request

Specified by:
getXui in interface XcapServerRequest
Returns:
String
See Also:
XcapServerRequest.getXui()

isGlobalDocument

public boolean isGlobalDocument()
Default behavior is to return isGlobalDocument() on the wrapped request

Specified by:
isGlobalDocument in interface XcapServerRequest
Returns:
boolean
See Also:
XcapServerRequest.isGlobalDocument()

setXcapURI

public void setXcapURI(java.lang.String xcapURI)
                throws java.net.MalformedURLException
Default behavior is to call setXcapURI() on the wrapped request

Specified by:
setXcapURI in interface XcapServerRequest
Parameters:
xcapURI - The full XCAP URI used to send the XCAP request.
Throws:
java.net.MalformedURLException
See Also:
XcapServerRequest.setXcapURI(java.lang.String)