|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.adapter.AbstractHttpAdapter | +--com.ibm.commerce.pvcadapter.PVCAdapterImpl
Base implementaion of the pervasive computing(PvC) adapter. Subclasses should implements abstract
method provided by PVCAdapterImpl.
To install PvC adapters, insert following tags into XML configuration file.
The tag HttpAdapters is located at the end of the configuraiton
file.
<!-- All PvC adapter should be listed as a HttpAdapter in HttpAdapters tag --></HttpAdapters>
<HttpAdaptername = "UniqueIdentifier">
deviceFormatId = "DeviceFormatId"
deviceFormatType = "DeviceFormatType"
deviceFormatTypeId = "DeviceFormatTypeId"
factoryClassname="ClassNameOfTheAdapter"
enabled="true"<!-- PVC adapters should provide following information --></HttpAdapter>
<PVCAdapterregistrationMode="RegistrationMode">
preferredLogonTimeout="LogonTimeout"
bufferTimeout="BufferTimeout"<!-- The adapter accepts access from following address--></PVCAdapter>
<IPCheck> <!-- If you don't need address check, do not specify IPCheck tag --><IP type="TypeOfTheAddress" value="Address"/></IPCheck>
...
<IP type="TypeOfTheAddress" value="Address"/><!-- The adapter can exculdes listed commands-->
<ExcludeCommands><!-- List commands the adapter should not execute--></ExcludeCommands>
<Command name="CommandName"/>
...
<Command name="CommandName"/><!-- The adapter can request user to reenter password to execute commands -->
<RelogonCommands><!-- List commands the adapter needs password --></RelogonCommands>
<Command name="CommandName"/>
...
<Command name="CommandName"/><HttpAdapter>
... <!-- You can install multiple adapters --></HttpAdapter>
UniqueIdentifier
Unique name to identify each adapters. Value must be shorter than length of PVCSESSION.SESSIONTYPE table.DeviceFormatId
Specify device format id of the adapter. The device format needs to be listed in DEVICEFORMAT table.DeviceFormatType
Specify name of the device format.DeviceFormatTypeId
Specify device format id an adapter with which the adapter shares entries in VIEWREG table. If you wish to separate entires in VIEWREG table with PC browser, you can speficy same device format ID as PC browser.ClassNameOfTheAdapter
Specify name of the adapter class.RegistrationMode
Specify registration mode from followings.LogonTimeout
0: Unlimited
1: Users need to register device infromation to login to WebSphere Commerce server using their device
2: Users need to register device infromation to login to WebSphere Commerce server using their device and one user can register only use one device to login to WebSphere Commerce server.
Time to logon expires. Specify value in minutesBufferTimeout
Time to buffered parameters are revoked. Specify value in minutesTypeOfTheAddress
Type of the address. Value values is net or hostCommandName
net: Specified Address is netowk address
host: Specified Address is host address
Name of a targetable command
Field Summary | |
protected static java.lang.String |
DEFAULT_MODELNAME
|
protected java.lang.String |
deviceModel
|
protected PVCDeviceModelAccessBean |
modelBean
|
protected PVCAdapterDesc |
pvcdesc
|
protected java.lang.Long |
pvcSessionId
|
protected PVCSessionAccessBean |
sessionAccessBean
|
protected SessionContext |
sessionContext
|
protected PVCDeviceSpecAccessBean |
specAccessBean
|
static java.lang.Integer |
STATUS_LOGOFF
Value used in PVCSESSION to indicate that the PVC device user is logoff status. |
static java.lang.Integer |
STATUS_LOGON
Value used in PVCSESSION to indicate that the PVC device user is logon status. |
protected java.lang.Integer |
storeId
|
protected java.lang.String |
terminalId
|
protected UserPVCDeviceAccessBean |
userDeviceAccessBean
|
Fields inherited from class com.ibm.commerce.adapter.AbstractHttpAdapter |
desc, req, reqObj, requestProperties, resp |
Fields inherited from interface com.ibm.commerce.pvcadapter.PVCAdapter |
COPYRIGHT |
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 |
Fields inherited from interface com.ibm.commerce.adapter.HttpAdapterFactory |
COPYRIGHT |
Constructor Summary | |
PVCAdapterImpl()
|
Method Summary | |
HttpAdapter |
createAdapter(com.ibm.commerce.pvcadapter.HttpServletRequest req,
com.ibm.commerce.pvcadapter.HttpServletResponse resp,
TypedProperty prop)
Checks to see if the HttpServletRequest data is in this device format. |
HttpAdapterDesc |
getAdapterDesc()
Return the terminal id of the device. |
java.lang.Integer |
getBufferTimeout()
Gets buffer timeout value applied to the adapter from XML configuration file. |
abstract java.lang.String |
getDeviceModel()
Gets the model name from the request. |
java.lang.String |
getDocumentPathName(java.lang.String name)
Gets the actual output document name based on a base document name. |
java.lang.Integer |
getLogonTimeout()
Gets the timeout value applied for the adapter from XML configuration file. |
PVCAdapterDesc |
getPVCAdapterDesc()
Gets the description of the PvC adapter |
PVCDeviceModelAccessBean |
getPVCDeviceModelAccessBean()
Returns the access bean which contains model information of the device. |
PVCDeviceSpecAccessBean |
getPVCDeviceSpecAccessBean()
Returns the access bean which contains spec information of the device. |
PVCSessionAccessBean |
getPVCSessionAccessBean()
Returns the access bean which contains session information of the device. |
java.lang.Long |
getPvcSessionId()
Returns session ID used for session control using the adapter. |
java.lang.String |
getRegistrationMode()
Returns retgistrationMode of the adapter in XML configuration file. |
SessionContext |
getSessionContext()
Returns session context necessary for session control |
java.lang.Integer |
getStoreId()
Returns store ID in the request |
abstract java.lang.String |
getTerminalId()
Gets the terminal ID sent by the wireless gateway. |
UserPVCDeviceAccessBean |
getUserPVCDeviceAccessBean()
Returns access bean of the client's device information in USERPVCDEV table. |
boolean |
httpsRedirection()
Check to see if the adapter can support HTTP -> HTTPS redirection |
void |
initFactory(org.w3c.dom.Element node)
initialize the Adapter based on the informtion defined in the node |
boolean |
isExcludeCommand(java.lang.String value)
Returns true if the named command is excluded for for this adapater. |
boolean |
isRelogonCommand(java.lang.String value)
Returns true if the named command required a relogon for this adapater. |
void |
postInvokeCommand(CommandContext commandContext)
Does necessary processes after invoking command. |
boolean |
preInvokeCommand(CommandContext commandContext)
Does necessary process before invoking command. |
com.ibm.commerce.pvcadapter.HttpControllerRequestObject |
preprocessRequest()
This method preprocess a HttpServletRequest and return a HttpControllerRequestObject. |
void |
setDeviceModel(java.lang.String value)
Sets model name of the device. |
void |
setPVCAdapterDesc(PVCAdapterDesc value)
Sets description of the PVCAdapter. |
void |
setPvcSessionId(java.lang.Long newPvcSessionId)
Sets session ID necessary for session control using PvC adapter. |
void |
setStoreId(java.lang.Integer storeId)
Sets store ID to the adapter |
void |
setTerminalId(java.lang.String value)
Sets terminal ID sent by the carrier to the adapter |
boolean |
userHasTimedout()
This method checks to see if a PvC user has timed out. |
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.pvcadapter.PVCAdapter |
checkDeviceFormat, setAdapterDesc |
Methods inherited from interface com.ibm.commerce.adapter.HttpAdapter |
getRequest, getRequestName, getRequestProperties, getResponse, processRequest, setRequest, setRequestProperties, setResponse |
Methods inherited from interface com.ibm.commerce.adapter.DeviceFormatAdapter |
getDefaultDeviceFormatId, getDeviceFormatId, getDeviceFormatName, getDeviceFormatType, getDeviceFormatTypeId, processErrorResponse, processResponse, setDefaultDeviceFormatId, setDeviceFormatId, setDeviceFormatName, setDeviceFormatType, setDeviceFormatTypeId |
Methods inherited from interface com.ibm.commerce.adapter.HttpAdapterFactory |
checkDeviceFormat, createAdapter |
Field Detail |
protected static java.lang.String DEFAULT_MODELNAME
protected java.lang.String deviceModel
protected PVCDeviceModelAccessBean modelBean
protected PVCAdapterDesc pvcdesc
protected java.lang.Long pvcSessionId
protected PVCSessionAccessBean sessionAccessBean
protected SessionContext sessionContext
protected PVCDeviceSpecAccessBean specAccessBean
public static final java.lang.Integer STATUS_LOGOFF
public static final java.lang.Integer STATUS_LOGON
protected java.lang.Integer storeId
protected java.lang.String terminalId
protected UserPVCDeviceAccessBean userDeviceAccessBean
Constructor Detail |
public PVCAdapterImpl()
Method Detail |
public HttpAdapter createAdapter(com.ibm.commerce.pvcadapter.HttpServletRequest req, com.ibm.commerce.pvcadapter.HttpServletResponse resp, TypedProperty prop)
public HttpAdapterDesc getAdapterDesc()
getAdapterDesc
in interface PVCAdapter
getAdapterDesc
in class AbstractHttpAdapter
public java.lang.Integer getBufferTimeout()
getBufferTimeout
in interface PVCAdapter
public abstract java.lang.String getDeviceModel()
getDeviceModel
in interface PVCAdapter
public java.lang.String getDocumentPathName(java.lang.String name)
getDocumentPathName
in interface DeviceFormatAdapter
getDocumentPathName
in class AbstractHttpAdapter
base
- document namepublic java.lang.Integer getLogonTimeout()
getLogonTimeout
in interface PVCAdapter
public final PVCAdapterDesc getPVCAdapterDesc()
getPVCAdapterDesc
in interface PVCAdapter
public PVCDeviceModelAccessBean getPVCDeviceModelAccessBean()
getPVCDeviceModelAccessBean
in interface PVCAdapter
public PVCDeviceSpecAccessBean getPVCDeviceSpecAccessBean()
getPVCDeviceSpecAccessBean
in interface PVCAdapter
public PVCSessionAccessBean getPVCSessionAccessBean()
getPVCSessionAccessBean
in interface PVCAdapter
public java.lang.Long getPvcSessionId()
getPvcSessionId
in interface PVCAdapter
public java.lang.String getRegistrationMode()
getRegistrationMode
in interface PVCAdapter
public SessionContext getSessionContext() throws ECException
getSessionContext
in interface DeviceFormatAdapter
public java.lang.Integer getStoreId()
public abstract java.lang.String getTerminalId()
getTerminalId
in interface PVCAdapter
public UserPVCDeviceAccessBean getUserPVCDeviceAccessBean()
public boolean httpsRedirection()
httpsRedirection
in interface HttpAdapter
public void initFactory(org.w3c.dom.Element node) throws java.lang.Exception
public final boolean isExcludeCommand(java.lang.String value)
isExcludeCommand
in interface PVCAdapter
name
- String - name of the commandpublic final boolean isRelogonCommand(java.lang.String value) throws ECException
isRelogonCommand
in interface PVCAdapter
name
- String - name of the commandpublic void postInvokeCommand(CommandContext commandContext) throws ECException
postInvokeCommand
in interface DeviceFormatAdapter
commandContext
- Context of the commandpublic boolean preInvokeCommand(CommandContext commandContext) throws ECException
preInvokeCommand
in interface DeviceFormatAdapter
commandContext
- Context of the commandpublic com.ibm.commerce.pvcadapter.HttpControllerRequestObject preprocessRequest()
preprocessRequest
in interface HttpAdapter
preprocessRequest
in class AbstractHttpAdapter
public final void setDeviceModel(java.lang.String value)
setDeviceModel
in interface PVCAdapter
value
- Model namepublic final void setPVCAdapterDesc(PVCAdapterDesc value)
setPVCAdapterDesc
in interface PVCAdapter
val
- desciption of the PVCAdapterpublic void setPvcSessionId(java.lang.Long newPvcSessionId)
setPvcSessionId
in interface PVCAdapter
newPvcSessionId
- Session IDpublic void setStoreId(java.lang.Integer storeId)
setStoreId
in interface PVCAdapter
storeId
- Store IDpublic final void setTerminalId(java.lang.String value)
setTerminalId
in interface PVCAdapter
value
- Terminal IDpublic boolean userHasTimedout()
userHasTimedout
in interface PVCAdapter
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |