Class DeltaBuilder<C extends Containerable>
java.lang.Object
com.evolveum.midpoint.prism.impl.delta.builder.DeltaBuilder<C>
- All Implemented Interfaces:
S_ItemEntry,S_MaybeAdd,S_MaybeDelete,S_ValuesEntry
@Experimental
public class DeltaBuilder<C extends Containerable>
extends Object
implements S_ItemEntry, S_MaybeDelete, S_MaybeAdd, S_ValuesEntry
Grammar
----
ObjectDelta ::= (ItemDelta)* ( 'OBJECT-DELTA(oid)' | 'ITEM-DELTA' | 'ITEM-DELTAS' )
ItemDelta ::= 'ITEM(...)' ( ( 'ADD-VALUES(...)' 'DELETE-VALUES(...)'? ) |
( 'DELETE-VALUES(...)' 'ADD-VALUES(...)'? ) | 'REPLACE-VALUES(...)' )
----
When combining DELETE and ADD prefer using DELETE first to match the actual behavior.
-
Constructor Summary
ConstructorsConstructorDescriptionDeltaBuilder(Class<C> objectClass, ItemDefinitionResolver itemDefinitionResolver) -
Method Summary
Modifier and TypeMethodDescriptionadd(PrismValue... values) add(Collection<? extends PrismValue> values) addRealValues(Collection<?> realValues) asObjectDelta(String oid) List<ObjectDelta<?>>asObjectDeltas(String oid) delete(PrismValue... values) delete(Collection<? extends PrismValue> values) deleteRealValues(Collection<?> realValues) Add new item delta.item(ItemPath path, ItemDefinition definition) Add new item delta.Add new item delta.Add new item delta.mod(PlusMinusZero plusMinusZero, PrismValue... values) mod(PlusMinusZero plusMinusZero, Object... realValues) Create proper modification type based on parameter.mod(PlusMinusZero plusMinusZero, Collection<? extends PrismValue> values) modRealValues(PlusMinusZero plusMinusZero, Collection<?> realValues) old(PrismValue... values) old(Collection<? extends PrismValue> values) oldObject(Containerable object) The state of object before the delta is applied.<T> S_ValuesEntryoldRealValue(T realValue) oldRealValues(Collection<?> realValues) Should we skip idempotent item deltas?Add new property delta.<T> S_ValuesEntryproperty(ItemPath path, PrismPropertyDefinition<T> definition) Add new property delta.Add new property delta.Add new property delta.replace(PrismValue... values) replace(Collection<? extends PrismValue> values) replaceRealValues(Collection<?> realValues) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.prism.delta.builder.S_ItemEntry
asObjectDeltaCast
-
Constructor Details
-
DeltaBuilder
public DeltaBuilder(Class<C> objectClass, ItemDefinitionResolver itemDefinitionResolver) throws SchemaException - Throws:
SchemaException
-
-
Method Details
-
getObjectClass
-
getPrismContext
-
optimizing
Description copied from interface:S_ItemEntryShould we skip idempotent item deltas? (Default is `false`.) **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add.- Specified by:
optimizingin interfaceS_ItemEntry
-
oldObject
Description copied from interface:S_ItemEntryThe state of object before the delta is applied. Used to compute estimatedOldValues. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add.- Specified by:
oldObjectin interfaceS_ItemEntry
-
item
Description copied from interface:S_ItemEntryAdd new item delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add.- Specified by:
itemin interfaceS_ItemEntry- Parameters:
names- The names forming path to the item.- Returns:
- The (potentially new) instance of an item delta value builder.
-
item
Description copied from interface:S_ItemEntryAdd new item delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add.- Specified by:
itemin interfaceS_ItemEntry- Parameters:
namesOrIds- The names or Ids forming path to the item.- Returns:
- The (potentially new) instance of an item delta value builder.
-
item
Description copied from interface:S_ItemEntryAdd new item delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add.- Specified by:
itemin interfaceS_ItemEntry- Parameters:
path- The path to the item.- Returns:
- The (potentially new) instance of an item delta value builder.
-
item
Description copied from interface:S_ItemEntryAdd new item delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add.- Specified by:
itemin interfaceS_ItemEntry- Parameters:
path- The path to the item.definition- The definition of the item.- Returns:
- The (potentially new) instance of an item delta value builder.
-
property
Description copied from interface:S_ItemEntryAdd new property delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add. Can be used with dynamic paths.- Specified by:
propertyin interfaceS_ItemEntry- Parameters:
names- The names forming path to the property.- Returns:
- The (potentially new) instance of a property delta value builder.
-
property
Description copied from interface:S_ItemEntryAdd new property delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add. Can be used with dynamic paths.- Specified by:
propertyin interfaceS_ItemEntry- Parameters:
namesOrIds- The names or Ids forming path to the property.- Returns:
- The (potentially new) instance of a property delta value builder.
-
property
Description copied from interface:S_ItemEntryAdd new property delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add. Can be used with dynamic paths.- Specified by:
propertyin interfaceS_ItemEntry- Parameters:
path- The path to the property.- Returns:
- The (potentially new) instance of a property delta value builder.
-
property
Description copied from interface:S_ItemEntryAdd new property delta. **Beware**: this method may return a new instance, so be sure to store it; otherwise, you may lose the deltas you add. Can be used with dynamic paths.- Specified by:
propertyin interfaceS_ItemEntry- Parameters:
path- The path to the property.definition- The definition of the property.- Returns:
- The (potentially new) instance of a property delta value builder.
-
asObjectDelta
- Specified by:
asObjectDeltain interfaceS_ItemEntry
-
asObjectDeltas
- Specified by:
asObjectDeltasin interfaceS_ItemEntry
-
asItemDelta
- Specified by:
asItemDeltain interfaceS_ItemEntry
-
asItemDeltas
- Specified by:
asItemDeltasin interfaceS_ItemEntry
-
add
- Specified by:
addin interfaceS_MaybeAdd- Specified by:
addin interfaceS_ValuesEntry
-
addRealValues
- Specified by:
addRealValuesin interfaceS_MaybeAdd- Specified by:
addRealValuesin interfaceS_ValuesEntry
-
add
- Specified by:
addin interfaceS_MaybeAdd- Specified by:
addin interfaceS_ValuesEntry
-
add
- Specified by:
addin interfaceS_MaybeAdd- Specified by:
addin interfaceS_ValuesEntry
-
old
- Specified by:
oldin interfaceS_ValuesEntry
-
oldRealValues
- Specified by:
oldRealValuesin interfaceS_ValuesEntry
-
oldRealValue
- Specified by:
oldRealValuein interfaceS_ValuesEntry
-
old
- Specified by:
oldin interfaceS_ValuesEntry
-
old
- Specified by:
oldin interfaceS_ValuesEntry
-
delete
- Specified by:
deletein interfaceS_MaybeDelete- Specified by:
deletein interfaceS_ValuesEntry
-
deleteRealValues
- Specified by:
deleteRealValuesin interfaceS_MaybeDelete- Specified by:
deleteRealValuesin interfaceS_ValuesEntry
-
delete
- Specified by:
deletein interfaceS_MaybeDelete- Specified by:
deletein interfaceS_ValuesEntry
-
delete
- Specified by:
deletein interfaceS_MaybeDelete- Specified by:
deletein interfaceS_ValuesEntry
-
replace
- Specified by:
replacein interfaceS_ValuesEntry
-
replaceRealValues
- Specified by:
replaceRealValuesin interfaceS_ValuesEntry
-
replace
- Specified by:
replacein interfaceS_ValuesEntry
-
replace
- Specified by:
replacein interfaceS_ValuesEntry
-
mod
Description copied from interface:S_ValuesEntryCreate proper modification type based on parameter. Plus means add, minus delete, zero means replace.- Specified by:
modin interfaceS_ValuesEntry
-
modRealValues
- Specified by:
modRealValuesin interfaceS_ValuesEntry
-
mod
- Specified by:
modin interfaceS_ValuesEntry
-
mod
- Specified by:
modin interfaceS_ValuesEntry
-