Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.http
Class Request

    java.lang.Object
      |
      +--com.bea.p13n.http.HttpConfigurableEntity
            |
            +--com.bea.p13n.http.Request

public class Request
extends HttpConfigurableEntity
implements java.io.Serializable, javax.servlet.http.HttpServletRequest

The Personalization Server implementation of the Http Servlet Request interface.

This object is used by the Personalization Server to get properties on an Http Request in a format understandable to Personalization Core Services such as the RulesService.

This will use a DefaultRequestFilter to filter out attributes. After loading the request attributes, this will additionally call out to any AttributeLoaders specified by the AttributeLoaderMBean's RequestLoaders attribute.

See Also:
  Serialized Form

Inner Class Summary
`static interface` | `Request.AttributeLoader` An object which is capable of loading additional attributes into a Request.

Field Summary
`static java.lang.String` | `AUTHORIZATION_SCHEME`
`static java.lang.String` | `CHAR_ENCODING`
`static java.lang.String` | `CONTENT_LENGTH`
`static java.lang.String` | `CONTENT_TYPE`
`static java.lang.String` | `CONTEXT_PATH`
`static java.lang.String` | `LOCALE`
`static java.lang.String` | `PATH_INFO`
`static java.lang.String` | `PATH_TRANSLATED`
`static java.lang.String` | `QUERY_STRING`
`static java.lang.String` | `REMOTE_ADDRESS`
`static java.lang.String` | `REMOTE_HOST`
`static java.lang.String` | `REMOTE_USER`
`static java.lang.String` | `REQUEST_METHOD`
`static java.lang.String` | `REQUEST_PROPERTY_SET_TYPE` request property set type
`static java.lang.String` | `REQUEST_PROTOCOL`
`static java.lang.String` | `REQUEST_URI`
`static java.lang.String` | `REQUEST_URL`
`static java.lang.String` | `SCHEME`
`static java.lang.String` | `SERVER_NAME`
`static java.lang.String` | `SERVER_PORT`
`static java.lang.String` | `SERVLET_PATH`

Fields inherited from class com.bea.p13n.http.HttpConfigurableEntity
`PROPERTY_SET_MANAGER`

Constructor Summary
`Request()` Default Constructor
`Request(javax.servlet.http.HttpServletRequest request)` Creates a P13N HTTP Request.
`Request(javax.servlet.http.HttpServletRequest request, boolean createSession)` Creates a P13N HTTP Request and, possibly, Session.

Method Summary
`static Request` | `createP13NRequest(javax.servlet.http.HttpServletRequest request)` Returns a P13N Request that acts as a surrogate for an HTTP request.
`java.lang.Object` | `getAttribute(java.lang.String name)`
`java.util.Enumeration` | `getAttributeNames()`
`java.lang.String` | `getAuthType()`
`java.lang.String` | `getCharacterEncoding()`
`int` | `getContentLength()`
`java.lang.String` | `getContentType()`
`java.lang.String` | `getContextPath()`
`javax.servlet.http.Cookie[]` | `getCookies()`
`long` | `getDateHeader(java.lang.String name)`
`java.lang.String` | `getHeader(java.lang.String name)`
`java.util.Enumeration` | `getHeaderNames()`
`java.util.Enumeration` | `getHeaders(java.lang.String name)`
`javax.servlet.ServletInputStream` | `getInputStream()`
`int` | `getIntHeader(java.lang.String name)`
`java.util.Locale` | `getLocale()`
`java.util.Enumeration` | `getLocales()`
`java.lang.String` | `getMethod()`
`java.lang.String` | `getMethod(java.lang.String name)`
`Session` | `getP13NSession()` Get the P13N Session related to this request (can be null).
`java.lang.String` | `getParameter(java.lang.String name)`
`java.util.Map` | `getParameterMap()`
`java.util.Enumeration` | `getParameterNames()`
`java.lang.String[]` | `getParameterValues(java.lang.String name)`
`java.lang.String` | `getPathInfo()`
`java.lang.String` | `getPathTranslated()`
`java.lang.Object` | `getProperty(java.lang.String propertySet, java.lang.String propertyName)` Retrieves a property value for the specified property set and name.
`java.lang.String` | `getProtocol()`
`java.lang.String` | `getQueryString()`
`java.io.BufferedReader` | `getReader()`
`java.lang.String` | `getRealPath(java.lang.String path)`
`java.lang.String` | `getRemoteAddr()`
`java.lang.String` | `getRemoteHost()`
`java.lang.String` | `getRemoteUser()`
`javax.servlet.RequestDispatcher` | `getRequestDispatcher(java.lang.String uri)`
`java.lang.String` | `getRequestedSessionId()`
`java.lang.String` | `getRequestURI()`
`java.lang.StringBuffer` | `getRequestURL()`
`java.lang.String` | `getScheme()`
`java.lang.String` | `getServerName()`
`int` | `getServerPort()`
`java.lang.String` | `getServletPath()`
`javax.servlet.http.HttpSession` | `getSession()`
`javax.servlet.http.HttpSession` | `getSession(boolean create)`
`java.security.Principal` | `getUserPrincipal()`
`boolean` | `isRequestedSessionIdFromCookie()`
`boolean` | `isRequestedSessionIdFromUrl()`
`boolean` | `isRequestedSessionIdFromURL()`
`boolean` | `isRequestedSessionIdValid()`
`boolean` | `isSecure()`
`boolean` | `isUserInRole(java.lang.String role)`
`void` | `removeAttribute(java.lang.String name)`
`void` | `setAttribute(java.lang.String name, java.lang.Object o)`
`void` | `setCharacterEncoding(java.lang.String anEncoding)`
`void` | `setP13NSession(Session session)` Set the P13N Session related to this request.

Methods inherited from class com.bea.p13n.http.HttpConfigurableEntity
`getJndiName, getPkString, getProperty, getPropertyAsString, getPropertyDefault, getPropertyNoDefault, getUniqueId, removeProperty, setProperty`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### REQUEST_PROPERTY_SET_TYPE

    public static final java.lang.String REQUEST_PROPERTY_SET_TYPE

  request property set type

### REQUEST_METHOD

    public static final java.lang.String REQUEST_METHOD

### REQUEST_URI

    public static final java.lang.String REQUEST_URI

### REQUEST_URL

    public static final java.lang.String REQUEST_URL

### REQUEST_PROTOCOL

    public static final java.lang.String REQUEST_PROTOCOL

### SERVLET_PATH

    public static final java.lang.String SERVLET_PATH

### PATH_INFO

    public static final java.lang.String PATH_INFO

### PATH_TRANSLATED

    public static final java.lang.String PATH_TRANSLATED

### CONTEXT_PATH

    public static final java.lang.String CONTEXT_PATH

### QUERY_STRING

    public static final java.lang.String QUERY_STRING

### CONTENT_LENGTH

    public static final java.lang.String CONTENT_LENGTH

### CONTENT_TYPE

    public static final java.lang.String CONTENT_TYPE

### SERVER_NAME

    public static final java.lang.String SERVER_NAME

### SERVER_PORT

    public static final java.lang.String SERVER_PORT

### REMOTE_USER

    public static final java.lang.String REMOTE_USER

### REMOTE_ADDRESS

    public static final java.lang.String REMOTE_ADDRESS

### REMOTE_HOST

    public static final java.lang.String REMOTE_HOST

### SCHEME

    public static final java.lang.String SCHEME

### AUTHORIZATION_SCHEME

    public static final java.lang.String AUTHORIZATION_SCHEME

### LOCALE

    public static final java.lang.String LOCALE

### CHAR_ENCODING

    public static final java.lang.String CHAR_ENCODING

Constructor Detail

### Request

    public Request()

  Default Constructor

### Request

    public Request(javax.servlet.http.HttpServletRequest request)

  Creates a P13N HTTP Request. This object copies values from the supplied HttpServletRequest. This does not automatically create the Session.

  Parameters:
    `request` - the `HttpServletRequest` used to set and retrieve properties.

### Request

    public Request(javax.servlet.http.HttpServletRequest request,
                   boolean createSession)

  Creates a P13N HTTP Request and, possibly, Session. This object copies values from the supplied HttpServletRequest.

  Parameters:
    `request` - the `HttpServletRequest` used to set and retrieve properties.
    `createSession` - true to also create a Session from the request's session and set it on this.
  See Also:
    `setP13NSession(com.bea.p13n.http.Session)`, `Session`

Method Detail

### createP13NRequest

    public static Request createP13NRequest(javax.servlet.http.HttpServletRequest request)
                                     throws java.lang.IllegalArgumentException

  Returns a P13N Request that acts as a surrogate for an HTTP request.

  Parameters:
    `request` - the request used to create the Session object.
  Returns:
    a new ConfigurableEntity that allows access to an `HttpServletRequest`
  Throws:
    java.lang.IllegalArgumentException - If the paramater is null.

### setP13NSession

    public void setP13NSession(Session session)

  Set the P13N Session related to this request.

### getP13NSession

    public Session getP13NSession()

  Get the P13N Session related to this request (can be null).

### getProperty

    public java.lang.Object getProperty(java.lang.String propertySet,
                                        java.lang.String propertyName)

  Retrieves a property value for the specified property set and name. The getProperty method will first look in the HTTP request attributes for the property and if not found, it will look for the property in the HTTP request parameters. If not found, then it looks in the Http headers. If not found, then it looks in the request methods (getContentType()). If not found, then it uses the propertySet parameter to find a propertySet for a 'REQUEST' type. If found, it uses the default value in that property set.

  Parameters:
    `propertySet` - The name of the property set for which the property is sought. This only used if no property is found in the request and we use the scope to look up the default value in the property set for the request. This parameter can be null.
    `propertyName` - The property name
  Returns:
    the property value
  Overrides:
    getProperty in class HttpConfigurableEntity

### getMethod

    public java.lang.String getMethod(java.lang.String name)

### getAttribute

    public java.lang.Object getAttribute(java.lang.String name)

### getAttributeNames

    public java.util.Enumeration getAttributeNames()

### getCharacterEncoding

    public java.lang.String getCharacterEncoding()

### getContentLength

    public int getContentLength()

### getContentType

    public java.lang.String getContentType()

### getInputStream

    public javax.servlet.ServletInputStream getInputStream()

### getParameter

    public java.lang.String getParameter(java.lang.String name)

### getParameterNames

    public java.util.Enumeration getParameterNames()

### getParameterValues

    public java.lang.String[] getParameterValues(java.lang.String name)

### getProtocol

    public java.lang.String getProtocol()

### getScheme

    public java.lang.String getScheme()

### getServerName

    public java.lang.String getServerName()

### getServerPort

    public int getServerPort()

### getReader

    public java.io.BufferedReader getReader()

### getRemoteAddr

    public java.lang.String getRemoteAddr()

### getRemoteHost

    public java.lang.String getRemoteHost()

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object o)

### removeAttribute

    public void removeAttribute(java.lang.String name)

### getLocale

    public java.util.Locale getLocale()

### getLocales

    public java.util.Enumeration getLocales()

### isSecure

    public boolean isSecure()

### getRequestDispatcher

    public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String uri)

### getRealPath

    public java.lang.String getRealPath(java.lang.String path)

### getAuthType

    public java.lang.String getAuthType()

  Specified by:
    getAuthType in interface javax.servlet.http.HttpServletRequest

### getCookies

    public javax.servlet.http.Cookie[] getCookies()

  Specified by:
    getCookies in interface javax.servlet.http.HttpServletRequest

### getDateHeader

    public long getDateHeader(java.lang.String name)

  Specified by:
    getDateHeader in interface javax.servlet.http.HttpServletRequest

### getHeader

    public java.lang.String getHeader(java.lang.String name)

  Specified by:
    getHeader in interface javax.servlet.http.HttpServletRequest

### getHeaders

    public java.util.Enumeration getHeaders(java.lang.String name)

  Specified by:
    getHeaders in interface javax.servlet.http.HttpServletRequest

### getHeaderNames

    public java.util.Enumeration getHeaderNames()

  Specified by:
    getHeaderNames in interface javax.servlet.http.HttpServletRequest

### getIntHeader

    public int getIntHeader(java.lang.String name)

  Specified by:
    getIntHeader in interface javax.servlet.http.HttpServletRequest

### getMethod

    public java.lang.String getMethod()

  Specified by:
    getMethod in interface javax.servlet.http.HttpServletRequest

### getPathInfo

    public java.lang.String getPathInfo()

  Specified by:
    getPathInfo in interface javax.servlet.http.HttpServletRequest

### getPathTranslated

    public java.lang.String getPathTranslated()

  Specified by:
    getPathTranslated in interface javax.servlet.http.HttpServletRequest

### getContextPath

    public java.lang.String getContextPath()

  Specified by:
    getContextPath in interface javax.servlet.http.HttpServletRequest

### getQueryString

    public java.lang.String getQueryString()

  Specified by:
    getQueryString in interface javax.servlet.http.HttpServletRequest

### getRemoteUser

    public java.lang.String getRemoteUser()

  Specified by:
    getRemoteUser in interface javax.servlet.http.HttpServletRequest

### isUserInRole

    public boolean isUserInRole(java.lang.String role)

  Specified by:
    isUserInRole in interface javax.servlet.http.HttpServletRequest

### getUserPrincipal

    public java.security.Principal getUserPrincipal()

  Specified by:
    getUserPrincipal in interface javax.servlet.http.HttpServletRequest

### getRequestedSessionId

    public java.lang.String getRequestedSessionId()

  Specified by:
    getRequestedSessionId in interface javax.servlet.http.HttpServletRequest

### getRequestURI

    public java.lang.String getRequestURI()

  Specified by:
    getRequestURI in interface javax.servlet.http.HttpServletRequest

### getServletPath

    public java.lang.String getServletPath()

  Specified by:
    getServletPath in interface javax.servlet.http.HttpServletRequest

### getSession

    public javax.servlet.http.HttpSession getSession(boolean create)

  Specified by:
    getSession in interface javax.servlet.http.HttpServletRequest

### getSession

    public javax.servlet.http.HttpSession getSession()

  Specified by:
    getSession in interface javax.servlet.http.HttpServletRequest

### isRequestedSessionIdValid

    public boolean isRequestedSessionIdValid()

  Specified by:
    isRequestedSessionIdValid in interface javax.servlet.http.HttpServletRequest

### isRequestedSessionIdFromCookie

    public boolean isRequestedSessionIdFromCookie()

  Specified by:
    isRequestedSessionIdFromCookie in interface javax.servlet.http.HttpServletRequest

### isRequestedSessionIdFromURL

    public boolean isRequestedSessionIdFromURL()

  Specified by:
    isRequestedSessionIdFromURL in interface javax.servlet.http.HttpServletRequest

### isRequestedSessionIdFromUrl

    public boolean isRequestedSessionIdFromUrl()

  Specified by:
    isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequest

### getParameterMap

    public java.util.Map getParameterMap()

### setCharacterEncoding

    public void setCharacterEncoding(java.lang.String anEncoding)

### getRequestURL

    public java.lang.StringBuffer getRequestURL()

  Specified by:
    getRequestURL in interface javax.servlet.http.HttpServletRequest

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved