Package com.evolveum.midpoint.prism
Interface PrismContainerValue<C extends Containerable>
- 
- All Superinterfaces:
- DebugDumpable,- Freezable,- MidpointOriginMetadata,- ParentVisitable,- PathVisitable,- PrismContextSensitive,- PrismValue,- Revivable,- Serializable,- Visitable
 - All Known Subinterfaces:
- PrismObjectValue<O>
 
 public interface PrismContainerValue<C extends Containerable> extends PrismValue, ParentVisitable - Author:
- semancik
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classPrismContainerValue.RemovedItemDefinitionExceptionUsed when accessing an item whose definition was removed.
 - 
Field Summary- 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaccept(Visitor visitor)voidaccept(Visitor visitor, ItemPath path, boolean recursive)voidacceptParentVisitor(Visitor visitor)<IV extends PrismValue,ID extends ItemDefinition<?>>
 voidadd(Item<IV,ID> item)<IV extends PrismValue,ID extends ItemDefinition<?>>
 voidadd(Item<IV,ID> item, boolean checkUniqueness)Adds an item to a property container.voidaddAll(Collection<? extends Item<?,?>> itemsToAdd)Adds a collection of items to a property container.voidaddAllReplaceExisting(Collection<? extends Item<?,?>> itemsToAdd)Adds a collection of items to a property container.booleanaddRawElement(Object element)<IV extends PrismValue,ID extends ItemDefinition<?>>
 voidaddReplaceExisting(Item<IV,ID> item)Adds an item to a property container.voidapplyDefinition(@NotNull PrismContainerDefinition<C> containerDef, boolean force)voidapplyDefinition(ItemDefinition definition, boolean force)CasContainerable()static <T extends Containerable>
 TasContainerable(PrismContainerValue<T> value)CasContainerable(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)voidassertDefinitions(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier)voidassertDefinitions(Supplier<String> sourceDescriptionSupplier)PrismContainer<C>asSingleValuedContainer(@NotNull QName itemName)Returns a single-valued container (with a single-valued definition) holding just this value.booleancanRepresent(Class<?> clazz)voidclear()PrismContainerValue<C>clone()Literal clone.PrismContainerValue<C>cloneComplex(CloneStrategy strategy)Complex clone with different cloning strategies.booleancontains(Item item)booleancontains(ItemName itemName)booleancontainsItem(ItemPath propPath, boolean acceptEmptyItem)static <C extends Containerable>
 booleancontainsRealValue(Collection<PrismContainerValue<C>> cvalCollection, PrismContainerValue<C> cval)<IV extends PrismValue,ID extends ItemDefinition<?>,I extends Item<IV,ID>>
 IcreateDetachedSubItem(QName name, Class<I> type, ID itemDefinition, boolean immutable)PrismContainerValue<C>createImmutableClone()<X> PrismProperty<X>createProperty(PrismPropertyDefinition propertyDefinition)<X> PrismProperty<X>createProperty(QName propertyName)booleandeleteRawElement(Object element)booleanequivalent(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)default <IV extends PrismValue,ID extends ItemDefinition<?>>
 Item<IV,ID>findItem(ItemPath itemPath)<IV extends PrismValue,ID extends ItemDefinition<?>,I extends Item<IV,ID>>
 IfindItem(ItemPath itemName, Class<I> type)<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)PrismReferencefindOrCreateReference(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.PrismReferencefindReference(QName elementName)PrismReferencefindReferenceByCompositeObjectElementName(QName elementName)Class<C>getCompileTimeClass()@Nullable ComplexTypeDefinitiongetComplexTypeDefinition()PrismContainer<C>getContainer()PrismContainerDefinition<C>getDefinition()LonggetId()static LonggetId(PrismValue value)@NotNull Collection<QName>getItemNames()default <T> TgetItemRealValue(ItemName itemName, Class<T> type)@NotNull Collection<Item<?,?>>getItems()Returns a collection of items that the property container contains.PrismContainerable<C>getParent()PrismContextgetPrismContextLocal()@NotNull Set<PrismProperty<?>>getProperties()Returns a set of properties that the property container contains.<T> TgetPropertyRealValue(QName propertyName, Class<T> type)PrismContainerValue<?>getRootValue()CgetValue()booleanhasCompleteDefinition()Returns true if all contained items have complete definitions.booleanhasNoItems()Like isEmpty but ignores presence of container value ID.static booleanidsMatch(PrismValue v1, PrismValue v2)booleanisIdOnly()static booleanisIdOnly(PrismValue value)voidkeepPaths(List<? extends ItemPath> keep)<IV extends PrismValue,ID extends ItemDefinition<?>>
 booleanmerge(Item<IV,ID> item)Merges the provided item into this item.voidmergeContent(@NotNull PrismContainerValue<?> other, @NotNull List<QName> overwrite)voidrecompute(PrismContext prismContext)<IV extends PrismValue,ID extends ItemDefinition<?>>
 voidremove(Item<IV,ID> item)voidremoveAll()voidremoveContainer(ItemPath path)voidremoveItems(List<? extends ItemPath> itemsToRemove)voidremoveOperationalItems()voidremovePaths(List<? extends ItemPath> remove)voidremoveProperty(ItemPath path)booleanremoveRawElement(Object element)voidremoveReference(ItemPath path)<IV extends PrismValue,ID extends ItemDefinition<?>>
 voidreplace(Item<IV,ID> oldItem, Item<IV,ID> newItem)voidsetId(Long id)voidsetOriginTypeRecursive(OriginType originType)Set origin type to all values and subvalues<T> voidsetPropertyRealValue(QName propertyName, T realValue, PrismContext prismContext)intsize()<IV extends PrismValue,ID extends ItemDefinition<?>>
 booleansubtract(Item<IV,ID> item)Subtract the provided item from this item.static <T extends Containerable>
 List<PrismContainerValue<T>>toPcvList(List<T> beans)- 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDump, debugDumpLazily, debugDumpLazily
 - 
Methods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, checkMutable, freeze, isImmutable
 - 
Methods inherited from interface com.evolveum.midpoint.prism.metadata.MidpointOriginMetadatagetOriginObject, getOriginType, setOriginObject, setOriginType
 - 
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitivegetPrismContext
 - 
Methods inherited from interface com.evolveum.midpoint.prism.PrismValueapplyDefinition, checkConsistenceInternal, clearParent, diff, equals, equals, find, getAllItems, getAllValues, getParentContainerValue, getPath, getRealClass, getRealValue, getRealValueOrRawType, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, hashCode, hashCode, hasRealClass, hasValueMetadata, isEmpty, isRaw, isTransient, normalize, recompute, representsSameValue, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, toHumanReadableString, valueMetadata
 
- 
 
- 
- 
- 
Method Detail- 
asContainerablestatic <T extends Containerable> T asContainerable(PrismContainerValue<T> value) 
 - 
getPrismContextLocalPrismContext getPrismContextLocal() 
 - 
getItems@NotNull @Contract(pure=true) @NotNull Collection<Item<?,?>> getItems() 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. - Returns:
- collection of items that the property container contains.
 
 - 
sizeint size() 
 - 
getProperties@NotNull @NotNull Set<PrismProperty<?>> getProperties() 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. - Returns:
- set of properties that the property container contains.
 
 - 
getIdLong getId() 
 - 
setIdvoid setId(Long id) 
 - 
getParentPrismContainerable<C> getParent() - Specified by:
- getParentin interface- PrismValue
 
 - 
getContainerPrismContainer<C> getContainer() 
 - 
getValueC getValue() 
 - 
asContainerable@NotNull C asContainerable() 
 - 
canRepresentboolean canRepresent(Class<?> clazz) 
 - 
getItemNames@NotNull @NotNull Collection<QName> getItemNames() 
 - 
add<IV extends PrismValue,ID extends ItemDefinition<?>> void add(Item<IV,ID> item) throws SchemaException - Throws:
- SchemaException
 
 - 
add<IV extends PrismValue,ID extends ItemDefinition<?>> void add(Item<IV,ID> item, boolean checkUniqueness) throws SchemaException Adds an item to a property container.- Parameters:
- item- item to add.
- Throws:
- IllegalArgumentException- an attempt to add value that already exists
- SchemaException
 
 - 
merge<IV extends PrismValue,ID extends ItemDefinition<?>> boolean merge(Item<IV,ID> item) throws SchemaException Merges the provided item into this item. The values are joined together. Returns true if new item or value was added.- Throws:
- SchemaException
 
 - 
subtract<IV extends PrismValue,ID extends ItemDefinition<?>> boolean subtract(Item<IV,ID> item) throws SchemaException 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.- Throws:
- SchemaException
 
 - 
addReplaceExisting<IV extends PrismValue,ID extends ItemDefinition<?>> void addReplaceExisting(Item<IV,ID> item) throws SchemaException Adds an item to a property container. Existing value will be replaced.- Parameters:
- item- item to add.
- Throws:
- SchemaException
 
 - 
remove<IV extends PrismValue,ID extends ItemDefinition<?>> void remove(Item<IV,ID> item) 
 - 
removeAllvoid removeAll() 
 - 
addAllvoid addAll(Collection<? extends Item<?,?>> itemsToAdd) throws SchemaException Adds a collection of items to a property container.- Parameters:
- itemsToAdd- items to add
- Throws:
- IllegalArgumentException- an attempt to add value that already exists
- SchemaException
 
 - 
addAllReplaceExistingvoid addAllReplaceExisting(Collection<? extends Item<?,?>> itemsToAdd) throws SchemaException Adds a collection of items to a property container. Existing values will be replaced.- Parameters:
- itemsToAdd- items to add
- Throws:
- SchemaException
 
 - 
replace<IV extends PrismValue,ID extends ItemDefinition<?>> void replace(Item<IV,ID> oldItem, Item<IV,ID> newItem) throws SchemaException - Throws:
- SchemaException
 
 - 
clearvoid clear() 
 - 
containsboolean contains(Item item) 
 - 
containsboolean contains(ItemName itemName) 
 - 
containsRealValuestatic <C extends Containerable> boolean containsRealValue(Collection<PrismContainerValue<C>> cvalCollection, PrismContainerValue<C> cval) 
 - 
findPartial<IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) 
 - 
findProperty<X> PrismProperty<X> findProperty(ItemPath propertyPath) 
 - 
findProperty<X> PrismProperty<X> findProperty(PrismPropertyDefinition<X> propertyDefinition) Finds a specific property in the container by definition.Returns null if nothing is found. - Parameters:
- propertyDefinition- property definition to find.
- Returns:
- found property or null
 
 - 
findContainer<X extends Containerable> PrismContainer<X> findContainer(QName containerName) 
 - 
findReferencePrismReference findReference(QName elementName) 
 - 
findReferenceByCompositeObjectElementNamePrismReference findReferenceByCompositeObjectElementName(QName elementName) 
 - 
findItem<IV extends PrismValue,ID extends ItemDefinition<?>,I extends Item<IV,ID>> I findItem(ItemPath itemName, Class<I> type) 
 - 
findItemdefault <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> findItem(ItemPath itemPath) 
 - 
findItem<IV extends PrismValue,ID extends ItemDefinition<?>,I extends Item<IV,ID>> I findItem(ItemDefinition itemDefinition, Class<I> type) 
 - 
containsItemboolean containsItem(ItemPath propPath, boolean acceptEmptyItem) throws SchemaException - Throws:
- SchemaException
 
 - 
createDetachedSubItem<IV extends PrismValue,ID extends ItemDefinition<?>,I extends Item<IV,ID>> I createDetachedSubItem(QName name, Class<I> type, ID itemDefinition, boolean immutable) throws SchemaException, PrismContainerValue.RemovedItemDefinitionException 
 - 
findOrCreateContainer<T extends Containerable> PrismContainer<T> findOrCreateContainer(QName containerName) throws SchemaException - Throws:
- SchemaException
 
 - 
findOrCreateReferencePrismReference findOrCreateReference(QName referenceName) throws SchemaException - Throws:
- SchemaException
 
 - 
findOrCreateItem<IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> findOrCreateItem(QName containerName) throws SchemaException - Throws:
- SchemaException
 
 - 
findOrCreateItem<IV extends PrismValue,ID extends ItemDefinition<?>,I extends Item<IV,ID>> I findOrCreateItem(QName containerName, Class<I> type) throws SchemaException - Throws:
- SchemaException
 
 - 
findOrCreateItem<IV extends PrismValue,ID extends ItemDefinition<?>,I extends Item<IV,ID>> I findOrCreateItem(ItemPath path, Class<I> type, ID definition) throws SchemaException - Throws:
- SchemaException
 
 - 
findOrCreateProperty<X> PrismProperty<X> findOrCreateProperty(ItemPath propertyPath) throws SchemaException - Throws:
- SchemaException
 
 - 
findOrCreateProperty<X> PrismProperty<X> findOrCreateProperty(PrismPropertyDefinition propertyDef) throws SchemaException - Throws:
- SchemaException
 
 - 
createProperty<X> PrismProperty<X> createProperty(QName propertyName) throws SchemaException - Throws:
- SchemaException
 
 - 
createProperty<X> PrismProperty<X> createProperty(PrismPropertyDefinition propertyDefinition) throws SchemaException - Throws:
- SchemaException
 
 - 
removePropertyvoid removeProperty(ItemPath path) 
 - 
removeContainervoid removeContainer(ItemPath path) 
 - 
removeReferencevoid removeReference(ItemPath path) 
 - 
setPropertyRealValue<T> void setPropertyRealValue(QName propertyName, T realValue, PrismContext prismContext) throws SchemaException - Throws:
- SchemaException
 
 - 
recomputevoid recompute(PrismContext prismContext) - Specified by:
- recomputein interface- PrismValue
 
 - 
acceptvoid accept(Visitor visitor) - Specified by:
- acceptin interface- PrismValue
- Specified by:
- acceptin interface- Visitable<C extends Containerable>
 
 - 
acceptvoid accept(Visitor visitor, ItemPath path, boolean recursive) - Specified by:
- acceptin interface- PathVisitable
- Specified by:
- acceptin interface- PrismValue
 
 - 
hasCompleteDefinitionboolean hasCompleteDefinition() Returns true if all contained items have complete definitions. (Currently does not check the definition of this value itself.)
 - 
addRawElementboolean addRawElement(Object element) throws SchemaException - Throws:
- SchemaException
 
 - 
deleteRawElementboolean deleteRawElement(Object element) throws SchemaException - Throws:
- SchemaException
 
 - 
removeRawElementboolean removeRawElement(Object element) 
 - 
applyDefinitionvoid applyDefinition(ItemDefinition definition, boolean force) throws SchemaException - Specified by:
- applyDefinitionin interface- PrismValue
- Throws:
- SchemaException
 
 - 
applyDefinitionvoid applyDefinition(@NotNull @NotNull PrismContainerDefinition<C> containerDef, boolean force) throws SchemaException- Throws:
- SchemaException
 
 - 
isIdOnlyboolean isIdOnly() 
 - 
isIdOnlystatic boolean isIdOnly(PrismValue value) 
 - 
getIdstatic Long getId(PrismValue value) 
 - 
idsMatchstatic boolean idsMatch(PrismValue v1, PrismValue v2) 
 - 
assertDefinitionsvoid assertDefinitions(Supplier<String> sourceDescriptionSupplier) throws SchemaException - Throws:
- SchemaException
 
 - 
assertDefinitionsvoid assertDefinitions(boolean tolerateRaw, Supplier<String> sourceDescriptionSupplier) throws SchemaException- Throws:
- SchemaException
 
 - 
clonePrismContainerValue<C> clone() Description copied from interface:PrismValueLiteral clone.- Specified by:
- clonein interface- PrismValue
 
 - 
createImmutableClonePrismContainerValue<C> createImmutableClone() - Specified by:
- createImmutableClonein interface- PrismValue
 
 - 
cloneComplexPrismContainerValue<C> cloneComplex(CloneStrategy strategy) Description copied from interface:PrismValueComplex clone with different cloning strategies.- Specified by:
- cloneComplexin interface- PrismValue
- See Also:
- CloneStrategy
 
 - 
equivalentboolean equivalent(PrismContainerValue<?> other) 
 - 
getComplexTypeDefinition@Nullable @Nullable ComplexTypeDefinition getComplexTypeDefinition() 
 - 
toPcvListstatic <T extends Containerable> List<PrismContainerValue<T>> toPcvList(List<T> beans) 
 - 
asSingleValuedContainerPrismContainer<C> asSingleValuedContainer(@NotNull @NotNull QName itemName) throws SchemaException Returns a single-valued container (with a single-valued definition) holding just this value.- Parameters:
- itemName- Item name for newly-created container.
- Throws:
- SchemaException
 
 - 
mergeContentvoid mergeContent(@NotNull @NotNull PrismContainerValue<?> other, @NotNull @NotNull List<QName> overwrite) throws SchemaException- Throws:
- SchemaException
 
 - 
getRootValuePrismContainerValue<?> getRootValue() - Specified by:
- getRootValuein interface- PrismValue
 
 - 
asPrismContainerValuesstatic <C extends Containerable> List<PrismContainerValue<C>> asPrismContainerValues(List<C> containerables) 
 - 
asContainerablesstatic <C extends Containerable> List<C> asContainerables(List<PrismContainerValue<C>> pcvs) 
 - 
asContainerablesstatic <C extends Containerable> Collection<C> asContainerables(Collection<PrismContainerValue<C>> pcvs) 
 - 
setOriginTypeRecursivevoid setOriginTypeRecursive(OriginType originType) Set origin type to all values and subvalues
 - 
keepPathsvoid keepPaths(List<? extends ItemPath> keep) throws SchemaException - Throws:
- SchemaException
 
 - 
removePathsvoid removePaths(List<? extends ItemPath> remove) throws SchemaException - Throws:
- SchemaException
 
 - 
removeOperationalItemsvoid removeOperationalItems() 
 - 
getDefinitionPrismContainerDefinition<C> getDefinition() 
 - 
acceptParentVisitorvoid acceptParentVisitor(Visitor visitor) - Specified by:
- acceptParentVisitorin interface- ParentVisitable
 
 - 
hasNoItemsboolean hasNoItems() Like isEmpty but ignores presence of container value ID.
 
- 
 
-