|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.prism.delta.ItemDelta<V>
public abstract class ItemDelta<V extends PrismValue>
Field Summary | |
---|---|
protected ItemDefinition |
definition
|
protected QName |
name
Name of the property |
protected ItemPath |
parentPath
Parent path of the property (path to the property container) |
protected Collection<V> |
valuesToAdd
|
protected Collection<V> |
valuesToDelete
|
protected Collection<V> |
valuesToReplace
|
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable |
---|
INDENT_STRING |
Constructor Summary | |
---|---|
ItemDelta(ItemDefinition itemDefinition)
|
|
ItemDelta(ItemPath propertyPath,
ItemDefinition itemDefinition)
|
|
ItemDelta(ItemPath parentPath,
QName name,
ItemDefinition itemDefinition)
|
|
ItemDelta(QName name,
ItemDefinition itemDefinition)
|
Method Summary | ||
---|---|---|
void |
accept(Visitor visitor)
|
|
boolean |
addsAnyValue()
|
|
void |
addValuesToAdd(Collection<V> newValues)
|
|
void |
addValuesToAdd(V... newValues)
|
|
void |
addValuesToDelete(Collection<V> newValues)
|
|
void |
addValuesToDelete(V... newValues)
|
|
void |
addValueToAdd(V newValue)
|
|
void |
addValueToDelete(V newValue)
|
|
static void |
applyDefinition(Collection<? extends ItemDelta> deltas,
PrismObjectDefinition definition)
|
|
void |
applyDefinition(ItemDefinition definition)
|
|
void |
applyDefinition(ItemDefinition itemDefinition,
boolean force)
|
|
static void |
applyTo(Collection<? extends ItemDelta> deltas,
PrismContainer propertyContainer)
|
|
void |
applyTo(Item item)
Apply this delta (path) to a property. |
|
void |
applyTo(PrismContainer<?> propertyContainer)
Apply this delta (path) to a property container. |
|
void |
applyTo(PrismContainerValue<?> propertyContainerVal)
Apply this delta (path) to a property container. |
|
void |
assertDefinitions(boolean tolarateRawValues,
String sourceDescription)
|
|
void |
assertDefinitions(String sourceDescription)
|
|
void |
checkConsistence()
|
|
void |
checkConsistence(boolean requireDefinition,
boolean prohibitRaw)
|
|
static void |
checkConsistence(Collection<? extends ItemDelta> deltas)
|
|
static void |
checkConsistence(Collection<? extends ItemDelta> deltas,
boolean requireDefinition,
boolean prohibitRaw)
|
|
void |
clear()
|
|
void |
clearValuesToAdd()
|
|
void |
clearValuesToDelete()
|
|
void |
clearValuesToReplace()
|
|
abstract ItemDelta<V> |
clone()
|
|
|
computeChangedItem(I oldItem)
|
|
boolean |
contains(ItemDelta<V> other)
Returns true if the other delta is a complete subset of this delta. |
|
protected void |
copyValues(ItemDelta<V> clone)
|
|
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator. |
|
String |
debugDump(int indent)
|
|
void |
distributeReplace(Collection<V> existingValues)
Distributes the replace values of this delta to add and delete with respect to provided existing values. |
|
String |
dump()
Show the content of the object intended for diagnostics by developer. |
|
protected void |
dumpValues(StringBuilder sb,
String label,
Collection<V> values,
int indent)
|
|
boolean |
equals(Object obj)
|
|
static
|
findContainerDelta(Collection<? extends ItemDelta> deltas,
ItemPath propertyPath)
|
|
static
|
findContainerDelta(Collection<? extends ItemDelta> deltas,
QName name)
|
|
static
|
findItemDelta(Collection<? extends ItemDelta> deltas,
ItemPath propertyPath,
Class<D> deltaType)
|
|
static
|
findItemDelta(Collection<? extends ItemDelta> deltas,
QName itemName,
Class<D> deltaType)
|
|
static Collection<? extends ItemDelta<?>> |
findItemDeltasSubPath(Collection<? extends ItemDelta<?>> deltas,
ItemPath itemPath)
|
|
static PropertyDelta |
findPropertyDelta(Collection<? extends ItemDelta> deltas,
ItemPath propertyPath)
|
|
static PropertyDelta |
findPropertyDelta(Collection<? extends ItemDelta> deltas,
ItemPath parentPath,
QName propertyName)
|
|
static PropertyDelta |
findPropertyDelta(Collection<? extends ItemDelta> deltas,
QName propertyName)
|
|
static ReferenceDelta |
findReferenceModification(Collection<? extends ItemDelta> deltas,
QName itemName)
|
|
V |
getAnyValue()
|
|
ItemDefinition |
getDefinition()
|
|
abstract Class<? extends Item> |
getItemClass()
|
|
Item<V> |
getItemNew()
Returns the "new" state of the property - the state that would be after the delta is applied. |
|
Item<V> |
getItemNew(Item<V> itemOld)
Returns the "new" state of the property - the state that would be after the delta is applied. |
|
QName |
getName()
|
|
ItemPath |
getParentPath()
|
|
ItemPath |
getPath()
|
|
ItemPath |
getPath(ItemPath pathPrefix)
|
|
PrismContext |
getPrismContext()
|
|
Collection<V> |
getValuesToAdd()
|
|
Collection<V> |
getValuesToDelete()
|
|
Collection<V> |
getValuesToReplace()
|
|
boolean |
hasCompleteDefinition()
|
|
int |
hashCode()
|
|
boolean |
isAdd()
|
|
boolean |
isDelete()
|
|
boolean |
isEmpty()
|
|
boolean |
isRaw()
|
|
boolean |
isReplace()
|
|
boolean |
isValueToAdd(V value)
|
|
boolean |
isValueToAdd(V value,
boolean ignoreMetadata)
|
|
boolean |
isValueToDelete(V value)
|
|
boolean |
isValueToDelete(V value,
boolean ignoreMetadata)
|
|
boolean |
isValueToReplace(V value)
|
|
boolean |
isValueToReplace(V value,
boolean ignoreMetadata)
|
|
void |
merge(ItemDelta<V> deltaToMerge)
Merge specified delta to this delta. |
|
void |
mergeValuesToAdd(Collection<V> newValues)
|
|
void |
mergeValuesToAdd(V[] newValues)
|
|
void |
mergeValuesToDelete(Collection<V> newValues)
|
|
void |
mergeValuesToDelete(V[] newValues)
|
|
void |
mergeValuesToReplace(Collection<V> newValues)
|
|
void |
mergeValuesToReplace(V[] newValues)
|
|
void |
mergeValueToAdd(V newValue)
|
|
void |
mergeValueToDelete(V newValue)
|
|
void |
mergeValueToReplace(V newValue)
|
|
ItemDelta<V> |
narrow(PrismObject<? extends Objectable> object)
Filters out all delta values that are meaningless to apply. |
|
void |
normalize()
|
|
static
|
removeItemDelta(Collection<? extends ItemDelta> deltas,
ItemPath propertyPath,
Class<D> deltaType)
|
|
boolean |
removeValueToAdd(V valueToRemove)
|
|
boolean |
removeValueToDelete(V valueToRemove)
|
|
boolean |
removeValueToReplace(V valueToRemove)
|
|
void |
revive(PrismContext prismContext)
|
|
void |
setDefinition(ItemDefinition definition)
|
|
void |
setName(QName name)
|
|
void |
setParentPath(ItemPath parentPath)
|
|
void |
setValuesToReplace(Collection<V> newValues)
|
|
void |
setValuesToReplace(V... newValues)
|
|
void |
setValueToReplace(V newValue)
|
|
void |
simplify()
Transforms the delta to the simplest (and safest) form. |
|
PrismValueDeltaSetTriple<V> |
toDeltaSetTriple()
|
|
static
|
toDeltaSetTriple(Item<T> item,
ItemDelta<T> delta)
|
|
static
|
toDeltaSetTriple(Item<T> item,
ItemDelta<T> delta,
boolean oldValuesValid,
boolean newValuesValid)
Deprecated. |
|
PrismValueDeltaSetTriple<V> |
toDeltaSetTriple(Item<V> itemOld)
|
|
String |
toString()
|
|
void |
validate()
|
|
void |
validate(String contextDescription)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected QName name
protected ItemPath parentPath
protected ItemDefinition definition
protected Collection<V extends PrismValue> valuesToReplace
protected Collection<V extends PrismValue> valuesToAdd
protected Collection<V extends PrismValue> valuesToDelete
Constructor Detail |
---|
public ItemDelta(ItemDefinition itemDefinition)
public ItemDelta(QName name, ItemDefinition itemDefinition)
public ItemDelta(ItemPath parentPath, QName name, ItemDefinition itemDefinition)
public ItemDelta(ItemPath propertyPath, ItemDefinition itemDefinition)
Method Detail |
---|
public QName getName()
getName
in interface Itemable
public void setName(QName name)
public ItemPath getParentPath()
public void setParentPath(ItemPath parentPath)
public ItemPath getPath()
public ItemPath getPath(ItemPath pathPrefix)
getPath
in interface Itemable
public ItemDefinition getDefinition()
getDefinition
in interface Itemable
public void setDefinition(ItemDefinition definition)
public void accept(Visitor visitor)
accept
in interface Visitable
public void applyDefinition(ItemDefinition definition) throws SchemaException
SchemaException
public static void applyDefinition(Collection<? extends ItemDelta> deltas, PrismObjectDefinition definition) throws SchemaException
SchemaException
public boolean hasCompleteDefinition()
public PrismContext getPrismContext()
getPrismContext
in interface Itemable
public abstract Class<? extends Item> getItemClass()
public Collection<V> getValuesToAdd()
public void clearValuesToAdd()
public Collection<V> getValuesToDelete()
public void clearValuesToDelete()
public Collection<V> getValuesToReplace()
public void clearValuesToReplace()
public void addValuesToAdd(Collection<V> newValues)
public void addValuesToAdd(V... newValues)
public void addValueToAdd(V newValue)
public boolean removeValueToAdd(V valueToRemove)
public boolean removeValueToDelete(V valueToRemove)
public boolean removeValueToReplace(V valueToRemove)
public void mergeValuesToAdd(Collection<V> newValues)
public void mergeValuesToAdd(V[] newValues)
public void mergeValueToAdd(V newValue)
public void addValuesToDelete(Collection<V> newValues)
public void addValuesToDelete(V... newValues)
public void addValueToDelete(V newValue)
public void mergeValuesToDelete(Collection<V> newValues)
public void mergeValuesToDelete(V[] newValues)
public void mergeValueToDelete(V newValue)
public void setValuesToReplace(Collection<V> newValues)
public void setValuesToReplace(V... newValues)
public void setValueToReplace(V newValue)
public void mergeValuesToReplace(Collection<V> newValues)
public void mergeValuesToReplace(V[] newValues)
public void mergeValueToReplace(V newValue)
public boolean isValueToAdd(V value)
public boolean isValueToAdd(V value, boolean ignoreMetadata)
public boolean isValueToDelete(V value)
public boolean isValueToDelete(V value, boolean ignoreMetadata)
public boolean isValueToReplace(V value)
public boolean isValueToReplace(V value, boolean ignoreMetadata)
public V getAnyValue()
public boolean isEmpty()
public boolean addsAnyValue()
public void normalize()
public boolean isReplace()
public boolean isAdd()
public boolean isDelete()
public void clear()
public static PropertyDelta findPropertyDelta(Collection<? extends ItemDelta> deltas, QName propertyName)
public static PropertyDelta findPropertyDelta(Collection<? extends ItemDelta> deltas, ItemPath parentPath, QName propertyName)
public static PropertyDelta findPropertyDelta(Collection<? extends ItemDelta> deltas, ItemPath propertyPath)
public static <X extends Containerable> ContainerDelta<X> findContainerDelta(Collection<? extends ItemDelta> deltas, ItemPath propertyPath)
public static <X extends Containerable> ContainerDelta<X> findContainerDelta(Collection<? extends ItemDelta> deltas, QName name)
public static <D extends ItemDelta> D findItemDelta(Collection<? extends ItemDelta> deltas, ItemPath propertyPath, Class<D> deltaType)
public static Collection<? extends ItemDelta<?>> findItemDeltasSubPath(Collection<? extends ItemDelta<?>> deltas, ItemPath itemPath)
public static <D extends ItemDelta> D findItemDelta(Collection<? extends ItemDelta> deltas, QName itemName, Class<D> deltaType)
public static ReferenceDelta findReferenceModification(Collection<? extends ItemDelta> deltas, QName itemName)
public static <D extends ItemDelta> void removeItemDelta(Collection<? extends ItemDelta> deltas, ItemPath propertyPath, Class<D> deltaType)
public ItemDelta<V> narrow(PrismObject<? extends Objectable> object)
public void validate() throws SchemaException
SchemaException
public void validate(String contextDescription) throws SchemaException
SchemaException
public static void checkConsistence(Collection<? extends ItemDelta> deltas)
public static void checkConsistence(Collection<? extends ItemDelta> deltas, boolean requireDefinition, boolean prohibitRaw)
public void checkConsistence()
public void checkConsistence(boolean requireDefinition, boolean prohibitRaw)
public void distributeReplace(Collection<V> existingValues)
public void merge(ItemDelta<V> deltaToMerge)
public void simplify()
public void applyTo(PrismContainer<?> propertyContainer) throws SchemaException
SchemaException
public static void applyTo(Collection<? extends ItemDelta> deltas, PrismContainer propertyContainer) throws SchemaException
SchemaException
public void applyTo(PrismContainerValue<?> propertyContainerVal) throws SchemaException
SchemaException
public void applyTo(Item item) throws SchemaException
SchemaException
public <I extends Item> I computeChangedItem(I oldItem) throws SchemaException
SchemaException
public Item<V> getItemNew() throws SchemaException
SchemaException
public Item<V> getItemNew(Item<V> itemOld) throws SchemaException
SchemaException
public boolean contains(ItemDelta<V> other)
public abstract ItemDelta<V> clone()
clone
in class Object
protected void copyValues(ItemDelta<V> clone)
@Deprecated public static <T extends PrismValue> PrismValueDeltaSetTriple<T> toDeltaSetTriple(Item<T> item, ItemDelta<T> delta, boolean oldValuesValid, boolean newValuesValid)
public static <T extends PrismValue> PrismValueDeltaSetTriple<T> toDeltaSetTriple(Item<T> item, ItemDelta<T> delta)
public PrismValueDeltaSetTriple<V> toDeltaSetTriple()
public PrismValueDeltaSetTriple<V> toDeltaSetTriple(Item<V> itemOld)
public void assertDefinitions(String sourceDescription) throws SchemaException
SchemaException
public void assertDefinitions(boolean tolarateRawValues, String sourceDescription) throws SchemaException
SchemaException
public boolean isRaw()
public void revive(PrismContext prismContext)
public void applyDefinition(ItemDefinition itemDefinition, boolean force) throws SchemaException
SchemaException
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public String dump()
Dumpable
dump
in interface Dumpable
protected void dumpValues(StringBuilder sb, String label, Collection<V> values, int indent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |