Finally, an item descriptor definition includes a <new-items> tag. This tag describes the item descriptor’s new item creation behavior. It specifies whether a new item of that item type can be created, and if so, describes how to create the DN (which is also the repository ID) for that item. This example completes the sample user and engineer item descriptor definitions:

<item-descriptor name="user">

  <!-- special properties -->
  ...
  <!-- object classes -->
  ...
  <!-- properties -->
  ...

  <!-- new item creation -->
  <new-items allowed="false">

</item-descriptor>

<item-descriptor name="engineer" parent="user">

  <!-- object classes  (added to parent classes) -->
  ...
  <!-- properties (added to parent properties) -->
  ...
  <!-- child properties (override parent properties) -->
  ...

  <!-- new item creation (overrides parent behavior) -->
  <new-items parent-dn="ou=Engineering,o=quincyfunds.com" rdn-property="login">

</item-descriptor>

The <new-items> tag in the user descriptor indicates that this descriptor does not allow new items to be created. The user descriptor basically acts as an abstract class — it provides a base set of object classes and properties for children descriptors to build on, but it does not allow items with those object classes and properties to be instantiated.

The engineer descriptor, on the other hand, does allow new items to be created. The new-items tag specifies where the newly created items should be placed in the LDAP directory. The new item’s DN is constructed by appending the value of the parent-dn attribute to the RDN. The RDN is created from the value of the LDAP attribute that corresponds to the repository item property specified by the rdn-property XML attribute. For example, if a new item is created whose login property is nat, the corresponding RDN is uid=nat (because the Profile’s login property maps to the uid attribute in the LDAP directory), and the DN is uid=nat,ou=Engineering,o=quincyfunds.com.

If a child descriptor definition does not contain a <new-items> tag, it inherits the parent’s item creation behavior.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices