Class ValueMetadataAdapter
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.metadata.ValueMetadataAdapter
-
- All Implemented Interfaces:
Freezable,Item<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>,Itemable,ParentVisitable,PathVisitable,PrismContainer<Containerable>,PrismContainerable<Containerable>,PrismContextSensitive,Revivable,ValueMetadata,Visitable,DebugDumpable,ShortDumpable,Serializable
@Experimental public class ValueMetadataAdapter extends Object implements ValueMetadata
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor visitor)voidaccept(Visitor visitor, ItemPath path, boolean recursive)voidacceptParentVisitor(@NotNull Visitor visitor)Accepts a visitor that visits each item/value on the way to the structure root.booleanadd(@NotNull PrismContainerValue<Containerable> newValue)Adds a given value, overwriting existing one.booleanadd(@NotNull PrismContainerValue<Containerable> newValue, @NotNull EquivalenceStrategy strategy)Adds a value, overwriting existing one(s).voidadd(Item<?,?> item)Convenience method.booleanaddAll(Collection<PrismContainerValue<Containerable>> newValues)Adds given values, with the same semantics as repeated add(..) calls.booleanaddAll(Collection<PrismContainerValue<Containerable>> newValues, @NotNull EquivalenceStrategy strategy)Adds given values, with the same semantics as repeated add(..) calls.voidaddIgnoringEquivalents(@NotNull PrismContainerValue<Containerable> newValue)Adds a value, not looking for equivalent values.voidaddRespectingMetadataAndCloning(PrismContainerValue<Containerable> value, @NotNull EquivalenceStrategy strategy, EquivalenceStrategy metadataEquivalenceStrategy)Adds a value, respecting the metadata.voidapplyDefinition(PrismContainerDefinition<Containerable> definition)voidapplyDefinition(PrismContainerDefinition<Containerable> definition, boolean force)voidassertDefinitions()voidassertDefinitions(boolean tolerateRawValues, String sourceDescription)voidassertDefinitions(String sourceDescription)booleancanRepresent(@NotNull Class<?> compileTimeClass)Returns true if values of this container can be represented as specified compile-time class.booleancanRepresent(QName type)Returns true if values of this container can be presented as specified type (from compile-time or runtime schema).voidcheckConsistence()voidcheckConsistence(boolean requireDefinitions, boolean prohibitRaw)voidcheckConsistence(boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)voidcheckConsistence(boolean requireDefinitions, ConsistencyCheckScope scope)voidcheckConsistence(ConsistencyCheckScope scope)voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)voidcheckImmutable()voidcheckMutable()voidclear()Removes all values from the item.ValueMetadataclone()Literal clone.static <T extends Item<?,?>>
Collection<T>cloneCollection(Collection<T> items)PrismContainer<Containerable>cloneComplex(CloneStrategy strategy)Complex clone with different cloning strategies.booleancontains(@NotNull PrismContainerValue<Containerable> value)booleancontains(@NotNull PrismContainerValue<Containerable> value, @NotNull EquivalenceStrategy strategy)booleancontainsItem(ItemPath itemPath, boolean acceptEmptyItem)ContainerDelta<Containerable>createDelta()Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.ContainerDelta<Containerable>createDelta(ItemPath path)PrismContainer<Containerable>createImmutableClone()PrismContainerValue<Containerable>createNewValue()static <V extends PrismContainerValue>
voidcreateParentIfNeeded(V value, ItemDefinition definition)StringdebugDump(int indent)PrismContainerDefinition<Containerable>deepCloneDefinition(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)ItemDelta<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>diff(Item<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> other)Computes a difference (delta) with the specified item using DEFAULT_FOR_DELTA_APPLICATION (REAL_VALUE_CONSIDER_DIFFERENT_IDS) equivalence strategy.ItemDelta<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>diff(Item<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> other, @NotNull ParameterizedEquivalenceStrategy strategy)Computes a difference (delta) with the specified item using given equivalence strategy.ContainerDelta<Containerable>diff(PrismContainer<Containerable> other)ContainerDelta<Containerable>diff(PrismContainer<Containerable> other, ParameterizedEquivalenceStrategy strategy)List<? extends ItemDelta>diffModifications(PrismContainer<Containerable> other, ParameterizedEquivalenceStrategy strategy)booleanequals(Object obj)Compares this item to the specified object under DEFAULT_FOR_EQUALS (DATA) strategy.booleanequals(Object obj, @NotNull EquivalenceStrategy equivalenceStrategy)Compares this item to the specified object under given strategy.booleanequals(Object obj, @NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)Compares this item to the specified object under given strategy.booleanequivalent(Object obj)This method ignores some part of the object during comparison (e.g.Objectfind(ItemPath path)Returns object (Item or PrismValue) pointed to by the given path.<T extends Containerable>
PrismContainer<T>findContainer(ItemPath path)<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindCreateItem(ItemPath itemPath, Class<I> type, ID itemDefinition, boolean create)<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindCreateItem(QName itemQName, Class<I> type, boolean create)<IV extends PrismValue,ID extends ItemDefinition>
Item<IV,ID>findItem(ItemPath path)<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindItem(ItemPath path, Class<I> type)<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindItem(QName itemQName, Class<I> type)<T extends Containerable>
PrismContainer<T>findOrCreateContainer(ItemPath containerPath)<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindOrCreateItem(ItemPath containerPath, Class<I> type)<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindOrCreateItem(ItemPath containerPath, Class<I> type, ID definition)<T> PrismProperty<T>findOrCreateProperty(ItemPath propertyPath)PrismReferencefindOrCreateReference(ItemPath propertyPath)<IV extends PrismValue,ID extends ItemDefinition>
PartiallyResolvedItem<IV,ID>findPartial(ItemPath path)<T> PrismProperty<T>findProperty(ItemPath path)PrismReferencefindReference(ItemPath path)PrismContainerValue<Containerable>findValue(long id)PrismContainerValue<Containerable>findValue(@NotNull PrismContainerValue<Containerable> value, @NotNull EquivalenceStrategy strategy)PrismContainerValue<Containerable>findValue(PrismContainerValue<Containerable> value, @NotNull Comparator<PrismContainerValue<Containerable>> comparator)voidfreeze()static @NotNull Collection<PrismValue>getAllValues(Item<?,?> item, ItemPath path)@NotNull Collection<PrismValue>getAllValues(ItemPath path)PrismContainerValue<Containerable>getAnyValue()Returns any of the values.PrismContainerValue<Containerable>getAnyValue(@NotNull ValueSelector<PrismContainerValue<Containerable>> selector)Returns a value matching given selector (or null if none exists).Collection<PrismContainerValue<Containerable>>getClonedValues()@Nullable Class<Containerable>getCompileTimeClass()Returns the static type of data represented by values of this container, if known and applicable.ComplexTypeDefinitiongetComplexTypeDefinition()PrismContainerDefinition<Containerable>getDefinition()Returns applicable definition.StringgetDisplayName()Returns a display name for the item.ItemNamegetElementName()Returns the name of the item.StringgetHelp()Returns help message defined for the item.LonggetHighestId()@Nullable PrismContainerValue<?>getParent()Returns the parent of this item (if exists).@NotNull ItemPathgetPath()Returns the path of this item (sequence of names from the "root" container or similar object to this item).PrismContextgetPrismContext()PrismContextgetPrismContextLocal()<T> TgetPropertyRealValue(ItemPath propertyPath, Class<T> type)@NotNull ContainerablegetRealValue()Returns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items.<X> XgetRealValue(Class<X> type)Type override, also for compatibility.@NotNull Collection<Containerable>getRealValues()Returns (potentially empty) collection of "real values".<X> X[]getRealValuesArray(Class<X> type)Type override, also for compatibility.@NotNull Collection<Object>getRealValuesOrRawTypes(PrismContext prismContext)@NotNull Map<String,Object>getUserData()Returns the "user data", a map that allows attaching arbitrary named data to this item.<T> TgetUserData(String key)Returns the user data for the given key (name).@NotNull PrismContainerValue<Containerable>getValue()Returns the value, if there is only one.PrismContainerValue<Containerable>getValue(Long id)@NotNull List<PrismContainerValue<Containerable>>getValues()Returns the values for this item.static <V extends PrismValue>
@NotNull Collection<V>getValues(Item<V,?> item)booleanhasCompleteDefinition()Returns true if this item and all contained items have definitions.inthashCode()Computes hash code to be used under DEFAULT_FOR_EQUALS (currently DATA) equivalence strategy.inthashCode(@NotNull EquivalenceStrategy equivalenceStrategy)Computes hash code to be used under given equivalence strategy.inthashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)Computes hash code to be used under given equivalence strategy.booleanhasNoValues()static booleanhasNoValues(Item<?,?> item)booleanhasRaw()Returns true is at least one of the values is raw.static ValueMetadataholding(@NotNull PrismContainer<?> value)booleanisEmpty()Normally the same asItem.hasNoValues().booleanisImmutable()booleanisIncomplete()Flag that indicates incomplete item.booleanisOperational()Returns true if this item is metadata item that should be ignored for metadata-insensitive comparisons and hashCode functions.booleanisRaw()Returns true is all the values are raw.booleanisSingleValue()Returns true if the item contains 0 or 1 values and (by definition) is not multivalued.voidmerge(Item<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> otherItem)Merge all the values of other item to this item.voidmergeValue(PrismContainerValue<Containerable> otherValue)voidmergeValues(PrismContainer<Containerable> other)voidmergeValues(Collection<PrismContainerValue<Containerable>> otherValues)static <V extends Containerable>
PrismContainer<V>newInstance(PrismContext prismContext, QName type)voidnormalize()voidrecomputeAllValues()Re-apply PolyString (and possible other) normalizations to the object.voidremove(Item<?,?> item)Convenience method.booleanremove(PrismContainerValue<Containerable> value)Removes values equivalent to given value from the item.booleanremove(PrismContainerValue<Containerable> value, @NotNull EquivalenceStrategy strategy)Removes values equivalent to given value from the item; under specified equivalence strategy OR when values represent the same value via "representsSameValue(.., lax=false)" method.booleanremoveAll(Collection<PrismContainerValue<Containerable>> values, @NotNull EquivalenceStrategy strategy)Removes all given values from the item.voidremoveContainer(ItemPath path)<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
voidremoveItem(ItemPath path, Class<I> itemType)voidremoveProperty(ItemPath path)voidremoveReference(ItemPath path)voidremoveRespectingMetadata(PrismContainerValue<Containerable> value, @NotNull EquivalenceStrategy strategy, EquivalenceStrategy metadataEquivalenceStrategy)Removes values equivalent to given value from the item; under specified equivalence strategy OR when values represent the same value via "representsSameValue(.., lax=false)" method.voidreplace(PrismContainerValue<Containerable> newValue)Replaces all values of the item by given value.voidreplaceAll(Collection<PrismContainerValue<Containerable>> newValues, @NotNull EquivalenceStrategy strategy)Replaces all values of the item by given values.static <T extends Item>
Collection<T>resetParentCollection(Collection<T> items)Sets all parents to null.voidrevive(PrismContext prismContext)<C extends Containerable>
voidsetContainerRealValue(QName containerName, C realValue)voidsetDefinition(PrismContainerDefinition<Containerable> definition)Sets applicable property container definition.voidsetElementName(QName elementName)Sets the name of the item.voidsetIncomplete(boolean incomplete)Flags the item as incomplete.voidsetParent(@Nullable PrismContainerValue<?> parentValue)Sets the parent of this item.voidsetPrismContext(PrismContext prismContext)<T> voidsetPropertyRealValue(QName propertyName, T realValue)<T> voidsetPropertyRealValues(QName propertyName, T... realValues)voidsetRealValue(Containerable value)voidsetUserData(String key, Object value)Sets the user data for the given key (name).voidsetValue(@NotNull PrismContainerValue<Containerable> value)voidshortDump(StringBuilder sb)Show the content of the object intended for diagnostics.voidtrim()Remove all empty valuesvoidtrimDefinitionTree(Collection<? extends ItemPath> alwaysKeep)Optimizes (trims) definition tree by removing any definitions not corresponding to items in this container.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Item
filterValues, filterYields, hasAnyValue, isSingleValueByDefinition, removeIf, size, valuesStream
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.ValueMetadata
addMetadataValue
-
-
-
-
Method Detail
-
holding
public static ValueMetadata holding(@NotNull @NotNull PrismContainer<?> value)
-
getPrismContext
public PrismContext getPrismContext()
- Specified by:
getPrismContextin interfacePrismContextSensitive
-
clone
public ValueMetadata clone()
Description copied from interface:ItemLiteral clone.- Specified by:
clonein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
clonein interfacePrismContainer<Containerable>- Specified by:
clonein interfaceValueMetadata- Overrides:
clonein classObject
-
shortDump
public void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpableShow the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDumpin interfaceShortDumpable- Parameters:
sb- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
getCompileTimeClass
@Nullable public @Nullable Class<Containerable> getCompileTimeClass()
Description copied from interface:PrismContainerReturns the static type of data represented by values of this container, if known and applicable. (There are containers that are purely dynamic, i.e. without any compile time class.)- Specified by:
getCompileTimeClassin interfacePrismContainer<Containerable>- Specified by:
getCompileTimeClassin interfacePrismContainerable<Containerable>
-
canRepresent
public boolean canRepresent(@NotNull @NotNull Class<?> compileTimeClass)Description copied from interface:PrismContainerReturns true if values of this container can be represented as specified compile-time class. For example, PrismContainer of AbstractRoleType has: - canRepresent(AbstractRoleType.class) = true - canRepresent(FocusType.class) = true - canRepresent(ObjectType.class) = true - canRepresent(TaskType.class) = false - canRepresent(RoleType.class) = false- Specified by:
canRepresentin interfacePrismContainer<Containerable>
-
canRepresent
public boolean canRepresent(QName type)
Description copied from interface:PrismContainerReturns true if values of this container can be presented as specified type (from compile-time or runtime schema). In particular, returns true if type of this container or any of its supertypes match given type.- Specified by:
canRepresentin interfacePrismContainer<Containerable>
-
getRealValues
@NotNull public @NotNull Collection<Containerable> getRealValues()
Description copied from interface:ItemReturns (potentially empty) collection of "real values".- Specified by:
getRealValuesin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
getRealValuesin interfacePrismContainer<Containerable>- Returns:
- List of current values. The list itself is freely modifiable - it is independent on the list of values in this container. However, values themselves are directly linked to the PCVs.
-
getRealValue
@NotNull public @NotNull Containerable getRealValue()
Description copied from interface:ItemReturns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items. It can also contain container IDs (although they are not considered to be part of the real value). It does not contain information about item element name nor other metadata like origin, definition, etc. (Although e.g. Containerable can be converted back into PrismContainerValue that can be used to retrieve this information.)- Specified by:
getRealValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
getRealValuein interfacePrismContainer<Containerable>
-
setRealValue
public void setRealValue(Containerable value) throws SchemaException
- Specified by:
setRealValuein interfacePrismContainer<Containerable>- Throws:
SchemaException
-
setValue
public void setValue(@NotNull @NotNull PrismContainerValue<Containerable> value) throws SchemaException- Specified by:
setValuein interfacePrismContainer<Containerable>- Throws:
SchemaException
-
getValue
@NotNull public @NotNull PrismContainerValue<Containerable> getValue()
Description copied from interface:ItemReturns the value, if there is only one. Throws exception if there are more values. If there is no value, this method either: - returns null (for properties) - throws an exception (for items that can hold multiple values) - creates an empty value (for containers and references). TODO think again whether getOrCreateValue would not be better- Specified by:
getValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
getValuein interfacePrismContainer<Containerable>
-
getValue
public PrismContainerValue<Containerable> getValue(Long id)
- Specified by:
getValuein interfacePrismContainer<Containerable>
-
setPropertyRealValue
public <T> void setPropertyRealValue(QName propertyName, T realValue) throws SchemaException
- Specified by:
setPropertyRealValuein interfacePrismContainer<Containerable>- Throws:
SchemaException
-
setContainerRealValue
public <C extends Containerable> void setContainerRealValue(QName containerName, C realValue) throws SchemaException
- Specified by:
setContainerRealValuein interfacePrismContainer<Containerable>- Throws:
SchemaException
-
setPropertyRealValues
public <T> void setPropertyRealValues(QName propertyName, T... realValues) throws SchemaException
- Specified by:
setPropertyRealValuesin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
getPropertyRealValue
public <T> T getPropertyRealValue(ItemPath propertyPath, Class<T> type)
- Specified by:
getPropertyRealValuein interfacePrismContainer<Containerable>
-
add
public void add(Item<?,?> item) throws SchemaException
Description copied from interface:PrismContainerConvenience method. Works only on single-valued containers.- Specified by:
addin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
createNewValue
public PrismContainerValue<Containerable> createNewValue()
- Specified by:
createNewValuein interfacePrismContainer<Containerable>
-
mergeValues
public void mergeValues(PrismContainer<Containerable> other) throws SchemaException
- Specified by:
mergeValuesin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
mergeValues
public void mergeValues(Collection<PrismContainerValue<Containerable>> otherValues) throws SchemaException
- Specified by:
mergeValuesin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
mergeValue
public void mergeValue(PrismContainerValue<Containerable> otherValue) throws SchemaException
- Specified by:
mergeValuein interfacePrismContainer<Containerable>- Throws:
SchemaException
-
trim
public void trim()
Description copied from interface:PrismContainerRemove all empty values- Specified by:
trimin interfacePrismContainer<Containerable>
-
setDefinition
public void setDefinition(PrismContainerDefinition<Containerable> definition)
Description copied from interface:PrismContainerSets applicable property container definition.- Specified by:
setDefinitionin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
setDefinitionin interfacePrismContainer<Containerable>- Parameters:
definition- the definition to set
-
applyDefinition
public void applyDefinition(PrismContainerDefinition<Containerable> definition) throws SchemaException
- Specified by:
applyDefinitionin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
applyDefinitionin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findItem(QName itemQName, Class<I> type)
- Specified by:
findItemin interfacePrismContainer<Containerable>
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
- Specified by:
findPartialin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
findPartialin interfacePrismContainer<Containerable>
-
findCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findCreateItem(QName itemQName, Class<I> type, boolean create) throws SchemaException
- Specified by:
findCreateItemin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findItem(ItemPath path, Class<I> type)
- Specified by:
findItemin interfacePrismContainer<Containerable>
-
findItem
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> findItem(ItemPath path)
- Specified by:
findItemin interfacePrismContainer<Containerable>
-
containsItem
public boolean containsItem(ItemPath itemPath, boolean acceptEmptyItem) throws SchemaException
- Specified by:
containsItemin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findCreateItem(ItemPath itemPath, Class<I> type, ID itemDefinition, boolean create) throws SchemaException
- Specified by:
findCreateItemin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findValue
public PrismContainerValue<Containerable> findValue(long id)
- Specified by:
findValuein interfacePrismContainer<Containerable>
-
findContainer
public <T extends Containerable> PrismContainer<T> findContainer(ItemPath path)
- Specified by:
findContainerin interfacePrismContainer<Containerable>
-
findProperty
public <T> PrismProperty<T> findProperty(ItemPath path)
- Specified by:
findPropertyin interfacePrismContainer<Containerable>
-
findReference
public PrismReference findReference(ItemPath path)
- Specified by:
findReferencein interfacePrismContainer<Containerable>
-
findOrCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(ItemPath containerPath, Class<I> type) throws SchemaException
- Specified by:
findOrCreateItemin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findOrCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(ItemPath containerPath, Class<I> type, ID definition) throws SchemaException
- Specified by:
findOrCreateItemin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findOrCreateContainer
public <T extends Containerable> PrismContainer<T> findOrCreateContainer(ItemPath containerPath) throws SchemaException
- Specified by:
findOrCreateContainerin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findOrCreateProperty
public <T> PrismProperty<T> findOrCreateProperty(ItemPath propertyPath) throws SchemaException
- Specified by:
findOrCreatePropertyin interfacePrismContainer<Containerable>- Throws:
SchemaException
-
findOrCreateReference
public PrismReference findOrCreateReference(ItemPath propertyPath) throws SchemaException
- Specified by:
findOrCreateReferencein interfacePrismContainer<Containerable>- Throws:
SchemaException
-
remove
public void remove(Item<?,?> item)
Description copied from interface:PrismContainerConvenience method. Works only on single-valued containers.- Specified by:
removein interfacePrismContainer<Containerable>
-
removeProperty
public void removeProperty(ItemPath path)
- Specified by:
removePropertyin interfacePrismContainer<Containerable>
-
removeContainer
public void removeContainer(ItemPath path)
- Specified by:
removeContainerin interfacePrismContainer<Containerable>
-
removeReference
public void removeReference(ItemPath path)
- Specified by:
removeReferencein interfacePrismContainer<Containerable>
-
removeItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> void removeItem(ItemPath path, Class<I> itemType)
- Specified by:
removeItemin interfacePrismContainer<Containerable>
-
createDelta
public ContainerDelta<Containerable> createDelta()
Description copied from interface:ItemCreates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g. PropertyDelta, ContainerDelta, ...)- Specified by:
createDeltain interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
createDeltain interfacePrismContainer<Containerable>
-
createDelta
public ContainerDelta<Containerable> createDelta(ItemPath path)
- Specified by:
createDeltain interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
createDeltain interfacePrismContainer<Containerable>
-
diff
public ContainerDelta<Containerable> diff(PrismContainer<Containerable> other)
- Specified by:
diffin interfacePrismContainer<Containerable>
-
diff
public ContainerDelta<Containerable> diff(PrismContainer<Containerable> other, ParameterizedEquivalenceStrategy strategy)
- Specified by:
diffin interfacePrismContainer<Containerable>
-
diffModifications
public List<? extends ItemDelta> diffModifications(PrismContainer<Containerable> other, ParameterizedEquivalenceStrategy strategy)
- Specified by:
diffModificationsin interfacePrismContainer<Containerable>
-
createImmutableClone
public PrismContainer<Containerable> createImmutableClone()
- Specified by:
createImmutableClonein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
createImmutableClonein interfacePrismContainer<Containerable>
-
cloneComplex
public PrismContainer<Containerable> cloneComplex(CloneStrategy strategy)
Description copied from interface:ItemComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
cloneComplexin interfacePrismContainer<Containerable>- See Also:
CloneStrategy
-
deepCloneDefinition
public PrismContainerDefinition<Containerable> deepCloneDefinition(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
- Specified by:
deepCloneDefinitionin interfacePrismContainer<Containerable>
-
accept
public void accept(Visitor visitor, ItemPath path, boolean recursive)
- Specified by:
acceptin interfacePathVisitable- Specified by:
acceptin interfacePrismContainer<Containerable>
-
equivalent
public boolean equivalent(Object obj)
Description copied from interface:PrismContainerThis method ignores some part of the object during comparison (e.g. source demarcation in values) These methods compare the "meaningful" parts of the objects.- Specified by:
equivalentin interfacePrismContainer<Containerable>
-
newInstance
public static <V extends Containerable> PrismContainer<V> newInstance(PrismContext prismContext, QName type) throws SchemaException
- Throws:
SchemaException
-
createParentIfNeeded
public static <V extends PrismContainerValue> void createParentIfNeeded(V value, ItemDefinition definition) throws SchemaException
- Throws:
SchemaException
-
trimDefinitionTree
public void trimDefinitionTree(Collection<? extends ItemPath> alwaysKeep)
Description copied from interface:PrismContainerOptimizes (trims) definition tree by removing any definitions not corresponding to items in this container. Works recursively by sub-containers of this one. USE WITH CARE. Make sure the definitions are not shared by other objects!- Specified by:
trimDefinitionTreein interfacePrismContainer<Containerable>
-
getDefinition
public PrismContainerDefinition<Containerable> getDefinition()
Description copied from interface:ItemReturns applicable definition.May return null if no definition is applicable or the definition is not known.
- Specified by:
getDefinitionin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
getDefinitionin interfaceItemable- Specified by:
getDefinitionin interfacePrismContainer<Containerable>- Specified by:
getDefinitionin interfacePrismContainerable<Containerable>- Returns:
- applicable definition
-
hasCompleteDefinition
public boolean hasCompleteDefinition()
Description copied from interface:ItemReturns true if this item and all contained items have definitions.- Specified by:
hasCompleteDefinitionin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getElementName
public ItemName getElementName()
Description copied from interface:ItemReturns the name of the item.The name is a QName. It uniquely defines an item.
The name may be null, but such an item will not work.
The name is the QName of XML element in the XML representation.
- Specified by:
getElementNamein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
getElementNamein interfaceItemable- Returns:
- item name TODO consider making element name obligatory
-
setElementName
public void setElementName(QName elementName)
Description copied from interface:ItemSets the name of the item.The name is a QName. It uniquely defines an item.
The name may be null, but such an item will not work.
The name is the QName of XML element in the XML representation.
- Specified by:
setElementNamein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Parameters:
elementName- the name to set TODO consider removing this method
-
getDisplayName
public String getDisplayName()
Description copied from interface:ItemReturns a display name for the item.Returns null if the display name cannot be determined.
The display name is fetched from the definition. If no definition (schema) is available, the display name will not be returned.
- Specified by:
getDisplayNamein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- display name for the item
-
getHelp
public String getHelp()
Description copied from interface:ItemReturns help message defined for the item.Returns null if the help message cannot be determined.
The help message is fetched from the definition. If no definition (schema) is available, the help message will not be returned.
- Specified by:
getHelpin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- help message for the item
-
isIncomplete
public boolean isIncomplete()
Description copied from interface:ItemFlag that indicates incomplete item. If set to true then the values in this item are not complete. If this flag is true then it can be assumed that the object that this item represents has at least one value. This is a method how to indicate that the item really has some values, but are not here. This may be used for variety of purposes. It may indicate that the account has a password, but the password value is not revealed. This may indicate that a user has a photo, but the photo was not requested and therefore is not returned. This may be used to indicate that only part of the attribute values were returned from the search. And so on.- Specified by:
isIncompletein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
setIncomplete
public void setIncomplete(boolean incomplete)
Description copied from interface:ItemFlags the item as incomplete.- Specified by:
setIncompletein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Parameters:
incomplete- The new value- See Also:
FIXME: Should be package-visible to implementation
-
getParent
@Nullable public @Nullable PrismContainerValue<?> getParent()
Description copied from interface:ItemReturns the parent of this item (if exists). Currently this has to be a PrismContainerValue.- Specified by:
getParentin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- The parent if exists
-
setParent
public void setParent(@Nullable @Nullable PrismContainerValue<?> parentValue)Description copied from interface:ItemSets the parent of this item.- Specified by:
setParentin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Parameters:
parentValue- The new parent
-
getPath
@NotNull public @NotNull ItemPath getPath()
Description copied from interface:ItemReturns the path of this item (sequence of names from the "root" container or similar object to this item). Note that if the containing object is a delta (usually a container delta), then the path- Specified by:
getPathin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
getPathin interfaceItemable- Returns:
- the path
-
getUserData
@NotNull public @NotNull Map<String,Object> getUserData()
Description copied from interface:ItemReturns the "user data", a map that allows attaching arbitrary named data to this item.- Specified by:
getUserDatain interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- the user data map
-
getUserData
public <T> T getUserData(String key)
Description copied from interface:ItemReturns the user data for the given key (name).- Specified by:
getUserDatain interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
setUserData
public void setUserData(String key, Object value)
Description copied from interface:ItemSets the user data for the given key (name).- Specified by:
setUserDatain interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getValues
@NotNull public @NotNull List<PrismContainerValue<Containerable>> getValues()
Description copied from interface:ItemReturns the values for this item. Although the ordering of this values is not important, and each value should be present at most once, we currently return them as a list instead of a set. TODO reconsider this- Specified by:
getValuesin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getAnyValue
public PrismContainerValue<Containerable> getAnyValue()
Description copied from interface:ItemReturns any of the values. Usually called when we are quite confident that there is only a single value; or we don't care which of the values we get. Does not create values if there are none.- Specified by:
getAnyValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getAnyValue
public PrismContainerValue<Containerable> getAnyValue(@NotNull @NotNull ValueSelector<PrismContainerValue<Containerable>> selector)
Description copied from interface:ItemReturns a value matching given selector (or null if none exists).- Specified by:
getAnyValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getRealValue
public <X> X getRealValue(Class<X> type)
Description copied from interface:ItemType override, also for compatibility.- Specified by:
getRealValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getRealValuesArray
public <X> X[] getRealValuesArray(Class<X> type)
Description copied from interface:ItemType override, also for compatibility.- Specified by:
getRealValuesArrayin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getRealValuesOrRawTypes
@Experimental @NotNull public @NotNull Collection<Object> getRealValuesOrRawTypes(PrismContext prismContext)
- Specified by:
getRealValuesOrRawTypesin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
isSingleValue
public boolean isSingleValue()
Description copied from interface:ItemReturns true if the item contains 0 or 1 values and (by definition) is not multivalued.- Specified by:
isSingleValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
add
public boolean add(@NotNull @NotNull PrismContainerValue<Containerable> newValue) throws SchemaExceptionDescription copied from interface:ItemAdds a given value, overwriting existing one. It compares values using DEFAULT_FOR_EQUALS (DATA) strategy, so it e.g. takes value metadata differences into account. It is because this method is used during parsing, internal computations (typically using generated beans), and similar situations where we expect little sophistication when it comes to value comparison. The less surprises the better.- Specified by:
addin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
add
public boolean add(@NotNull @NotNull PrismContainerValue<Containerable> newValue, @NotNull @NotNull EquivalenceStrategy strategy) throws SchemaExceptionDescription copied from interface:ItemAdds a value, overwriting existing one(s). Uses specified equivalence strategy.- Specified by:
addin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- true if this item changed as a result of the call. This is either during real value addition or during overwriting existing value with a different one. The "difference" is taken using the DEFAULT_FOR_EQUALS (DATA) equivalence strategy.
- Throws:
SchemaException
-
addIgnoringEquivalents
public void addIgnoringEquivalents(@NotNull @NotNull PrismContainerValue<Containerable> newValue) throws SchemaExceptionDescription copied from interface:ItemAdds a value, not looking for equivalent values. (This means that the new value is always added, if possible.) Note that we check the cardinality of the item according to its definition, i.e. we do not allow single-valued item to contain more than one value.- Specified by:
addIgnoringEquivalentsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
addAll
public boolean addAll(Collection<PrismContainerValue<Containerable>> newValues) throws SchemaException
Description copied from interface:ItemAdds given values, with the same semantics as repeated add(..) calls.- Specified by:
addAllin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really added)
- Throws:
SchemaException
-
addAll
public boolean addAll(Collection<PrismContainerValue<Containerable>> newValues, @NotNull @NotNull EquivalenceStrategy strategy) throws SchemaException
Description copied from interface:ItemAdds given values, with the same semantics as repeated add(..) calls. For equality testing uses given strategy.- Specified by:
addAllin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really added)
- Throws:
SchemaException
-
addRespectingMetadataAndCloning
public void addRespectingMetadataAndCloning(PrismContainerValue<Containerable> value, @NotNull @NotNull EquivalenceStrategy strategy, EquivalenceStrategy metadataEquivalenceStrategy) throws SchemaException
Description copied from interface:ItemAdds a value, respecting the metadata. I.e. if equivalent value exists, the metadata are merged. (Replacing metadata of colliding provenance, adding all the others.) If a value is to be added as a whole, it is cloned.- Specified by:
addRespectingMetadataAndCloningin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
removeRespectingMetadata
public void removeRespectingMetadata(PrismContainerValue<Containerable> value, @NotNull @NotNull EquivalenceStrategy strategy, EquivalenceStrategy metadataEquivalenceStrategy)
Description copied from interface:ItemRemoves values equivalent to given value from the item; under specified equivalence strategy OR when values represent the same value via "representsSameValue(.., lax=false)" method. Respects metadata, i.e. if value to be removed has metadata specified, this method removes only particular metadata. Only if this means that all metadata are gone, then the value is deleted.- Specified by:
removeRespectingMetadatain interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
remove
public boolean remove(PrismContainerValue<Containerable> value)
Description copied from interface:ItemRemoves values equivalent to given value from the item. Note we use REAL_VALUE_CONSIDER_DIFFERENT_IDS strategy that ignores value metadata and operational data. This may or may not be good! TODO reconsider- Specified by:
removein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
remove
public boolean remove(PrismContainerValue<Containerable> value, @NotNull @NotNull EquivalenceStrategy strategy)
Description copied from interface:ItemRemoves values equivalent to given value from the item; under specified equivalence strategy OR when values represent the same value via "representsSameValue(.., lax=false)" method.- Specified by:
removein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really removed)
-
removeAll
public boolean removeAll(Collection<PrismContainerValue<Containerable>> values, @NotNull @NotNull EquivalenceStrategy strategy)
Description copied from interface:ItemRemoves all given values from the item. It is basically a shortcut for repeatedItem.remove(PrismValue, EquivalenceStrategy)call.- Specified by:
removeAllin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really removed)
-
clear
public void clear()
Description copied from interface:ItemRemoves all values from the item.- Specified by:
clearin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
replaceAll
public void replaceAll(Collection<PrismContainerValue<Containerable>> newValues, @NotNull @NotNull EquivalenceStrategy strategy) throws SchemaException
Description copied from interface:ItemReplaces all values of the item by given values.- Specified by:
replaceAllin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
replace
public void replace(PrismContainerValue<Containerable> newValue) throws SchemaException
Description copied from interface:ItemReplaces all values of the item by given value.- Specified by:
replacein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
equals
public boolean equals(Object obj)
Description copied from interface:ItemCompares this item to the specified object under DEFAULT_FOR_EQUALS (DATA) strategy.- Specified by:
equalsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Overrides:
equalsin classObject
-
equals
public boolean equals(Object obj, @NotNull @NotNull EquivalenceStrategy equivalenceStrategy)
Description copied from interface:ItemCompares this item to the specified object under given strategy.- Specified by:
equalsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
equals
public boolean equals(Object obj, @NotNull @NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)
Description copied from interface:ItemCompares this item to the specified object under given strategy.- Specified by:
equalsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
hashCode
public int hashCode()
Description copied from interface:ItemComputes hash code to be used under DEFAULT_FOR_EQUALS (currently DATA) equivalence strategy.- Specified by:
hashCodein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Overrides:
hashCodein classObject
-
hashCode
public int hashCode(@NotNull @NotNull EquivalenceStrategy equivalenceStrategy)Description copied from interface:ItemComputes hash code to be used under given equivalence strategy.- Specified by:
hashCodein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
hashCode
public int hashCode(@NotNull @NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)Description copied from interface:ItemComputes hash code to be used under given equivalence strategy.- Specified by:
hashCodein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
contains
public boolean contains(@NotNull @NotNull PrismContainerValue<Containerable> value)- Specified by:
containsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- true if the item contains a given value (by default using DEFAULT_FOR_EQUALS i.e. DATA strategy) Note that the "sameness" (ID-only value matching) is NOT considered here.
-
contains
public boolean contains(@NotNull @NotNull PrismContainerValue<Containerable> value, @NotNull @NotNull EquivalenceStrategy strategy)- Specified by:
containsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- true if the item contains a given value under specified equivalence strategy Note that the "sameness" (ID-only value matching) is NOT considered here.
-
findValue
public PrismContainerValue<Containerable> findValue(@NotNull @NotNull PrismContainerValue<Containerable> value, @NotNull @NotNull EquivalenceStrategy strategy)
- Specified by:
findValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- a value of this item that is equivalent to the given one under given equivalence strategy (or null if no such value exists)
-
findValue
public PrismContainerValue<Containerable> findValue(PrismContainerValue<Containerable> value, @NotNull @NotNull Comparator<PrismContainerValue<Containerable>> comparator)
- Specified by:
findValuein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Returns:
- a value of this item that is equivalent to the given one under given comparator (or null if no such value exists)
-
diff
public ItemDelta<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> diff(Item<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> other)
Description copied from interface:ItemComputes a difference (delta) with the specified item using DEFAULT_FOR_DELTA_APPLICATION (REAL_VALUE_CONSIDER_DIFFERENT_IDS) equivalence strategy. Compares item values only -- does NOT dive into lower levels.- Specified by:
diffin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
diff
public ItemDelta<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> diff(Item<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy)
Description copied from interface:ItemComputes a difference (delta) with the specified item using given equivalence strategy. Note this method cannot accept general EquivalenceStrategy here; it needs the parameterized strategy. Compares item values only -- does NOT dive into lower levels.- Specified by:
diffin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getClonedValues
public Collection<PrismContainerValue<Containerable>> getClonedValues()
- Specified by:
getClonedValuesin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
normalize
public void normalize()
- Specified by:
normalizein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
merge
public void merge(Item<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>> otherItem) throws SchemaException
Description copied from interface:ItemMerge all the values of other item to this item.- Specified by:
mergein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
find
public Object find(ItemPath path)
Description copied from interface:ItemReturns object (Item or PrismValue) pointed to by the given path.- Specified by:
findin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
acceptParentVisitor
public void acceptParentVisitor(@NotNull @NotNull Visitor visitor)Description copied from interface:ItemAccepts a visitor that visits each item/value on the way to the structure root.- Specified by:
acceptParentVisitorin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Specified by:
acceptParentVisitorin interfaceParentVisitable
-
recomputeAllValues
public void recomputeAllValues()
Description copied from interface:ItemRe-apply PolyString (and possible other) normalizations to the object.- Specified by:
recomputeAllValuesin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
applyDefinition
public void applyDefinition(PrismContainerDefinition<Containerable> definition, boolean force) throws SchemaException
- Specified by:
applyDefinitionin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
cloneCollection
public static <T extends Item<?,?>> Collection<T> cloneCollection(Collection<T> items)
-
resetParentCollection
public static <T extends Item> Collection<T> resetParentCollection(Collection<T> items)
Description copied from interface:ItemSets all parents to null. This is good if the items are to be "transplanted" into a different Containerable.
-
checkConsistence
public void checkConsistence(boolean requireDefinitions, ConsistencyCheckScope scope)- Specified by:
checkConsistencein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
checkConsistence
public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw)- Specified by:
checkConsistencein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
checkConsistence
public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)- Specified by:
checkConsistencein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
checkConsistence
public void checkConsistence()
- Specified by:
checkConsistencein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
checkConsistence
public void checkConsistence(ConsistencyCheckScope scope)
- Specified by:
checkConsistencein interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
checkConsistenceInternal
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
- Specified by:
checkConsistenceInternalin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
assertDefinitions
public void assertDefinitions() throws SchemaException- Specified by:
assertDefinitionsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
assertDefinitions
public void assertDefinitions(String sourceDescription) throws SchemaException
- Specified by:
assertDefinitionsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
assertDefinitions
public void assertDefinitions(boolean tolerateRawValues, String sourceDescription) throws SchemaException- Specified by:
assertDefinitionsin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>- Throws:
SchemaException
-
isRaw
public boolean isRaw()
Description copied from interface:ItemReturns true is all the values are raw.- Specified by:
isRawin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
hasRaw
public boolean hasRaw()
Description copied from interface:ItemReturns true is at least one of the values is raw.- Specified by:
hasRawin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
isEmpty
public boolean isEmpty()
Description copied from interface:ItemNormally the same asItem.hasNoValues(). But a container is considered empty also if all its values (PCVs) are empty. This is a bit strange and should be revisited.- Specified by:
isEmptyin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
hasNoValues
public boolean hasNoValues()
- Specified by:
hasNoValuesin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
hasNoValues
public static boolean hasNoValues(Item<?,?> item)
-
isOperational
public boolean isOperational()
Description copied from interface:ItemReturns true if this item is metadata item that should be ignored for metadata-insensitive comparisons and hashCode functions.- Specified by:
isOperationalin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getValues
@NotNull public static <V extends PrismValue> @NotNull Collection<V> getValues(Item<V,?> item)
-
getAllValues
@NotNull public @NotNull Collection<PrismValue> getAllValues(ItemPath path)
- Specified by:
getAllValuesin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getAllValues
@NotNull public static @NotNull Collection<PrismValue> getAllValues(Item<?,?> item, ItemPath path)
-
getPrismContextLocal
public PrismContext getPrismContextLocal()
- Specified by:
getPrismContextLocalin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
setPrismContext
public void setPrismContext(PrismContext prismContext)
- Specified by:
setPrismContextin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
getHighestId
public Long getHighestId()
- Specified by:
getHighestIdin interfaceItem<PrismContainerValue<Containerable>,PrismContainerDefinition<Containerable>>
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDumpin interfaceDebugDumpable
-
revive
public void revive(PrismContext prismContext) throws SchemaException
- Specified by:
revivein interfaceRevivable- Throws:
SchemaException
-
isImmutable
public boolean isImmutable()
- Specified by:
isImmutablein interfaceFreezable
-
checkMutable
public void checkMutable()
- Specified by:
checkMutablein interfaceFreezable
-
checkImmutable
public void checkImmutable()
- Specified by:
checkImmutablein interfaceFreezable
-
getComplexTypeDefinition
public ComplexTypeDefinition getComplexTypeDefinition()
- Specified by:
getComplexTypeDefinitionin interfacePrismContainerable<Containerable>
-
-