public interface PrismContainerValue<C extends Containerable> extends PrismValue, ParentVisitable
INDENT_STRING| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor) |
void |
accept(Visitor visitor,
ItemPath path,
boolean recursive) |
void |
acceptParentVisitor(Visitor visitor) |
<IV extends PrismValue,ID extends ItemDefinition> |
add(Item<IV,ID> item) |
<IV extends PrismValue,ID extends ItemDefinition> |
add(Item<IV,ID> item,
boolean checkUniqueness)
Adds 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> |
addReplaceExisting(Item<IV,ID> item)
Adds an item to a property container.
|
void |
applyDefinition(ItemDefinition definition,
boolean force) |
void |
applyDefinition(PrismContainerDefinition<C> containerDef,
boolean force) |
C |
asContainerable() |
C |
asContainerable(Class<C> requiredClass) |
static <T extends Containerable> |
asContainerable(PrismContainerValue<T> value) |
static <C extends Containerable> |
asContainerables(Collection<PrismContainerValue<C>> pcvs) |
static <C extends Containerable> |
asContainerables(List<PrismContainerValue<C>> pcvs) |
static <C extends Containerable> |
asPrismContainerValues(List<C> containerables) |
void |
assertDefinitions(boolean tolerateRaw,
String sourceDescription) |
void |
assertDefinitions(String sourceDescription) |
PrismContainer<C> |
asSingleValuedContainer(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() |
PrismContainerValue<C> |
clone()
Literal clone.
|
PrismContainerValue<C> |
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.
|
boolean |
contains(Item item) |
boolean |
contains(ItemName itemName) |
boolean |
containsItem(ItemPath propPath,
boolean acceptEmptyItem) |
static <C extends Containerable> |
containsRealValue(Collection<PrismContainerValue<C>> cvalCollection,
PrismContainerValue<C> cval) |
static void |
copyDefinition(Containerable aClone,
Containerable original,
PrismContext prismContext)
Deprecated.
|
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
createDetachedSubItem(QName name,
Class<I> type,
ID itemDefinition,
boolean immutable) |
<X> PrismProperty<X> |
createProperty(PrismPropertyDefinition propertyDefinition) |
<X> PrismProperty<X> |
createProperty(QName propertyName) |
String |
debugDump(int indent) |
boolean |
deleteRawElement(Object element) |
boolean |
equals(Object obj) |
boolean |
equivalent(PrismContainerValue<?> other) |
Object |
find(ItemPath path) |
<X extends Containerable> |
findContainer(QName containerName) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findItem(ItemDefinition itemDefinition,
Class<I> type) |
default <IV extends PrismValue,ID extends ItemDefinition> |
findItem(ItemPath itemPath) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findItem(ItemPath itemName,
Class<I> type) |
<T extends Containerable> |
findOrCreateContainer(QName containerName) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findOrCreateItem(ItemPath path,
Class<I> type,
ID definition) |
<IV extends PrismValue,ID extends ItemDefinition> |
findOrCreateItem(QName containerName) |
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> |
findOrCreateItem(QName containerName,
Class<I> type) |
<X> PrismProperty<X> |
findOrCreateProperty(ItemPath propertyPath) |
<X> PrismProperty<X> |
findOrCreateProperty(PrismPropertyDefinition propertyDef) |
PrismReference |
findOrCreateReference(QName referenceName) |
<IV extends PrismValue,ID extends ItemDefinition> |
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.
|
PrismReference |
findReference(QName elementName) |
PrismReference |
findReferenceByCompositeObjectElementName(QName elementName) |
Collection<PrismValue> |
getAllValues(ItemPath path) |
Class<C> |
getCompileTimeClass() |
ComplexTypeDefinition |
getComplexTypeDefinition() |
PrismContainer<C> |
getContainer() |
PrismContainerDefinition<C> |
getDefinition() |
Long |
getId() |
Collection<QName> |
getItemNames() |
Collection<Item<?,?>> |
getItems()
Returns a collection of items that the property container contains.
|
PrismContainerable<C> |
getParent() |
ItemPath |
getPath() |
PrismContext |
getPrismContext() |
PrismContext |
getPrismContextLocal() |
Set<PrismProperty<?>> |
getProperties()
Returns a set of properties that the property container contains.
|
<T> T |
getPropertyRealValue(QName propertyName,
Class<T> type) |
Class<?> |
getRealClass() |
<T> T |
getRealValue() |
PrismContainerValue<?> |
getRootValue() |
QName |
getTypeName() |
C |
getValue() |
boolean |
hasCompleteDefinition() |
int |
hashCode() |
boolean |
hasNoItems()
Like isEmpty but ignores presence of container value ID.
|
boolean |
isEmpty() |
boolean |
isIdOnly() |
boolean |
isRaw() |
void |
keepPaths(List<? extends ItemPath> keep) |
<IV extends PrismValue,ID extends ItemDefinition> |
merge(Item<IV,ID> item)
Merges the provided item into this item.
|
void |
mergeContent(PrismContainerValue<?> other,
List<QName> overwrite) |
void |
normalize() |
void |
recompute(PrismContext prismContext) |
<IV extends PrismValue,ID extends ItemDefinition> |
remove(Item<IV,ID> item) |
void |
removeAll() |
void |
removeContainer(ItemPath path) |
void |
removeItems(List<? extends ItemPath> itemsToRemove) |
void |
removeOperationalItems() |
void |
removePaths(List<? extends ItemPath> remove) |
void |
removeProperty(ItemPath path) |
boolean |
removeRawElement(Object element) |
void |
removeReference(ItemPath path) |
<IV extends PrismValue,ID extends ItemDefinition> |
replace(Item<IV,ID> oldItem,
Item<IV,ID> newItem) |
void |
revive(PrismContext prismContext) |
void |
setId(Long id) |
void |
setImmutable(boolean immutable) |
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> |
subtract(Item<IV,ID> item)
Subtract the provided item from this item.
|
String |
toHumanReadableString() |
static <T extends Containerable> |
toPcvList(List<T> beans) |
String |
toString() |
applyDefinition, clearParent, diff, diff, equals, equals, equals, getOriginObject, getOriginType, getParentContainerValue, getRealValueOrRawType, getUserData, getUserData, hashCode, hashCode, hasRealClass, isImmutable, recompute, representsSameValue, setOriginObject, setOriginType, setParent, setPrismContext, setUserDatadebugDump, debugDumpLazily, debugDumpLazilystatic <T extends Containerable> T asContainerable(PrismContainerValue<T> value)
PrismContext getPrismContext()
getPrismContext in interface PrismValuePrismContext getPrismContextLocal()
@NotNull @Contract(pure=true) Collection<Item<?,?>> getItems()
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.
int size()
@NotNull Set<PrismProperty<?>> getProperties()
Returned set is immutable! Any change to it will be ignored.
Long getId()
void setId(Long id)
PrismContainerable<C> getParent()
getParent in interface PrismValuePrismContainer<C> getContainer()
@NotNull ItemPath getPath()
getPath in interface PrismValueC getValue()
@NotNull C asContainerable()
boolean canRepresent(Class<?> clazz)
@NotNull Collection<QName> getItemNames()
<IV extends PrismValue,ID extends ItemDefinition> void add(Item<IV,ID> item) throws SchemaException
SchemaException<IV extends PrismValue,ID extends ItemDefinition> void add(Item<IV,ID> item, boolean checkUniqueness) throws SchemaException
item - item to add.SchemaExceptionIllegalArgumentException - an attempt to add value that already exists<IV extends PrismValue,ID extends ItemDefinition> boolean merge(Item<IV,ID> item) throws SchemaException
SchemaException<IV extends PrismValue,ID extends ItemDefinition> boolean subtract(Item<IV,ID> item) throws SchemaException
SchemaException<IV extends PrismValue,ID extends ItemDefinition> void addReplaceExisting(Item<IV,ID> item) throws SchemaException
item - item to add.SchemaException<IV extends PrismValue,ID extends ItemDefinition> void remove(Item<IV,ID> item)
void removeAll()
void addAll(Collection<? extends Item<?,?>> itemsToAdd) throws SchemaException
itemsToAdd - items to addIllegalArgumentException - an attempt to add value that already existsSchemaExceptionvoid addAllReplaceExisting(Collection<? extends Item<?,?>> itemsToAdd) throws SchemaException
itemsToAdd - items to addSchemaException<IV extends PrismValue,ID extends ItemDefinition> void replace(Item<IV,ID> oldItem, Item<IV,ID> newItem) throws SchemaException
SchemaExceptionvoid clear()
boolean contains(Item item)
boolean contains(ItemName itemName)
static <C extends Containerable> boolean containsRealValue(Collection<PrismContainerValue<C>> cvalCollection, PrismContainerValue<C> cval)
Object find(ItemPath path)
find in interface PrismValue<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)
Returns null if nothing is found.
propertyDefinition - property definition to find.<X extends Containerable> PrismContainer<X> findContainer(QName containerName)
PrismReference findReference(QName elementName)
PrismReference findReferenceByCompositeObjectElementName(QName elementName)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findItem(ItemPath itemName, 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>> I findItem(ItemDefinition itemDefinition, Class<I> type)
boolean containsItem(ItemPath propPath, boolean acceptEmptyItem) throws SchemaException
SchemaException<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I createDetachedSubItem(QName name, Class<I> type, ID itemDefinition, boolean immutable) throws SchemaException
SchemaException<T extends Containerable> PrismContainer<T> findOrCreateContainer(QName containerName) throws SchemaException
SchemaExceptionPrismReference findOrCreateReference(QName referenceName) throws SchemaException
SchemaException<IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> findOrCreateItem(QName containerName) throws SchemaException
SchemaException<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(QName containerName, Class<I> type) throws SchemaException
SchemaException<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(ItemPath path, Class<I> type, ID definition) throws SchemaException
SchemaException<X> PrismProperty<X> findOrCreateProperty(ItemPath propertyPath) throws SchemaException
SchemaException<X> PrismProperty<X> findOrCreateProperty(PrismPropertyDefinition propertyDef) throws SchemaException
SchemaException<X> PrismProperty<X> createProperty(QName propertyName) throws SchemaException
SchemaException<X> PrismProperty<X> createProperty(PrismPropertyDefinition propertyDefinition) throws SchemaException
SchemaExceptionvoid removeProperty(ItemPath path)
void removeContainer(ItemPath path)
void removeReference(ItemPath path)
<T> void setPropertyRealValue(QName propertyName, T realValue, PrismContext prismContext) throws SchemaException
SchemaExceptionvoid recompute(PrismContext prismContext)
recompute in interface PrismValuevoid accept(Visitor visitor)
accept in interface PrismValueaccept in interface Visitablevoid accept(Visitor visitor, ItemPath path, boolean recursive)
accept in interface PathVisitableaccept in interface PrismValueboolean hasCompleteDefinition()
boolean isRaw()
isRaw in interface PrismValueboolean addRawElement(Object element) throws SchemaException
SchemaExceptionboolean deleteRawElement(Object element) throws SchemaException
SchemaExceptionboolean removeRawElement(Object element)
void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
applyDefinition in interface PrismValueSchemaExceptionvoid applyDefinition(@NotNull
PrismContainerDefinition<C> containerDef,
boolean force)
throws SchemaException
SchemaExceptionvoid revive(PrismContext prismContext) throws SchemaException
revive in interface PrismValuerevive in interface RevivableSchemaExceptionboolean isEmpty()
isEmpty in interface PrismValueboolean isIdOnly()
void normalize()
normalize in interface PrismValuevoid checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
checkConsistenceInternal in interface PrismValuevoid assertDefinitions(String sourceDescription) throws SchemaException
SchemaExceptionvoid assertDefinitions(boolean tolerateRaw,
String sourceDescription)
throws SchemaException
SchemaExceptionPrismContainerValue<C> clone()
PrismValueclone in interface PrismValuePrismContainerValue<C> cloneComplex(CloneStrategy strategy)
PrismValuecloneComplex in interface PrismValueCloneStrategyboolean equivalent(PrismContainerValue<?> other)
String debugDump(int indent)
debugDump in interface DebugDumpableString toHumanReadableString()
toHumanReadableString in interface PrismValue@Deprecated static void copyDefinition(Containerable aClone, Containerable original, PrismContext prismContext)
QName getTypeName()
getTypeName in interface PrismValue@Nullable ComplexTypeDefinition getComplexTypeDefinition()
static <T extends Containerable> List<PrismContainerValue<T>> toPcvList(List<T> beans)
void setImmutable(boolean immutable)
setImmutable in interface PrismValueClass<?> getRealClass()
getRealClass in interface PrismValue@NotNull <T> T getRealValue()
getRealValue in interface PrismValuePrismContainer<C> asSingleValuedContainer(@NotNull QName itemName) throws SchemaException
itemName - Item name for newly-created container.SchemaExceptionvoid mergeContent(@NotNull
PrismContainerValue<?> other,
@NotNull
List<QName> overwrite)
throws SchemaException
SchemaExceptionPrismContainerValue<?> getRootValue()
getRootValue in interface PrismValuestatic <C extends Containerable> List<PrismContainerValue<C>> asPrismContainerValues(List<C> containerables)
static <C extends Containerable> List<C> asContainerables(List<PrismContainerValue<C>> pcvs)
static <C extends Containerable> Collection<C> asContainerables(Collection<PrismContainerValue<C>> pcvs)
void setOriginTypeRecursive(OriginType originType)
void keepPaths(List<? extends ItemPath> keep) throws SchemaException
SchemaExceptionvoid removePaths(List<? extends ItemPath> remove) throws SchemaException
SchemaException@NotNull Collection<PrismValue> getAllValues(ItemPath path)
getAllValues in interface PrismValuevoid removeOperationalItems()
PrismContainerDefinition<C> getDefinition()
void acceptParentVisitor(Visitor visitor)
acceptParentVisitor in interface ParentVisitableboolean hasNoItems()
Copyright © 2022 Evolveum. All rights reserved.