Interface PrismContainerValueDelegator<C extends Containerable>
- All Superinterfaces:
DebugDumpable
,Freezable
,MidpointOriginMetadata
,ParentVisitable
,PathVisitable
,PrismContainerValue<C>
,PrismValue
,PrismVisitable
,Revivable
,SchemaLookup.Aware
,Serializable
,Visitable
- All Known Implementing Classes:
LazyPrismContainerValue
public interface PrismContainerValueDelegator<C extends Containerable>
extends PrismContainerValue<C>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismContainerValue
PrismContainerValue.RemovedItemDefinitionException
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
default void
default void
acceptParentVisitor
(Visitor visitor) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
voiddefault <IV extends PrismValue,
ID extends ItemDefinition<?>>
voidAdds an item to a property container.default void
addAll
(Collection<? extends Item<?, ?>> itemsToAdd) Adds a collection of items to a property container.default void
addAllReplaceExisting
(Collection<? extends Item<?, ?>> itemsToAdd) Adds a collection of items to a property container.default boolean
addRawElement
(Object element) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
voidaddReplaceExisting
(Item<IV, ID> item) Adds an item to a property container.default PrismContainerValue<C>
applyDefinition
(@NotNull ItemDefinition<?> itemDefinition) Definition application MAY change the value (currently only for container values).default PrismContainerValue<C>
applyDefinition
(@NotNull ItemDefinition<?> itemDefinition, boolean force) Definition application MAY change the value (currently only for container values).default PrismContainerValue<C>
applyDefinition
(@NotNull PrismContainerDefinition<C> containerDef, boolean force) default void
applyDefinitionLegacy
(@NotNull ItemDefinition<?> definition) This one checks that nothing has changed.default void
applyDefinitionLegacy
(@NotNull ItemDefinition<?> definition, boolean force) Definition application MAY change the value (currently only for container/reference values).default C
default C
asContainerable
(Class<C> requiredClass) default void
assertDefinitions
(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier) default void
assertDefinitions
(Supplier<String> sourceDescriptionSupplier) default PrismContainer<C>
asSingleValuedContainer
(@NotNull QName itemName) Returns a single-valued container (with a single-valued definition) holding just this value.default boolean
canRepresent
(Class<?> clazz) default void
checkConsistenceInternal
(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) default void
default void
default void
checkNothingExceptFor
(QName... allowedItemNames) For simplicity, everything must be qualified: names to check, and existing names.default void
clear()
default void
Used when we are removing the value from the previous parent.default PrismContainerValue<C>
cloneComplex
(CloneStrategy strategy) Complex clone with different cloning strategies.default @NotNull PrismValue
default boolean
default boolean
default boolean
containsItem
(ItemPath propPath, boolean acceptEmptyItem) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IcreateDetachedSubItem
(QName name, Class<I> type, ID itemDefinition, boolean immutable) default PrismContainerValue<C>
default <X> PrismProperty<X>
createProperty
(PrismPropertyDefinition<X> propertyDefinition) default <X> PrismProperty<X>
createProperty
(QName propertyName) delegate()
default boolean
deleteRawElement
(Object element) default void
default Collection<? extends ItemDelta>
diff
(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy) Assumes matching representations.default boolean
equals
(PrismValue otherValue, @NotNull EquivalenceStrategy strategy) default boolean
equals
(PrismValue otherValue, @NotNull ParameterizedEquivalenceStrategy strategy) default boolean
equivalent
(PrismContainerValue<?> other) default Object
default <X extends Containerable>
PrismContainer<X>findContainer
(QName containerName) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindItem
(ItemDefinition itemDefinition, Class<I> type) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
Item<IV,ID> default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
Idefault <T extends Containerable>
PrismContainer<T>findOrCreateContainer
(QName containerName) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindOrCreateItem
(ItemPath path, Class<I> type, ID definition) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
Item<IV,ID> findOrCreateItem
(QName containerName) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindOrCreateItem
(QName containerName, Class<I> type) default <X> PrismProperty<X>
findOrCreateProperty
(ItemPath propertyPath) default <X> PrismProperty<X>
findOrCreateProperty
(PrismPropertyDefinition propertyDef) default PrismReference
findOrCreateReference
(QName referenceName) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
PartiallyResolvedItem<IV,ID> findPartial
(ItemPath path) default <X> PrismProperty<X>
findProperty
(ItemPath propertyPath) default <X> PrismProperty<X>
findProperty
(PrismPropertyDefinition<X> propertyDefinition) Finds a specific property in the container by definition.default PrismReference
findReference
(QName elementName) default void
freeze()
default @NotNull Collection<Item<?,
?>> getAllItems
(@NotNull ItemPath path) default @NotNull Collection<PrismValue>
getAllValues
(ItemPath path) default @Nullable ComplexTypeDefinition
default PrismContainer<C>
default PrismContainerDefinition<C>
default @NotNull Collection<QName>
default <T> T
getItemRealValue
(ItemName itemName, Class<T> type) default @NotNull Collection<Item<?,
?>> getItems()
Returns a collection of items that the property container contains.default <T> T
getNearestValueOfType
(@NotNull Class<T> type) default Objectable
default OriginType
default PrismContainerable<C>
default PrismContainerValue<?>
default @NotNull ItemPath
getPath()
default @NotNull Set<PrismProperty<?>>
Returns a set of properties that the property container contains.default <T> T
getPropertyRealValue
(QName propertyName, Class<T> type) default @Nullable Class<?>
default <T> T
Returns the statically-typed "real value".default @Nullable Object
default @Nullable Object
default @NotNull PrismContainerValue<?>
default SchemaContext
default Object
getUserData
(@NotNull String key) default C
getValue()
default @NotNull ValueMetadata
Returns 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 ValueMetadata
Returns the value metadata, if there is any.default boolean
Returns true if all contained items have complete definitions.default int
hashCode
(@NotNull EquivalenceStrategy equivalenceStrategy) default int
hashCode
(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy) default boolean
Like isEmpty but ignores presence of container value ID.default boolean
default boolean
default boolean
isEmpty()
default boolean
default boolean
Returns `true` if this value represents aPrismObject
value.default boolean
Ignores untyped values (considers them non-matching).default boolean
isRaw()
default boolean
default void
default <IV extends PrismValue,
ID extends ItemDefinition<?>>
booleanMerges the provided item into this item.default void
mergeContent
(@NotNull PrismContainerValue<?> other, @NotNull List<QName> overwrite) default void
Currently doing nothing.default void
Recompute the value or otherwise "initialize" it before adding it to a prism tree.default void
recompute
(PrismContext prismContext) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
voiddefault void
default void
removeContainer
(ItemPath path) default void
removeItems
(List<? extends ItemPath> itemsToRemove) default void
default void
removePaths
(List<? extends ItemPath> remove) default void
removeProperty
(ItemPath path) default boolean
removeRawElement
(Object element) default void
removeReference
(ItemPath path) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
voiddefault boolean
representsSameValue
(PrismValue other, EquivalenceStrategy strategy, boolean lax) Returns true if this and other value represent the same value.default void
revive
(PrismContext prismContext) TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)default SchemaLookup
default void
default void
setOriginObject
(Objectable source) default void
setOriginType
(OriginType type) default void
setOriginTypeRecursive
(OriginType originType) Set origin type to all values and subvaluesdefault void
default <T> void
setPropertyRealValue
(QName propertyName, T realValue) default void
setTransient
(boolean value) default void
setUserData
(@NotNull String key, Object value) default void
setValueMetadata
(Containerable realValue) Sets metadata from this value (from PCV).default void
setValueMetadata
(PrismContainer<?> valueMetadata) Sets metadata for this value.default void
setValueMetadata
(ValueMetadata valueMetadata) Sets metadata for this value.default int
size()
default <IV extends PrismValue,
ID extends ItemDefinition<?>>
booleanSubtract the provided item from this item.default String
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerValue
acceptVisitor, clone, getId, isIdOnly
Methods inherited from interface com.evolveum.midpoint.prism.PrismValue
getRootObjectable, getTypeName
-
Method Details
-
delegate
PrismContainerValue<C> delegate() -
isImmutable
default boolean isImmutable()- Specified by:
isImmutable
in interfaceFreezable
-
freeze
default void freeze() -
checkMutable
default void checkMutable()- Specified by:
checkMutable
in interfaceFreezable
-
checkImmutable
default void checkImmutable()- Specified by:
checkImmutable
in interfaceFreezable
-
revive
Description copied from interface:Revivable
TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary) -
getCompileTimeClass
- Specified by:
getCompileTimeClass
in interfacePrismContainerValue<C extends Containerable>
-
getProperties
Description copied from interface:PrismContainerValue
Returns a set of properties that the property container contains.Returned set is immutable! Any change to it will be ignored.
This method costs a bit, as the set of properties needs to be created. Consider using other methods if possible.
- Specified by:
getProperties
in interfacePrismContainerValue<C extends Containerable>
- Returns:
- set of properties that the property container contains.
-
getItems
Description copied from interface:PrismContainerValue
Returns a collection of items that the property container contains. The items may be properties or inner property containers.Returned collection is mutable, but the caller should NOT modify it. Instead - e.g. if it needs to remove values - it should call remove() method.
- Specified by:
getItems
in interfacePrismContainerValue<C extends Containerable>
- Returns:
- collection of items that the property container contains.
-
setOriginTypeRecursive
Description copied from interface:PrismContainerValue
Set origin type to all values and subvalues- Specified by:
setOriginTypeRecursive
in interfacePrismContainerValue<C extends Containerable>
-
keepPaths
- Specified by:
keepPaths
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
size
default int size()- Specified by:
size
in interfacePrismContainerValue<C extends Containerable>
-
deleteRawElement
- Specified by:
deleteRawElement
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findContainer
- Specified by:
findContainer
in interfacePrismContainerValue<C extends Containerable>
-
findOrCreateProperty
- Specified by:
findOrCreateProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
getPropertyRealValue
- Specified by:
getPropertyRealValue
in interfacePrismContainerValue<C extends Containerable>
-
equivalent
- Specified by:
equivalent
in interfacePrismContainerValue<C extends Containerable>
-
findOrCreateProperty
default <X> PrismProperty<X> findOrCreateProperty(PrismPropertyDefinition propertyDef) throws SchemaException - Specified by:
findOrCreateProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
removeRawElement
- Specified by:
removeRawElement
in interfacePrismContainerValue<C extends Containerable>
-
getParent
- Specified by:
getParent
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
getParent
in interfacePrismValue
-
removeProperty
- Specified by:
removeProperty
in interfacePrismContainerValue<C extends Containerable>
-
remove
- Specified by:
remove
in interfacePrismContainerValue<C extends Containerable>
-
findItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findItemI extends Item<IV, ID>> (ItemDefinition itemDefinition, Class<I> type) - Specified by:
findItem
in interfacePrismContainerValue<C extends Containerable>
-
hasNoItems
default boolean hasNoItems()Description copied from interface:PrismContainerValue
Like isEmpty but ignores presence of container value ID.- Specified by:
hasNoItems
in interfacePrismContainerValue<C extends Containerable>
-
findOrCreateReference
- Specified by:
findOrCreateReference
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
accept
- Specified by:
accept
in interfacePathVisitable
- Specified by:
accept
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
accept
in interfacePrismValue
-
getComplexTypeDefinition
- Specified by:
getComplexTypeDefinition
in interfacePrismContainerValue<C extends Containerable>
-
hasCompleteDefinition
default boolean hasCompleteDefinition()Description copied from interface:PrismContainerValue
Returns true if all contained items have complete definitions. (Currently does not check the definition of this value itself.)- Specified by:
hasCompleteDefinition
in interfacePrismContainerValue<C extends Containerable>
-
accept
- Specified by:
accept
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
accept
in interfacePrismValue
- Specified by:
accept
in interfaceVisitable<C extends Containerable>
-
findProperty
- Specified by:
findProperty
in interfacePrismContainerValue<C extends Containerable>
-
recompute
- Specified by:
recompute
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
recompute
in interfacePrismValue
-
removeReference
- Specified by:
removeReference
in interfacePrismContainerValue<C extends Containerable>
-
applyDefinition
default PrismContainerValue<C> applyDefinition(@NotNull @NotNull ItemDefinition<?> itemDefinition) throws SchemaException Description copied from interface:PrismValue
Definition 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:
applyDefinition
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
applyDefinition
in interfacePrismValue
- Throws:
SchemaException
-
applyDefinition
default PrismContainerValue<C> applyDefinition(@NotNull @NotNull ItemDefinition<?> itemDefinition, boolean force) throws SchemaException Description copied from interface:PrismValue
Definition application MAY change the value (currently only for container values). The caller must deal with that.- Specified by:
applyDefinition
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
applyDefinition
in interfacePrismValue
- Throws:
SchemaException
-
addAll
Description copied from interface:PrismContainerValue
Adds a collection of items to a property container.- Specified by:
addAll
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
itemsToAdd
- items to add- Throws:
SchemaException
-
add
default <IV extends PrismValue,ID extends ItemDefinition<?>> void add(Item<IV, ID> item) throws SchemaException- Specified by:
add
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
addAllReplaceExisting
default void addAllReplaceExisting(Collection<? extends Item<?, ?>> itemsToAdd) throws SchemaExceptionDescription copied from interface:PrismContainerValue
Adds a collection of items to a property container. Existing values will be replaced.- Specified by:
addAllReplaceExisting
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
itemsToAdd
- items to add- Throws:
SchemaException
-
removeAll
default void removeAll()- Specified by:
removeAll
in interfacePrismContainerValue<C extends Containerable>
-
getDefinition
- Specified by:
getDefinition
in interfacePrismContainerValue<C extends Containerable>
-
createImmutableClone
- Specified by:
createImmutableClone
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
createImmutableClone
in interfacePrismValue
-
add
default <IV extends PrismValue,ID extends ItemDefinition<?>> void add(Item<IV, ID> item, boolean checkUniqueness) throws SchemaExceptionDescription copied from interface:PrismContainerValue
Adds an item to a property container.- Specified by:
add
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
item
- item to add.- Throws:
SchemaException
-
asContainerable
- Specified by:
asContainerable
in interfacePrismContainerValue<C extends Containerable>
-
assertDefinitions
- Specified by:
assertDefinitions
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
removeOperationalItems
default void removeOperationalItems()- Specified by:
removeOperationalItems
in interfacePrismContainerValue<C extends Containerable>
-
contains
- Specified by:
contains
in interfacePrismContainerValue<C extends Containerable>
-
getRootValue
- Specified by:
getRootValue
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
getRootValue
in interfacePrismValue
-
subtract
default <IV extends PrismValue,ID extends ItemDefinition<?>> boolean subtract(Item<IV, ID> item) throws SchemaExceptionDescription copied from interface:PrismContainerValue
Subtract the provided item from this item. The values of the provided item are deleted from this item. Returns true if this item was changed.- Specified by:
subtract
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
addReplaceExisting
default <IV extends PrismValue,ID extends ItemDefinition<?>> void addReplaceExisting(Item<IV, ID> item) throws SchemaExceptionDescription copied from interface:PrismContainerValue
Adds an item to a property container. Existing value will be replaced.- Specified by:
addReplaceExisting
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
item
- item to add.- Throws:
SchemaException
-
schemaLookup
- Specified by:
schemaLookup
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
schemaLookup
in interfacePrismValue
- Specified by:
schemaLookup
in interfaceSchemaLookup.Aware
-
clear
default void clear()- Specified by:
clear
in interfacePrismContainerValue<C extends Containerable>
-
removeContainer
- Specified by:
removeContainer
in interfacePrismContainerValue<C extends Containerable>
-
assertDefinitions
default void assertDefinitions(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier) throws SchemaException - Specified by:
assertDefinitions
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
getItemRealValue
- Specified by:
getItemRealValue
in interfacePrismContainerValue<C extends Containerable>
-
mergeContent
default void mergeContent(@NotNull @NotNull PrismContainerValue<?> other, @NotNull @NotNull List<QName> overwrite) throws SchemaException - Specified by:
mergeContent
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
addRawElement
- Specified by:
addRawElement
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
getItemNames
- Specified by:
getItemNames
in interfacePrismContainerValue<C extends Containerable>
-
getContainer
- Specified by:
getContainer
in interfacePrismContainerValue<C extends Containerable>
-
findOrCreateItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findOrCreateItemI extends Item<IV, ID>> (ItemPath path, Class<I> type, ID definition) throws SchemaException - Specified by:
findOrCreateItem
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
getValue
- Specified by:
getValue
in interfacePrismContainerValue<C extends Containerable>
-
cloneComplex
Description copied from interface:PrismValue
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
cloneComplex
in interfacePrismValue
- See Also:
-
findOrCreateContainer
default <T extends Containerable> PrismContainer<T> findOrCreateContainer(QName containerName) throws SchemaException - Specified by:
findOrCreateContainer
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findItem
default <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> findItem(ItemPath itemPath) - Specified by:
findItem
in interfacePrismContainerValue<C extends Containerable>
-
containsItem
- Specified by:
containsItem
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
contains
- Specified by:
contains
in interfacePrismContainerValue<C extends Containerable>
-
removeItems
- Specified by:
removeItems
in interfacePrismContainerValue<C extends Containerable>
-
findProperty
Description copied from interface:PrismContainerValue
Finds a specific property in the container by definition.Returns null if nothing is found.
- Specified by:
findProperty
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
propertyDefinition
- property definition to find.- Returns:
- found property or null
-
findPartial
default <IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) - Specified by:
findPartial
in interfacePrismContainerValue<C extends Containerable>
-
asContainerable
- Specified by:
asContainerable
in interfacePrismContainerValue<C extends Containerable>
-
createProperty
- Specified by:
createProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findOrCreateItemI extends Item<IV, ID>> (QName containerName, Class<I> type) throws SchemaException - Specified by:
findOrCreateItem
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
removePaths
- Specified by:
removePaths
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
merge
default <IV extends PrismValue,ID extends ItemDefinition<?>> boolean merge(Item<IV, ID> item) throws SchemaExceptionDescription copied from interface:PrismContainerValue
Merges the provided item into this item. The values are joined together. Returns true if new item or value was added.- Specified by:
merge
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
canRepresent
- Specified by:
canRepresent
in interfacePrismContainerValue<C extends Containerable>
-
setPropertyRealValue
- Specified by:
setPropertyRealValue
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
checkNothingExceptFor
Description copied from interface:PrismContainerValue
For simplicity, everything must be qualified: names to check, and existing names.- Specified by:
checkNothingExceptFor
in interfacePrismContainerValue<C extends Containerable>
-
applyDefinition
default PrismContainerValue<C> applyDefinition(@NotNull @NotNull PrismContainerDefinition<C> containerDef, boolean force) throws SchemaException - Specified by:
applyDefinition
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findReference
- Specified by:
findReference
in interfacePrismContainerValue<C extends Containerable>
-
findItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findItemI extends Item<IV, ID>> (ItemPath itemPath, Class<I> type) - Specified by:
findItem
in interfacePrismContainerValue<C extends Containerable>
-
acceptParentVisitor
- Specified by:
acceptParentVisitor
in interfaceParentVisitable
- Specified by:
acceptParentVisitor
in interfacePrismContainerValue<C extends Containerable>
-
createDetachedSubItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I createDetachedSubItemI extends Item<IV, ID>> (QName name, Class<I> type, ID itemDefinition, boolean immutable) throws SchemaException, PrismContainerValue.RemovedItemDefinitionException - Specified by:
createDetachedSubItem
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
PrismContainerValue.RemovedItemDefinitionException
-
createProperty
default <X> PrismProperty<X> createProperty(PrismPropertyDefinition<X> propertyDefinition) throws SchemaException - Specified by:
createProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
asSingleValuedContainer
default PrismContainer<C> asSingleValuedContainer(@NotNull @NotNull QName itemName) throws SchemaException Description copied from interface:PrismContainerValue
Returns a single-valued container (with a single-valued definition) holding just this value.- Specified by:
asSingleValuedContainer
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
itemName
- Item name for newly-created container.- Throws:
SchemaException
-
findOrCreateItem
default <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> findOrCreateItem(QName containerName) throws SchemaException - Specified by:
findOrCreateItem
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
replace
default <IV extends PrismValue,ID extends ItemDefinition<?>> void replace(Item<IV, ID> oldItem, Item<IV, throws SchemaExceptionID> newItem) - Specified by:
replace
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
setOriginObject
- Specified by:
setOriginObject
in interfaceMidpointOriginMetadata
-
setOriginType
- Specified by:
setOriginType
in interfaceMidpointOriginMetadata
-
getOriginType
- Specified by:
getOriginType
in interfaceMidpointOriginMetadata
-
getOriginObject
- Specified by:
getOriginObject
in interfaceMidpointOriginMetadata
-
getUserData
- Specified by:
getUserData
in interfacePrismValue
-
getUserData
- Specified by:
getUserData
in interfacePrismValue
-
isRaw
default boolean isRaw()- Specified by:
isRaw
in interfacePrismValue
-
isTransient
- Specified by:
isTransient
in interfacePrismValue
- Returns:
- True if the value is transient, so it won't be serialized if serialization of transient value is disabled.
-
normalize
default void normalize()Description copied from interface:PrismValue
Currently doing nothing.- Specified by:
normalize
in interfacePrismValue
-
getRealValueIfExists
- Specified by:
getRealValueIfExists
in interfacePrismValue
-
isOfType
Description copied from interface:PrismValue
Ignores untyped values (considers them non-matching). Supports non-static types. (May be slower.)- Specified by:
isOfType
in interfacePrismValue
-
hasRealClass
- Specified by:
hasRealClass
in interfacePrismValue
-
deleteValueMetadata
default void deleteValueMetadata()- Specified by:
deleteValueMetadata
in interfacePrismValue
-
clearParent
default void clearParent()Description copied from interface:PrismValue
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.- Specified by:
clearParent
in interfacePrismValue
-
equals
- Specified by:
equals
in interfacePrismValue
-
equals
default boolean equals(PrismValue otherValue, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
equals
in interfacePrismValue
-
getAllValues
Description copied from interface:PrismValue
- Specified by:
getAllValues
in interfacePrismValue
-
setUserData
- Specified by:
setUserData
in interfacePrismValue
-
setParent
- Specified by:
setParent
in interfacePrismValue
-
getValueMetadata
Description copied from interface:PrismValue
Returns the value metadata, creating empty one if there's none. When performance is critical, consider usingPrismValue.getValueMetadataIfExists()
instead; or callPrismValue.hasValueMetadata()
first.- Specified by:
getValueMetadata
in interfacePrismValue
-
getValueMetadataIfExists
Description copied from interface:PrismValue
Returns the value metadata, if there is any.- Specified by:
getValueMetadataIfExists
in interfacePrismValue
-
setTransient
- Specified by:
setTransient
in interfacePrismValue
-
isEmpty
default boolean isEmpty()- Specified by:
isEmpty
in interfacePrismValue
-
applyDefinitionLegacy
default void applyDefinitionLegacy(@NotNull @NotNull ItemDefinition<?> definition, boolean force) throws SchemaException Description copied from interface:PrismValue
Definition application MAY change the value (currently only for container/reference values). The caller must deal with that.- Specified by:
applyDefinitionLegacy
in interfacePrismValue
- Throws:
SchemaException
-
getRealValueOrRawType
- Specified by:
getRealValueOrRawType
in interfacePrismValue
-
getValueMetadataAsContainer
@Experimental @NotNull default <C extends Containerable> @NotNull PrismContainer<C> getValueMetadataAsContainer()Description copied from interface:PrismValue
Returns value metadata as typed PrismContainer. Useful for lazy clients because of the type matching.- Specified by:
getValueMetadataAsContainer
in interfacePrismValue
-
getSchemaContext
- Specified by:
getSchemaContext
in interfacePrismValue
-
getNearestValueOfType
- Specified by:
getNearestValueOfType
in interfacePrismValue
-
cloneIfImmutable
- Specified by:
cloneIfImmutable
in interfacePrismValue
-
diff
default Collection<? extends ItemDelta> diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy) Description copied from interface:PrismValue
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.- Specified by:
diff
in interfacePrismValue
-
getRealClass
- Specified by:
getRealClass
in interfacePrismValue
-
getAllItems
Description copied from interface:PrismValue
SeeItem.getAllItems(ItemPath)
. Here the path is never empty.- Specified by:
getAllItems
in interfacePrismValue
-
hasValueMetadata
default boolean hasValueMetadata()- Specified by:
hasValueMetadata
in 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:PrismValue
Sets metadata for this value.- Specified by:
setValueMetadata
in interfacePrismValue
-
setValueMetadata
Description copied from interface:PrismValue
Sets metadata for this value.- Specified by:
setValueMetadata
in interfacePrismValue
-
setValueMetadata
Description copied from interface:PrismValue
Sets metadata from this value (from PCV). To be removed (most probably).- Specified by:
setValueMetadata
in interfacePrismValue
- Throws:
SchemaException
-
hashCode
- Specified by:
hashCode
in interfacePrismValue
-
find
- Specified by:
find
in interfacePrismValue
-
isObjectable
default boolean isObjectable()Description copied from interface:PrismValue
Returns `true` if this value represents aPrismObject
value. Temporary implementation that uses real value to do the check, asPrismObjectValue
can mask itself as aPrismContainerValue
, at least for now.- Specified by:
isObjectable
in interfacePrismValue
-
getParentContainerValue
- Specified by:
getParentContainerValue
in interfacePrismValue
-
getPath
- Specified by:
getPath
in interfacePrismValue
-
applyDefinitionLegacy
default void applyDefinitionLegacy(@NotNull @NotNull ItemDefinition<?> definition) throws SchemaException Description copied from interface:PrismValue
This one checks that nothing has changed.- Specified by:
applyDefinitionLegacy
in interfacePrismValue
- Throws:
SchemaException
-
checkConsistenceInternal
default void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
checkConsistenceInternal
in interfacePrismValue
-
hashCode
- Specified by:
hashCode
in interfacePrismValue
-
representsSameValue
Description copied from interface:PrismValue
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.- Specified by:
representsSameValue
in interfacePrismValue
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.
-
recompute
default void recompute()Description copied from interface:PrismValue
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.- Specified by:
recompute
in interfacePrismValue
-
toHumanReadableString
- Specified by:
toHumanReadableString
in interfacePrismValue
-
setId
- Specified by:
setId
in interfacePrismContainerValue<C extends Containerable>
-
getRealValue
@Nullable default <T> T getRealValue()Description copied from interface:PrismValue
Returns 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:
getRealValue
in interfacePrismValue
-