Package com.evolveum.midpoint.prism.impl
Class PrismContainerValueImpl<C extends Containerable>
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.PrismValueImpl
com.evolveum.midpoint.prism.impl.PrismContainerValueImpl<C>
- All Implemented Interfaces:
Freezable
,ItemDefinitionTransformer.TransformableValue
,MidpointOriginMetadata
,ParentVisitable
,PathVisitable
,PrismContainerValue<C>
,PrismContextSensitive
,PrismValue
,Revivable
,Visitable
,DebugDumpable
,Serializable
- Direct Known Subclasses:
PrismObjectValueImpl
public class PrismContainerValueImpl<C extends Containerable>
extends PrismValueImpl
implements PrismContainerValue<C>
- Author:
- semancik
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismContainerValue
PrismContainerValue.RemovedItemDefinitionException
-
Field Summary
Modifier and TypeFieldDescriptionprotected ComplexTypeDefinition
static final RuntimeException
protected final LinkedHashMap<QName,
Item<?, ?>> Fields inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
defaultEquivalenceStrategy
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ConstructorDescriptionPrismContainerValueImpl
(C containerable) PrismContainerValueImpl
(OriginType type, Objectable source, PrismContainerable container, Long id, ComplexTypeDefinition complexTypeDefinition, PrismContext prismContext) PrismContainerValueImpl
(PrismContext prismContext) PrismContainerValueImpl
(C containerable, PrismContext prismContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
acceptParentVisitor
(Visitor visitor) <IV extends PrismValue,
ID extends ItemDefinition<?>>
void<IV extends PrismValue,
ID extends ItemDefinition<?>>
voidAdds an item to a property container.void
addAll
(Collection<? extends Item<?, ?>> itemsToAdd) Adds a collection of items to a property container.void
addAllReplaceExisting
(Collection<? extends Item<?, ?>> itemsToAdd) Adds a collection of items to a property container.boolean
addRawElement
(Object element) <IV extends PrismValue,
ID extends ItemDefinition<?>>
voidaddReplaceExisting
(Item<IV, ID> item) Adds an item to a property container.void
applyDefinition
(@NotNull PrismContainerDefinition<C> containerDef, boolean force) void
applyDefinition
(ItemDefinition definition, boolean force) static <T extends Containerable>
TasContainerable
(PrismContainerValue<T> value) asContainerable
(Class<C> requiredClass) static <C extends Containerable>
Collection<C>asContainerables
(Collection<PrismContainerValue<C>> pcvs) static <C extends Containerable>
List<C>asContainerables
(List<PrismContainerValue<C>> pcvs) static <C extends Containerable>
List<PrismContainerValue<C>>asPrismContainerValues
(List<C> containerables) void
assertDefinitions
(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier) void
assertDefinitions
(Supplier<String> sourceDescriptionSupplier) asSingleValuedContainer
(@NotNull QName itemName) Returns a single-valued container (with a single-valued definition) holding just this value.boolean
canRepresent
(Class<?> clazz) void
checkConsistenceInternal
(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) void
clear()
clone()
Literal clone.cloneComplex
(CloneStrategy strategy) Complex clone with different cloning strategies.boolean
boolean
boolean
containsItem
(ItemPath path, boolean acceptEmptyItem) static <C extends Containerable>
booleancontainsRealValue
(Collection<PrismContainerValue<C>> cvalCollection, PrismContainerValue<C> cval) protected void
copyValues
(CloneStrategy strategy, PrismContainerValueImpl<C> clone) <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IcreateDetachedSubItem
(QName name, Class<I> type, ID itemDefinition, boolean immutable) <X> PrismProperty<X>
createProperty
(PrismPropertyDefinition propertyDefinition) <X> PrismProperty<X>
createProperty
(QName propertyName) debugDump
(int indent) protected void
boolean
deleteRawElement
(Object element) protected void
boolean
diffMatchingRepresentation
(PrismValue otherValue, Collection<? extends ItemDelta> deltas, ParameterizedEquivalenceStrategy strategy, boolean exitOnDiff) boolean
equals
(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) boolean
equivalent
(PrismContainerValue<?> other) <X extends Containerable>
PrismContainer<X>findContainer
(QName containerName) <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindItem
(ItemDefinition itemDefinition, Class<I> type) <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
I<T extends Containerable>
PrismContainer<T>findOrCreateContainer
(QName containerName) <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindOrCreateItem
(ItemPath path, Class<I> type, ID definition) <IV extends PrismValue,
ID extends ItemDefinition<?>>
Item<IV,ID> findOrCreateItem
(QName containerName) <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindOrCreateItem
(QName containerName, Class<I> type) <X> PrismProperty<X>
findOrCreateProperty
(ItemPath propertyPath) <X> PrismProperty<X>
findOrCreateProperty
(PrismPropertyDefinition propertyDef) findOrCreateReference
(QName referenceName) <IV extends PrismValue,
ID extends ItemDefinition<?>>
PartiallyResolvedItem<IV,ID> findPartial
(ItemPath path) <X> PrismProperty<X>
findProperty
(ItemPath propertyPath) <X> PrismProperty<X>
findProperty
(PrismPropertyDefinition<X> propertyDefinition) Finds a specific property in the container by definition.findReference
(QName elementName) findReferenceByCompositeObjectElementName
(QName elementName) @NotNull Collection<Item<?,
?>> getAllItems
(@NotNull ItemPath path) @NotNull Collection<PrismValue>
getAllValues
(ItemPath path) @Nullable ComplexTypeDefinition
getId()
Returns the value of identifier corresponding to the '#' path: container id or object oid.@NotNull Collection<QName>
@NotNull Collection<Item<?,
?>> getItems()
Returns a set of items that the property container contains.@NotNull ItemPath
getPath()
protected Object
@NotNull Set<PrismProperty<?>>
Returns a set of properties that the property container contains.<T> T
getPropertyRealValue
(QName propertyName, Class<T> type) Class<?>
<T> T
Returns the statically-typed "real value".@NotNull PrismContainerValue<?>
getValue()
boolean
Returns true if all contained items have complete definitions.int
hashCode
(@NotNull ParameterizedEquivalenceStrategy strategy) boolean
Like isEmpty but ignores presence of container value ID.boolean
isEmpty()
boolean
isIdOnly()
boolean
isRaw()
void
<IV extends PrismValue,
ID extends ItemDefinition<?>>
booleanMerges the provided item into this item.void
mergeContent
(@NotNull PrismContainerValue<?> other, @NotNull List<QName> overwrite) void
Currently doing nothing.void
void
recompute
(PrismContext prismContext) <IV extends PrismValue,
ID extends ItemDefinition<?>>
voidvoid
void
removeContainer
(ItemPath path) void
removeItems
(List<? extends ItemPath> itemsToRemove) void
void
removePaths
(List<? extends ItemPath> remove) void
removeProperty
(ItemPath path) boolean
removeRawElement
(Object element) void
removeReference
(ItemPath path) <IV extends PrismValue,
ID extends ItemDefinition<?>>
voidboolean
representsSameValue
(PrismValue other, boolean lax) Returns true if this and other value represent the same value.void
revive
(PrismContext prismContext) TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)void
void
setOriginTypeRecursive
(OriginType originType) Set origin type to all values and subvalues<T> void
setPropertyRealValue
(QName propertyName, T realValue, PrismContext prismContext) int
size()
<IV extends PrismValue,
ID extends ItemDefinition<?>>
booleanSubtract the provided item from this item.static <T extends Containerable>
List<PrismContainerValue<T>>toString()
void
transformDefinition
(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation) Methods inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
appendOriginDump, applyDefinition, clearParent, copyValues, diff, diffMatchingRepresentation, equals, equals, getOriginObject, getOriginType, getParentContainerValue, getUserData, getUserData, getValueMetadata, hashCode, hashCode, hasValueMetadata, isTransient, recompute, setOriginObject, setOriginType, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
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.PrismContainerValue
findItem, getItemRealValue
Methods inherited from interface com.evolveum.midpoint.prism.PrismValue
applyDefinition, clearParent, cloneIfImmutable, diff, equals, getNearestValueOfType, getParentContainerValue, getRealValueIfExists, getRealValueOrRawType, getRootObjectable, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, hashCode, hasRealClass, hasValueMetadata, isObjectable, isOfType, isTransient, recompute, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, valueMetadata
-
Field Details
-
DIFFERENT_ITEMS_EXCEPTION
-
items
-
unqualifiedItemNames
-
complexTypeDefinition
-
-
Constructor Details
-
PrismContainerValueImpl
public PrismContainerValueImpl() -
PrismContainerValueImpl
-
PrismContainerValueImpl
-
PrismContainerValueImpl
-
PrismContainerValueImpl
public PrismContainerValueImpl(OriginType type, Objectable source, PrismContainerable container, Long id, ComplexTypeDefinition complexTypeDefinition, PrismContext prismContext)
-
-
Method Details
-
asContainerable
-
getPrismContext
- Specified by:
getPrismContext
in interfacePrismContextSensitive
- Overrides:
getPrismContext
in classPrismValueImpl
-
getPrismContextLocal
- Specified by:
getPrismContextLocal
in interfacePrismContainerValue<C extends Containerable>
-
getItems
Returns a set of items that the property container contains. The items may be properties or inner property containers.The set may be null. In case there are no properties an empty set is returned.
Returned set is mutable. Live object is returned.
- Specified by:
getItems
in interfacePrismContainerValue<C extends Containerable>
- Returns:
- set of items that the property container contains.
-
getItems
-
size
public int size()- Specified by:
size
in interfacePrismContainerValue<C extends Containerable>
-
getProperties
Returns a set of properties that the property container contains.The set must not be null. In case there are no properties an empty set is returned.
Returned set is immutable! Any change to it will be ignored.
- Specified by:
getProperties
in interfacePrismContainerValue<C extends Containerable>
- Returns:
- set of properties that the property container contains.
-
getId
- Specified by:
getId
in interfacePrismContainerValue<C extends Containerable>
-
setId
- Specified by:
setId
in interfacePrismContainerValue<C extends Containerable>
-
getParent
- Specified by:
getParent
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
getParent
in interfacePrismValue
- Overrides:
getParent
in classPrismValueImpl
-
getContainer
- Specified by:
getContainer
in interfacePrismContainerValue<C extends Containerable>
-
getPath
- Specified by:
getPath
in interfacePrismValue
- Overrides:
getPath
in classPrismValueImpl
-
getPathComponent
- Overrides:
getPathComponent
in classPrismValueImpl
-
getValue
- Specified by:
getValue
in interfacePrismContainerValue<C extends Containerable>
-
asContainerable
- Specified by:
asContainerable
in interfacePrismContainerValue<C extends Containerable>
-
getCompileTimeClass
- Specified by:
getCompileTimeClass
in interfacePrismContainerValue<C extends Containerable>
-
canRepresent
- Specified by:
canRepresent
in interfacePrismContainerValue<C extends Containerable>
-
asContainerable
- Specified by:
asContainerable
in interfacePrismContainerValue<C extends Containerable>
-
getItemNames
- Specified by:
getItemNames
in interfacePrismContainerValue<C extends Containerable>
-
add
public <IV extends PrismValue,ID extends ItemDefinition<?>> void add(Item<IV, ID> item) throws SchemaException- Specified by:
add
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
add
public <IV extends PrismValue,ID extends ItemDefinition<?>> void add(Item<IV, ID> item, boolean checkUniqueness) throws SchemaExceptionAdds an item to a property container.- Specified by:
add
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
item
- item to add.- Throws:
IllegalArgumentException
- an attempt to add value that already existsSchemaException
-
merge
public <IV extends PrismValue,ID extends ItemDefinition<?>> boolean merge(Item<IV, ID> item) throws SchemaExceptionMerges 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
-
subtract
public <IV extends PrismValue,ID extends ItemDefinition<?>> boolean subtract(Item<IV, ID> item) throws SchemaExceptionSubtract 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
public <IV extends PrismValue,ID extends ItemDefinition<?>> void addReplaceExisting(Item<IV, ID> item) throws SchemaExceptionAdds 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
-
remove
public <IV extends PrismValue,ID extends ItemDefinition<?>> void remove(@NotNull @NotNull Item<IV, ID> item) - Specified by:
remove
in interfacePrismContainerValue<C extends Containerable>
-
removeAll
public void removeAll()- Specified by:
removeAll
in interfacePrismContainerValue<C extends Containerable>
-
addAll
Adds a collection of items to a property container.- Specified by:
addAll
in interfacePrismContainerValue<C extends Containerable>
- Parameters:
itemsToAdd
- items to add- Throws:
IllegalArgumentException
- an attempt to add value that already existsSchemaException
-
addAllReplaceExisting
public void addAllReplaceExisting(Collection<? extends Item<?, ?>> itemsToAdd) throws SchemaExceptionAdds 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
-
replace
public <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
-
clear
public void clear()- Specified by:
clear
in interfacePrismContainerValue<C extends Containerable>
-
contains
- Specified by:
contains
in interfacePrismContainerValue<C extends Containerable>
-
contains
- Specified by:
contains
in interfacePrismContainerValue<C extends Containerable>
-
containsRealValue
public static <C extends Containerable> boolean containsRealValue(Collection<PrismContainerValue<C>> cvalCollection, PrismContainerValue<C> cval) -
find
- Specified by:
find
in interfacePrismValue
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) - Specified by:
findPartial
in interfacePrismContainerValue<C extends Containerable>
-
findProperty
- Specified by:
findProperty
in interfacePrismContainerValue<C extends Containerable>
-
findProperty
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
-
findContainer
- Specified by:
findContainer
in interfacePrismContainerValue<C extends Containerable>
-
findReference
- Specified by:
findReference
in interfacePrismContainerValue<C extends Containerable>
-
findReferenceByCompositeObjectElementName
- Specified by:
findReferenceByCompositeObjectElementName
in interfacePrismContainerValue<C extends Containerable>
-
findItem
public <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>
-
findItem
public <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>
-
containsItem
- Specified by:
containsItem
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
createDetachedSubItem
public <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
-
findOrCreateContainer
public <T extends Containerable> PrismContainer<T> findOrCreateContainer(QName containerName) throws SchemaException - Specified by:
findOrCreateContainer
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateReference
- Specified by:
findOrCreateReference
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateItem
public <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> findOrCreateItem(QName containerName) throws SchemaException - Specified by:
findOrCreateItem
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateItem
public <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
-
findOrCreateItem
public <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
-
findOrCreateProperty
- Specified by:
findOrCreateProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateProperty
public <X> PrismProperty<X> findOrCreateProperty(PrismPropertyDefinition propertyDef) throws SchemaException - Specified by:
findOrCreateProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
createProperty
- Specified by:
createProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
createProperty
public <X> PrismProperty<X> createProperty(PrismPropertyDefinition propertyDefinition) throws SchemaException - Specified by:
createProperty
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
removeProperty
- Specified by:
removeProperty
in interfacePrismContainerValue<C extends Containerable>
-
removeContainer
- Specified by:
removeContainer
in interfacePrismContainerValue<C extends Containerable>
-
removeReference
- Specified by:
removeReference
in interfacePrismContainerValue<C extends Containerable>
-
setPropertyRealValue
public <T> void setPropertyRealValue(QName propertyName, T realValue, PrismContext prismContext) throws SchemaException - Specified by:
setPropertyRealValue
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
getPropertyRealValue
- Specified by:
getPropertyRealValue
in interfacePrismContainerValue<C extends Containerable>
-
recompute
- Specified by:
recompute
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
recompute
in interfacePrismValue
- Specified by:
recompute
in classPrismValueImpl
-
accept
- Specified by:
accept
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
accept
in interfacePrismValue
- Specified by:
accept
in interfaceVisitable<C extends Containerable>
- Overrides:
accept
in classPrismValueImpl
-
accept
- Specified by:
accept
in interfacePathVisitable
- Specified by:
accept
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
accept
in interfacePrismValue
- Overrides:
accept
in classPrismValueImpl
-
acceptParentVisitor
- Specified by:
acceptParentVisitor
in interfaceParentVisitable
- Specified by:
acceptParentVisitor
in interfacePrismContainerValue<C extends Containerable>
-
hasCompleteDefinition
public 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>
-
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
- Overrides:
representsSameValue
in classPrismValueImpl
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.
-
diffMatchingRepresentation
public boolean diffMatchingRepresentation(PrismValue otherValue, Collection<? extends ItemDelta> deltas, ParameterizedEquivalenceStrategy strategy, boolean exitOnDiff) - Overrides:
diffMatchingRepresentation
in classPrismValueImpl
-
isRaw
public boolean isRaw()- Specified by:
isRaw
in interfacePrismValue
-
addRawElement
- Specified by:
addRawElement
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
deleteRawElement
- Specified by:
deleteRawElement
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
removeRawElement
- Specified by:
removeRawElement
in interfacePrismContainerValue<C extends Containerable>
-
getDefinition
- Specified by:
getDefinition
in interfacePrismContainerValue<C extends Containerable>
- Overrides:
getDefinition
in classPrismValueImpl
-
applyDefinition
- Specified by:
applyDefinition
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
applyDefinition
in interfacePrismValue
- Overrides:
applyDefinition
in classPrismValueImpl
- Throws:
SchemaException
-
applyDefinition
public void applyDefinition(@NotNull @NotNull PrismContainerDefinition<C> containerDef, boolean force) throws SchemaException - Specified by:
applyDefinition
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
revive
Description copied from interface:Revivable
TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)- Specified by:
revive
in interfaceRevivable
- Overrides:
revive
in classPrismValueImpl
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfacePrismValue
-
hasNoItems
public boolean hasNoItems()Description copied from interface:PrismContainerValue
Like isEmpty but ignores presence of container value ID.- Specified by:
hasNoItems
in interfacePrismContainerValue<C extends Containerable>
-
isIdOnly
public boolean isIdOnly()- Specified by:
isIdOnly
in interfacePrismContainerValue<C extends Containerable>
-
normalize
public void normalize()Description copied from interface:PrismValue
Currently doing nothing.- Specified by:
normalize
in interfacePrismValue
- Overrides:
normalize
in classPrismValueImpl
-
checkConsistenceInternal
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
checkConsistenceInternal
in interfacePrismValue
- Specified by:
checkConsistenceInternal
in classPrismValueImpl
-
assertDefinitions
- Specified by:
assertDefinitions
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
assertDefinitions
public void assertDefinitions(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier) throws SchemaException - Specified by:
assertDefinitions
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
clone
Description copied from class:PrismValueImpl
Literal clone.- Specified by:
clone
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
clone
in interfacePrismValue
- Specified by:
clone
in classPrismValueImpl
-
createImmutableClone
- Specified by:
createImmutableClone
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
createImmutableClone
in interfacePrismValue
- Overrides:
createImmutableClone
in classPrismValueImpl
-
cloneComplex
Description copied from class:PrismValueImpl
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
cloneComplex
in interfacePrismValue
- Specified by:
cloneComplex
in classPrismValueImpl
- See Also:
-
copyValues
-
equals
public boolean equals(PrismValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
equals
in interfacePrismValue
- Overrides:
equals
in classPrismValueImpl
-
equivalent
- Specified by:
equivalent
in interfacePrismContainerValue<C extends Containerable>
-
hashCode
- Specified by:
hashCode
in interfacePrismValue
- Overrides:
hashCode
in classPrismValueImpl
-
toString
-
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDumpIdentifiers
-
detailedDebugDumpStart
-
toHumanReadableString
- Specified by:
toHumanReadableString
in interfacePrismValue
- Specified by:
toHumanReadableString
in classPrismValueImpl
-
getTypeName
- Specified by:
getTypeName
in interfacePrismValue
- Overrides:
getTypeName
in classPrismValueImpl
-
getComplexTypeDefinition
- Specified by:
getComplexTypeDefinition
in interfacePrismContainerValue<C extends Containerable>
-
toPcvList
-
performFreeze
public void performFreeze()- Overrides:
performFreeze
in classPrismValueImpl
-
getRealClass
- Specified by:
getRealClass
in interfacePrismValue
- Specified by:
getRealClass
in classPrismValueImpl
-
getRealValue
@NotNull public <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
- Specified by:
getRealValue
in classPrismValueImpl
-
asSingleValuedContainer
public PrismContainer<C> asSingleValuedContainer(@NotNull @NotNull QName itemName) throws SchemaException 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
-
mergeContent
@Experimental public void mergeContent(@NotNull @NotNull PrismContainerValue<?> other, @NotNull @NotNull List<QName> overwrite) throws SchemaException - Specified by:
mergeContent
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
getRootValue
- Specified by:
getRootValue
in interfacePrismContainerValue<C extends Containerable>
- Specified by:
getRootValue
in interfacePrismValue
- Overrides:
getRootValue
in classPrismValueImpl
-
asPrismContainerValues
public static <C extends Containerable> List<PrismContainerValue<C>> asPrismContainerValues(List<C> containerables) -
asContainerables
-
asContainerables
public static <C extends Containerable> Collection<C> asContainerables(Collection<PrismContainerValue<C>> pcvs) -
setOriginTypeRecursive
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
-
removePaths
- Specified by:
removePaths
in interfacePrismContainerValue<C extends Containerable>
- Throws:
SchemaException
-
getAllValues
Description copied from interface:PrismValue
- Specified by:
getAllValues
in interfacePrismValue
- Overrides:
getAllValues
in classPrismValueImpl
-
getAllItems
Description copied from interface:PrismValue
SeeItem.getAllItems(ItemPath)
. Here the path is never empty.- Specified by:
getAllItems
in interfacePrismValue
- Overrides:
getAllItems
in classPrismValueImpl
-
getIdentifier
Returns the value of identifier corresponding to the '#' path: container id or object oid. -
removeItems
- Specified by:
removeItems
in interfacePrismContainerValue<C extends Containerable>
-
removeOperationalItems
public void removeOperationalItems()- Specified by:
removeOperationalItems
in interfacePrismContainerValue<C extends Containerable>
-
transformDefinition
public void transformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation) - Specified by:
transformDefinition
in interfaceItemDefinitionTransformer.TransformableValue
-