Interface PrismValueDelegator
- All Superinterfaces:
ComplexCopyable<PrismValue>,DebugDumpable,Freezable,MidpointOriginMetadata,PathVisitable,PrismValue,PrismVisitable,Revivable,SchemaLookup.Aware,Serializable,Visitable
- All Known Subinterfaces:
PrismContainerValueDelegator<C>,PrismObjectValueDelegator<O>,PrismPropertyValueDelegator<T>,PrismReferenceValueDelegator
- All Known Implementing Classes:
FlyweightClonedValue,GenericLazyPrismContainerValue
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddefault voiddefault booleanacceptVisitor(PrismVisitor visitor) Accept visitor and visits prism item or value and it's children Note: name is not accept, but accept visitor to prevent naming conflict in lambdas dynamic languages such as groovy withVisitable.accept(com.evolveum.midpoint.prism.Visitor)default PrismValueapplyDefinition(@NotNull ItemDefinition<?> definition) Definition application MAY change the value (currently only for container values).default PrismValueapplyDefinition(@NotNull ItemDefinition<?> definition, boolean force) Definition application MAY change the value (currently only for container values).default voidapplyDefinitionLegacy(@NotNull ItemDefinition<?> definition) This one checks that nothing has changed.default voidapplyDefinitionLegacy(@NotNull ItemDefinition<?> definition, boolean force) Definition application MAY change the value (currently only for container/reference values).default voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) default voidUsed when we are removing the value from the previous parent.default PrismValueclone()Literal clone.default PrismValuecloneComplex(@NotNull CloneStrategy strategy) Complex clone with different cloning strategies.default @NotNull PrismValuedefault PrismValuedefault StringShow the content of the object intended for diagnostics by system administrator.default StringdebugDump(int indent) default Objectdefault ObjectdebugDumpLazily(int indent) delegate()default voiddefault Collection<? extends ItemDelta>diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy) Assumes matching representations.default booleanequals(PrismValue otherValue, @NotNull EquivalenceStrategy strategy) default booleanequals(PrismValue otherValue, @NotNull ParameterizedEquivalenceStrategy strategy) default Objectdefault @NotNull Collection<Item<?,?>> getAllItems(@NotNull ItemPath path) default @NotNull Collection<PrismValue>getAllValues(ItemPath path) default <T> TgetNearestValueOfType(@NotNull Class<T> type) default Objectabledefault OriginTypedefault Itemabledefault PrismContainerValue<?>default @NotNull ItemPathgetPath()default @Nullable Class<?>default <T> TReturns the statically-typed "real value".default @Nullable Objectdefault @Nullable Objectdefault @Nullable ObjectableReturns the top-most object (Objectable).default @NotNull PrismValuedefault SchemaContextdefault QNamedefault ObjectgetUserData(@NotNull String key) default @NotNull ValueMetadataReturns the value metadata, creating empty one if there's none.default <C extends Containerable>
@NotNull PrismContainer<C>Returns value metadata as typed PrismContainer.default @Nullable ValueMetadataReturns the value metadata, if there is any.default inthashCode(@NotNull EquivalenceStrategy equivalenceStrategy) default inthashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy) default booleandefault booleandefault booleanisEmpty()default booleanReturns `true` if this value represents aPrismObjectvalue.default booleanIgnores untyped values (considers them non-matching).default booleanisRaw()default booleandefault voidCurrently doing nothing.default voidRecompute the value or otherwise "initialize" it before adding it to a prism tree.default voidrecompute(PrismContext prismContext) default booleanrepresentsSameValue(PrismValue other, EquivalenceStrategy strategy, boolean lax) Returns true if this and other value represent the same value.default SchemaLookupdefault voidsetOriginObject(Objectable source) default voidsetOriginType(OriginType type) default voiddefault voidsetTransient(boolean value) default voidsetUserData(@NotNull String key, Object value) default voidsetValueMetadata(Containerable realValue) Sets metadata from this value (from PCV).default voidsetValueMetadata(PrismContainer<?> valueMetadata) Sets metadata for this value.default voidsetValueMetadata(ValueMetadata valueMetadata) Sets metadata for this value.default StringMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.PrismValue
copy, immutableCopy, mutableCopy
-
Method Details
-
delegate
PrismValue delegate() -
getUserData
- Specified by:
getUserDatain interfacePrismValue
-
getUserData
- Specified by:
getUserDatain interfacePrismValue
-
setUserData
- Specified by:
setUserDatain interfacePrismValue
-
getParent
- Specified by:
getParentin interfacePrismValue
-
setParent
- Specified by:
setParentin interfacePrismValue
-
getValueMetadata
Description copied from interface:PrismValueReturns the value metadata, creating empty one if there's none. When performance is critical, consider usingPrismValue.getValueMetadataIfExists()instead; or callPrismValue.hasValueMetadata()first.- Specified by:
getValueMetadatain interfacePrismValue
-
getValueMetadataIfExists
Description copied from interface:PrismValueReturns the value metadata, if there is any.- Specified by:
getValueMetadataIfExistsin interfacePrismValue
-
getValueMetadataAsContainer
@Experimental @NotNull default <C extends Containerable> @NotNull PrismContainer<C> getValueMetadataAsContainer()Description copied from interface:PrismValueReturns value metadata as typed PrismContainer. Useful for lazy clients because of the type matching.- Specified by:
getValueMetadataAsContainerin interfacePrismValue
-
hasValueMetadata
default boolean hasValueMetadata()- Specified by:
hasValueMetadatain interfacePrismValue- Returns:
- True if this value has any metadata (i.e. the metadata container has any value). TODO Or should we accept only non-empty values? Probably not.
-
setValueMetadata
Description copied from interface:PrismValueSets metadata for this value.- Specified by:
setValueMetadatain interfacePrismValue
-
setValueMetadata
Description copied from interface:PrismValueSets metadata for this value.- Specified by:
setValueMetadatain interfacePrismValue
-
setValueMetadata
Description copied from interface:PrismValueSets metadata from this value (from PCV). To be removed (most probably).- Specified by:
setValueMetadatain interfacePrismValue- Throws:
SchemaException
-
deleteValueMetadata
default void deleteValueMetadata()- Specified by:
deleteValueMetadatain interfacePrismValue
-
getPath
- Specified by:
getPathin interfacePrismValue
-
clearParent
default void clearParent()Description copied from interface:PrismValueUsed 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.- Specified by:
clearParentin interfacePrismValue
-
applyDefinition
default PrismValue applyDefinition(@NotNull @NotNull ItemDefinition<?> definition) throws SchemaException Description copied from interface:PrismValueDefinition application MAY change the value (currently only for container values). The caller must deal with that. To be seen if this is a good idea. But probably so, because there are various situations when the definition application changes the nature of a prism value (midPoint shadow associations are currently the only places) but of prism items (midPoint attributes and associations need this; and it must be worked around for now).- Specified by:
applyDefinitionin interfacePrismValue- Throws:
SchemaException
-
applyDefinitionLegacy
default void applyDefinitionLegacy(@NotNull @NotNull ItemDefinition<?> definition) throws SchemaException Description copied from interface:PrismValueThis one checks that nothing has changed.- Specified by:
applyDefinitionLegacyin interfacePrismValue- Throws:
SchemaException
-
applyDefinition
default PrismValue applyDefinition(@NotNull @NotNull ItemDefinition<?> definition, boolean force) throws SchemaException Description copied from interface:PrismValueDefinition application MAY change the value (currently only for container values). The caller must deal with that.- Specified by:
applyDefinitionin interfacePrismValue- Throws:
SchemaException
-
applyDefinitionLegacy
default void applyDefinitionLegacy(@NotNull @NotNull ItemDefinition<?> definition, boolean force) throws SchemaException Description copied from interface:PrismValueDefinition application MAY change the value (currently only for container/reference values). The caller must deal with that.- Specified by:
applyDefinitionLegacyin interfacePrismValue- Throws:
SchemaException
-
recompute
default void recompute()Description copied from interface:PrismValueRecompute 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.- Specified by:
recomputein interfacePrismValue
-
recompute
- Specified by:
recomputein interfacePrismValue
-
accept
- Specified by:
acceptin interfacePrismValue- Specified by:
acceptin interfaceVisitable
-
accept
- Specified by:
acceptin interfacePathVisitable- Specified by:
acceptin interfacePrismValue
-
checkConsistenceInternal
default void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
checkConsistenceInternalin interfacePrismValue
-
representsSameValue
Description copied from interface:PrismValueReturns 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.- Specified by:
representsSameValuein interfacePrismValuelax- 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
default void normalize()Description copied from interface:PrismValueCurrently doing nothing.- Specified by:
normalizein interfacePrismValue
-
clone
Description copied from interface:PrismValueLiteral clone.- Specified by:
clonein interfacePrismValue
-
createImmutableClone
- Specified by:
createImmutableClonein interfacePrismValue
-
cloneComplex
Description copied from interface:PrismValueComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfaceComplexCopyable<PrismValue>- Specified by:
cloneComplexin interfacePrismValue- See Also:
-
hashCode
- Specified by:
hashCodein interfacePrismValue
-
hashCode
- Specified by:
hashCodein interfacePrismValue
-
equals
- Specified by:
equalsin interfacePrismValue
-
equals
default boolean equals(PrismValue otherValue, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
equalsin interfacePrismValue
-
diff
default Collection<? extends ItemDelta> diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy) Description copied from interface:PrismValueAssumes 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.- Specified by:
diffin interfacePrismValue
-
getRealClass
- Specified by:
getRealClassin interfacePrismValue
-
hasRealClass
- Specified by:
hasRealClassin interfacePrismValue
-
getRealValue
@Nullable default <T> T getRealValue()Description copied from interface:PrismValueReturns the statically-typed "real value". TODO specify when exactly the returned value can be null. TODO decide for containers: they throw an exception if the value is not statically typed.- Specified by:
getRealValuein interfacePrismValue
-
getRealValueOrRawType
- Specified by:
getRealValueOrRawTypein interfacePrismValue
-
getRealValueIfExists
- Specified by:
getRealValueIfExistsin interfacePrismValue
-
getRootValue
- Specified by:
getRootValuein interfacePrismValue
-
getRootObjectable
Description copied from interface:PrismValueReturns the top-most object (Objectable).- Specified by:
getRootObjectablein interfacePrismValue
-
getNearestValueOfType
- Specified by:
getNearestValueOfTypein interfacePrismValue
-
getParentContainerValue
- Specified by:
getParentContainerValuein interfacePrismValue
-
getTypeName
- Specified by:
getTypeNamein interfacePrismValue
-
getAllValues
Description copied from interface:PrismValue- Specified by:
getAllValuesin interfacePrismValue
-
getAllItems
Description copied from interface:PrismValueSeeItem.getAllItems(ItemPath). Here the path is never empty.- Specified by:
getAllItemsin interfacePrismValue
-
isRaw
default boolean isRaw()- Specified by:
isRawin interfacePrismValue
-
isEmpty
default boolean isEmpty()- Specified by:
isEmptyin interfacePrismValue
-
toHumanReadableString
- Specified by:
toHumanReadableStringin interfacePrismValue
-
find
- Specified by:
findin interfacePrismValue
-
isTransient
- Specified by:
isTransientin interfacePrismValue- Returns:
- True if the value is transient, so it won't be serialized if serialization of transient value is disabled.
-
setTransient
- Specified by:
setTransientin interfacePrismValue
-
isOfType
Description copied from interface:PrismValueIgnores untyped values (considers them non-matching). Supports non-static types. (May be slower.)- Specified by:
isOfTypein interfacePrismValue
-
cloneIfImmutable
- Specified by:
cloneIfImmutablein interfacePrismValue
-
isObjectable
default boolean isObjectable()Description copied from interface:PrismValueReturns `true` if this value represents aPrismObjectvalue. Temporary implementation that uses real value to do the check, asPrismObjectValuecan mask itself as aPrismContainerValue, at least for now.- Specified by:
isObjectablein interfacePrismValue
-
getSchemaContext
- Specified by:
getSchemaContextin interfacePrismValue
-
schemaLookup
- Specified by:
schemaLookupin interfacePrismValue- Specified by:
schemaLookupin interfaceSchemaLookup.Aware
-
acceptVisitor
Description copied from interface:PrismVisitableAccept visitor and visits prism item or value and it's children Note: name is not accept, but accept visitor to prevent naming conflict in lambdas dynamic languages such as groovy withVisitable.accept(com.evolveum.midpoint.prism.Visitor)- Specified by:
acceptVisitorin interfacePrismValue- Specified by:
acceptVisitorin interfacePrismVisitable- Returns:
- return value of
PrismVisitor.visit(PrismVisitable)invocation for this visitable.
-
debugDump
Description copied from interface:DebugDumpableShow the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.- Specified by:
debugDumpin interfaceDebugDumpable- Returns:
- content of the object intended for diagnostics by system administrator.
-
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable
-
debugDumpLazily
- Specified by:
debugDumpLazilyin interfaceDebugDumpable
-
debugDumpLazily
- Specified by:
debugDumpLazilyin interfaceDebugDumpable
-
getOriginObject
- Specified by:
getOriginObjectin interfaceMidpointOriginMetadata
-
getOriginType
- Specified by:
getOriginTypein interfaceMidpointOriginMetadata
-
setOriginType
- Specified by:
setOriginTypein interfaceMidpointOriginMetadata
-
setOriginObject
- Specified by:
setOriginObjectin interfaceMidpointOriginMetadata
-