public class HttpProgramAdapterImpl
extends com.ibm.commerce.adapter.AbstractHttpAdapter
implements com.ibm.commerce.adapter.HttpAdapter, com.ibm.commerce.adapter.HttpAdapterFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_HTTP_CHARSET_CONSTANT
The constant use to determine the encoding of the request.
|
static java.lang.String |
_ICI_MESSAGE
The parameter that will have the content of the message.
|
static java.lang.String |
_ICI_NEWINBOUND_COMMAND_NAME
This is the name of the command that can return a CommandProperty representation of the message.
|
static java.lang.String |
_STR_CreateAdapter
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_GetData
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_InitFactory
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_IsSupportedConfigParameter
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_PostInvokeCommand
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_PreInvokeCommand
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_PreprocessRequest
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_ProcessErrorResponse
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_ProcessResponse
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_SetCommandProperties
Constant representing the method name used for logging.
|
static java.lang.String |
_STR_ThisClass
Constant representing the class name used for logging.
|
static java.lang.String |
_STR_ValidateDeviceFormat
Constant representing the method name used for logging.
|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
HttpProgramAdapterImpl()
Creates an instance of the Program Adapter to handle HTTP requests.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkDeviceFormat(javax.servlet.http.HttpServletRequest req,
TypedProperty prop)
Return true if the input request can be processed by this adapter.
|
com.ibm.commerce.adapter.HttpAdapter |
createAdapter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
TypedProperty param)
This method returns an instance of this adapter if the request has the format defined by this
adapter.
|
CommandProperty |
getCommandProperties()
Returns the CommandProperty object of the request.
|
java.lang.Integer |
getDefaultDeviceFormatId()
Returns the default device format identifier for this adapter.
|
java.lang.Integer |
getDeviceFormatTypeId()
Gets the identifier of the device format type for this adapter.
|
com.ibm.commerce.adapter.SessionContext |
getSessionContext()
Gets the session context.
|
com.ibm.commerce.server.HttpRequestWrapper |
getWrapperRequest()
Gets the http request wrapper.
|
boolean |
httpsRedirection()
Returns true if Https redirection is required.
|
void |
initFactory(org.w3c.dom.Element node)
Initialize the adapter based on the information defined in the node.
|
void |
postInvokeCommand(CommandContext commandContext)
This method implements adapter specific function after the execution of a command.
|
boolean |
preInvokeCommand(CommandContext commandContext)
This method implements adapter specific function before the execution of a command.
|
com.ibm.commerce.webcontroller.HttpControllerRequestObject |
preprocessRequest()
This method preprocesses the request and returns a controller request object.
|
boolean |
processErrorResponse(CommandContext commandContext,
java.lang.Exception e)
This method is called by the web controller when the execution of a request has failed.
|
boolean |
processResponse(CommandContext commandContext,
TypedProperty respProperty)
This method is called by the web controller after it has successfully finished the execution of
the request.
|
void |
setCommandProperties(CommandProperty cmdProp)
Sets the CommandProperties object.
|
void |
setWrapperRequest(com.ibm.commerce.server.HttpRequestWrapper wrapper) |
CommandProperty |
validateDeviceFormat(javax.servlet.http.HttpServletRequest req)
Return a command property if there is a corresponding message mapper that can handle the request.
|
displayGenericErrorView, getAdapterDesc, getContextPath, getDeviceFormatId, getDeviceFormatName, getDeviceFormatType, getDocumentPathName, getOrigReqName, getRequest, getRequestName, getRequestObject, getRequestProperties, getRequestURI, getResponse, getResponseObject, getUniqueIdentifier, httpRedirection, isDoubleClickHandlerEnabled, isEnabled, preInvokeAjaxCommand, preInvokeCommand, processRequest, processRequest, setAdapterDesc, setDefaultDeviceFormatId, setDeviceFormatClass, setDeviceFormatId, setDeviceFormatName, setDeviceFormatType, setDeviceFormatTypeId, setOrigReqName, setRequest, setRequestProperties, setResponse
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdapterDesc, getContextPath, getRequest, getRequestName, getRequestObject, getRequestProperties, getRequestURI, getResponse, getResponseObject, getUniqueIdentifier, isDoubleClickHandlerEnabled, preInvokeAjaxCommand, preInvokeCommand, processRequest, processRequest, setAdapterDesc, setRequest, setRequestProperties, setResponse
public static final java.lang.String COPYRIGHT
public static final java.lang.String _ICI_NEWINBOUND_COMMAND_NAME
public static final java.lang.String _ICI_MESSAGE
public static final java.lang.String _HTTP_CHARSET_CONSTANT
public static final java.lang.String _STR_ThisClass
public static final java.lang.String _STR_ValidateDeviceFormat
public static final java.lang.String _STR_SetCommandProperties
public static final java.lang.String _STR_ProcessResponse
public static final java.lang.String _STR_ProcessErrorResponse
public static final java.lang.String _STR_PreprocessRequest
public static final java.lang.String _STR_PreInvokeCommand
public static final java.lang.String _STR_PostInvokeCommand
public static final java.lang.String _STR_IsSupportedConfigParameter
public static final java.lang.String _STR_InitFactory
public static final java.lang.String _STR_CreateAdapter
public static final java.lang.String _STR_GetData
public HttpProgramAdapterImpl()
public boolean checkDeviceFormat(javax.servlet.http.HttpServletRequest req, TypedProperty prop)
checkDeviceFormat
in interface com.ibm.commerce.adapter.HttpAdapterFactory
request
- the HTTP request.properties
- the request parameters.public com.ibm.commerce.adapter.HttpAdapter createAdapter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, TypedProperty param)
createAdapter
in interface com.ibm.commerce.adapter.HttpAdapterFactory
request
- the HTTP request.response
- the HTTP response.param
- the request parameterspublic CommandProperty getCommandProperties()
public java.lang.Integer getDefaultDeviceFormatId()
getDefaultDeviceFormatId
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
getDefaultDeviceFormatId
in class com.ibm.commerce.adapter.AbstractHttpAdapter
public java.lang.Integer getDeviceFormatTypeId()
getDeviceFormatTypeId
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
getDeviceFormatTypeId
in class com.ibm.commerce.adapter.AbstractHttpAdapter
public com.ibm.commerce.adapter.SessionContext getSessionContext() throws ECException
getSessionContext
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
ECException
- if there is a problem obtaining the session context.public boolean httpsRedirection()
httpsRedirection
in interface com.ibm.commerce.adapter.HttpAdapter
public void initFactory(org.w3c.dom.Element node) throws java.lang.Exception
initFactory
in interface com.ibm.commerce.adapter.HttpAdapterFactory
initFactory
in class com.ibm.commerce.adapter.AbstractHttpAdapter
node
- the XML configuration for the adapter.java.lang.Exception
- if there is a problem initializing.public void postInvokeCommand(CommandContext commandContext) throws ECException
postInvokeCommand
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
commandContext
- CommandContext - the command context associated with the command.ECException
public boolean preInvokeCommand(CommandContext commandContext) throws ECException
preInvokeCommand
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
commandContext
- the command context associated with the command.ECException
- should never happen because the method only returns true.public com.ibm.commerce.webcontroller.HttpControllerRequestObject preprocessRequest()
preprocessRequest
in interface com.ibm.commerce.adapter.HttpAdapter
preprocessRequest
in class com.ibm.commerce.adapter.AbstractHttpAdapter
public boolean processErrorResponse(CommandContext commandContext, java.lang.Exception e) throws ECException
processErrorResponse
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
processErrorResponse
in class com.ibm.commerce.adapter.AbstractHttpAdapter
commandContext
- commandContext for the request.exception
- the exception caught when executing the request.ECException
- if there is a problem determining whether a response is necessary.public boolean processResponse(CommandContext commandContext, TypedProperty respProperty) throws ECException
processResponse
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
processResponse
in class com.ibm.commerce.adapter.AbstractHttpAdapter
commandContext
- the command context of the command.respProperties
- the response properties returned by the command.ECException
- if there is a problem determining whether a response is necessary.public void setCommandProperties(CommandProperty cmdProp)
cmdProperties
- the command properties which describes what command to execute.public CommandProperty validateDeviceFormat(javax.servlet.http.HttpServletRequest req)
request
- the HTTP request.public com.ibm.commerce.server.HttpRequestWrapper getWrapperRequest()
public void setWrapperRequest(com.ibm.commerce.server.HttpRequestWrapper wrapper)
wrapper
-