com.ibm.commerce.adapter
Interface DeviceFormatAdapter

All Known Subinterfaces:
HttpAdapter, HttpAdapterFactory, PVCAdapter

public interface DeviceFormatAdapter

Provides the basic interface for a device format adapter.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 java.lang.Integer getDefaultDeviceFormatId()
          Returns the default device format identifier for this adapter
 java.lang.Integer getDeviceFormatId()
          Returns the device format identifier for this adapter
 java.lang.String getDeviceFormatName()
          Return the device format name.
 java.lang.String getDeviceFormatType()
          Returns the device format type name such as Browser, PVCDevice
 java.lang.Integer getDeviceFormatTypeId()
          Returns the device format type id for this adapter.
 java.lang.String getDocumentPathName(java.lang.String name)
          Given a base document name, returns a actual document name based on the device
 TypedProperty getRequestProperties()
          Returns the request parameters in a TypedProperty object.
 SessionContext getSessionContext()
          Gets the session context.
 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.
 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 resProp)
          This method is called by the web controller after it has successfully finished the execution of the request.
 void setDefaultDeviceFormatId(java.lang.Integer value)
          Sets the device format Id.
 void setDeviceFormatId(java.lang.Integer value)
          Sets the device format Id.
 void setDeviceFormatName(java.lang.String value)
          Sets the device format name.
 void setDeviceFormatType(java.lang.String value)
          Sets the input device type for this request.
 void setDeviceFormatTypeId(java.lang.Integer value)
          Sets the device format type Id.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Method Detail

getDefaultDeviceFormatId

public java.lang.Integer getDefaultDeviceFormatId()
Returns the default device format identifier for this adapter

Returns:
Integer

getDeviceFormatId

public java.lang.Integer getDeviceFormatId()
Returns the device format identifier for this adapter

Returns:
Integer

getDeviceFormatName

public java.lang.String getDeviceFormatName()
Return the device format name. e.g. Browser
Returns:
java.lang.String

getDeviceFormatType

public java.lang.String getDeviceFormatType()
Returns the device format type name such as Browser, PVCDevice

Returns:
java.lang.String

getDeviceFormatTypeId

public java.lang.Integer getDeviceFormatTypeId()
Returns the device format type id for this adapter. For example: -1 - Browser -2 - PVCDevice
Returns:
Integer

getDocumentPathName

public java.lang.String getDocumentPathName(java.lang.String name)
Given a base document name, returns a actual document name based on the device
Parameters:
name - String - base name for the output document
Returns:
String - the name of the actual document

getRequestProperties

public TypedProperty getRequestProperties()
Returns the request parameters in a TypedProperty object.

getSessionContext

public SessionContext getSessionContext()
                                 throws ECException
Gets the session context.
Returns:
SessionContext

postInvokeCommand

public void postInvokeCommand(CommandContext commandContext)
                       throws ECException
This method implements adapter specific function after the execution of a command.
Parameters:
commandContext - CommandContext - the command context associated with the command.
Throws:
ECException -  

preInvokeCommand

public boolean preInvokeCommand(CommandContext commandContext)
                         throws ECException
This method implements adapter specific function before the execution of a command.
Parameters:
commandContext - CommandContext - the command context associated with the command.
Returns:
boolean - true - to continue, false - finished request
Throws:
ECException -  

processErrorResponse

public boolean processErrorResponse(CommandContext commandContext,
                                    java.lang.Exception e)
                             throws ECException
This method is called by the web controller when the execution of a request has failed. The web controller will execute the error view task associated with the exeception if this method returns true.
Parameters:
exception - Exception - exception caught when executing the request.
Returns:
boolean - true if the error view task is to be executed by the web controller - false if there is no need to execute the error view task

processResponse

public boolean processResponse(CommandContext commandContext,
                               TypedProperty resProp)
                        throws ECException
This method is called by the web controller after it has successfully finished the execution of the request. The web controller will execute the view task associated with the command if this method returns true.
Parameters:
respProperties - TypedProperty - response properties returned by the command.
Returns:
boolean - true if the view task is to be executed by the web controller - false if there is no need to execute the view task

setDefaultDeviceFormatId

public void setDefaultDeviceFormatId(java.lang.Integer value)
Sets the device format Id.
Parameters:
value - java.lang.Integer

setDeviceFormatId

public void setDeviceFormatId(java.lang.Integer value)
Sets the device format Id.
Parameters:
value - java.lang.Integer

setDeviceFormatName

public void setDeviceFormatName(java.lang.String value)
Sets the device format name.
Parameters:
value - java.lang.String

setDeviceFormatType

public void setDeviceFormatType(java.lang.String value)
Sets the input device type for this request.
Parameters:
value - java.lang.String

setDeviceFormatTypeId

public void setDeviceFormatTypeId(java.lang.Integer value)
Sets the device format type Id.
Parameters:
value - java.lang.Integer