com.ibm.commerce.foundation.server.services.httpdevice

Class Device

  • java.lang.Object
    • com.ibm.commerce.foundation.server.services.httpdevice.Device


  • public class Device
    extends java.lang.Object
    This class defines the configuration attribute of a particular device. The required attributes are the name of the device, the corresponding internal device ID and channel ID. It also stores additional attributes in a hash map. This object is cached in DeviceConfigurationServiceSourceImpl once a device is resolved.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Device(java.lang.String name, java.lang.Integer deviceId, java.lang.Integer channelId)
      Default Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Integer getChannelId()
      Returns the channel ID.
      java.lang.Integer getDeviceId()
      Returns the device ID.
      java.lang.String getName()
      Returns the name of the device.
      java.util.Map getProperties()
      Returns a map of additional properties of the device.
      java.lang.Object getProperty(java.lang.Object propertyName)
      Returns a property of the device for the given property name.
      void setChannelId(java.lang.Integer channelId)
      Sets the channel ID.
      void setDeviceId(java.lang.Integer deviceId)
      Sets the device ID.
      void setName(java.lang.String name)
      Sets the name of the device.
      void setProperties(java.util.Map properties)
      Sets a map of additional properties of the device.
      void setProperty(java.lang.Object propertyName, java.lang.Object propertyValue)
      Sets a property of the device for the given property name.
      java.lang.String toString()
      Returns a string representation of this Device object.
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Device

        public Device(java.lang.String name,
                      java.lang.Integer deviceId,
                      java.lang.Integer channelId)
        Default Constructor. Create an instance of the object using the given name, device ID and channel ID.
        Parameters:
        name - The name of the device.
        deviceId - The ID of the device.
        channelId - The ID of the channel.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the device.
        Returns:
        The name of the device.
      • setName

        public void setName(java.lang.String name)
        Sets the name of the device.
        Parameters:
        name - The name of the device.
      • getDeviceId

        public java.lang.Integer getDeviceId()
        Returns the device ID.
        Returns:
        The device ID.
      • setDeviceId

        public void setDeviceId(java.lang.Integer deviceId)
        Sets the device ID.
        Parameters:
        deviceId - The device ID.
      • getChannelId

        public java.lang.Integer getChannelId()
        Returns the channel ID.
        Returns:
        The channel ID.
      • setChannelId

        public void setChannelId(java.lang.Integer channelId)
        Sets the channel ID.
        Parameters:
        channelId - The channel ID.
      • getProperties

        public java.util.Map getProperties()
        Returns a map of additional properties of the device.
        Returns:
        The additional properties of the device.
      • setProperties

        public void setProperties(java.util.Map properties)
        Sets a map of additional properties of the device.
        Parameters:
        properties - The additional properties of the device.
      • getProperty

        public java.lang.Object getProperty(java.lang.Object propertyName)
        Returns a property of the device for the given property name.
        Parameters:
        propertyName - The name of the property
        Returns:
        The property of the device for the given property name.
      • setProperty

        public void setProperty(java.lang.Object propertyName,
                                java.lang.Object propertyValue)
        Sets a property of the device for the given property name.
        Parameters:
        propertyName - The name of the property.
        propertyValue - The value of the property.
      • toString

        public java.lang.String toString()
        Returns a string representation of this Device object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Returns a string representation of this Device object.