BEA Systems, Inc.

com.beasys.commerce.axiom.p13n.http
Class Request

java.lang.Object
  |
  +--com.beasys.commerce.axiom.p13n.http.HttpConfigurableEntity
        |
        +--com.beasys.commerce.axiom.p13n.http.Request

public final class Request
extends HttpConfigurableEntity
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 is a READ ONLY object and not meant to setProperties on. This assumes that all objects the the HttpRequest attributes are Serializable. If they are not, a NotSerializableException will be thrown at runtime when this object is used in a remote method call.

See Also:
Serialized Form

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_PROTOCOL
           
static java.lang.String REQUEST_URI
           
static java.lang.String SCHEME
           
static java.lang.String SERVER_NAME
           
static java.lang.String SERVER_PORT
           
static java.lang.String SERVLET_PATH
           
 
Constructor Summary
Request()
          Default Constructor
Request(javax.servlet.http.HttpServletRequest request)
          Creates a P13N HTTP Request.
 
Method Summary
 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.
 
Methods inherited from class com.beasys.commerce.axiom.p13n.http.HttpConfigurableEntity
addBusinessPolicy, addPropertyValue, addPropertyValueMapped, get__classIdentifier, get__containingBelonging, get__containingEntity, get__mapKey, get__sequenceNumber, getBusinessPolicy, getDefaultValueFromSchema, getEJBHome, getHandle, getPersistableHandle, getPrimaryKey, getProperty, getPropertyAsString, getPropertyAsString, getPropertyDefault, getPropertyNoDefault, getSuccessor, getUniqueId, isIdentical, remove, removeBusinessPolicy, removeProperty, removeProperty, removePropertyValue, removePropertyValueMapped, removeSuccessor, set__containingBelonging, set__containingEntity, set__mapKey, setProperty, setProperty, setSuccessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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
Method Detail

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.
Overrides:
getProperty in class HttpConfigurableEntity
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 name
successor - 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

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved