DJDoc v.1.0.0b-1

net.sf.djdoc.servlet
Class DjdocRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by net.sf.djdoc.servlet.DjdocRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class DjdocRequest
extends javax.servlet.http.HttpServletRequestWrapper

This is a class wrapping the pure HttpServletRequest and enhancing it with information about the request type as well as the names of the requested API, package and/or file. This information is completely extracted out of the request URI.
The DjdocRequest class also holds a reference to the result object of the Action.


Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
DjdocRequest(javax.servlet.http.HttpServletRequest req)
          Public constructor.
 
Method Summary
 java.lang.String getApiName()
          Getter method for this DjdocRequest's API name.
 java.lang.String getBunchName()
          Getter method for this DjdocRequest's package name.
 java.lang.String getFileName()
          Getter method for this DjdocRequest's file name.
 RequestType getRequestType()
          Getter method for this DjdocRequest's RequestType.
 java.lang.Object getResult()
          Getter method for this DjdocRequest's result object.
 SessionInfo getSessionInfo()
          Getter method for this DjdocRequest's SessionInfo object.
 void sendResponse(javax.servlet.http.HttpServletResponse httpServletResponse)
          This method processes the result object by delegating the work to the Action of the respective Item.ItemType.
 void setResult(java.lang.Object result)
          Setter method for this DjdocRequest's result object.
 void setSessionInfo(SessionInfo sessionInfo)
          Setter method for this DjdocRequest's SessionInfo object.
 
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 javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, 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

DjdocRequest

public DjdocRequest(javax.servlet.http.HttpServletRequest req)
Public constructor. Here all the "dirty work" of analyzing the request URI is performed and all "request information" members are set.

Parameters:
req - The HttpServletRequest to be wrapped by this DjdocRequest
Method Detail

sendResponse

public void sendResponse(javax.servlet.http.HttpServletResponse httpServletResponse)
                  throws java.io.IOException
This method processes the result object by delegating the work to the Action of the respective Item.ItemType.

Parameters:
httpServletResponse -
Throws:
java.io.IOException

getRequestType

public RequestType getRequestType()
Getter method for this DjdocRequest's RequestType.

Returns:
The RequestType of this DjdocRequest

getApiName

public java.lang.String getApiName()
Getter method for this DjdocRequest's API name.

Returns:
The API name of this DjdocRequest

getBunchName

public java.lang.String getBunchName()
Getter method for this DjdocRequest's package name.

Returns:
The package name of this DjdocRequest

getFileName

public java.lang.String getFileName()
Getter method for this DjdocRequest's file name.

Returns:
The file name of this DjdocRequest

getResult

public java.lang.Object getResult()
Getter method for this DjdocRequest's result object.

Returns:
The result object of this DjdocRequest

setResult

public void setResult(java.lang.Object result)
Setter method for this DjdocRequest's result object.

Parameters:
result - The result object of this DjdocRequest

getSessionInfo

public SessionInfo getSessionInfo()
Getter method for this DjdocRequest's SessionInfo object.

Returns:
The SessionInfo object of this DjdocRequest

setSessionInfo

public void setSessionInfo(SessionInfo sessionInfo)
Setter method for this DjdocRequest's SessionInfo object.

Parameters:
sessionInfo - The SessionInfo object of this DjdocRequest

DJDoc v.1.0.0b-1