8.2 Value Types

Each configuration value has an associated data type. If the data type is not specified on the XML <definition> element of the value, the data type defaults to String.

The engine enforces configuration value data typing. If a configuration value definition has an invalid data type, the operation that depends on the configuration value definition fails (for example, starting a driver or a job).

8.2.1 String

The String data type value is a sequence of Unicode characters. Any valid XML character that is allowed in XML PCDATA is allowed in the value of a string value. String values can be empty (that is, the string value might have zero length). A string value can have a multiline attribute on the <definition> element. If the multiline value has a value of True, the Agent should present the value honoring any embedded end-of-line characters and allow the user to specify line breaks.

8.2.2 Boolean

A Boolean data type has a value that is either True or False. Boolean values cannot have empty values. The content of the value element must match the following production:

Boolean ::= 'true' | 'false'

Example:

    <definition
         type="boolean"
         name="perform-magic"
         display-name="Do what I mean, not what I say"
         >
         <value>true</value>
         <description>This is an example of a boolean value</description>
    </definition>

8.2.3 Integer

The Integer data type has a value that is one or more Unicode characters that match the XML specification production digit. The Integer values might optionally be preceded by a ‘-‘ (hyphen) character, indicating negation. The minimum and maximum integer values are those that can be represented in a signed, two’s complement 32-bit value as in the Java language int type. The Integer values can be restricted in range. A lower bound, an upper bound, or both can be specified. The content of the value element must match the following pattern:

Integer ::= '-'? Digit+

Digit ::= '1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'

For example:

<configuration-values>
        <definitions>
           <definition display-name="An example Structured GCV" instance-separator=":" 
name="demo.structure" type="structured" value-separator=";">
          <template max-count="12" min-count="0">
          <definition display-name="Name of the object class" name="class-name" type="string">
         <description>Class the rest of this GCV refers too</description> 
  </definition>
         <definition display-name="DN of the driver that should be used to handle this instances class" 
dn-space="dirxml" dn-type="slash" name="driver-dn" type="dn">
          <description>Driver that will handle this class and attriutes.</description> 
         <value /> 
  </definition>
          <definition display-name="List of attributes to manage" item-separator="|" 
name="attribute-list" type="list">
          <description>For this instances class, for this instances driver, use this instances 
attribute-list</description> 
  </definition>
          <definition display-name="Password for this driver" name="password" type="password-ref">
         <description>A password to use just for this driver</description> 
         <value>named-password-name</value> 
  </definition>
         <definition display-name="IP Pof the server" name="server-ip" type="string">
         <description>Server IP</description> 
  </definition>
          <definition display-name="Port to use" name="server-port" range-hi="65536" range-lo="1024" 
type="integer">
         <description /> 
         <value>1024</value> 
  </definition>
         </template>
         <value>
         <instance>
          <definition display-name="Name of the object class" name="class-name" type="string">
         <description>Class the rest of this GCV refers too</description> 
         <value>User</value> 
  </definition>
          <definition display-name="DN of the driver that should be used to handle this instances class" 
dn-space="dirxml" dn-type="slash" name="driver-dn" type="dn">
          <description>Driver that will handle this class and attriutes.</description> 
         <value>services\idm\driverset\Driver1</value> 
  </definition>
          <definition display-name="List of attributes to manage" item-separator="|" 
name="attribute-list" type="list">
          <description>For this instances class, for this instances driver, use this instances 
attribute-list</description> 
         <value>
         <item>Surname</item> 
         <item>Given Name</item> 
         <item>Description</item> 
         <item>Full Name</item> 
         </value>
  </definition>
         <definition display-name="Password for this driver" name="password" type="password-ref">
         <description>A password to use just for this driver</description> 
         <value>named-password-name_1</value> 
  </definition>
         <definition display-name="IP Pof the server" name="server-ip" type="string">
        <description>Server IP</description> 
        <value>10.1.1.1</value> 
  </definition>
        <definition display-name="Port to use" name="server-port" range-hi="65536" range-lo="1024" 
type="integer">
         <description /> 
         <value>8090</value> 
  </definition>
         </instance>
         <instance>
          <definition display-name="Name of the object class" name="class-name" type="string">
         <description>Class the rest of this GCV refers too</description> 
         <value>Group</value> 
  </definition>
            <definition display-name="DN of the driver that should be used to handle this instances class" 
dn-space="dirxml" dn-type="slash" name="driver-dn" type="dn">
           <description>Driver that will handle this class and attriutes.</description> 
          <value>services\idm\driverset\Driver2</value> 
  </definition>
              <definition display-name="List of attributes to manage" item-separator="|" 
name="attribute-list" type="list">
               <description>For this instances class, for this instances driver, use this instances 
attribute-list</description> 
                  <value>
                  <item>Member</item> 
                  <item>Owner</item> 
                  <item>Description</item> 
                  </value>
  </definition>
                   <definition display-name="Password for this driver" name="password" type="password-ref">
                      <description>A password to use just for this driver</description> 
                        <value>named-password-name_2</value> 
   </definition>
                  <definition display-name="IP Pof the server" name="server-ip" type="string">
                 <description>Server IP</description> 
                  <value>10.1.1.2</value> 
   </definition>
                    <definition display-name="Port to use" name="server-port" range-hi="65536" range-lo="1024" 
type="integer">
                 <description /> 
               <value>8091</value> 
             </definition>
          </instance>
        </value>
      <description>Description of a structured GCV</description> 
   </definition>
 </definitions>
</configuration-values>

8.2.4 Real

The Real data type values have a value that describes a real (or floating-point) number. The total allowable range of values for a real value are those that can be represented by a 64-bit double-precision floating point value as in the Java language double type. The Real values can be restricted in range. A lower bound, an upper bound, or both can be specified. The content of the value element must match the following production:

Real ::= Integer | ('-'? Digit+ '.' Digit+)

Example:

        <definition
             type="real"
             name="multiplier"
             display-name="Factor by which to multiply collective IQ"
             range-hi="1.0"
             >
             <value>0.6</value>
            <description>When one or more managers walk into a room, the collective IQ is affected. This value is used to calculate the approximate resulting collective IQ.</description>
         </definition>

8.2.5 Dn

The DN data type values must be a syntactically legal distinguished name. The DN values must be further qualified with a dn-type attribute that specifies the DN syntax. A DN value can have an empty value. If dn-space="dirxml", an object selection button should be presented.

Examples:

          <definition
              type="dn"
              name="user-account"
               display-name="Enter the user account to be used for authentication"
              dn-type="ldap"
              >
              <value>cn=admin,ou=ITDept,o=TheCompany</value>
               <description>This value specifies the DN of a user account used to authenticate to the LDAP directory.</description>
              </definition>
              <definition type="dn" name="exchange-account"
              display-name="Enter the DN of the Exchange user"
              dn-type="custom"
              dn-delims="10./+=*\"
              >
              <value>CN=Admin+UID=1056/OU=Mayberry</value>
         </definition>

8.2.6 Enum

The Enum data type value is one of a defined set of strings. Each defined string must conform to the string production.

For example:

       <definition
          type="enum"
          name="magical-features"
          display-name="Choose the magical feature set"
          >
          <value>full</value>
           <enum-choice display-name="Full-on, magical stuff">full</enum-choice>
           <enum-choice display-name="Partial magic, but no rabbits">partial</enumchoice>
           <enum-choice display-name="No magic, just boring normal life">none</enumchoice>
                </definition>
                <definition
                     display-name="xlfid(submit-method)Scheduled action"
                     name="action"
                     type="enum"
                     >
   <enum-choice display-name="xlfid(start)Start the driver">start</enumchoice>
   <enum-choice display-name="xlfid(stop)Stop the driver">stop</enum-choice>
   <enum-choice display-name="xlfid(toggle)Toggle the driver">toggle</enumchoice>
   <value>start</value>
                  </definition>

8.2.7 List

The List data type value is an ordered list of zero or more strings. The list value also specifies a delimiter character that is used when outputting the list value in a non-structured location (for example, as a single string consisting of each individual string in the list separated by the delimiter character).

The content of each <item> element must match the following:

String ::= Char*

The list items can be empty or duplicate of other list items. The order of list items is significant. The Agent must preserve all characters in a list item exactly as specified by the user, which includes white space. The Agent serializing the definition XML must therefore specify an xml:space="preserve" attribute on the value element. It might also be necessary to use character entity references for some white space according to the XML rules for parsers:

For example:

<definition
display-name="List o' things"
item-separator=";"
name="ingredients"
type="list"
>
<value>
<item>Snips</item>
<item>Snails</item>
<item>Puppy Dog Tails</item>
<item>Sugar</item>
<item>Spice</item>
<item>Everything Nice</item>
</value>
</definition>

8.2.8 Structured

The structured data type value has two fundamental parts: a template that defines a set of simple types (string, enum, and so on), and zero or more instances that contain the actual values of the structured control value. In some ways, structured values are similar to structures in the C programming language. The structured value also specifies the delimiter strings that are used when outputting the value as a single string. The delimiters are used for string representation, but in a nodeset context, you get the <instance> node tree fragments

For example, the following Agent presentation has a nested control value with buttons for adding and removing instances. The example allows for template creation and editing.

<definition
display-name="Servers list"
value-separator=";"
instance-separator="&#10;"
name="servers"
type="structured"
>
<template>
<definition name="host" display-name="Host" type="string">
<value/>
</definition>
<definition name="port" display-name="TCP port" type="integer" rangelo="
1" range-hi="65535">
<value>1</value>
</definition>
</template>
<value>
<instance>
<definition name="host" display-name="Host" type="string">
<value>192.168.0.1</value>
</definition>
<definition name="port" display-name="TCP port" type="integer"
range-lo="1" range-hi="65535">
<value>8028</value>
</definition>
</instance>
<instance>
<definition name="host" display-name="Host" type="string">
<value>10.0.0.1</value>
</definition>
<definition name="port" display-name="TCP port" type="integer"
range-lo="1" range-hi="65535">
<value>8028</value>
</definition>
</instance>
</value>
</definition>

8.2.9 Password-ref

The password-ref data type value is the key value of a named password. The named password key values can be any non-empty sequence of Unicode characters. Because of the representation of CV definitions in XML, the actual set of Unicode characters allowed are those that are legal in XML PCCHAR data. The Agent presenting the password-ref value is responsible for setting any user-entered password value to the named password. If the referenced named password does not exist, then the Agent must create it. The user-entered value must not be placed in the XML definition.

The following example shows an Agent presentation of the password field, associated confirmation field, and associated clear value button.

 <definition
   type="password-ref"
   name="account-pwd"
   display-name="Password for the authentication account"
   >
   <value>auth-acct-pwd</value>
 </definition>

8.2.10 Dn-ref

The dn-ref data type does not have a a value of its own. Instead, it assumes any value obtained from a DN-syntax eDirectory attribute on the object containing the value definition. The information about the eDirectory attribute is specified by XML attributes on the <definition> element.

The following example shows an Agent presentation of an entry field with the associated object selection button.

<definition 
       type="dn-ref" 
       name="pwd-policy" 
       display-name="Password Policy object used for password generation" 
       attr-name="nspmPasswordPolicyDN" 
       aux-class-name="DirXML-PasswordGeneration"> 
    <target-class>nspmPasswordPolicy</target-class> 
 <value>DirXML-PasswordPolicy.Password Policies.Security</value> 
</definition>

8.2.11 GCV-ref

A GCV reference value does not have a value of its own and is not defined with a <definition> element. Instead, a value is obtained from and stored to a GCV in an enclosing logical structure. For example, a gcv-ref value in shim parameters refers to a GCV defined for the driver. The GCV is specified by the name attribute on the <gcv-ref> element.

The following example shows an Agent presentation that depends on the referenced GCV:

<gcv-ref name="placement-base"/>

<definition display-name="Placement base container" name="placement-base" type="string">
               <description>This is  the placement base container</description>
              <value></value>
        </definition>