public class ProgramAdapter
extends com.ibm.commerce.adapter.nonhttp.NonHttpAdapterImpl
implements com.ibm.commerce.adapter.nonhttp.NonHttpAdapter, com.ibm.commerce.adapter.nonhttp.NonHttpAdapterFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_STR_CreateAdapter
Constant to represent the method name for logging purposes.
|
static java.lang.String |
_STR_InitFactory
Constant to represent the method name for logging purposes.
|
static java.lang.String |
_STR_SetCommandProperties
Constant to represent the method name for logging purposes.
|
static java.lang.String |
_STR_ThisClass
Constant to represent the class name for logging purposes.
|
static java.lang.String |
_STR_ValidateDeviceFormat
Constant to represent the method name for logging purposes.
|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
ProgramAdapter()
Creates the program adapter object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkDeviceFormat(java.lang.Object req,
TypedProperty prop)
Return true if the input request can be processed by this adapter.
|
com.ibm.commerce.adapter.nonhttp.NonHttpAdapter |
createAdapter(java.lang.Object request,
java.lang.Object response,
TypedProperty param)
This method returns an instance of this adapter if the request has the format defined by this
adapter.
|
void |
initFactory(org.w3c.dom.Element node)
Initialize the Adapter factory based on the information defined in the DOM XML node.
|
boolean |
preInvokeCommand(CommandContext commandContext)
This method checks if an exception occurs when validating the request session information.
|
boolean |
processResponse(CommandContext commandContext,
TypedProperty resProp)
This method is called by the web controller after it has successfully finished the execution of
the request.
|
void |
setCommandProperties(CommandProperty cmdProp)
Sets the CommandProperty of the adapter.
|
CommandProperty |
validateDeviceFormat(java.lang.Object req)
Returns a command property object if the device can be handled by this adapter, otherwise null will be returned.
|
exceptionOccurred, getAdapterDesc, getDefaultDeviceFormatId, getDeviceFormatId, getDeviceFormatName, getDeviceFormatType, getDeviceFormatTypeId, getDocumentPathName, getRequest, getRequestName, getRequestProperties, getResponse, getSessionContext, isEnabled, postInvokeCommand, preprocessRequest, processErrorResponse, processRequest, setAdapterDesc, setDefaultDeviceFormatId, setDeviceFormatId, setDeviceFormatName, setDeviceFormatType, setDeviceFormatTypeId, setRequest, setRequestProperties, setResponse
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionOccurred, getAdapterDesc, getRequest, getRequestName, getResponse, preprocessRequest, processRequest, setAdapterDesc, setRequest, setRequestProperties, setResponse
getAdapterDesc, isEnabled
getDefaultDeviceFormatId, getDeviceFormatId, getDeviceFormatName, getDeviceFormatType, getDeviceFormatTypeId, getDocumentPathName, getRequestProperties, getSessionContext, postInvokeCommand, processErrorResponse, setDefaultDeviceFormatId, setDeviceFormatId, setDeviceFormatName, setDeviceFormatType, setDeviceFormatTypeId
public static final java.lang.String COPYRIGHT
public static final java.lang.String _STR_ThisClass
public static final java.lang.String _STR_CreateAdapter
public static final java.lang.String _STR_InitFactory
public static final java.lang.String _STR_SetCommandProperties
public static final java.lang.String _STR_ValidateDeviceFormat
public boolean checkDeviceFormat(java.lang.Object req, TypedProperty prop)
checkDeviceFormat
in interface com.ibm.commerce.adapter.nonhttp.NonHttpAdapterFactory
req
- the request objectprop
- the request properties created for this requestpublic com.ibm.commerce.adapter.nonhttp.NonHttpAdapter createAdapter(java.lang.Object request, java.lang.Object response, TypedProperty param)
createAdapter
in interface com.ibm.commerce.adapter.nonhttp.NonHttpAdapterFactory
request
- the request object.response
- the response object.param
- the request parameterspublic void initFactory(org.w3c.dom.Element node) throws java.lang.Exception
initFactory
in interface com.ibm.commerce.adapter.nonhttp.NonHttpAdapterFactory
initFactory
in class com.ibm.commerce.adapter.nonhttp.NonHttpAdapterImpl
node
- The XML configuration of the adapter.java.lang.Exception
- if there is a problem initializing the adapter.public boolean preInvokeCommand(CommandContext commandContext) throws ECException
preInvokeCommand
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
preInvokeCommand
in class com.ibm.commerce.adapter.nonhttp.NonHttpAdapterImpl
commandContext
- the command context associated with the command.ECException
- Whether there is a problem trying to determine whether an error occurred during the validating
of the session.public boolean processResponse(CommandContext commandContext, TypedProperty resProp) throws ECException
processResponse
in interface com.ibm.commerce.adapter.DeviceFormatAdapter
processResponse
in class com.ibm.commerce.adapter.nonhttp.NonHttpAdapterImpl
commandContext
- the command context of the command.resProp
- the response properties returned by the command.ECException
- if there is a problem determining whether an exception happened or not.public void setCommandProperties(CommandProperty cmdProp)
DummyProgramAdapterSessionContext
.cmdProp
- the command property for the adapter.public CommandProperty validateDeviceFormat(java.lang.Object req)
req
- the request object.