Previous Topic

Next Topic

Book Contents

Book Index

Device Configuration

On this page is found detailed information about filtering and configuring the Device. The device filtering is possible to contain the device UID, name, tags and attributes. Also it is possible to change device name, add new device tags to the existing and modify device attributes.

Filtering Devices

<device-filter>

The <device-filter> is optional element and it is used to filter the devices to which the configuration to be applied. The possible ways to filter the devices are - by LDAP filter or by device properties. For this reason the <device-filter> element has two child elements – <ldap> and <device-properties>. Only one of these child elements should be available.

<ldap>

The <ldap> is an optional element, but if this element is not provided, then the <device-filter> element must be provided. The <ldap> tag has required attribute "value", that contains the LDAP filter. This value must be encoded according LDAP specification. The following examples shows LDAP filter that filters all devices that have name "Device Test Name".

<device-filter>

  <ldap value="(name=Device Test Name)" />

</device-filter>

<device-properties>

The <device-properties> is an optional element, but if this element is not provided, then the <ldap> element must be provided. This element is used to represent the restrictions for the device. From the content of the <device-properties>, LDAP filter is constructed by using AND operator. The <device-properties> element has the following child elements <uid>, <name>, <tags> and <attributes>.

The following example filters those devices that have name "Device Test Name" AND tag equal to "Device Test Tag" AND attribute with key "Custom Attribute" and value Map with key "Custom Attribute Value Key" and value List that have two elements "Custom Attribute Value 1" and "Custom Attribute Value 2":

<device-filter>

  <device-properties>

    <name value="Device Test Name" />

    <tags>

      <tag value="Device Test Tag" />

    </tags>

    <attributes>

      <attribute name="Custom Attribute">

        <map-value>

          <element key="Custom Attribute Value Key">

            <array-value>

              <element value="Custom Attribute Value 1" />

              <element value="Custom Attribute Value 2" />

            </array-value>

          </element>

        </map-value>

        <class value="java.util.Map">

          <class value="java.util.List">

            <class value="java.lang.String" />

          </class>

        </class>

      </attribute>

    <attributes>

  </device-properties>

</device-filter>

Configuring Devices

<device-config>

The <device-config> is an optional element and it is used to configure those devices that match the <device-filer>. If there is no <device-filter>, the configuration should configure all devices. The <device-config> element configures the name, tags and attributes of the filtered devices. The <device-config> element has child elements – <name>, <tags> and <attributes>: