java.lang.Object | +--com.ibm.commerce.adapter.AbstractHttpAdapter
Reserved for IBM internal use. This class provides an abstract base implementation of an Http device format adapter. It implements both the HttpAdapter interface and the HttpAdapterFactory interface.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM Copyright notice field. |
protected
HttpAdapterDesc |
desc |
protected
java.lang.String |
encoding |
protected
HttpServletRequest |
req |
protected
HttpControllerRequestObject |
reqObj |
protected
TypedProperty |
requestProperties |
protected
HttpServletResponse |
resp |
protected
SessionContext |
sessionContext |
Fields inherited from interface com.ibm.commerce.adapter. HttpAdapter |
DEVFMTID_BROWSER,
DEVFMTNAME_BROWSER,
DEVFMTNAME_IMODE,
DEVFMTTYP_BROWSER,
DEVFMTTYP_PVCDEVICE,
DEVFMTTYP_XMLFMT,
DEVFMTTYPID_BROWSER,
DEVFMTTYPID_PVC,
DEVFMTTYPID_XML |
Constructor Summary | |
---|---|
AbstractHttpAdapter() Reserved for IBM internal use. |
Method Summary | |
---|---|
void |
displayGenericErrorView(ServletContext servletContext,
java.lang.String docName) Reserved for IBM internal use. |
HttpAdapterDesc |
getAdapterDesc() Reserved for IBM internal use. |
java.lang.Integer |
getDefaultDeviceFormatId() Reserved for IBM internal use. |
java.lang.Integer |
getDeviceFormatId() Reserved for IBM internal use. |
java.lang.String |
getDeviceFormatName() Reserved for IBM internal use. |
java.lang.String |
getDeviceFormatType() Reserved for IBM internal use. |
java.lang.Integer |
getDeviceFormatTypeId() Reserved for IBM internal use. |
java.lang.String |
getDocumentPathName(java.lang.String name) Reserved for IBM internal use. |
HttpServletRequest |
getRequest() Reserved for IBM internal use. |
java.lang.String |
getRequestName() Reserved for IBM internal use. |
TypedProperty |
getRequestProperties() Reserved for IBM internal use. |
HttpServletResponse |
getResponse() Reserved for IBM internal use. |
java.lang.String |
getUniqueIdentifier() Reserved for IBM internal use. |
boolean |
httpRedirection() Reserved for IBM internal use. |
void |
initFactory(org.w3c.dom.Element node) Reserved for IBM internal use. |
boolean |
isDoubleClickHandlerEnabled() Reserved for IBM internal use. |
boolean |
isEnabled() Reserved for IBM internal use. |
HttpControllerRequestObject |
preprocessRequest() Reserved for IBM internal use. |
boolean |
processErrorResponse(
CommandContext commandContext, java.lang.Exception e) Reserved for IBM internal use. |
void |
processRequest(ServletContext servletContext,
java.lang.String encoding, boolean storeCommand) Reserved for IBM internal use. |
boolean |
processResponse(
CommandContext commandContext,
TypedProperty respProperty) Reserved for IBM internal use. |
void |
setAdapterDesc(
HttpAdapterDesc value) Reserved for IBM internal use. |
void |
setDefaultDeviceFormatId(java.lang.Integer value) Reserved for IBM internal use. |
void |
setDeviceFormatClass(java.lang.Class value) Reserved for IBM internal use. |
void |
setDeviceFormatId(java.lang.Integer value) Reserved for IBM internal use. |
void |
setDeviceFormatName(java.lang.String value) Reserved for IBM internal use. |
void |
setDeviceFormatType(java.lang.String value) Reserved for IBM internal use. |
void |
setDeviceFormatTypeId(java.lang.Integer value) Reserved for IBM internal use. |
void |
setRequest(HttpServletRequest value) Reserved for IBM internal use. |
void |
setRequestProperties(
TypedProperty val) Reserved for IBM internal use. |
void |
setResponse(HttpServletResponse value) Reserved for IBM internal use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.adapter. HttpAdapter |
httpsRedirection |
Methods inherited from interface com.ibm.commerce.adapter. DeviceFormatAdapter |
getSessionContext,
postInvokeCommand,
preInvokeCommand |
Methods inherited from interface com.ibm.commerce.adapter. HttpAdapterFactory |
checkDeviceFormat,
createAdapter |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected HttpAdapterDesc desc
protected TypedProperty requestProperties
protected HttpServletRequest req
protected HttpServletResponse resp
protected SessionContext sessionContext
protected HttpControllerRequestObject reqObj
protected java.lang.String encoding
Constructor Detail |
---|
public AbstractHttpAdapter()
Method Detail |
---|
public void displayGenericErrorView(ServletContext servletContext, java.lang.String docName)
servletContext
- the servlet context.public HttpAdapterDesc getAdapterDesc()
getAdapterDesc
in interface
HttpAdapter
public java.lang.Integer getDefaultDeviceFormatId()
getDefaultDeviceFormatId
in interface
DeviceFormatAdapter
HttpAdapter.DEVFMTID_BROWSER
.public final java.lang.Integer getDeviceFormatId()
getDeviceFormatId
in interface
DeviceFormatAdapter
public final java.lang.String getDeviceFormatName()
getDeviceFormatName
in interface
DeviceFormatAdapter
public final java.lang.String getDeviceFormatType()
getDeviceFormatType
in interface
DeviceFormatAdapter
public java.lang.Integer getDeviceFormatTypeId()
getDeviceFormatTypeId
in interface
DeviceFormatAdapter
public java.lang.String getDocumentPathName(java.lang.String name)
getDocumentPathName
in interface
DeviceFormatAdapter
name
- the base document name.public final HttpServletRequest getRequest()
getRequest
in interface
HttpAdapter
HttpServletRequest
object of the originating HTTP
request.public final java.lang.String getRequestName()
getRequestName
in interface
HttpAdapter
public TypedProperty getRequestProperties()
getRequestProperties
in interface
HttpAdapter
public final HttpServletResponse getResponse()
getResponse
in interface
HttpAdapter
HttpServletRespons
of the originating HTTP
request.public boolean httpRedirection()
true
.public void initFactory(org.w3c.dom.Element node) throws java.lang.Exception
HttpAdapterDesc
) and initializing the descriptor with
the given XML element.
initFactory
in interface
HttpAdapterFactory
node
- the XML element containing the adapter's
configuration.java.lang.Exception
- if there was a problem initializing the
adapter.public final boolean isEnabled()
isEnabled
in interface
HttpAdapterFactory
public HttpControllerRequestObject preprocessRequest()
ControllerRequestObject
to pass to the
WebController
to execute the command.
preprocessRequest
in interface
HttpAdapter
public boolean processErrorResponse(CommandContext commandContext, java.lang.Exception e) throws ECException
processErrorResponse
in interface
DeviceFormatAdapter
commandContext
- the command context for the requesttrue
which indicates that the error response
should be processed.ECException
- if there is a problem when determining whether the error response is needed
or not.public final void processRequest(ServletContext servletContext, java.lang.String encoding, boolean storeCommand) throws ECException
processRequest
in interface
HttpAdapter
servletContext
- the servlet context associated with this
requestencoding
- the encoding used for the incoming parametersstoreCommand
- true
if this is a store command,
otherwise false
ECException
- if there was a problem processing the request.public boolean processResponse(CommandContext commandContext, TypedProperty respProperty) throws ECException
processResponse
in interface
DeviceFormatAdapter
commandContext
- the command context after the command is
executed.true
to indicate that the repsonse should be
processed.ECException
- if there was a problem processing the response.public final void setAdapterDesc(HttpAdapterDesc value)
setAdapterDesc
in interface
HttpAdapter
value
- the Http adapter descriptor.public void setDefaultDeviceFormatId(java.lang.Integer value)
setDefaultDeviceFormatId
in interface
DeviceFormatAdapter
value
- the default device format Id.public final void setDeviceFormatClass(java.lang.Class value)
value
- the class object associated with this
adapter.public final void setDeviceFormatId(java.lang.Integer value)
setDeviceFormatId
in interface
DeviceFormatAdapter
value
- the device format id.public final void setDeviceFormatName(java.lang.String value)
setDeviceFormatName
in interface
DeviceFormatAdapter
value
- the device format name.public final void setDeviceFormatType(java.lang.String value)
setDeviceFormatType
in interface
DeviceFormatAdapter
value
- the name of the device format
type.public final void setDeviceFormatTypeId(java.lang.Integer value)
setDeviceFormatTypeId
in interface
DeviceFormatAdapter
value
- the device format type identifier.public final void setRequest(HttpServletRequest value)
setRequest
in interface
HttpAdapter
public final void setRequestProperties(TypedProperty val)
setRequestProperties
in interface
HttpAdapter
public final void setResponse(HttpServletResponse value)
setResponse
in interface
HttpAdapter
public boolean isDoubleClickHandlerEnabled()
isDoubleClickHandlerEnabled
in interface
HttpAdapter
false
to indicate that double click should
not be handled.public java.lang.String getUniqueIdentifier()
getUniqueIdentifier
in interface
HttpAdapter
null
.