Interface PropertyDelta<T>
- All Superinterfaces:
DebugDumpable
,Foreachable<PrismPropertyValue<T>>
,Freezable
,Itemable
,ItemDelta<PrismPropertyValue<T>,
,PrismPropertyDefinition<T>> PathVisitable
,Serializable
,Visitable
public interface PropertyDelta<T>
extends ItemDelta<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
Relative difference (delta) of a property values.
This class describes what values are to be added, removed or replaced in the property. The delta can be either add+delete or replace, but not both. It either describes what values to add and delete from the property (add+delete) or what is the new set of values (replace). Add+delete deltas can be merged without a loss. There are ideal for multi-value properties. If replace deltas are merged, only the last value will be present. These are better suited for single-value properties.
- Author:
- Radovan Semancik
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.delta.ItemDelta
ItemDelta.Transformer<V extends PrismValue,
D extends ItemDefinition<?>> -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRealValuesToAdd
(Collection<T> newValues) void
addRealValuesToAdd
(T... newValues) void
addRealValuesToDelete
(Collection<T> values) void
addRealValuesToDelete
(T... newValues) void
applyDefinition
(@NotNull PrismPropertyDefinition<T> definition) Note: this may change the implementation of the prism values in the delta.clone()
Returns the "new" state of the property - the state that would be after the delta is applied.getPropertyNewMatchingPath
(PrismProperty<T> propertyOld) Returns the "new" state of the property - the state that would be after the delta is applied.<T> Collection<PrismPropertyValue<T>>
Returns all values regardless of whether they are added or removed or replaced.<P extends PrismProperty>
Pboolean
isApplicableToType
(Item item) boolean
isRealValueToAdd
(PrismPropertyValue<?> value) boolean
isRealValueToDelete
(PrismPropertyValue<?> value) narrow
(PrismObject<? extends Objectable> object, @NotNull Comparator<PrismPropertyValue<T>> plusComparator, @NotNull Comparator<PrismPropertyValue<T>> minusComparator, boolean assumeMissingItems) Returns the narrowed delta that will have the same effect on the object as the current one.void
setDefinition
(@NotNull PrismPropertyDefinition<T> definition) TODO do we need this method publicly?void
setPropertyDefinition
(PrismPropertyDefinition<T> propertyDefinition) void
setRealValuesToReplace
(@NotNull Collection<T> newValues) void
setRealValuesToReplace
(T... newValues) Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze
Methods inherited from interface com.evolveum.midpoint.prism.delta.ItemDelta
accept, accept, accept, addEstimatedOldValue, addEstimatedOldValues, addEstimatedOldValues, addsAnyValue, addsAnyValueMatching, addToReplaceDelta, addValuesToAdd, addValuesToAdd, addValuesToDelete, addValuesToDelete, addValueToAdd, addValueToDelete, addValueToReplace, applyDefinition, applyResults, applyTo, applyTo, applyTo, applyToMatchingPath, applyTransformer, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, clear, clearValuesToAdd, clearValuesToDelete, clearValuesToReplace, cloneWithChangedParentPath, contains, contains, createReverseDelta, debugDump, distributeReplace, equals, equivalent, filterValues, filterYields, findValueToAddOrReplace, foreach, getAnyValue, getDefinition, getElementName, getEstimatedOldValues, getItemNew, getItemNew, getItemNewMatchingPath, getNewValues, getParentPath, getPath, getRealValuesToAdd, getRealValuesToDelete, getRealValuesToReplace, getSubDelta, getValueChanges, getValues, getValuesToAdd, getValuesToDelete, getValuesToReplace, hasCompleteDefinition, isAdd, isApplicableTo, isDelete, isEmpty, isImmutable, isLiterallyEmpty, isMetadataRelated, isOperational, isRaw, isRedundant, isReplace, isValueToAdd, isValueToDelete, isValueToReplace, merge, mergeValuesToAdd, mergeValuesToAdd, mergeValuesToDelete, mergeValuesToDelete, mergeValuesToReplace, mergeValuesToReplace, mergeValueToAdd, mergeValueToDelete, mergeValueToReplace, normalize, removeValueToAdd, removeValueToDelete, removeValueToReplace, resetValuesToAdd, resetValuesToDelete, resetValuesToReplace, revive, setElementName, setEstimatedOldValues, setOriginTypeRecursive, setParentPath, setValuesToReplace, setValuesToReplace, setValueToReplace, setValueToReplace, simplify, size, toDeltaSetTriple, toString, validate, validate, validateValues, validateValues
-
Method Details
-
getPropertyDefinition
PrismPropertyDefinition<T> getPropertyDefinition() -
setPropertyDefinition
-
setDefinition
Description copied from interface:ItemDelta
TODO do we need this method publicly?- Specified by:
setDefinition
in interfaceItemDelta<PrismPropertyValue<T>,
PrismPropertyDefinition<T>>
-
applyDefinition
void applyDefinition(@NotNull @NotNull PrismPropertyDefinition<T> definition) throws SchemaException Description copied from interface:ItemDelta
Note: this may change the implementation of the prism values in the delta.- Specified by:
applyDefinition
in interfaceItemDelta<PrismPropertyValue<T>,
PrismPropertyDefinition<T>> - Throws:
SchemaException
-
getItemClass
Class<PrismProperty> getItemClass()- Specified by:
getItemClass
in interfaceItemDelta<PrismPropertyValue<T>,
PrismPropertyDefinition<T>>
-
getValues
Returns all values regardless of whether they are added or removed or replaced. Useful for iterating over all the changed values. -
getAnyRealValue
T getAnyRealValue() -
instantiateEmptyProperty
-
isApplicableToType
-
clone
PropertyDelta<T> clone()- Specified by:
clone
in interfaceItemDelta<PrismPropertyValue<T>,
PrismPropertyDefinition<T>>
-
isRealValueToAdd
-
isRealValueToDelete
-
getPropertyNewMatchingPath
Returns the "new" state of the property - the state that would be after the delta is applied.- Throws:
SchemaException
-
getPropertyNewMatchingPath
Returns the "new" state of the property - the state that would be after the delta is applied.- Throws:
SchemaException
-
narrow
PropertyDelta<T> narrow(PrismObject<? extends Objectable> object, @NotNull @NotNull Comparator<PrismPropertyValue<T>> plusComparator, @NotNull @NotNull Comparator<PrismPropertyValue<T>> minusComparator, boolean assumeMissingItems) Returns the narrowed delta that will have the same effect on the object as the current one. Expects that the delta executor (can be e.g. the connector!) considers values equivalent if they are equal according to the specified comparator.- Specified by:
narrow
in interfaceItemDelta<PrismPropertyValue<T>,
PrismPropertyDefinition<T>> plusComparator
- Comparator we want to use when determining skippability of values being added.minusComparator
- Comparator we want to use when determining skippability of values being deleted.
-
setRealValuesToReplace
-
setRealValuesToReplace
-
addRealValuesToAdd
-
addRealValuesToDelete
-
addRealValuesToAdd
-
addRealValuesToDelete
-