# add

<add> is used:

- As an event notification from the PublicationShim to DirXML that on object was added in the application. When used as a notification, an <association> is required.
- As a command from DirXML to the SubsciptionShim to add an object in the application.

<add> will contain an <add-attr> for each attribute of the object added.

<add> may contain a <password> for the object added.

A response to <add> should be a <status> indicating whether or not the <add> was processed successfully. When used as a command, <add> should also return an <add-association> that contains the unique key for the newly added object. The dest-dn and dest-entry-id attributes of the <add-association> should be set to the src-dn and src-entry-id of the <add>.

Example

>     <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>

## 1. Allowed Content

> association
>   Unique key of the application object.
> add-attr
>   Add attribute.
> password
>   The authentication password.
> operation-data
>   Operation additional custom data.

## 2. Attributes

> Attribute | Value(s) | Default Value
> --- | --- | ---
> class-name | CDATA The name of the base class of the object. The class name is mapped between the application and eDirectory name spaces by the schema mapping rule so that DirXML will see the name in the eDirectory namespace and a driver will see the name in the application name space. | #REQUIRED
> dest-dn | CDATA The distinguished name of the target object in the namespace of the receiver. Should be left empty for event notifications. Filled in by placement rule on commands. | #IMPLIED
> dest-entry-id | CDATA The entry id of the target object in the namespace of the receiver. (Reserved) Should be ignored by the driver. | #IMPLIED
> event-id | CDATA An identifier used to tag the results of an event or command. Should be copied to the event-id attribute of the resulting <status> and <add-association> elements. | #IMPLIED
> qualified-src-dn | CDATA The qualified version of src-dn. Only used for describing objects from eDirectory. | #IMPLIED
> src-dn | CDATA The distinguished name of source object that generated the event in the namespace of the sender. Should be copied to dest-dn attribute of the resulting <add-association> for commands. | #IMPLIED
> src-entry-id | CDATA The entry id of source object that generated the event in the namespace of the sender. Should be copied to dest-entry-id attribute of the resulting <add-association> for commands. | #IMPLIED
> template-dn | CDATA The distinguished name of a template in the receiver's name space to use as a basis for creating the object. Filled in by create rule for commands. Drivers only need to implement this if it makes sense for the application. | #IMPLIED
> timestamp | CDATA (Reserved) Should be ignored by the driver. | #IMPLIED

## 3. Content Rule

> ( association ? , add-attr * , password ? , operation-data ? )

## 4. Parent Elements

> input
>   Input events or commands.

Top Elements || All Elements || Tree