<!--
This is the XML DTD for the LDAP Synchronization properties. 
The ldapsync.xml file must include a DOCTYPE of the following
form:

	<!DOCTYPE ldapsync SYSTEM "ldapuser.dtd">

-->

<!--
The following conventions apply to all elements unless indicated otherwise.

- In elements that contain PCDATA, the leading and trailing 
  whitespace in the data will be ignored.

- In attributes that contain CDATA, the leading and trailing 
  whitespace in the data will be ignored.

- In elements or attributes whose value is an "enumerated type", 
  the value is case sensitive.

-->


<!-- The ldapsync element is the root of the LDAP Synchronization
properties. -->

<!ELEMENT ldapsync (user)>

<!-- The user element contains all the details for obtaining the list 
of users from LDAP server that need to access MAXIMO application and 
how the data associated with each user should be mapped to MAXIMO
database tables. -->

<!ELEMENT user (basedn, filter, scope, attributes?, datamap)>



<!-- The basedn element contains the base Distinguished Name (DN) of the 
tree in the LDAP directory that contains users or groups. -->

<!ELEMENT basedn (#PCDATA)>

<!-- The filter element contains an LDAP search filter for finding all 
users or groups beneath the base Distinguished Name(DN). -->

<!ELEMENT filter (#PCDATA)>

<!-- The scope element contains an LDAP search scope that indicates
how deep in the directory tree to search for users or groups.
Valid values are subtree or onelevel. -->

<!ELEMENT scope (#PCDATA)>

<!-- The attributes element contains list of LDAP attribute names of
user or group object for which the data need to be obtained. -->

<!ELEMENT attributes (attribute*)>


<!-- The attribute element contains LDAP attribute name of
user or group object for which the data need to be obtained. -->

<!ELEMENT attribute (#PCDATA)>

<!-- The datamap element contains the list of tables into which
the LDAP attribute data obtained from the LDAP Server need to be 
mapped. -->

<!ELEMENT datamap (table+)>

<!-- The table element contains a list of columns that should 
be mapped to the appropriate LDAP attribute data. -->

<!ELEMENT table (keycolumn+, column*)>

<!-- The keycolumn element contains the LDAP attribute name
whose value should be used to store in this column for the 
appropriate table in database. -->

<!ELEMENT keycolumn (#PCDATA)>

<!-- The column element contains the LDAP attribute name
whose value should be used to store in this column for the 
appropriate table in database. Since some of the data for the
MAXIMO required columns cannot be mapped to LDAP attributes, 
this element can contain a special substitute or literal value. 
that is enclosed in {}, which is used as the value of the column.
The supported special substitute values are :uniqueid and :sysdate.
If the element contains {:uniqueid}, then the default synchronizer 
adapter class generates a unique identifier for the column value. 
If the element contains {:sysdate}, then the default synchronizer
adapter class uses the current date for the column value.
-->

<!ELEMENT column (#PCDATA)>


<!-- List of attribute names used by elements. -->

<!-- The name attribute of the table element contains the name of the 
database table. -->

<!ATTLIST table name CDATA #REQUIRED>

<!-- The allowdelete attribute of the table element contains true or false
to indicate whether a row in the table should be deleted or not, if any of
the required column's LDAP attribute value is null. For example, if a phone
number is erased from LDAP server, then we want the record entry to be
removed from the MAXIMO database table. -->

<!ATTLIST table allowdelete (true|false) #IMPLIED>

<!-- The name attribute of the keycolumn element contains the name of the 
database column. -->


<!ATTLIST keycolumn name CDATA #REQUIRED>

<!-- The type attribute of the keycolumn element contains the data type of the 
value. Only character data types are supported. -->

<!ATTLIST keycolumn type (ALN|UPPER|LOWER|INTEGER|YORN|CRYPTO) #IMPLIED>


<!-- The name attribute of the column element contains the name of the 
database column. -->

<!ATTLIST column name CDATA #REQUIRED>

<!-- The type attribute of the column element contains the data type of the 
value. Only character data types are supported. -->

<!ATTLIST column type (ALN|UPPER|LOWER|INTEGER|YORN|CRYPTO) #IMPLIED>

<!-- The required attribute of the column element contains true or false
to indicate whether the column value obtained from LDAP attribute is required
to contain a value or not. The allowdelete attribute of the appropriate
table element uses this information to delete a row from the table. -->

<!ATTLIST column required (true|false) #IMPLIED>
