Each item descriptor includes <property> tags that define the properties of its repository items, how they correspond to the attributes of the corresponding LDAP entry, and how they are displayed in the ATG Control Center interface. Just as in the case of the SQL repository, the <property> tag has optional XML attributes such as required, readable, and hidden.

Here is an example of a property definition that contains all the optional tag attributes:

<property name="department" ldap-name="ou"
  data-type="string"
  multi="false"
  display-name="Department"
  description="Department within the organization"
  default="unknown"
  required="false"
  readable="true"
  writable="false"
  queryable="true"
  hidden="false"
  expert="false"/>

See the LDAP Repository Definition Tag Reference in this chapter for full details.

For properties whose data-type attribute is set to enumerated, use <option> tags to specify the property’s value choices, as in the engineerType attribute of the engineer item descriptor:

<property name="engineerType" data-type="enumerated" default="products"
  description="Type of engineer: products or services">
  <option>products</option>
  <option>services</option>
</property>

This approach is again inherited from the SQL repository definition file.

Just like the SQL repository, an LDAP repository’s <property> tags can have zero or more <attribute> child tags. These child tags allow you to associate arbitrary name/string value pairs with any attribute. The name/value pairs are added to the attribute’s property descriptor via java.beans.FeatureDescriptor.setValue, and can later be used by the application. Here is an example:

<property name="employeeNumber" data-type="string">
  <attribute name="unique" value="true"/>
</property>

You might use a descriptor like unique to specify that a property value can be assigned to only one repository item within the item type. This LDAP repository feature is similar to the feature described in User-Defined Property Types.

You can also specify a property editor class to use with a property with the editor-class attribute. For example, the following tag associates a special property editor with the password property:

<property name="password" ldap-name="userpassword"
    data-type="string" required="true"
    editor-class="atg.beans.PasswordPropertyEditor"/>

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

Legal Notices