Interface PropertyDelta<T>
- 
- All Superinterfaces:
- DebugDumpable,- Foreachable<PrismPropertyValue<T>>,- Freezable,- Itemable,- ItemDelta<PrismPropertyValue<T>,PrismPropertyDefinition<T>>,- PathVisitable,- PrismContextSensitive,- Serializable,- Visitable
 - All Known Implementing Classes:
- PropertyDeltaImpl
 
 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:
- ObjectDelta
 
- 
- 
Field Summary- 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRealValuesToAdd(Collection<T> newValues)voidaddRealValuesToAdd(T... newValues)voidaddRealValuesToDelete(Collection<T> values)voidaddRealValuesToDelete(T... newValues)voidapplyDefinition(PrismPropertyDefinition<T> definition)PropertyDelta<T>clone()TgetAnyRealValue()Class<PrismProperty>getItemClass()PrismPropertyDefinition<T>getPropertyDefinition()PrismProperty<T>getPropertyNewMatchingPath()Returns the "new" state of the property - the state that would be after the delta is applied.PrismProperty<T>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>>getValues(Class<T> type)Returns all values regardless of whether they are added or removed or replaced.<P extends PrismProperty>
 PinstantiateEmptyProperty()booleanisApplicableToType(Item item)booleanisRealValueToAdd(PrismPropertyValue<?> value)booleanisRealValueToDelete(PrismPropertyValue<?> value)PropertyDelta<T>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.voidsetDefinition(PrismPropertyDefinition<T> definition)voidsetPropertyDefinition(PrismPropertyDefinition<T> propertyDefinition)voidsetRealValuesToReplace(T... newValues)- 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazily
 - 
Methods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, checkMutable, freeze
 - 
Methods inherited from interface com.evolveum.midpoint.prism.delta.ItemDeltaaccept, accept, accept, addEstimatedOldValue, addEstimatedOldValues, addEstimatedOldValues, addsAnyValue, addToReplaceDelta, addValuesToAdd, addValuesToAdd, addValuesToDelete, addValuesToDelete, addValueToAdd, addValueToDelete, addValueToReplace, applyDefinition, applyTo, applyTo, applyToMatchingPath, 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, getParentPath, getPath, getSubDelta, getValueChanges, getValuesToAdd, getValuesToDelete, getValuesToReplace, hasCompleteDefinition, isAdd, isApplicableTo, isDelete, isEmpty, isImmutable, isInFactEmpty, 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
 - 
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitivegetPrismContext
 
- 
 
- 
- 
- 
Method Detail- 
getPropertyDefinitionPrismPropertyDefinition<T> getPropertyDefinition() 
 - 
setPropertyDefinitionvoid setPropertyDefinition(PrismPropertyDefinition<T> propertyDefinition) 
 - 
setDefinitionvoid setDefinition(PrismPropertyDefinition<T> definition) - Specified by:
- setDefinitionin interface- ItemDelta<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
 
 - 
applyDefinitionvoid applyDefinition(PrismPropertyDefinition<T> definition) throws SchemaException - Specified by:
- applyDefinitionin interface- ItemDelta<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
- Throws:
- SchemaException
 
 - 
getItemClassClass<PrismProperty> getItemClass() - Specified by:
- getItemClassin interface- ItemDelta<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
 
 - 
getValues<T> Collection<PrismPropertyValue<T>> getValues(Class<T> type) Returns all values regardless of whether they are added or removed or replaced. Useful for iterating over all the changed values.
 - 
getAnyRealValueT getAnyRealValue() 
 - 
instantiateEmptyProperty<P extends PrismProperty> P instantiateEmptyProperty() 
 - 
isApplicableToTypeboolean isApplicableToType(Item item) 
 - 
clonePropertyDelta<T> clone() - Specified by:
- clonein interface- ItemDelta<PrismPropertyValue<T>,PrismPropertyDefinition<T>>
 
 - 
isRealValueToAddboolean isRealValueToAdd(PrismPropertyValue<?> value) 
 - 
isRealValueToDeleteboolean isRealValueToDelete(PrismPropertyValue<?> value) 
 - 
getPropertyNewMatchingPathPrismProperty<T> getPropertyNewMatchingPath() throws SchemaException Returns the "new" state of the property - the state that would be after the delta is applied.- Throws:
- SchemaException
 
 - 
getPropertyNewMatchingPathPrismProperty<T> getPropertyNewMatchingPath(PrismProperty<T> propertyOld) throws SchemaException Returns the "new" state of the property - the state that would be after the delta is applied.- Throws:
- SchemaException
 
 - 
narrowPropertyDelta<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:
- narrowin interface- ItemDelta<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. We can skip deletion of vDel if there is no vEx ~ vDel (under minusComparator). We can skip addition of vAdd if there is existing vEx ~ vAdd (under plusComparator). But if we do that we must be sure to skip deletion of all vDel ~ vAdd (under minusComparator). Otherwise we would delete vDel but fail to add equivalent vAdd. We can skip replacing of a set of values if and only if existing item has equivalent values under plusComparator. This reasoning is bound to the actual application algorithm in ItemDeltaImpl. But we should be aware that there are deltas that are applied by other code, e.g. those than are applied on a resource.
 
 - 
setRealValuesToReplacevoid setRealValuesToReplace(T... newValues) 
 - 
addRealValuesToAddvoid addRealValuesToAdd(T... newValues) 
 - 
addRealValuesToDeletevoid addRealValuesToDelete(T... newValues) 
 - 
addRealValuesToAddvoid addRealValuesToAdd(Collection<T> newValues) 
 - 
addRealValuesToDeletevoid addRealValuesToDelete(Collection<T> values) 
 
- 
 
-