Interface PrismContainerDelegator<C extends Containerable>
- All Superinterfaces:
Cloneable
,ComplexCopyable<Item<PrismContainerValue<C>,
,PrismContainerDefinition<C>>> DebugDumpable
,Freezable
,Item<PrismContainerValue<C>,
,PrismContainerDefinition<C>> Itemable
,ItemDelegator<PrismContainerValue<C>,
,PrismContainerDefinition<C>> ParentVisitable
,PathVisitable
,PrismContainer<C>
,PrismContainerable<C>
,PrismVisitable
,Revivable
,Serializable
,Visitable
- All Known Subinterfaces:
PrismObjectDelegator<O>
public interface PrismContainerDelegator<C extends Containerable>
extends PrismContainer<C>, ItemDelegator<PrismContainerValue<C>,PrismContainerDefinition<C>>
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
Fields inherited from interface com.evolveum.midpoint.prism.Item
KEY_NAMESPACE_CONTEXT
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
default void
Convenience method.default boolean
canRepresent
(@NotNull Class<?> compileTimeClass) Returns true if values of this container can be represented as specified compile-time class.default boolean
canRepresent
(QName type) Returns true if values of this container can be presented as specified type (from compile-time or runtime schema).default PrismContainer<C>
clone()
Literal clone.default @NotNull PrismContainer<C>
cloneComplex
(@NotNull CloneStrategy strategy) Complex clone with different cloning strategies.default boolean
containsItem
(ItemPath itemPath, boolean acceptEmptyItem) default ContainerDelta<C>
Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.default ContainerDelta<C>
createDelta
(ItemPath path) default PrismContainer<C>
default PrismContainerValue<C>
default PrismContainerDefinition<C>
deepCloneDefinition
(@NotNull DeepCloneOperation operation) delegate()
default ContainerDelta<C>
diff
(PrismContainer<C> other) default ContainerDelta<C>
diff
(PrismContainer<C> other, ParameterizedEquivalenceStrategy strategy) diffModifications
(PrismContainer<C> other, ParameterizedEquivalenceStrategy strategy) default boolean
equivalent
(Object obj) This method ignores some part of the object during comparison (e.g. source demarcation in values) These methods compare the "meaningful" parts of the objects.default <T extends Containerable>
PrismContainer<T>findContainer
(ItemPath path) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindCreateItem
(ItemPath itemPath, Class<I> type, ID itemDefinition, boolean create) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindCreateItem
(QName itemQName, Class<I> type, boolean create) Deprecated.default <IV extends PrismValue,
ID extends ItemDefinition<?>>
Item<IV,ID> default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
Idefault <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IDeprecated.default <T extends Containerable>
PrismContainer<T>findOrCreateContainer
(ItemPath containerPath) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindOrCreateItem
(ItemPath containerPath, Class<I> type) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
IfindOrCreateItem
(ItemPath containerPath, Class<I> type, ID definition) default <T> PrismProperty<T>
findOrCreateProperty
(ItemPath propertyPath) default PrismReference
findOrCreateReference
(ItemPath propertyPath) default <IV extends PrismValue,
ID extends ItemDefinition<?>>
PartiallyResolvedItem<IV,ID> findPartial
(ItemPath path) default <T> PrismProperty<T>
findProperty
(ItemPath path) default PrismReference
findReference
(ItemPath path) default PrismContainerValue<C>
findValue
(long id) Returns the static type of data represented by values of this container, if known and applicable.default ComplexTypeDefinition
default PrismContainerDefinition<C>
Returns applicable definition.default <T> T
getPropertyRealValue
(ItemPath propertyPath, Class<T> type) default C
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.default @NotNull Collection<C>
Returns (potentially empty) collection of "real values".default @NotNull PrismContainerValue<C>
getValue()
Returns the value, if there is only one.default PrismContainerValue<C>
default @NotNull List<PrismContainerValue<C>>
Returns the values for this item.default void
mergeValue
(PrismContainerValue<C> otherValue) default void
mergeValues
(PrismContainer<C> other) default void
mergeValues
(Collection<PrismContainerValue<C>> otherValues) default void
Convenience method.default void
removeContainer
(ItemPath path) default <IV extends PrismValue,
ID extends ItemDefinition<?>, I extends Item<IV, ID>>
voidremoveItem
(ItemPath path, Class<I> itemType) default void
removeProperty
(ItemPath path) default void
removeReference
(ItemPath path) default <C1 extends Containerable>
voidsetContainerRealValue
(QName containerName, C1 realValue) default <T> void
setPropertyRealValue
(QName propertyName, T realValue) default <T> void
setPropertyRealValues
(QName propertyName, T... realValues) default void
setRealValue
(C value) default void
setValue
(@NotNull PrismContainerValue<C> value) default void
trim()
Remove all empty valuesdefault void
trimDefinitionTree
(Collection<? extends ItemPath> alwaysKeep) Optimizes (trims) definition tree by removing any definitions not corresponding to items in this container.Methods inherited from interface com.evolveum.midpoint.prism.deleg.ItemDelegator
accept, acceptParentVisitor, acceptVisitor, add, add, addAll, addAll, addIgnoringEquivalents, addRespectingMetadataAndCloning, applyDefinition, applyDefinition, applyDefinitionIfMissing, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, checkImmutable, checkMutable, clear, contains, contains, debugDump, debugDump, debugDumpLazily, debugDumpLazily, diff, diff, equals, equals, filterValues, filterYields, find, findValue, findValue, freeze, getAllItems, getAllValues, getAnyValue, getAnyValue, getClonedValues, getDisplayName, getElementName, getHelp, getHighestId, getNamespaceContext, getParent, getPath, getRealValue, getRealValues, getRealValuesArray, getRealValuesOrRawTypes, getUserData, getUserData, hasAnyValue, hasCompleteDefinition, hashCode, hashCode, hasNoValues, hasRaw, isEmpty, isImmutable, isIncomplete, isOperational, isRaw, isSingleValue, isSingleValueByDefinition, merge, normalize, recomputeAllValues, remove, remove, removeAll, removeIf, removeRespectingMetadata, replace, replaceAll, revive, setDefinition, setElementName, setIncomplete, setParent, setUserData, size, valuesStream
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainer
copy, immutableCopy, mutableCopy
-
Method Details
-
delegate
PrismContainer<C> delegate()- Specified by:
delegate
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-
getDefinition
Description copied from interface:Item
Returns applicable definition.May return null if no definition is applicable or the definition is not known.
- Specified by:
getDefinition
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getDefinition
in interfaceItemable
- Specified by:
getDefinition
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getDefinition
in interfacePrismContainer<C extends Containerable>
- Specified by:
getDefinition
in interfacePrismContainerable<C extends Containerable>
- Returns:
- applicable definition
-
getCompileTimeClass
Description copied from interface:PrismContainer
Returns 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:
getCompileTimeClass
in interfacePrismContainer<C extends Containerable>
- Specified by:
getCompileTimeClass
in interfacePrismContainerable<C extends Containerable>
-
canRepresent
Description copied from interface:PrismContainer
Returns 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:
canRepresent
in interfacePrismContainer<C extends Containerable>
-
canRepresent
Description copied from interface:PrismContainer
Returns 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:
canRepresent
in interfacePrismContainer<C extends Containerable>
-
getRealValues
Description copied from interface:Item
Returns (potentially empty) collection of "real values". The list itself is detached, freely modifiable. (Note that the values can still embed a parent, e.g., for containers and references.)- Specified by:
getRealValues
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getRealValues
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getRealValues
in interfacePrismContainer<C extends 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.
- See Also:
-
getRealValue
Description copied from interface:Item
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. 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:
getRealValue
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getRealValue
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getRealValue
in interfacePrismContainer<C extends Containerable>
-
setRealValue
- Specified by:
setRealValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
setValue
- Specified by:
setValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getValue
Description copied from interface:Item
Returns 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:
getValue
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getValue
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getValue
in interfacePrismContainer<C extends Containerable>
-
getValue
- Specified by:
getValue
in interfacePrismContainer<C extends Containerable>
-
getValues
Description copied from interface:Item
Returns 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 FIXME we should return immutable list, to avoid manipulating the values directly FIXME and maybe we should return List<? extends V> to avoid specializing the values, see ShadowAssociationValue in midPoint- Specified by:
getValues
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getValues
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
getValues
in interfacePrismContainer<C extends Containerable>
-
setPropertyRealValue
- Specified by:
setPropertyRealValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
setContainerRealValue
default <C1 extends Containerable> void setContainerRealValue(QName containerName, C1 realValue) throws SchemaException - Specified by:
setContainerRealValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
setPropertyRealValues
- Specified by:
setPropertyRealValues
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getPropertyRealValue
- Specified by:
getPropertyRealValue
in interfacePrismContainer<C extends Containerable>
-
add
Description copied from interface:PrismContainer
Convenience method. Works only on single-valued containers.- Specified by:
add
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
createNewValue
- Specified by:
createNewValue
in interfacePrismContainer<C extends Containerable>
-
mergeValues
- Specified by:
mergeValues
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
mergeValues
- Specified by:
mergeValues
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
mergeValue
- Specified by:
mergeValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
trim
default void trim()Description copied from interface:PrismContainer
Remove all empty values- Specified by:
trim
in interfacePrismContainer<C extends Containerable>
-
findItem
@Deprecated default <IV extends PrismValue,ID extends ItemDefinition<?>, I findItemI extends Item<IV, ID>> (QName itemQName, Class<I> type) Deprecated.- Specified by:
findItem
in interfacePrismContainer<C extends Containerable>
-
findPartial
default <IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) - Specified by:
findPartial
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
findPartial
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
findPartial
in interfacePrismContainer<C extends Containerable>
-
findCreateItem
@Deprecated default <IV extends PrismValue,ID extends ItemDefinition<?>, I findCreateItemI extends Item<IV, ID>> (QName itemQName, Class<I> type, boolean create) throws SchemaException Deprecated.- Specified by:
findCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findItemI extends Item<IV, ID>> (ItemPath path, Class<I> type) - Specified by:
findItem
in interfacePrismContainer<C extends Containerable>
-
findItem
- Specified by:
findItem
in interfacePrismContainer<C extends Containerable>
-
containsItem
- Specified by:
containsItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findCreateItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findCreateItemI extends Item<IV, ID>> (ItemPath itemPath, Class<I> type, ID itemDefinition, boolean create) throws SchemaException - Specified by:
findCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findValue
- Specified by:
findValue
in interfacePrismContainer<C extends Containerable>
-
findContainer
- Specified by:
findContainer
in interfacePrismContainer<C extends Containerable>
-
findProperty
- Specified by:
findProperty
in interfacePrismContainer<C extends Containerable>
-
findReference
- Specified by:
findReference
in interfacePrismContainer<C extends Containerable>
-
findOrCreateItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findOrCreateItemI extends Item<IV, ID>> (ItemPath containerPath, Class<I> type) throws SchemaException - Specified by:
findOrCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, I findOrCreateItemI extends Item<IV, ID>> (ItemPath containerPath, Class<I> type, ID definition) throws SchemaException - Specified by:
findOrCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateContainer
default <T extends Containerable> PrismContainer<T> findOrCreateContainer(ItemPath containerPath) throws SchemaException - Specified by:
findOrCreateContainer
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateProperty
- Specified by:
findOrCreateProperty
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateReference
- Specified by:
findOrCreateReference
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
remove
Description copied from interface:PrismContainer
Convenience method. Works only on single-valued containers.- Specified by:
remove
in interfacePrismContainer<C extends Containerable>
-
removeProperty
- Specified by:
removeProperty
in interfacePrismContainer<C extends Containerable>
-
removeContainer
- Specified by:
removeContainer
in interfacePrismContainer<C extends Containerable>
-
removeReference
- Specified by:
removeReference
in interfacePrismContainer<C extends Containerable>
-
removeItem
default <IV extends PrismValue,ID extends ItemDefinition<?>, void removeItemI extends Item<IV, ID>> (ItemPath path, Class<I> itemType) - Specified by:
removeItem
in interfacePrismContainer<C extends Containerable>
-
createDelta
Description copied from interface:Item
Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g. PropertyDelta, ContainerDelta, ...)- Specified by:
createDelta
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
createDelta
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
createDelta
in interfacePrismContainer<C extends Containerable>
-
createDelta
- Specified by:
createDelta
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
createDelta
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
createDelta
in interfacePrismContainer<C extends Containerable>
-
diff
- Specified by:
diff
in interfacePrismContainer<C extends Containerable>
-
diff
- Specified by:
diff
in interfacePrismContainer<C extends Containerable>
-
diffModifications
default List<? extends ItemDelta> diffModifications(PrismContainer<C> other, ParameterizedEquivalenceStrategy strategy) - Specified by:
diffModifications
in interfacePrismContainer<C extends Containerable>
-
clone
Description copied from interface:Item
Literal clone.- Specified by:
clone
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
clone
in interfacePrismContainer<C extends Containerable>
-
createImmutableClone
- Specified by:
createImmutableClone
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
createImmutableClone
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
createImmutableClone
in interfacePrismContainer<C extends Containerable>
-
cloneComplex
Description copied from interface:Item
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfaceComplexCopyable<C extends Containerable>
- Specified by:
cloneComplex
in interfaceItem<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
cloneComplex
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
cloneComplex
in interfacePrismContainer<C extends Containerable>
- See Also:
-
deepCloneDefinition
default PrismContainerDefinition<C> deepCloneDefinition(@NotNull @NotNull DeepCloneOperation operation) - Specified by:
deepCloneDefinition
in interfacePrismContainer<C extends Containerable>
-
accept
- Specified by:
accept
in interfaceItemDelegator<PrismContainerValue<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Specified by:
accept
in interfacePathVisitable
- Specified by:
accept
in interfacePrismContainer<C extends Containerable>
-
equivalent
Description copied from interface:PrismContainer
This 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:
equivalent
in interfacePrismContainer<C extends Containerable>
-
trimDefinitionTree
Description copied from interface:PrismContainer
Optimizes (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:
trimDefinitionTree
in interfacePrismContainer<C extends Containerable>
-
getComplexTypeDefinition
- Specified by:
getComplexTypeDefinition
in interfacePrismContainerable<C extends Containerable>
-