Class AttributeDelta


  • public class AttributeDelta
    extends Object

    Specifies a modification of a single Attribute. The delta is often a description of a relative modification of the attribute. It describes values that are added and removed. But it may also define an absolute modification: values that are replaced.

    The added/removed/replaced attributes are defined by a separate value lists. The valuesToAdd list defines the new attribute values to add to existing values. The valuesToRemove list defines the attribute values that will be removed from existing attribute values. The valuesToReplace list defines the new attribute values. In that case existing attribute values will be removed and new attribute values from the valuesToReplace list will be placed in the attribute. The delta may have add and remove lists at the same time. But if replace list is specified then no other list may be present. Empty list is not the same as null list, especially in the replace case. Null list means that there is no modification of that particular type (add/remove/replace). Empty list means that there is a modification of that particular type, but it does not include any value. This distinction is important especially for the replace case. Delta with empty valuesToReplace list means that all existing values of an attribute should be removed, but no new value is to be set in the attribute. The resulting state is attribute with no values.

    The delta does not guarantee ordering of the values. It is not guaranteed that the added attributes will be appended at the end. Nor is the resulting order of values after application of remove delta guaranteed. This behavior is connector-specific.

    Password delta note: Password is often quite an special attribute. There are two related-but somehow distinct password operations: password reset and password change. Password reset is usually initiated by an administrator and it does not need old/current password value. It is represented as replace delta. Password change is usually a self-service operation and it does require old/current password value. Password change should be represented as add/delete delta, new password value being added, old/current password value being removed.

    Terminology note: The term "delete" would be better than "remove", especially because "remove" may be easily confused with "replace". But the framework is already using the term "remove", so we have preferred naming consistency in this case.

    The AttributeDeltaBuilder should be used to construct an instance of AttributeDelta.

    Since:
    1.4.3
    Author:
    Radovan Semancik