public abstract class PrismValue extends Object implements IPrismValue
Modifier and Type | Field and Description |
---|---|
protected boolean |
immutable |
protected PrismContext |
prismContext |
INDENT_STRING
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor) |
void |
accept(Visitor visitor,
ItemPath path,
boolean recursive) |
protected void |
appendOriginDump(StringBuilder builder) |
void |
applyDefinition(ItemDefinition definition) |
void |
applyDefinition(ItemDefinition definition,
boolean force) |
abstract void |
checkConsistenceInternal(Itemable rootItem,
boolean requireDefinitions,
boolean prohibitRaw,
ConsistencyCheckScope scope) |
protected void |
checkMutability() |
void |
clearParent()
Used when we are removing the value from the previous parent.
|
static <T> void |
clearParent(List<PrismPropertyValue<T>> values) |
abstract PrismValue |
clone()
Literal clone.
|
static <T extends PrismValue> |
cloneCollection(Collection<T> values) |
static <T extends PrismValue> |
cloneCollectionComplex(CloneStrategy strategy,
Collection<T> values) |
abstract PrismValue |
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.
|
static <X extends PrismValue> |
cloneValues(Collection<X> values) |
static <V extends PrismValue> |
collectionContainsEquivalentValue(Collection<V> collection,
V value) |
static <V extends PrismValue> |
contains(Collection<V> thisSet,
V otherValue,
boolean ignoreMetadata,
boolean isLiteral) |
static <V extends PrismValue> |
containsAll(Collection<V> thisSet,
Collection<V> otherSet,
boolean ignoreMetadata,
boolean isLiteral) |
static <V extends PrismValue> |
containsRealValue(Collection<V> collection,
V value) |
static <X,V extends PrismValue> |
containsRealValue(Collection<X> collection,
V value,
Function<X,V> valueExtractor) |
protected void |
copyValues(CloneStrategy strategy,
PrismValue clone) |
Collection<? extends ItemDelta> |
diff(PrismValue otherValue)
Assumes matching representations.
|
Collection<? extends ItemDelta> |
diff(PrismValue otherValue,
boolean ignoreMetadata,
boolean isLiteral)
Assumes matching representations.
|
boolean |
equals(Object obj) |
boolean |
equals(PrismValue otherValue,
boolean ignoreMetadata) |
boolean |
equals(PrismValue thisValue,
PrismValue otherValue) |
boolean |
equalsComplex(PrismValue other,
boolean ignoreMetadata,
boolean isLiteral) |
boolean |
equalsRealValue(PrismValue otherValue) |
boolean |
equalsRealValue(PrismValue thisValue,
PrismValue otherValue) |
static <V extends PrismValue> |
equalsRealValues(Collection<V> collection1,
Collection<V> collection2) |
static PrismValue |
fromRealValue(Object realValue) |
Collection<PrismValue> |
getAllValues(ItemPath path) |
protected ItemDefinition |
getDefinition() |
Objectable |
getOriginObject() |
OriginType |
getOriginType() |
Itemable |
getParent() |
PrismContainerValue<?> |
getParentContainerValue() |
static PrismContainerValue<?> |
getParentContainerValue(PrismValue value) |
ItemPath |
getPath()
Computes a path in current prism structure this value is part of.
|
PrismContext |
getPrismContext() |
abstract Class<?> |
getRealClass() |
abstract <T> T |
getRealValue() |
static <T> Set<T> |
getRealValuesOfCollection(Collection<? extends PrismValue> collection) |
PrismValue |
getRootValue() |
QName |
getTypeName() |
Map<String,Object> |
getUserData() |
Object |
getUserData(String key) |
int |
hashCode() |
boolean |
isImmutable() |
void |
normalize() |
void |
recompute()
Recompute the value or otherwise "initialize" it before adding it to a prism tree.
|
boolean |
representsSameValue(PrismValue other,
boolean lax)
Returns true if this and other value represent the same value.
|
static <T extends PrismValue> |
resetParentCollection(Collection<T> values)
Sets all parents to null.
|
void |
revive(PrismContext prismContext) |
void |
setImmutable(boolean immutable) |
void |
setOriginObject(Objectable source) |
void |
setOriginType(OriginType type) |
void |
setParent(Itemable parent) |
void |
setPrismContext(PrismContext prismContext) |
void |
setUserData(String key,
Object value) |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
find, findPartial, isEmpty, isRaw, match, recompute, toHumanReadableString
debugDump, debugDump, debugDumpLazily, debugDumpLazily
protected boolean immutable
protected transient PrismContext prismContext
public void setPrismContext(PrismContext prismContext)
public void setOriginObject(Objectable source)
public void setOriginType(OriginType type)
public OriginType getOriginType()
getOriginType
in interface IPrismValue
public Objectable getOriginObject()
getOriginObject
in interface IPrismValue
public Object getUserData(@NotNull String key)
getUserData
in interface IPrismValue
public void setUserData(@NotNull String key, Object value)
setUserData
in interface IPrismValue
public Itemable getParent()
getParent
in interface IPrismValue
public void setParent(Itemable parent)
setParent
in interface IPrismValue
@NotNull public ItemPath getPath()
IPrismValue
getPath
in interface IPrismValue
public void clearParent()
clearParent
in interface IPrismValue
public static <T> void clearParent(List<PrismPropertyValue<T>> values)
public PrismContext getPrismContext()
getPrismContext
in interface IPrismValue
protected ItemDefinition getDefinition()
public void applyDefinition(ItemDefinition definition) throws SchemaException
applyDefinition
in interface IPrismValue
SchemaException
public void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
applyDefinition
in interface IPrismValue
SchemaException
public void revive(PrismContext prismContext) throws SchemaException
revive
in interface Revivable
SchemaException
public void recompute()
recompute
in interface IPrismValue
public void accept(Visitor visitor, ItemPath path, boolean recursive)
accept
in interface PathVisitable
public abstract void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
public boolean representsSameValue(PrismValue other, boolean lax)
lax
- If we can reasonably assume that the two values belong together even if they don't have the same ID,
e.g. if they both belong to single-valued parent items. This is useful e.g. when comparing
multi-valued containers. But can cause problems when we want to be sure we are removing the correct
value.public static <V extends PrismValue> boolean containsRealValue(Collection<V> collection, V value)
public static <X,V extends PrismValue> boolean containsRealValue(Collection<X> collection, V value, Function<X,V> valueExtractor)
public static <V extends PrismValue> boolean equalsRealValues(Collection<V> collection1, Collection<V> collection2)
public static <V extends PrismValue> boolean containsAll(Collection<V> thisSet, Collection<V> otherSet, boolean ignoreMetadata, boolean isLiteral)
public static <V extends PrismValue> boolean contains(Collection<V> thisSet, V otherValue, boolean ignoreMetadata, boolean isLiteral)
public void normalize()
normalize
in interface IPrismValue
public static <X extends PrismValue> Collection<X> cloneValues(Collection<X> values)
public abstract PrismValue clone()
public abstract PrismValue cloneComplex(CloneStrategy strategy)
CloneStrategy
protected void copyValues(CloneStrategy strategy, PrismValue clone)
@NotNull public static <T extends PrismValue> Collection<T> cloneCollection(Collection<T> values)
@NotNull public static <T extends PrismValue> Collection<T> cloneCollectionComplex(CloneStrategy strategy, Collection<T> values)
public static <T extends PrismValue> Collection<T> resetParentCollection(Collection<T> values)
public boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral)
public boolean equals(PrismValue otherValue, boolean ignoreMetadata)
equals
in interface IPrismValue
public boolean equals(PrismValue thisValue, PrismValue otherValue)
public boolean equalsRealValue(PrismValue otherValue)
public boolean equalsRealValue(PrismValue thisValue, PrismValue otherValue)
public Collection<? extends ItemDelta> diff(PrismValue otherValue)
diff
in interface IPrismValue
public Collection<? extends ItemDelta> diff(PrismValue otherValue, boolean ignoreMetadata, boolean isLiteral)
diff
in interface IPrismValue
protected void appendOriginDump(StringBuilder builder)
public static <T> Set<T> getRealValuesOfCollection(Collection<? extends PrismValue> collection)
public static <V extends PrismValue> boolean collectionContainsEquivalentValue(Collection<V> collection, V value)
public boolean isImmutable()
isImmutable
in interface IPrismValue
public void setImmutable(boolean immutable)
protected void checkMutability()
@Nullable public abstract Class<?> getRealClass()
@Nullable public abstract <T> T getRealValue()
public PrismValue getRootValue()
public static PrismContainerValue<?> getParentContainerValue(PrismValue value)
public PrismContainerValue<?> getParentContainerValue()
public QName getTypeName()
public static PrismValue fromRealValue(Object realValue)
@NotNull public Collection<PrismValue> getAllValues(ItemPath path)
Copyright © 2019 Evolveum. All rights reserved.