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.
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.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected void |
extendToStringMap(Map<String,Object> map) |
String |
getName() |
List<Object> |
getValuesToAdd() |
List<Object> |
getValuesToRemove() |
List<Object> |
getValuesToReplace() |
int |
hashCode() |
boolean |
is(String name)
Determines if the 'name' matches this
AttributeDelta . |
String |
toString() |
public String getName()
public boolean is(String name)
AttributeDelta
.Copyright © 2019. All rights reserved.