Class ObjectDeltaImpl<O extends Objectable>
- All Implemented Interfaces:
ObjectDelta<O>
,Freezable
,PathVisitable
,PrismContextSensitive
,Visitable
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
ShadowCoordinatesQualifiedObjectDeltaImpl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.delta.ObjectDelta
ObjectDelta.FactorOutResultMulti<T extends Objectable>, ObjectDelta.FactorOutResultSingle<T extends Objectable>
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ConstructorDescriptionObjectDeltaImpl
(Class<O> objectTypeClass, ChangeType changeType, PrismContext prismContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
<D extends ItemDelta>
DaddModification
(D itemDelta) Adds modification (itemDelta) and returns the modification that was added.<C extends Containerable>
voidaddModificationAddContainer
(ItemPath propertyPath, C... containerables) <C extends Containerable>
voidaddModificationAddContainer
(ItemPath propertyPath, PrismContainerValue<C>... containerValues) final <X> void
addModificationAddProperty
(ItemPath propertyPath, X... propertyValues) void
addModificationAddReference
(ItemPath path, PrismReferenceValue... refValues) <C extends Containerable>
voidaddModificationDeleteContainer
(ItemPath propertyPath, C... containerables) <C extends Containerable>
voidaddModificationDeleteContainer
(ItemPath propertyPath, PrismContainerValue<C>... containerValues) <X> void
addModificationDeleteProperty
(ItemPath propertyPath, X... propertyValues) void
addModificationDeleteReference
(ItemPath path, PrismReferenceValue... refValues) <C extends Containerable>
voidaddModificationReplaceContainer
(ItemPath propertyPath, PrismContainerValue<C>... containerValues) final <X> PropertyDelta<X>
addModificationReplaceProperty
(ItemPath propertyPath, X... propertyValues) void
addModificationReplaceReference
(ItemPath path, PrismReferenceValue... refValues) void
addModifications
(ItemDelta<?, ?>... itemDeltas) void
addModifications
(Collection<? extends ItemDelta> itemDeltas) void
applyDefinition
(PrismObjectDefinition<O> objectDefinition, boolean force) void
applyDefinitionIfPresent
(PrismObjectDefinition<O> definition, boolean tolerateNoDefinition) void
applyTo
(PrismObject<O> targetObject) Applies this object delta to specified object, returns updated object.void
void
assertDefinitions
(boolean tolerateRawElements) void
assertDefinitions
(boolean tolerateRawElements, Supplier<String> sourceDescriptionSupplier) Assert that all the items has appropriate definition.void
assertDefinitions
(Supplier<String> sourceDescription) void
void
checkConsistence
(boolean requireOid, boolean requireDefinition, boolean prohibitRaw) void
checkConsistence
(boolean requireOid, boolean requireDefinition, boolean prohibitRaw, ConsistencyCheckScope scope) void
protected void
checkIdentifierConsistence
(boolean requireOid) void
clear()
clone()
Deep clone.computeChangedObject
(PrismObject<O> objectOld) Applies this object delta to specified object, returns updated object.boolean
containsAllModifications
(Collection<? extends ItemDelta<?, ?>> itemDeltas, EquivalenceStrategy strategy) boolean
containsModification
(ItemDelta itemDelta, EquivalenceStrategy strategy) protected void
copyValues
(ObjectDeltaImpl<O> clone) static <O extends Objectable>
ObjectDeltaImpl<O>createAddDelta
(PrismObject<O> objectToAdd) <C extends Containerable>
ContainerDelta<C><C extends Containerable>
ContainerDelta<C>createContainerModification
(ItemPath path, PrismContainerDefinition<C> containerDefinition) static <O extends Objectable>
ObjectDeltaImpl<O>createDeleteDelta
(Class<O> type, String oid, PrismContext prismContext) static <O extends Objectable>
ObjectDeltaImpl<O>createEmptyDeleteDelta
(Class<O> type, String oid, PrismContext prismContext) static <O extends Objectable>
ObjectDeltaImpl<O>createEmptyDelta
(Class<O> type, String oid, PrismContext prismContext, ChangeType changeType) static <O extends Objectable>
ObjectDeltaImpl<O>createEmptyModifyDelta
(Class<O> type, String oid, PrismContext prismContext) <X> PropertyDelta<X>
<C> PropertyDelta<C>
createPropertyModification
(ItemPath path, PrismPropertyDefinition propertyDefinition) createReferenceModification
(ItemPath refPath) createReferenceModification
(ItemPath path, PrismReferenceDefinition referenceDefinition) createReferenceModification
(QName name, PrismReferenceDefinition referenceDefinition) debugDump
(int indent) protected String
protected String
boolean
deleteModification
(ItemDelta<?, ?> itemDelta) Deletes a modification, if it exists in a given MODIFY delta.boolean
boolean
@NotNull ObjectDelta.FactorOutResultSingle<O>
factorOut
(Collection<? extends ItemPath> paths, boolean cloneDelta) @NotNull ObjectDelta.FactorOutResultMulti<O>
factorOutValues
(ItemPath path, boolean cloneDelta) <X extends Containerable>
ContainerDelta<X>findContainerDelta
(ItemPath propertyPath) <IV extends PrismValue,
ID extends ItemDefinition<?>>
ItemDelta<IV,ID> findItemDelta
(ItemPath itemPath) TODO specify this method!<IV extends PrismValue,
ID extends ItemDefinition<?>>
ItemDelta<IV,ID> findItemDelta
(ItemPath itemPath, boolean strict) <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>, DD extends ItemDelta<IV, ID>>
DDfindItemDelta
(ItemPath propertyPath, Class<DD> deltaType, Class<I> itemType, boolean strict) @NotNull Collection<? extends ItemDelta<?,
?>> findItemDeltasSubPath
(ItemPath itemPath) Returns all item deltas at or below a specified path.<IV extends PrismValue,
ID extends ItemDefinition<?>>
Collection<PartiallyResolvedDelta<IV,ID>> findPartial
(ItemPath propertyPath) <X> PropertyDelta<X>
findPropertyDelta
(ItemPath propertyPath) <X> PropertyDelta<X>
findPropertyDelta
(ItemPath parentPath, QName propertyName) Top-level path is assumed.findReferenceModification
(ItemPath itemPath) getDeletedValuesFor
(ItemPath itemPath) Limitations: (1) For DELETE object delta, we don't know what values were in the object's item.@NotNull Collection<? extends ItemDelta<?,
?>> getNewValuesFor
(ItemPath itemPath) getOid()
boolean
int
hashCode()
boolean
hasItemDelta
(ItemPath propertyPath) boolean
hasItemOrSubitemDelta
(ItemPath itemPath) boolean
hasRelatedDelta
(ItemPath itemPath) Returns `true` if the delta may have an effect on the specified item.boolean
isAdd()
boolean
isDelete()
boolean
isEmpty()
boolean
isModify()
boolean
isRedundant
(PrismObject<O> object, @NotNull ParameterizedEquivalenceStrategy plusStrategy, @NotNull ParameterizedEquivalenceStrategy minusStrategy, boolean assumeMissingItems) Check if delta is redundant w.r.t.void
merge
(ObjectDelta<O> deltaToMerge) Merge provided delta into this delta.void
mergeModification
(ItemDelta<?, ?> modificationToMerge) void
mergeModifications
(Collection<? extends ItemDelta> modificationsToMerge) narrow
(PrismObject<O> existingObject, @NotNull ParameterizedEquivalenceStrategy plusStrategy, @NotNull ParameterizedEquivalenceStrategy minusStrategy, boolean assumeMissingItems) void
protected void
void
removeContainerModification
(ItemPath itemName) void
void
removeModification
(ItemDelta<?, ?> itemDelta) void
void
removePropertyModification
(ItemPath itemPath) void
removeReferenceModification
(ItemPath itemPath) void
revive
(PrismContext prismContext) void
setChangeType
(ChangeType changeType) void
setObjectToAdd
(PrismObject<O> objectToAdd) void
setObjectTypeClass
(Class<O> objectTypeClass) void
void
setPrismContext
(PrismContext prismContext) boolean
subtract
(@NotNull ItemPath itemPath, @NotNull PrismValue value, boolean fromMinusSet, boolean dryRun) Checks if the delta tries to add (or set) a 'value' for the item identified by 'itemPath'.subtract
(@NotNull Collection<ItemPath> paths) Returns modifications that are related to the given paths; removes them from the original delta.void
Incorporates the property delta into the existing property deltas (regardless of the change type).void
Returns short string identification of object type.toDeltaSetTriple
(PrismObject<O> objectOld) CreatesPrismValueDeltaSetTriple
(plus/minus/zero sets) for the value ofPrismObject
.toString()
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
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.ObjectDelta
isImmutable, isOfType
-
Constructor Details
-
ObjectDeltaImpl
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceVisitable<O extends Objectable>
-
accept
- Specified by:
accept
in interfaceObjectDelta<O extends Objectable>
-
accept
- Specified by:
accept
in interfaceObjectDelta<O extends Objectable>
- Specified by:
accept
in interfacePathVisitable
-
getChangeType
- Specified by:
getChangeType
in interfaceObjectDelta<O extends Objectable>
-
setChangeType
- Specified by:
setChangeType
in interfaceObjectDelta<O extends Objectable>
-
isAdd
public boolean isAdd()- Specified by:
isAdd
in interfaceObjectDelta<O extends Objectable>
-
isDelete
public boolean isDelete()- Specified by:
isDelete
in interfaceObjectDelta<O extends Objectable>
-
isModify
public boolean isModify()- Specified by:
isModify
in interfaceObjectDelta<O extends Objectable>
-
getOid
- Specified by:
getOid
in interfaceObjectDelta<O extends Objectable>
-
setOid
- Specified by:
setOid
in interfaceObjectDelta<O extends Objectable>
-
getPrismContext
- Specified by:
getPrismContext
in interfacePrismContextSensitive
-
setPrismContext
- Specified by:
setPrismContext
in interfaceObjectDelta<O extends Objectable>
-
getObjectToAdd
- Specified by:
getObjectToAdd
in interfaceObjectDelta<O extends Objectable>
-
setObjectToAdd
- Specified by:
setObjectToAdd
in interfaceObjectDelta<O extends Objectable>
-
getModifications
- Specified by:
getModifications
in interfaceObjectDelta<O extends Objectable>
-
addModification
Description copied from interface:ObjectDelta
Adds modification (itemDelta) and returns the modification that was added. NOTE: the modification that was added may be different from the modification that was passed into this method! E.g. in case if two modifications must be merged to keep the delta consistent. Therefore always use the returned modification after this method is invoked.- Specified by:
addModification
in interfaceObjectDelta<O extends Objectable>
-
deleteModification
Description copied from interface:ObjectDelta
Deletes a modification, if it exists in a given MODIFY delta. (Throws an exception if the delta is not a MODIFY one.)- Specified by:
deleteModification
in interfaceObjectDelta<O extends Objectable>
- Returns:
- true if the modification was found and removed
-
containsModification
- Specified by:
containsModification
in interfaceObjectDelta<O extends Objectable>
-
containsAllModifications
public boolean containsAllModifications(Collection<? extends ItemDelta<?, ?>> itemDeltas, EquivalenceStrategy strategy) - Specified by:
containsAllModifications
in interfaceObjectDelta<O extends Objectable>
-
addModifications
- Specified by:
addModifications
in interfaceObjectDelta<O extends Objectable>
-
addModifications
- Specified by:
addModifications
in interfaceObjectDelta<O extends Objectable>
-
findItemDelta
public <IV extends PrismValue,ID extends ItemDefinition<?>> ItemDelta<IV,ID> findItemDelta(ItemPath itemPath) Description copied from interface:ObjectDelta
TODO specify this method!An attempt:
Given this ADD or MODIFY object delta OD, finds an item delta ID such that "ID has the same effect on an item specified by itemPath as OD" (simply said).
More precisely, - if OD is ADD delta: ID is ADD delta that adds values of the item present in the object being added - if OD is MODIFY delta: ID is such delta that: 1. Given ANY object O, let O' be O after application of OD. 2. Let I be O(itemPath), I' be O'(itemPath). 3. Then I' is the same as I after application of ID. ID is null if no such item delta exists - or cannot be found easily.
Problem: - If OD contains more than one modification that affects itemPath the results from findItemDelta can be differ from the above definition.
- Specified by:
findItemDelta
in interfaceObjectDelta<O extends Objectable>
-
findItemDelta
public <IV extends PrismValue,ID extends ItemDefinition<?>> ItemDelta<IV,ID> findItemDelta(ItemPath itemPath, boolean strict) - Specified by:
findItemDelta
in interfaceObjectDelta<O extends Objectable>
-
findItemDelta
public <IV extends PrismValue,ID extends ItemDefinition<?>, DD findItemDeltaI extends Item<IV, ID>, DD extends ItemDelta<IV, ID>> (ItemPath propertyPath, Class<DD> deltaType, Class<I> itemType, boolean strict) - Specified by:
findItemDelta
in interfaceObjectDelta<O extends Objectable>
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition<?>> Collection<PartiallyResolvedDelta<IV,ID>> findPartial(ItemPath propertyPath) - Specified by:
findPartial
in interfaceObjectDelta<O extends Objectable>
-
hasItemDelta
- Specified by:
hasItemDelta
in interfaceObjectDelta<O extends Objectable>
-
hasItemOrSubitemDelta
- Specified by:
hasItemOrSubitemDelta
in interfaceObjectDelta<O extends Objectable>
-
hasRelatedDelta
Description copied from interface:ObjectDelta
Returns `true` if the delta may have an effect on the specified item. - For `ADD` deltas, returns `true` if the object has the specified item. - For `DELETE` deltas, returns `false` (as we don't know the object). - For `MODIFY` deltas, returns `true` if there is any overlap between the specified item and the modified items (either exact match, sub- or super-path match). May not be quite precise when multivalued containers are involved, e.g. if we are asking about `assignment[1]/targetRef` and the delta contains an addition of `assignment` with a different PCV ID, e.g. [2]. The result would be a false positive.- Specified by:
hasRelatedDelta
in interfaceObjectDelta<O extends Objectable>
-
hasCompleteDefinition
public boolean hasCompleteDefinition()- Specified by:
hasCompleteDefinition
in interfaceObjectDelta<O extends Objectable>
-
getObjectTypeClass
- Specified by:
getObjectTypeClass
in interfaceObjectDelta<O extends Objectable>
-
setObjectTypeClass
- Specified by:
setObjectTypeClass
in interfaceObjectDelta<O extends Objectable>
-
performFreeze
protected void performFreeze()- Overrides:
performFreeze
in classAbstractFreezable
-
findPropertyDelta
Top-level path is assumed.- Specified by:
findPropertyDelta
in interfaceObjectDelta<O extends Objectable>
-
findPropertyDelta
- Specified by:
findPropertyDelta
in interfaceObjectDelta<O extends Objectable>
-
findContainerDelta
- Specified by:
findContainerDelta
in interfaceObjectDelta<O extends Objectable>
-
findReferenceModification
- Specified by:
findReferenceModification
in interfaceObjectDelta<O extends Objectable>
-
findItemDeltasSubPath
@NotNull public @NotNull Collection<? extends ItemDelta<?,?>> findItemDeltasSubPath(ItemPath itemPath) Returns all item deltas at or below a specified path.- Specified by:
findItemDeltasSubPath
in interfaceObjectDelta<O extends Objectable>
-
removeModification
- Specified by:
removeModification
in interfaceObjectDelta<O extends Objectable>
-
removeReferenceModification
- Specified by:
removeReferenceModification
in interfaceObjectDelta<O extends Objectable>
-
removeContainerModification
- Specified by:
removeContainerModification
in interfaceObjectDelta<O extends Objectable>
-
removePropertyModification
- Specified by:
removePropertyModification
in interfaceObjectDelta<O extends Objectable>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceObjectDelta<O extends Objectable>
-
normalize
public void normalize()- Specified by:
normalize
in interfaceObjectDelta<O extends Objectable>
-
narrow
public ObjectDeltaImpl<O> narrow(PrismObject<O> existingObject, @NotNull @NotNull ParameterizedEquivalenceStrategy plusStrategy, @NotNull @NotNull ParameterizedEquivalenceStrategy minusStrategy, boolean assumeMissingItems) - Specified by:
narrow
in interfaceObjectDelta<O extends Objectable>
-
applyDefinitionIfPresent
public void applyDefinitionIfPresent(PrismObjectDefinition<O> definition, boolean tolerateNoDefinition) throws SchemaException - Specified by:
applyDefinitionIfPresent
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
clone
Deep clone.- Specified by:
clone
in interfaceObjectDelta<O extends Objectable>
- Overrides:
clone
in classObject
-
copyValues
-
merge
Merge provided delta into this delta. This delta is assumed to be chronologically earlier, delta in the parameter is assumed to come chronologicaly later.- Specified by:
merge
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
mergeModifications
public void mergeModifications(Collection<? extends ItemDelta> modificationsToMerge) throws SchemaException - Specified by:
mergeModifications
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
mergeModification
- Specified by:
mergeModification
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
swallow
Incorporates the property delta into the existing property deltas (regardless of the change type).TODO incorporate equivalence strategy
- Specified by:
swallow
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
applyTo
Description copied from interface:ObjectDelta
Applies this object delta to specified object, returns updated object. It modifies the provided object.- Specified by:
applyTo
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
computeChangedObject
Applies this object delta to specified object, returns updated object. It leaves the original object unchanged.- Specified by:
computeChangedObject
in interfaceObjectDelta<O extends Objectable>
- Parameters:
objectOld
- object before change- Returns:
- object with applied changes or null if the object should not exit (was deleted)
- Throws:
SchemaException
-
swallow
- Specified by:
swallow
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
createPropertyModification
- Specified by:
createPropertyModification
in interfaceObjectDelta<O extends Objectable>
-
createPropertyModification
public <C> PropertyDelta<C> createPropertyModification(ItemPath path, PrismPropertyDefinition propertyDefinition) - Specified by:
createPropertyModification
in interfaceObjectDelta<O extends Objectable>
-
createReferenceModification
public ReferenceDelta createReferenceModification(QName name, PrismReferenceDefinition referenceDefinition) -
createReferenceModification
public ReferenceDelta createReferenceModification(ItemPath path, PrismReferenceDefinition referenceDefinition) - Specified by:
createReferenceModification
in interfaceObjectDelta<O extends Objectable>
-
createContainerModification
- Specified by:
createContainerModification
in interfaceObjectDelta<O extends Objectable>
-
createContainerModification
public <C extends Containerable> ContainerDelta<C> createContainerModification(ItemPath path, PrismContainerDefinition<C> containerDefinition) - Specified by:
createContainerModification
in interfaceObjectDelta<O extends Objectable>
-
addModificationReplaceProperty
@SafeVarargs public final <X> PropertyDelta<X> addModificationReplaceProperty(ItemPath propertyPath, X... propertyValues) - Specified by:
addModificationReplaceProperty
in interfaceObjectDelta<O extends Objectable>
-
addModificationAddProperty
@SafeVarargs public final <X> void addModificationAddProperty(ItemPath propertyPath, X... propertyValues) - Specified by:
addModificationAddProperty
in interfaceObjectDelta<O extends Objectable>
-
addModificationDeleteProperty
- Specified by:
addModificationDeleteProperty
in interfaceObjectDelta<O extends Objectable>
-
addModificationAddContainer
public <C extends Containerable> void addModificationAddContainer(ItemPath propertyPath, C... containerables) throws SchemaException - Specified by:
addModificationAddContainer
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
addModificationAddContainer
public <C extends Containerable> void addModificationAddContainer(ItemPath propertyPath, PrismContainerValue<C>... containerValues) - Specified by:
addModificationAddContainer
in interfaceObjectDelta<O extends Objectable>
-
addModificationDeleteContainer
public <C extends Containerable> void addModificationDeleteContainer(ItemPath propertyPath, C... containerables) throws SchemaException - Specified by:
addModificationDeleteContainer
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
addModificationDeleteContainer
public <C extends Containerable> void addModificationDeleteContainer(ItemPath propertyPath, PrismContainerValue<C>... containerValues) - Specified by:
addModificationDeleteContainer
in interfaceObjectDelta<O extends Objectable>
-
addModificationReplaceContainer
public <C extends Containerable> void addModificationReplaceContainer(ItemPath propertyPath, PrismContainerValue<C>... containerValues) - Specified by:
addModificationReplaceContainer
in interfaceObjectDelta<O extends Objectable>
-
addModificationAddReference
- Specified by:
addModificationAddReference
in interfaceObjectDelta<O extends Objectable>
-
addModificationDeleteReference
- Specified by:
addModificationDeleteReference
in interfaceObjectDelta<O extends Objectable>
-
addModificationReplaceReference
- Specified by:
addModificationReplaceReference
in interfaceObjectDelta<O extends Objectable>
-
createReferenceModification
- Specified by:
createReferenceModification
in interfaceObjectDelta<O extends Objectable>
-
createEmptyModifyDelta
public static <O extends Objectable> ObjectDeltaImpl<O> createEmptyModifyDelta(Class<O> type, String oid, PrismContext prismContext) -
createEmptyDeleteDelta
public static <O extends Objectable> ObjectDeltaImpl<O> createEmptyDeleteDelta(Class<O> type, String oid, PrismContext prismContext) -
createEmptyDelta
public static <O extends Objectable> ObjectDeltaImpl<O> createEmptyDelta(Class<O> type, String oid, PrismContext prismContext, ChangeType changeType) -
createAddDelta
-
createDeleteDelta
public static <O extends Objectable> ObjectDeltaImpl<O> createDeleteDelta(Class<O> type, String oid, PrismContext prismContext) -
createReverseDelta
- Specified by:
createReverseDelta
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
checkConsistence
public void checkConsistence()- Specified by:
checkConsistence
in interfaceObjectDelta<O extends Objectable>
-
checkConsistence
- Specified by:
checkConsistence
in interfaceObjectDelta<O extends Objectable>
-
checkConsistence
public void checkConsistence(boolean requireOid, boolean requireDefinition, boolean prohibitRaw) - Specified by:
checkConsistence
in interfaceObjectDelta<O extends Objectable>
-
checkConsistence
public void checkConsistence(boolean requireOid, boolean requireDefinition, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
checkConsistence
in interfaceObjectDelta<O extends Objectable>
-
checkIdentifierConsistence
protected void checkIdentifierConsistence(boolean requireOid) -
assertDefinitions
- Specified by:
assertDefinitions
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
assertDefinitions
- Specified by:
assertDefinitions
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
assertDefinitions
- Specified by:
assertDefinitions
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
assertDefinitions
public void assertDefinitions(boolean tolerateRawElements, Supplier<String> sourceDescriptionSupplier) throws SchemaException Assert that all the items has appropriate definition.- Specified by:
assertDefinitions
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
revive
- Specified by:
revive
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
applyDefinition
public void applyDefinition(PrismObjectDefinition<O> objectDefinition, boolean force) throws SchemaException - Specified by:
applyDefinition
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
hashCode
public int hashCode() -
equivalent
- Specified by:
equivalent
in interfaceObjectDelta<O extends Objectable>
-
equals
-
toString
-
debugName
-
debugIdentifiers
-
toDebugType
Returns short string identification of object type. It should be in a form suitable for log messages. There is no requirement for the type name to be unique, but it rather has to be compact. E.g. short element names are preferred to long QNames or URIs.- Specified by:
toDebugType
in interfaceObjectDelta<O extends Objectable>
-
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-
subtract
Returns modifications that are related to the given paths; removes them from the original delta. Applicable only to modify deltas. Currently compares paths by "equals" predicate -- in the future we might want to treat sub/super/equivalent paths! So consider this method highly experimental.- Specified by:
subtract
in interfaceObjectDelta<O extends Objectable>
-
factorOut
@NotNull public @NotNull ObjectDelta.FactorOutResultSingle<O> factorOut(Collection<? extends ItemPath> paths, boolean cloneDelta) - Specified by:
factorOut
in interfaceObjectDelta<O extends Objectable>
-
factorOutValues
@NotNull public @NotNull ObjectDelta.FactorOutResultMulti<O> factorOutValues(ItemPath path, boolean cloneDelta) throws SchemaException - Specified by:
factorOutValues
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
subtract
public boolean subtract(@NotNull @NotNull ItemPath itemPath, @NotNull @NotNull PrismValue value, boolean fromMinusSet, boolean dryRun) Checks if the delta tries to add (or set) a 'value' for the item identified by 'itemPath'. If yes, it removes it.TODO consider changing return value to 'incremental delta' (or null)
- Specified by:
subtract
in interfaceObjectDelta<O extends Objectable>
- Parameters:
dryRun
- only testing if value could be subtracted; not changing anything- Returns:
- true if the delta originally contained an instruction to add (or set) 'itemPath' to 'value'.
-
getModifiedItems
- Specified by:
getModifiedItems
in interfaceObjectDelta<O extends Objectable>
-
getNewValuesFor
- Specified by:
getNewValuesFor
in interfaceObjectDelta<O extends Objectable>
-
getDeletedValuesFor
Limitations: (1) For DELETE object delta, we don't know what values were in the object's item. (2) For REPLACE item delta, we don't know what values were in the object's item (but these deltas are quite rare for multivalued items; and eventually there will be normalized into ADD+DELETE form) (3) For DELETE item delta for PrismContainers, content of items deleted might not be known (only ID could be provided on PCVs).- Specified by:
getDeletedValuesFor
in interfaceObjectDelta<O extends Objectable>
-
clear
public void clear()- Specified by:
clear
in interfaceObjectDelta<O extends Objectable>
-
isRedundant
public boolean isRedundant(PrismObject<O> object, @NotNull @NotNull ParameterizedEquivalenceStrategy plusStrategy, @NotNull @NotNull ParameterizedEquivalenceStrategy minusStrategy, boolean assumeMissingItems) throws SchemaException Description copied from interface:ObjectDelta
Check if delta is redundant w.r.t. given object - i.e. if its application would have no visible effect on that object.- Specified by:
isRedundant
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-
removeOperationalItems
- Specified by:
removeOperationalItems
in interfaceObjectDelta<O extends Objectable>
-
removeEstimatedOldValues
- Specified by:
removeEstimatedOldValues
in interfaceObjectDelta<O extends Objectable>
-
toDeltaSetTriple
public PrismValueDeltaSetTriple<PrismObjectValue<O>> toDeltaSetTriple(PrismObject<O> objectOld) throws SchemaException Description copied from interface:ObjectDelta
CreatesPrismValueDeltaSetTriple
(plus/minus/zero sets) for the value ofPrismObject
. Quite inefficient, as uses object cloning.- Specified by:
toDeltaSetTriple
in interfaceObjectDelta<O extends Objectable>
- Throws:
SchemaException
-