com.beasys.commerce.axiom.p13n.http
Class Request
com.beasys.commerce.axiom.p13n.http.Request
- All Implemented Interfaces:
- java.io.Serializable
- public final class Request
- implements java.io.Serializable
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 "p13n.request.loaders" property in
weblogiccommerce.properties.
- See Also:
- Serialized Form
Inner Class Summary |
static interface |
Request.AttributeLoader
An object which is capable of loading additional attributes into a
Request. |
Constructor Summary |
Request()
Default Constructor |
Request(javax.servlet.http.HttpServletRequest request)
Creates a P13N HTTP Request. |
Request(javax.servlet.http.HttpServletRequest request,
boolean createSession)
|
REQUEST_METHOD
public static final java.lang.String REQUEST_METHOD
REQUEST_URI
public static final java.lang.String REQUEST_URI
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
Request
public Request()
- Default Constructor
Request
public Request(javax.servlet.http.HttpServletRequest request)
- Creates a P13N HTTP Request. This object clones the provided HttpRequest.
- Parameters:
request
- the HttpServletRequest
used to set and retrieve
properties
Request
public Request(javax.servlet.http.HttpServletRequest request,
boolean createSession)
setP13NSession
public void setP13NSession(Session session)
getP13NSession
public Session getP13NSession()
getProperty
public java.lang.Object getProperty(java.lang.String scopeName,
java.lang.String propertyName,
ConfigurableEntity successor,
java.lang.Object defaultValue)
- Retrieves a property value for the specified scope and key.
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 scopeName parameter to find a
schema entity for a 'REQUEST' schema group name. If found, it uses the
default value in the schema.
If not found, then it returns the default passed in.
- Parameters:
scopeName
- The name of the scope for which the property is
sought. The scope is only used if no property is found in the request
and we use the scope to look up the default value in the Schema for the
request. This parameter can be null.key
- The property namesuccessor
- The successor. Must be null. It is not used in this
method and will be ignored.defaultValue
- the default value to return if the property is
not found- Returns:
- the property value
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()
getCookies
public javax.servlet.http.Cookie[] getCookies()
getDateHeader
public long getDateHeader(java.lang.String name)
getHeader
public java.lang.String getHeader(java.lang.String name)
getHeaders
public java.util.Enumeration getHeaders(java.lang.String name)
getHeaderNames
public java.util.Enumeration getHeaderNames()
getIntHeader
public int getIntHeader(java.lang.String name)
getMethod
public java.lang.String getMethod()
getPathInfo
public java.lang.String getPathInfo()
getPathTranslated
public java.lang.String getPathTranslated()
getContextPath
public java.lang.String getContextPath()
getQueryString
public java.lang.String getQueryString()
getRemoteUser
public java.lang.String getRemoteUser()
isUserInRole
public boolean isUserInRole(java.lang.String role)
getUserPrincipal
public java.security.Principal getUserPrincipal()
getRequestedSessionId
public java.lang.String getRequestedSessionId()
getRequestURI
public java.lang.String getRequestURI()
getServletPath
public java.lang.String getServletPath()
getSession
public javax.servlet.http.HttpSession getSession(boolean create)
getSession
public javax.servlet.http.HttpSession getSession()
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
Copyright © 2001 BEA Systems, Inc. All Rights Reserved