The DeleteControl specifies whether to delete the decendants, if
they exist, of a deleted entity.
DeleteControl is used for specifying whether to delete any existing descendants
of an entity that is being deleted.
The structure of a DeleteControl data object consists of:
- deleteDescendants
- is used to indicate whether or not to delete the descendants of the entity,
if it has descendants. If this property is set to true, the entity and all
its descendants are deleted. If the property is set to false, an exception
is thrown if the entity has any descendant. The default value is false.
- returnDeleted
- is used to indicate whether to return the entities which are actually
deleted in the output data object. The default value is false, which means
that no output data object is returned.
XML schema definition
The following is the XML schema
definition for the DeleteControl data object:
<xsd:complexType name="DeleteControl">
<xsd:complexContent>
<xsd:extension base="Control">
<xsd:attribute name="deleteDescendants" type="xsd:boolean" default="true"/>
<xsd:attribute name="returnDeleted" type="xsd:boolean" default="false"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
Sample data object
Following is a sample DeleteControl
DataObject which does not have the property deleteDescendants defined. Because
the default value is true, this data object is used in delete API to delete
entities and all their descendants:
<wim:Root>
<wim:entities>
<wim:identifier uniqueName="o=Sales,cn=users,dc=yourco,dc=com"/>
</wim:entities>
<wim:controls xsi:type="wim:DeleteControl" />
</wim:Root>