Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The object provided in the delta may or may not have OID. If it does then that OID will be used. If it does not then it will be generated when the delta is executed. The ADD object delta obviously works only if such object does not exist already. Attempt to apply ADD delta to an existing objects results in an error.

Code Block
xml
xml
titleObject ADD deltaxml
<objectDelta>
    <changeType>add</changeType>
    <objectType>c:UserType</objectType>
    <objectToAdd>
        <c:user>
            <c:name>jack</c:name>
            ...
        </c:user>
    </objectToAdd>
</objectDelta>

...

Object MODIFY:add Delta

Code Block
xml
xml
titleObject MODIFY:add deltaxml
<objectDelta>
    <changeType>modify</changeType>
    <objectType>c:UserType</objectType>
    <oid>e3ba0a70-6ef3-11e2-8c1f-001e8c717e5b</oid>
    <modification>
        <modificationType>add</modificationType>
        <value>
            <c:employeeType>pirate</c:employeeType>
        </value>
    </modification>
</objectDelta>

Object MODIFY:delete Delta

Code Block
xml
xml
titleObject MODIFY:delete deltaxml
<objectDelta>
    <changeType>modify</changeType>
    <objectType>c:UserType</objectType>
    <oid>e3ba0a70-6ef3-11e2-8c1f-001e8c717e5b</oid>
    <modification>
        <modificationType>delete</modificationType>
        <value>
            <c:employeeType>pirate</c:employeeType>
        </value>
    </modification>
</objectDelta>

Object MODIFY:replace Delta

Code Block
xml
xml
titleObject MODIFY:replace deltaxml
<objectDelta>
    <changeType>modify</changeType>
    <objectType>c:UserType</objectType>
    <oid>e3ba0a70-6ef3-11e2-8c1f-001e8c717e5b</oid>
    <modification>
        <modificationType>replace</modificationType>
        <value>
            <c:fullName>cpt. Jack Sparrow</c:fullName>
        </value>
    </modification>
</objectDelta>

...

The DELETE object delta obviously works only if such object does exist. Attempt to apply DELETE delta to an non-existing objects results in an error.

Code Block
xml
xml
titleObject DELETE deltaxml
<objectDelta>
    <changeType>delete</changeType>
    <objectType>c:UserType</objectType>
    <oid>e3ba0a70-6ef3-11e2-8c1f-001e8c717e5b</oid>
</objectDelta>