com.ibm.commerce.pvcadapter
Class DeviceInfo

java.lang.Object
  |
  +--com.ibm.commerce.pvcadapter.DeviceInfo

public class DeviceInfo
extends java.lang.Object

DataBean which contains information of the client's device. Following code is sample which explains how to get this object inside JSP script.

<jsp:useBean id="pvc_device_info" scope="request" class="com.ibm.commerce.pvcadapter.DeviceInfo">
</jsp:useBean>
PVCAdapters allows you to design web page optimized for clients specification using information from the data bean object.


Field Summary
static java.lang.String ATTRIB_KEY
          ID of the databean in the response property.
 int colors
          Number of colors the device can display.
 java.lang.String contentDirectory
          Name of the directory where the contents for the device are located.
 java.lang.String documentFormat
          Format of documents the device can display.
 java.lang.String documentVersion
          Version of the document format the device can display.
 int height
          Height of the display the device has
 java.lang.String imageFormat
          Format of images the device can display
 boolean isMonochrome
          Flag indicates that the device has monochrome display or not
 int maxContentLength
          Maximum length of contents the device can receive.
 int maxUrlLength
          Maximum length of URL the device can access.
 java.lang.String model
          Model name of the device.
 java.lang.String modelDescription
          Description of the device model.
 java.lang.String pvcSessionId
          Reference number of the session record in PVCSESSION used to identify the device.
 java.lang.String pvcSessionType
          Name of the PVC adapter usered for the device.
 java.lang.String soundFormat
          Format of sound file the device can play
 java.lang.String spec
          Name of the specification of the device which is recorded in PVCDEVSPEC table.
 java.lang.String specDescription
          Description of the device specification in PVCDEVSPEC table.
 java.lang.String vendor
          Vendor name of the device.
 int width
          Width of the display the device has.
 
Constructor Summary
DeviceInfo(PVCAdapter pvcAdapter)
          Constructs a DeviceInfo object.
 
Method Summary
 int getColors()
          Returns number of colors that the client's device can display.
 java.lang.String getContentDirectory()
          Returns name of the directory where the documents for the client's device is located.
 java.lang.String getDocumentFormat()
          Returns document format supported by the client's device.
 java.lang.String getDocumentVersion()
          Returns document version supported by the client's device.
 int getHeight()
          Returns height of display the client's device has.
 java.lang.String getImageFormat()
          Returns image format supported by the client's device.
 int getMaxContentLength()
          Returns maximum content length supported by the client's device.
 int getMaxUrlLength()
          Returns maximum URL length supported by the client's device.
 java.lang.String getModel()
          Returns model name of the client's device.
 java.lang.String getModelDescription()
          Returns description of the client's device model.
 java.lang.String getPvcSessionId()
          Returns reference number of the session information stored in PVCSESSION table.
 java.lang.String getPvcSessionType()
          Returns type of the session which is stored as SESSIONTYPE in PVCSESSION table.
 java.lang.String getSoundFormat()
          Returns supported type of sound file.
 java.lang.String getSpec()
          Returns name of the device specification which is defined in PVCDEVSPEC table
 java.lang.String getSpecDescription()
          Returns description of the device specification which is defined in PVCDEVSPEC table
 java.lang.String getVendor()
          Returns vendor name of the device
 int getWidth()
          Returns width of display the client's device has.
 boolean isIsMonochrome()
          Returns whether client's display is monochrome
 void setColors(int newColors)
          Sets number of colors to the data bean.
 void setContentDirectory(java.lang.String newContentDirectory)
          Sets content directory to the data bean.
 void setDocumentFormat(java.lang.String newDocumentFormat)
          Sets supported document format to the data bean.
 void setDocumentVersion(java.lang.String newDocumentVersion)
          Sets supported version of document format to the data bean.
 void setHeight(int newHeight)
          Sets hieght of the clients display to the data bean.
 void setImageFormat(java.lang.String newImageFormat)
          Sets supported image format to the data bean.
 void setIsMonochrome(boolean newIsMonochrome)
          Sets monochrome flag to the data bean.
 void setMaxContentLength(int newMaxContentLength)
          Sets maximum content length to the data bean.
 void setMaxUrlLength(int newMaxUrlLength)
          Sets maximum URL length to the data bean.
 void setModel(java.lang.String newModel)
          Sets model name to the data bean.
 void setModelDescription(java.lang.String newModelDescription)
          Sets description of the client's device model to the data bean.
 void setPvcSessionId(java.lang.String newPvcSessionId)
          Sets reference number to the client's session recored in PVCSESSION table.
 void setPvcSessionType(java.lang.String newPvcSessionType)
          Sets type of the client's session stored in PVCSESSION table.
 void setSoundFormat(java.lang.String newSoundFormat)
          Sets supported sound format to the data bean
 void setSpec(java.lang.String newSpec)
          Sets definition name of the device specification the data bean
 void setSpecDescription(java.lang.String newSpecDescription)
          Sets description of the device specification to the data bean
 void setVendor(java.lang.String newVendor)
          Sets vendor name of the device to the data bean
 void setWidth(int newWidth)
          Sets width of the display to the data bean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIB_KEY

public static final java.lang.String ATTRIB_KEY
ID of the databean in the response property.

colors

public int colors
Number of colors the device can display.

contentDirectory

public java.lang.String contentDirectory
Name of the directory where the contents for the device are located.

documentFormat

public java.lang.String documentFormat
Format of documents the device can display.

documentVersion

public java.lang.String documentVersion
Version of the document format the device can display.

height

public int height
Height of the display the device has

imageFormat

public java.lang.String imageFormat
Format of images the device can display

isMonochrome

public boolean isMonochrome
Flag indicates that the device has monochrome display or not

maxContentLength

public int maxContentLength
Maximum length of contents the device can receive.

maxUrlLength

public int maxUrlLength
Maximum length of URL the device can access.

model

public java.lang.String model
Model name of the device.

modelDescription

public java.lang.String modelDescription
Description of the device model.

pvcSessionId

public java.lang.String pvcSessionId
Reference number of the session record in PVCSESSION used to identify the device.

pvcSessionType

public java.lang.String pvcSessionType
Name of the PVC adapter usered for the device.

soundFormat

public java.lang.String soundFormat
Format of sound file the device can play

spec

public java.lang.String spec
Name of the specification of the device which is recorded in PVCDEVSPEC table.

specDescription

public java.lang.String specDescription
Description of the device specification in PVCDEVSPEC table.

vendor

public java.lang.String vendor
Vendor name of the device.

width

public int width
Width of the display the device has.
Constructor Detail

DeviceInfo

public DeviceInfo(PVCAdapter pvcAdapter)
Constructs a DeviceInfo object. Fields are initialized information from the adapter.
Parameters:
PVC - adapter
Method Detail

getColors

public int getColors()
Returns number of colors that the client's device can display.
Returns:
number of colors

getContentDirectory

public java.lang.String getContentDirectory()
Returns name of the directory where the documents for the client's device is located.
Returns:
Directory name

getDocumentFormat

public java.lang.String getDocumentFormat()
Returns document format supported by the client's device.
Returns:
Supported document format

getDocumentVersion

public java.lang.String getDocumentVersion()
Returns document version supported by the client's device.
Returns:
Supported document version

getHeight

public int getHeight()
Returns height of display the client's device has.
Returns:
Hight of display panel

getImageFormat

public java.lang.String getImageFormat()
Returns image format supported by the client's device.
Returns:
Supported image format

getMaxContentLength

public int getMaxContentLength()
Returns maximum content length supported by the client's device.
Returns:
maximun content length

getMaxUrlLength

public int getMaxUrlLength()
Returns maximum URL length supported by the client's device.
Returns:
Maximum URL length

getModel

public java.lang.String getModel()
Returns model name of the client's device.
Returns:
Model name

getModelDescription

public java.lang.String getModelDescription()
Returns description of the client's device model.
Returns:
Description of the model

getPvcSessionId

public java.lang.String getPvcSessionId()
Returns reference number of the session information stored in PVCSESSION table.
Returns:
Reference number of session information

getPvcSessionType

public java.lang.String getPvcSessionType()
Returns type of the session which is stored as SESSIONTYPE in PVCSESSION table. Each apateres has unique session type. Return value differs accoding PVCAadapter used for the session.
Returns:
Type of the session.

getSoundFormat

public java.lang.String getSoundFormat()
Returns supported type of sound file.
Returns:
Supported sound format

getSpec

public java.lang.String getSpec()
Returns name of the device specification which is defined in PVCDEVSPEC table
Returns:
Definition name of the device specification

getSpecDescription

public java.lang.String getSpecDescription()
Returns description of the device specification which is defined in PVCDEVSPEC table
Returns:
Description of the device specification

getVendor

public java.lang.String getVendor()
Returns vendor name of the device
Returns:
Vedor name

getWidth

public int getWidth()
Returns width of display the client's device has.
Returns:
Width of display

isIsMonochrome

public boolean isIsMonochrome()
Returns whether client's display is monochrome
Returns:
true if client has monochrome display, false otherwise

setColors

public void setColors(int newColors)
Sets number of colors to the data bean.
Parameters:
newColors - Number of colors

setContentDirectory

public void setContentDirectory(java.lang.String newContentDirectory)
Sets content directory to the data bean.
Parameters:
newContentDirectory - Directory name

setDocumentFormat

public void setDocumentFormat(java.lang.String newDocumentFormat)
Sets supported document format to the data bean.
Parameters:
newDocumentFormat - Document format

setDocumentVersion

public void setDocumentVersion(java.lang.String newDocumentVersion)
Sets supported version of document format to the data bean.
Parameters:
newDocumentVersion - Document version

setHeight

public void setHeight(int newHeight)
Sets hieght of the clients display to the data bean.
Parameters:
newHeight - Height of the display

setImageFormat

public void setImageFormat(java.lang.String newImageFormat)
Sets supported image format to the data bean.
Parameters:
newImageFormat - Image format

setIsMonochrome

public void setIsMonochrome(boolean newIsMonochrome)
Sets monochrome flag to the data bean.
Parameters:
newIsMonochrome - ture if display is monochrome; false otherwise

setMaxContentLength

public void setMaxContentLength(int newMaxContentLength)
Sets maximum content length to the data bean.
Parameters:
newMaxContentLength - Maximum content length

setMaxUrlLength

public void setMaxUrlLength(int newMaxUrlLength)
Sets maximum URL length to the data bean.
Parameters:
newMaxUrlLength - Maximum URL length

setModel

public void setModel(java.lang.String newModel)
Sets model name to the data bean.
Parameters:
newModel - Model name

setModelDescription

public void setModelDescription(java.lang.String newModelDescription)
Sets description of the client's device model to the data bean.
Parameters:
newModelDescription - Model description

setPvcSessionId

public void setPvcSessionId(java.lang.String newPvcSessionId)
Sets reference number to the client's session recored in PVCSESSION table.
Parameters:
newPvcSessionId - Reference to the session record.

setPvcSessionType

public void setPvcSessionType(java.lang.String newPvcSessionType)
Sets type of the client's session stored in PVCSESSION table.
Parameters:
newPvcSessionType - Type of the session

setSoundFormat

public void setSoundFormat(java.lang.String newSoundFormat)
Sets supported sound format to the data bean
Parameters:
newSoundFormat - Supported sound format

setSpec

public void setSpec(java.lang.String newSpec)
Sets definition name of the device specification the data bean
Parameters:
newSpec - Definition name of the device specification

setSpecDescription

public void setSpecDescription(java.lang.String newSpecDescription)
Sets description of the device specification to the data bean
Parameters:
newSpecDescription - Description of the device specification

setVendor

public void setVendor(java.lang.String newVendor)
Sets vendor name of the device to the data bean
Parameters:
newVendor - Vendor name of the device

setWidth

public void setWidth(int newWidth)
Sets width of the display to the data bean
Parameters:
newWidth - Width of the display