Advanced Customization > Info*Engine User’s Guide > Info*Engine Custom Tag Reference > Info*Engine Tags > Directory Library Tags > updateObjects
  
updateObjects
The updateObjects tag updates existing entries in an LDAP directory service. Using this tag, you can add new attributes to existing LDAP entries, replace existing attributes, or delete existing attributes. Name the Info*Engine group that contains the LDAP attributes that you are updating by using the GROUP_IN parameter on a nested param tag.
Before executing this tag, you must create an Info*Engine group that contains elements that define the LDAP entries to be modified. Each element must have the dn attribute, the distinguished name of the entry. The additional attributes in each element identify names and values of the LDAP attributes to modify.
Syntax
<iedir:updateObjects uri="service_URL" modification="type">
<iedir:param name="GROUP_IN" data="group_name"/>
</iedir:updateObjects>
Attribute Descriptions
Required Attributes: uri
uri
Specifies an LDAP URL that identifies the directory service and the base entry to use when updating entries. For example, entering the following URL identifies the “myCompany.com” directory service:
ldap://myCompany.com/
This attribute is required.
modification
Specifies the type of modification to do. Enter one of the following types:
Modification Type
Description
ADD
Adds the LDAP attributes specified in the group element to the LDAP entry identified by the dn group element attribute.
If an LDAP attribute that is specified in a group element already exists in the LDAP entry, the tag returns an error.
DELETE
Deletes the LDAP attributes other than dn that are named in group element attributes for the LDAP entry. Each LDAP entry is identified by the dn group element attribute. To delete an entire LDAP entry, use the deleteObject tag.
If an LDAP attribute that is specified in a group element does not exist in the LDAP entry, the tag may return an error or may complete without an error, depending on the LDAP server in use.
REPLACE
Replaces the values of existing LDAP attributes that are specified in the group element. The LDAP entry where the replacement is done is identified by the dn group element attribute.
If an LDAP attribute that is specified in the group element does not exist in the LDAP entry, the attribute and its corresponding value are added to the entry.
The default for this optional attribute is REPLACE.
Example
The following example declares that the page uses tags from the Info*Engine directory and core tag libraries and that the tags have the iedir and ie prefixes. The task tag block creates the group of elements used as input and the updateObjects tag block updates LDAP entries in the “myCompany.com” directory service at the “dc=myHost,dc=myCompany,dc=com” base entry:
<%@ taglib uri="http://www.ptc.com/infoengine/taglib/core"
prefix="ie" %>

<%@ taglib uri="http://www.ptc.com/infoengine/taglib/directory"
prefix="iedir" %>

<ie:task uri="ldaptask.xml">
<ie:param name="GROUP_OUT" data="ldap_update"/>
</ie:task>
<iedir:updateObjects
uri="ldap://myCompany.com/dc=myHost,dc=myCompany,dc=com">
<iedir:param name="GROUP_IN" data="ldap_update"/>
</iedir:updateObjects>