Interface PrismContainerValueDelegator<C extends Containerable>
- All Superinterfaces:
DebugDumpable,Freezable,MidpointOriginMetadata,ParentVisitable,PathVisitable,PrismContainerValue<C>,PrismValue,PrismVisitable,Revivable,SchemaLookup.Aware,Serializable,Visitable,Walkable
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 voiddefault voiddefault voidacceptParentVisitor(Visitor visitor) default <IV extends PrismValue,ID extends ItemDefinition<?>>
voiddefault <IV extends PrismValue,ID extends ItemDefinition<?>>
voidAdds an item to a property container.default voidaddAll(Collection<? extends Item<?, ?>> itemsToAdd) Adds a collection of items to a property container.default voidaddAllReplaceExisting(Collection<? extends Item<?, ?>> itemsToAdd) Adds a collection of items to a property container.default booleanaddRawElement(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 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 Cdefault CasContainerable(Class<C> requiredClass) default voidassertDefinitions(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier) default voidassertDefinitions(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 booleancanRepresent(Class<?> clazz) default voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) default voiddefault voiddefault voidcheckNothingExceptFor(QName... allowedItemNames) For simplicity, everything must be qualified: names to check, and existing names.default voidclear()default voidUsed when we are removing the value from the previous parent.default PrismContainerValue<C>cloneComplex(@NotNull CloneStrategy strategy) Complex clone with different cloning strategies.default @NotNull PrismValuedefault booleandefault booleandefault booleancontainsItem(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 booleandeleteRawElement(Object element) 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 booleanequivalent(PrismContainerValue<?> other) default Objectdefault <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 PrismReferencefindOrCreateReference(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 PrismReferencefindReference(QName elementName) default voidfreeze()Should be no-op (or very quick) if the object is already immutable.default @NotNull Collection<Item<?,?>> getAllItems(@NotNull ItemPath path) default @NotNull Collection<PrismValue>getAllValues(ItemPath path) default @Nullable ComplexTypeDefinitiondefault PrismContainer<C>default PrismContainerDefinition<C>default @NotNull Collection<QName>default <T> TgetItemRealValue(ItemName itemName, Class<T> type) default @NotNull Collection<Item<?,?>> getItems()Returns a collection of items that the property container contains.default <T> TgetNearestValueOfType(@NotNull Class<T> type) default Objectabledefault OriginTypedefault PrismContainerable<C>default PrismContainerValue<?>default @NotNull ItemPathgetPath()default @NotNull Set<PrismProperty<?>>Returns a set of properties that the property container contains.default <T> TgetPropertyRealValue(QName propertyName, Class<T> type) default @Nullable Class<?>default <T> TReturns the statically-typed "real value".default @Nullable Objectdefault @Nullable Objectdefault @NotNull PrismContainerValue<?>default SchemaContextdefault ObjectgetUserData(@NotNull String key) default CgetValue()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 booleanReturns true if all contained items have complete definitions.default inthashCode(@NotNull EquivalenceStrategy equivalenceStrategy) default inthashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy) default booleanLike isEmpty but ignores presence of container value ID.default booleandefault booleandefault booleanisEmpty()default booleandefault booleanReturns `true` if this value represents aPrismObjectvalue.default booleanIgnores untyped values (considers them non-matching).default booleanisRaw()default booleandefault voiddefault <IV extends PrismValue,ID extends ItemDefinition<?>>
booleanMerges the provided item into this item.default voidmergeContent(@NotNull PrismContainerValue<?> other, @NotNull List<QName> overwrite) default voidCurrently doing nothing.default voidRecompute the value or otherwise "initialize" it before adding it to a prism tree.default voidrecompute(PrismContext prismContext) default <IV extends PrismValue,ID extends ItemDefinition<?>>
voiddefault voiddefault voidremoveContainer(ItemPath path) default voidremoveItem(@NotNull ItemPath path) Useful when removing something without the knowledge of its kind.default voidremoveItems(List<? extends ItemPath> itemsToRemove) default voidremoveMetadataFromPaths(List<? extends ItemPath> pathsToRemoveMetadata) Remove metadata from specified paths Can also remove metadata from the object on which it's called, if the paths contains a "root" path (e.g.default voiddefault voidremovePaths(List<? extends ItemPath> remove) default voidremoveProperty(ItemPath path) default booleanremoveRawElement(Object element) default voidremoveReference(ItemPath path) default <IV extends PrismValue,ID extends ItemDefinition<?>>
voiddefault booleanrepresentsSameValue(PrismValue other, EquivalenceStrategy strategy, boolean lax) Returns true if this and other value represent the same value.default voidrevive(PrismContext prismContext) TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)default SchemaLookupdefault voiddefault voidsetOriginObject(Objectable source) default voidsetOriginType(OriginType type) default voidsetOriginTypeRecursive(OriginType originType) Set origin type to all values and subvaluesdefault voiddefault <T> voidsetPropertyRealValue(QName propertyName, T realValue) default 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 intsize()default <IV extends PrismValue,ID extends ItemDefinition<?>>
booleanSubtract the provided item from this item.default Stringdefault voidwalk(BiPredicate<? super ItemPath, Boolean> descendPredicate, Predicate<? super ItemPath> consumePredicate, Consumer<? super Item<?, ?>> itemConsumer) Walk through hierarchy of containing items based on provided conditions.Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.PrismContainerValue
acceptVisitor, clone, getId, isIdOnlyMethods inherited from interface com.evolveum.midpoint.prism.PrismValue
getRootObjectable, getTypeName
-
Method Details
-
delegate
PrismContainerValue<C> delegate() -
isImmutable
default boolean isImmutable()- Specified by:
isImmutablein interfaceFreezable
-
freeze
default void freeze()Description copied from interface:FreezableShould be no-op (or very quick) if the object is already immutable. -
checkMutable
default void checkMutable()- Specified by:
checkMutablein interfaceFreezable
-
checkImmutable
default void checkImmutable()- Specified by:
checkImmutablein interfaceFreezable
-
revive
Description copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary) -
getCompileTimeClass
- Specified by:
getCompileTimeClassin interfacePrismContainerValue<C extends Containerable>
-
getProperties
Description copied from interface:PrismContainerValueReturns 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:
getPropertiesin interfacePrismContainerValue<C extends Containerable>- Returns:
- set of properties that the property container contains.
-
getItems
Description copied from interface:PrismContainerValueReturns 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:
getItemsin interfacePrismContainerValue<C extends Containerable>- Returns:
- collection of items that the property container contains.
-
setOriginTypeRecursive
Description copied from interface:PrismContainerValueSet origin type to all values and subvalues- Specified by:
setOriginTypeRecursivein interfacePrismContainerValue<C extends Containerable>
-
keepPaths
- Specified by:
keepPathsin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
size
default int size()- Specified by:
sizein interfacePrismContainerValue<C extends Containerable>
-
deleteRawElement
- Specified by:
deleteRawElementin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
findContainer
- Specified by:
findContainerin interfacePrismContainerValue<C extends Containerable>
-
findOrCreateProperty
- Specified by:
findOrCreatePropertyin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
getPropertyRealValue
- Specified by:
getPropertyRealValuein interfacePrismContainerValue<C extends Containerable>
-
equivalent
- Specified by:
equivalentin interfacePrismContainerValue<C extends Containerable>
-
findOrCreateProperty
default <X> PrismProperty<X> findOrCreateProperty(PrismPropertyDefinition propertyDef) throws SchemaException - Specified by:
findOrCreatePropertyin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
removeRawElement
- Specified by:
removeRawElementin interfacePrismContainerValue<C extends Containerable>
-
getParent
- Specified by:
getParentin interfacePrismContainerValue<C extends Containerable>- Specified by:
getParentin interfacePrismValue
-
removeItem
Description copied from interface:PrismContainerValueUseful when removing something without the knowledge of its kind.- Specified by:
removeItemin interfacePrismContainerValue<C extends Containerable>
-
removeProperty
- Specified by:
removePropertyin interfacePrismContainerValue<C extends Containerable>
-
remove
- Specified by:
removein 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:
findItemin interfacePrismContainerValue<C extends Containerable>
-
hasNoItems
default boolean hasNoItems()Description copied from interface:PrismContainerValueLike isEmpty but ignores presence of container value ID.- Specified by:
hasNoItemsin interfacePrismContainerValue<C extends Containerable>
-
findOrCreateReference
- Specified by:
findOrCreateReferencein interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
accept
- Specified by:
acceptin interfacePathVisitable- Specified by:
acceptin interfacePrismContainerValue<C extends Containerable>- Specified by:
acceptin interfacePrismValue
-
getComplexTypeDefinition
- Specified by:
getComplexTypeDefinitionin interfacePrismContainerValue<C extends Containerable>
-
hasCompleteDefinition
default boolean hasCompleteDefinition()Description copied from interface:PrismContainerValueReturns true if all contained items have complete definitions. (Currently does not check the definition of this value itself.)- Specified by:
hasCompleteDefinitionin interfacePrismContainerValue<C extends Containerable>
-
accept
- Specified by:
acceptin interfacePrismContainerValue<C extends Containerable>- Specified by:
acceptin interfacePrismValue- Specified by:
acceptin interfaceVisitable<C extends Containerable>
-
findProperty
- Specified by:
findPropertyin interfacePrismContainerValue<C extends Containerable>
-
recompute
- Specified by:
recomputein interfacePrismContainerValue<C extends Containerable>- Specified by:
recomputein interfacePrismValue
-
removeReference
- Specified by:
removeReferencein interfacePrismContainerValue<C extends Containerable>
-
applyDefinition
default PrismContainerValue<C> applyDefinition(@NotNull @NotNull ItemDefinition<?> itemDefinition) 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 interfacePrismContainerValue<C extends Containerable>- Specified by:
applyDefinitionin interfacePrismValue- Throws:
SchemaException
-
applyDefinition
default PrismContainerValue<C> applyDefinition(@NotNull @NotNull ItemDefinition<?> itemDefinition, 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 interfacePrismContainerValue<C extends Containerable>- Specified by:
applyDefinitionin interfacePrismValue- Throws:
SchemaException
-
addAll
Description copied from interface:PrismContainerValueAdds a collection of items to a property container.- Specified by:
addAllin 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:
addin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
addAllReplaceExisting
default void addAllReplaceExisting(Collection<? extends Item<?, ?>> itemsToAdd) throws SchemaExceptionDescription copied from interface:PrismContainerValueAdds a collection of items to a property container. Existing values will be replaced.- Specified by:
addAllReplaceExistingin interfacePrismContainerValue<C extends Containerable>- Parameters:
itemsToAdd- items to add- Throws:
SchemaException
-
removeAll
default void removeAll()- Specified by:
removeAllin interfacePrismContainerValue<C extends Containerable>
-
getDefinition
- Specified by:
getDefinitionin interfacePrismContainerValue<C extends Containerable>
-
createImmutableClone
- Specified by:
createImmutableClonein interfacePrismContainerValue<C extends Containerable>- Specified by:
createImmutableClonein interfacePrismValue
-
add
default <IV extends PrismValue,ID extends ItemDefinition<?>> void add(Item<IV, ID> item, boolean checkUniqueness) throws SchemaExceptionDescription copied from interface:PrismContainerValueAdds an item to a property container.- Specified by:
addin interfacePrismContainerValue<C extends Containerable>- Parameters:
item- item to add.- Throws:
SchemaException
-
asContainerable
- Specified by:
asContainerablein interfacePrismContainerValue<C extends Containerable>
-
assertDefinitions
- Specified by:
assertDefinitionsin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
removeOperationalItems
default void removeOperationalItems()- Specified by:
removeOperationalItemsin interfacePrismContainerValue<C extends Containerable>
-
contains
- Specified by:
containsin interfacePrismContainerValue<C extends Containerable>
-
getRootValue
- Specified by:
getRootValuein interfacePrismContainerValue<C extends Containerable>- Specified by:
getRootValuein interfacePrismValue
-
subtract
default <IV extends PrismValue,ID extends ItemDefinition<?>> boolean subtract(Item<IV, ID> item) throws SchemaExceptionDescription copied from interface:PrismContainerValueSubtract 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:
subtractin 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:PrismContainerValueAdds an item to a property container. Existing value will be replaced.- Specified by:
addReplaceExistingin interfacePrismContainerValue<C extends Containerable>- Parameters:
item- item to add.- Throws:
SchemaException
-
schemaLookup
- Specified by:
schemaLookupin interfacePrismContainerValue<C extends Containerable>- Specified by:
schemaLookupin interfacePrismValue- Specified by:
schemaLookupin interfaceSchemaLookup.Aware
-
clear
default void clear()- Specified by:
clearin interfacePrismContainerValue<C extends Containerable>
-
removeContainer
- Specified by:
removeContainerin interfacePrismContainerValue<C extends Containerable>
-
assertDefinitions
default void assertDefinitions(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier) throws SchemaException - Specified by:
assertDefinitionsin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
getItemRealValue
- Specified by:
getItemRealValuein interfacePrismContainerValue<C extends Containerable>
-
mergeContent
default void mergeContent(@NotNull @NotNull PrismContainerValue<?> other, @NotNull @NotNull List<QName> overwrite) throws SchemaException - Specified by:
mergeContentin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
addRawElement
- Specified by:
addRawElementin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
getItemNames
- Specified by:
getItemNamesin interfacePrismContainerValue<C extends Containerable>
-
getContainer
- Specified by:
getContainerin 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:
findOrCreateItemin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
getValue
- Specified by:
getValuein interfacePrismContainerValue<C extends Containerable>
-
cloneComplex
Description copied from interface:PrismValueComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfacePrismContainerValue<C extends Containerable>- Specified by:
cloneComplexin interfacePrismValue- See Also:
-
findOrCreateContainer
default <T extends Containerable> PrismContainer<T> findOrCreateContainer(QName containerName) throws SchemaException - Specified by:
findOrCreateContainerin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
findItem
default <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> findItem(ItemPath itemPath) - Specified by:
findItemin interfacePrismContainerValue<C extends Containerable>
-
containsItem
- Specified by:
containsItemin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
contains
- Specified by:
containsin interfacePrismContainerValue<C extends Containerable>
-
removeItems
- Specified by:
removeItemsin interfacePrismContainerValue<C extends Containerable>
-
findProperty
Description copied from interface:PrismContainerValueFinds a specific property in the container by definition.Returns null if nothing is found.
- Specified by:
findPropertyin 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:
findPartialin interfacePrismContainerValue<C extends Containerable>
-
asContainerable
- Specified by:
asContainerablein interfacePrismContainerValue<C extends Containerable>
-
createProperty
- Specified by:
createPropertyin 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:
findOrCreateItemin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
removePaths
- Specified by:
removePathsin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
removeMetadataFromPaths
default void removeMetadataFromPaths(List<? extends ItemPath> pathsToRemoveMetadata) throws SchemaException Description copied from interface:PrismContainerValueRemove metadata from specified paths Can also remove metadata from the object on which it's called, if the paths contains a "root" path (e.g.ItemPath.fromString("/")).- Specified by:
removeMetadataFromPathsin interfacePrismContainerValue<C extends Containerable>- Parameters:
pathsToRemoveMetadata- the paths to items on which metadata should be removed.- Throws:
SchemaException
-
merge
default <IV extends PrismValue,ID extends ItemDefinition<?>> boolean merge(Item<IV, ID> item) throws SchemaExceptionDescription copied from interface:PrismContainerValueMerges the provided item into this item. The values are joined together. Returns true if new item or value was added.- Specified by:
mergein interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
canRepresent
- Specified by:
canRepresentin interfacePrismContainerValue<C extends Containerable>
-
setPropertyRealValue
- Specified by:
setPropertyRealValuein interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
checkNothingExceptFor
Description copied from interface:PrismContainerValueFor simplicity, everything must be qualified: names to check, and existing names.- Specified by:
checkNothingExceptForin interfacePrismContainerValue<C extends Containerable>
-
applyDefinition
default PrismContainerValue<C> applyDefinition(@NotNull @NotNull PrismContainerDefinition<C> containerDef, boolean force) throws SchemaException - Specified by:
applyDefinitionin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
findReference
- Specified by:
findReferencein 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:
findItemin interfacePrismContainerValue<C extends Containerable>
-
acceptParentVisitor
- Specified by:
acceptParentVisitorin interfaceParentVisitable- Specified by:
acceptParentVisitorin 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:
createDetachedSubItemin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaExceptionPrismContainerValue.RemovedItemDefinitionException
-
createProperty
default <X> PrismProperty<X> createProperty(PrismPropertyDefinition<X> propertyDefinition) throws SchemaException - Specified by:
createPropertyin interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
asSingleValuedContainer
default PrismContainer<C> asSingleValuedContainer(@NotNull @NotNull QName itemName) throws SchemaException Description copied from interface:PrismContainerValueReturns a single-valued container (with a single-valued definition) holding just this value.- Specified by:
asSingleValuedContainerin 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:
findOrCreateItemin 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:
replacein interfacePrismContainerValue<C extends Containerable>- Throws:
SchemaException
-
setOriginObject
- Specified by:
setOriginObjectin interfaceMidpointOriginMetadata
-
setOriginType
- Specified by:
setOriginTypein interfaceMidpointOriginMetadata
-
getOriginType
- Specified by:
getOriginTypein interfaceMidpointOriginMetadata
-
getOriginObject
- Specified by:
getOriginObjectin interfaceMidpointOriginMetadata
-
getUserData
- Specified by:
getUserDatain interfacePrismValue
-
getUserData
- Specified by:
getUserDatain interfacePrismValue
-
isRaw
default boolean isRaw()- Specified by:
isRawin 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.
-
normalize
default void normalize()Description copied from interface:PrismValueCurrently doing nothing.- Specified by:
normalizein interfacePrismValue
-
getRealValueIfExists
- Specified by:
getRealValueIfExistsin interfacePrismValue
-
isOfType
Description copied from interface:PrismValueIgnores untyped values (considers them non-matching). Supports non-static types. (May be slower.)- Specified by:
isOfTypein interfacePrismValue
-
hasRealClass
- Specified by:
hasRealClassin interfacePrismValue
-
deleteValueMetadata
default void deleteValueMetadata()- Specified by:
deleteValueMetadatain 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
-
equals
- Specified by:
equalsin interfacePrismValue
-
equals
default boolean equals(PrismValue otherValue, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
equalsin interfacePrismValue
-
getAllValues
Description copied from interface:PrismValue- Specified by:
getAllValuesin interfacePrismValue
-
setUserData
- Specified by:
setUserDatain 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
-
setTransient
- Specified by:
setTransientin interfacePrismValue
-
isEmpty
default boolean isEmpty()- Specified by:
isEmptyin interfacePrismValue
-
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
-
getRealValueOrRawType
- Specified by:
getRealValueOrRawTypein 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
-
getSchemaContext
- Specified by:
getSchemaContextin interfacePrismValue
-
getNearestValueOfType
- Specified by:
getNearestValueOfTypein interfacePrismValue
-
cloneIfImmutable
- Specified by:
cloneIfImmutablein 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
-
getAllItems
Description copied from interface:PrismValueSeeItem.getAllItems(ItemPath). Here the path is never empty.- Specified by:
getAllItemsin 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
-
hashCode
- Specified by:
hashCodein interfacePrismValue
-
find
- Specified by:
findin 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
-
getParentContainerValue
- Specified by:
getParentContainerValuein interfacePrismValue
-
getPath
- Specified by:
getPathin interfacePrismValue
-
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
-
checkConsistenceInternal
default void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
checkConsistenceInternalin interfacePrismValue
-
hashCode
- Specified by:
hashCodein 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.
-
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
-
toHumanReadableString
- Specified by:
toHumanReadableStringin interfacePrismValue
-
setId
- Specified by:
setIdin interfacePrismContainerValue<C extends Containerable>
-
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
-
walk
default void walk(BiPredicate<? super ItemPath, Boolean> descendPredicate, Predicate<? super ItemPath> consumePredicate, Consumer<? super Item<?, throws SchemaException?>> itemConsumer) Description copied from interface:WalkableWalk through hierarchy of containing items based on provided conditions. Caller can provide two types of conditions. One (consumePredicate) is used to decide if currently iterated item should be consumed (by provideditemConsumer). Second (descendPredicate) tells, if walk should descend into currently iterated item. Descending condition is a BiPredicate in order to allow caller decide not just based on item path, but also based on the fact if the item was also consumed (depending on implementation, the results ofconsumePredicatecould be directly passed to the descending condition).- Specified by:
walkin interfaceWalkable- Parameters:
descendPredicate- theBiPredicatewhich tells whether to descend into current item. Boolean parameter tells whether the item was also consumed or not.consumePredicate- thePredicatewhich tells whether to consume current item.itemConsumer- the consumer to consume item with if it passes theconsumePredicatetest.- Throws:
SchemaException- when something wrong happen during the walk.
-