com.ibm.commerce.pvcadapter

Class DeviceInfo

  • java.lang.Object
    • com.ibm.commerce.pvcadapter.DeviceInfo


  • public class DeviceInfo
    extends java.lang.Object
    A data bean which contains information about the client's device. The following code is a sample that explains how to insert this object inside the JSP script.
    <jsp:useBean id="pvc_device_info" scope="request" class="com.ibm.commerce.pvcadapter.DeviceInfo">
    </jsp:useBean>
    A PvC adapter allows you to design a Web page that is optimized for client specifications, using information from the data bean object.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      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.
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
      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
      The 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

      Constructors 
      Constructor and Description
      DeviceInfo(PVCAdapter pvcAdapter)
      Constructs a DeviceInfo object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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 are 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 the type of the session which is stored as SESSIONTYPE in the 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 height 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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • ATTRIB_KEY

        public static final java.lang.String ATTRIB_KEY
        ID of the databean in the response property.
        See Also:
        Constant Field Values
      • 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.
      • model

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

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

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

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

        public int width
        Width of the display the device has.
      • height

        public int height
        Height of the display the device has
      • colors

        public int colors
        Number of colors the device can display.
      • isMonochrome

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

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

        public java.lang.String soundFormat
        The format of sound file the device can play.
      • 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.
      • contentDirectory

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

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

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

        public java.lang.String modelDescription
        Description of the device model.
    • Constructor Detail

      • DeviceInfo

        public DeviceInfo(PVCAdapter pvcAdapter)
        Constructs a DeviceInfo object. Fields are initialized information from the adapter.
        Parameters:
        pvcAdapter - the PvC adapter to use when initializing.
    • Method Detail

      • getColors

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

        public java.lang.String getContentDirectory()
        Returns name of the directory where the documents for the client's device are located.
        Returns:
        The directory name.
      • getDocumentFormat

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

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

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

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

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

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

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

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

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

        public java.lang.String getPvcSessionType()
        Returns the type of the session which is stored as SESSIONTYPE in the PVCSESSION table. Each adapter has unique session type. The return value differs according to the PVCAadapter used for the session.
        Returns:
        The session type.
      • getSoundFormat

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

        public java.lang.String getSpec()
        Returns name of the device specification which is defined in PVCDEVSPEC table
        Returns:
        The 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:
        The description of the device specification.
      • getVendor

        public java.lang.String getVendor()
        Returns vendor name of the device
        Returns:
        The vendor name.
      • getWidth

        public int getWidth()
        Returns width of display the client's device has.
        Returns:
        The 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 - the number of colors.
      • setContentDirectory

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

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

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

        public void setHeight(int newHeight)
        Sets height of the clients display to the data bean.
        Parameters:
        newHeight - the height of the display.
      • setImageFormat

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

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

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

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

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

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

        public void setPvcSessionId(java.lang.String newPvcSessionId)
        Sets reference number to the client's session recored in PVCSESSION table.
        Parameters:
        newPvcSessionId - a 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 - the type of the session.
      • setSoundFormat

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

        public void setSpec(java.lang.String newSpec)
        Sets definition name of the device specification the data bean.
        Parameters:
        newSpec - the 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 - the 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 - the vendor name of the device.
      • setWidth

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