Package com.evolveum.midpoint.prism
Interface PrismValue
-
- All Superinterfaces:
DebugDumpable
,Freezable
,MidpointOriginMetadata
,PathVisitable
,PrismContextSensitive
,Revivable
,Serializable
,Visitable
- All Known Subinterfaces:
PrismContainerValue<C>
,PrismObjectValue<O>
,PrismPropertyValue<T>
,PrismReferenceValue
public interface PrismValue extends Visitable, PathVisitable, Serializable, DebugDumpable, Revivable, Freezable, PrismContextSensitive, MidpointOriginMetadata
- Author:
- semancik
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
accept(Visitor visitor)
void
accept(Visitor visitor, ItemPath path, boolean recursive)
void
applyDefinition(ItemDefinition definition)
void
applyDefinition(ItemDefinition definition, boolean force)
void
checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
void
clearParent()
Used when we are removing the value from the previous parent.PrismValue
clone()
Literal clone.PrismValue
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.PrismValue
createImmutableClone()
Collection<? extends ItemDelta>
diff(PrismValue otherValue)
Assumes matching representations.Collection<? extends ItemDelta>
diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy)
Assumes matching representations.boolean
equals(PrismValue otherValue, @NotNull EquivalenceStrategy strategy)
boolean
equals(PrismValue otherValue, @NotNull ParameterizedEquivalenceStrategy strategy)
boolean
equals(PrismValue thisValue, PrismValue otherValue)
Deprecated.Object
find(ItemPath path)
@NotNull Collection<PrismValue>
getAllValues(ItemPath path)
Itemable
getParent()
PrismContainerValue<?>
getParentContainerValue()
@NotNull ItemPath
getPath()
@Nullable Class<?>
getRealClass()
<T> T
getRealValue()
default @Nullable Object
getRealValueOrRawType(PrismContext prismContext)
PrismValue
getRootValue()
QName
getTypeName()
Map<String,Object>
getUserData()
Object
getUserData(@NotNull String key)
int
hashCode(@NotNull EquivalenceStrategy equivalenceStrategy)
int
hashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)
default boolean
hasRealClass()
boolean
isEmpty()
boolean
isRaw()
void
normalize()
void
recompute()
Recompute the value or otherwise "initialize" it before adding it to a prism tree.void
recompute(PrismContext prismContext)
boolean
representsSameValue(PrismValue other, boolean lax)
Returns true if this and other value represent the same value.void
setParent(Itemable parent)
void
setPrismContext(PrismContext prismContext)
void
setUserData(@NotNull String key, Object value)
String
toHumanReadableString()
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
-
Methods inherited from interface com.evolveum.midpoint.prism.metadata.MidpointOriginMetadata
getOriginObject, getOriginType, setOriginObject, setOriginType
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
-
-
-
Method Detail
-
setPrismContext
void setPrismContext(PrismContext prismContext)
-
getParent
Itemable getParent()
-
setParent
void setParent(Itemable parent)
-
getPath
@NotNull @NotNull ItemPath getPath()
-
clearParent
void clearParent()
Used when we are removing the value from the previous parent. Or when we know that the previous parent will be discarded and we want to avoid unnecessary cloning.
-
applyDefinition
void applyDefinition(ItemDefinition definition) throws SchemaException
- Throws:
SchemaException
-
applyDefinition
void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
- Throws:
SchemaException
-
recompute
void recompute()
Recompute the value or otherwise "initialize" it before adding it to a prism tree. This may as well do nothing if no recomputing or initialization is needed.
-
recompute
void recompute(PrismContext prismContext)
-
accept
void accept(Visitor visitor, ItemPath path, boolean recursive)
- Specified by:
accept
in interfacePathVisitable
-
checkConsistenceInternal
void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
-
representsSameValue
boolean representsSameValue(PrismValue other, boolean lax)
Returns true if this and other value represent the same value. E.g. if they have the same IDs, OIDs or it is otherwise know that they "belong together" without a deep examination of the values.- Parameters:
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.
-
normalize
void normalize()
-
clone
PrismValue clone()
Literal clone.
-
createImmutableClone
PrismValue createImmutableClone()
-
cloneComplex
PrismValue cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.- See Also:
CloneStrategy
-
hashCode
int hashCode(@NotNull @NotNull EquivalenceStrategy equivalenceStrategy)
-
hashCode
int hashCode(@NotNull @NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)
-
equals
boolean equals(PrismValue otherValue, @NotNull @NotNull EquivalenceStrategy strategy)
-
equals
boolean equals(PrismValue otherValue, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy)
-
equals
@Deprecated boolean equals(PrismValue thisValue, PrismValue otherValue)
Deprecated.
-
diff
Collection<? extends ItemDelta> diff(PrismValue otherValue)
Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. E.g. the container with the same ID.
-
diff
Collection<? extends ItemDelta> diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy)
Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. E.g. the container with the same ID.
-
getRealClass
@Nullable @Nullable Class<?> getRealClass()
-
hasRealClass
@Experimental default boolean hasRealClass()
-
getRealValue
@Nullable <T> T getRealValue()
-
getRealValueOrRawType
@Nullable @Experimental default @Nullable Object getRealValueOrRawType(PrismContext prismContext)
-
getRootValue
PrismValue getRootValue()
-
getParentContainerValue
PrismContainerValue<?> getParentContainerValue()
-
getTypeName
QName getTypeName()
-
getAllValues
@NotNull @NotNull Collection<PrismValue> getAllValues(ItemPath path)
-
isRaw
boolean isRaw()
-
isEmpty
boolean isEmpty()
-
toHumanReadableString
String toHumanReadableString()
-
-