add

Specifies an input that creates a new entry in the receiver.

Description

The <add> element is an input command or an input event. It is used for following tasks:

  • The DirXML engine sends an add command to the subscriber shim to request that the external application add an entry.
  • The publisher shim sends an add event as notification that an entry has been added in the external application. When the add event is used for event notification, it must also contain an association element.

Definition

  <!ELEMENT add             (association?, add-attr*, password?)>
  <!ATTLIST add
            src-dn           CDATA            #IMPLIED
            src-entry-id     CDATA            #IMPLIED
            dest-dn          CDATA            #IMPLIED
            dest-entry-id    CDATA            #IMPLIED
            class-name       CDATA            #REQUIRED
            template-dn      CDATA            #IMPLIED
            event-id         CDATA            #IMPLIED>
  <!ELEMENT add-attr        (value+)>
  <!ATTLIST add-attr
            attr-name        CDATA            #REQUIRED>
  <!ELEMENT password         (#PCDATA)>
  

Attributes

src-dn
Specifies the distinguished name of the entry to add, in the name space of the sender. When the DirXML engine sends the <add> element, the DirXML driver should copy the src-dn attribute to the dest-dn attribute of an <add-association> element.
src-entry-id
Specifies the entry ID of the entry that generated the add event or command. It is specified in the name space of the sender. When the DirXML engine sends the <add> element, the DirXML driver should copy the src-entry-id attribute to the dest-entry-id attribute of an <add-association> element.
dest-dn
Specifies the distinguished name of the entry in the name space of the receiver. For event notifications, it should be left empty. For commands, it is filled in by the placement rules.
dest-entry-id
Specifies the entry ID of the entry in the name space of the receiver. Used internally by the DirXML engine and should be ignored by the driver.
class-name
Specifies the base class of the entry being added.
template-dn
Specifies the distinguished name, in the receiver's name space, of the template to use when creating the entry.
event-id
Specifies an identifier used to identify a particular instance of the command or event.

Elements

association
Specifies the unique key of the entry in the external application.
add-attr
Specifies the attributes to add with the entry.
<password>
Specifies the initial password for the entry.

Request Format

Command

The DirXML engine sends the following attributes and elements in the add command to the subscriber shim:

  • src-dn
  • dest-dn (if generated by the placement rules)
  • class-name
  • event-id
  • template-dn which specifies the distinguished name, in the receiver's name space, of the template to use when creating the entry
  • 0 or more <add-attr> elements
  • If 1 or more <add-attr> elements, 1 or more <value> elements as children of the <add-attr> element
  • <password> (optional, initial password for the entry)

Event

The publisher shim sends the following attributes in the add command to the DirXML engine:

  • src-dn
  • class-name
  • event-id (optional)
  • 0 or more <add-attr> elements
  • If 1 or more <add-attr> elements, 1 or more <value> elements for each <add-attr> element
  • <association>

Reply Format

Command

The subscriber shim must return a status command, and if the add succeeded, the subscriber shim must return an add-association command with the key that uniquely identifies the new entry.

If the entry does not contain values for all the attributes defined in the create rules, DirXML discards the add command for the entry. When a modify command is received for this entry, DirXML queries eDirectory for the missing attributes. If all the attributes now have values, DirXML changes the modify into an add command.

Event

The DirXML engine returns a status command.

If the add event does not contain values for all the attributes defined in the create rules, the add event fails. When a modify event is received for this entry, the DirXML engine queries the publisher shim for the missing attributes. The add event succeeds if the required attributes now have values.

Parent

Example

The following example shows an add event from a DirXML driver.

  <add class-name="User" src-dn="\Sam">
       <association>1012</association>
       <add-attr attr-name="cn">
            <value>Sam</value>
       </add-attr>
       <add-attr attr-name="Surname">
            <value>Jones</value>
       </add-attr>
       <add-attr attr-name="Given Name">
            <value>Sam</value>
       </add-attr>
       <add-attr attr-name="Telephone Number">
            <value>555-1212</value>
       </add-attr>
  </add>