Class PrismContainerWrapperImpl<C extends Containerable>
java.lang.Object
com.evolveum.midpoint.gui.impl.prism.wrapper.ItemWrapperImpl<PrismContainer<C>,PrismContainerValueWrapper<C>>
com.evolveum.midpoint.gui.impl.prism.wrapper.PrismContainerWrapperImpl<C>
- All Implemented Interfaces:
ItemWrapper<PrismContainer<C>,
,PrismContainerValueWrapper<C>> PrismContainerWrapper<C>
,Definition
,Freezable
,ItemDefinition<PrismContainer<C>>
,LivePrismItemDefinition
,LocalItemDefinitionStore
,PrismContainerDefinition<C>
,PrismItemAccessDefinition
,PrismItemBasicDefinition
,PrismItemStorageDefinition
,PrismLifecycleDefinition
,PrismPresentationDefinition
,Revivable
,SchemaLookup.Aware
,SmartVisitable<Definition>
,Visitable<Definition>
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
AssociationAttributeMappingWrapper
,AssociationMappingExpressionWrapper
,AuthenticationBehaviorWrapper
,CaseWorkItemTypeWrapper
,ObjectTypeAttributeMappingWrapper
,PrismObjectWrapperImpl
,PrismSchemaWrapper
,ProfilingClassLoggerContainerWrapperImpl
,ShadowAssociationValueWrapper
,ShadowAssociationWrapperImpl
public class PrismContainerWrapperImpl<C extends Containerable>
extends ItemWrapperImpl<PrismContainer<C>,PrismContainerValueWrapper<C>>
implements PrismContainerWrapper<C>, Serializable
- Author:
- katka
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.Definition
Definition.DefinitionBuilder, Definition.DefinitionMutator
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.ItemDefinition
ItemDefinition.ItemDefinitionLikeBuilder, ItemDefinition.ItemDefinitionMutator
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismContainerDefinition
PrismContainerDefinition.PrismContainerDefinitionMutator<C extends Containerable>
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
PrismItemAccessDefinition.Data, PrismItemAccessDefinition.Delegable, PrismItemAccessDefinition.Info, PrismItemAccessDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition
PrismItemBasicDefinition.Data, PrismItemBasicDefinition.Delegable, PrismItemBasicDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemStorageDefinition
PrismItemStorageDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition
PrismLifecycleDefinition.Data, PrismLifecycleDefinition.Delegable, PrismLifecycleDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
PrismPresentationDefinition.Data, PrismPresentationDefinition.Delegable, PrismPresentationDefinition.Mutable
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ConstructorDescriptionPrismContainerWrapperImpl
(PrismContainerValueWrapper<?> parent, PrismContainer<C> item, ItemStatus status) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(Visitor<Definition> visitor) boolean
accept
(Visitor<Definition> visitor, SmartVisitation<Definition> visitation) boolean
canRepresent
(@NotNull QName type) TODO@NotNull PrismContainerDefinition<C>
clone()
cloneVirtualContainerWithNewValue
(PrismContainerValueWrapper<? extends Containerable> parent, ModelServiceLocator modelServiceLocator) cloneWithNewDefinition
(QName newItemName, ItemDefinition newDefinition) TODO@NotNull ItemDefinition<PrismContainer<C>>
cloneWithNewName
(@NotNull ItemName itemName) Returns a clone of this definition, but with name changed to the provided one.@NotNull PrismContainerDefinition<?>
cloneWithNewType
(@NotNull QName newTypeName, @NotNull ComplexTypeDefinition newCtd) Changes the type name and definition for this PCD.protected <D extends ItemDelta<? extends PrismValue,
? extends ItemDefinition>>
Collection<D>@NotNull ContainerDelta<C>
createEmptyDelta
(ItemPath path) Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.protected PrismContainerValue<C>
createNewEmptyValue
(ModelServiceLocator locator) TODO<T extends Containerable>
PrismContainerWrapper<T>findContainer
(ItemPath path) <T extends Containerable>
PrismContainerWrapper<T>findContainer
(String identifier) findContainerValue
(ItemPath path) <IW extends ItemWrapper>
IW<ID extends ItemDefinition<?>>
IDfindLocalItemDefinition
(@NotNull QName name, @NotNull Class<ID> clazz, boolean caseInsensitive) Returns the local item definition corresponding to given item name (optionally case-insensitive) and definition class.<X> PrismPropertyWrapper<X>
findProperty
(ItemPath propertyPath) findReference
(ItemPath path) void
freeze()
Static (compile-time) class holding the container values.Definition of the container values.@NotNull List<? extends ItemDefinition<?>>
Returns a list of item definitions in this container.<D extends ItemDelta<? extends PrismValue,
? extends ItemDefinition>>
Collection<D>getDelta()
protected ItemPath
getDeltaPathForStatus
(ItemStatus status) Returns set of property definitions.@Nullable SchemaContextDefinition
PrismContainerWrapper<? extends Containerable>
Returns a compile-time class that is used to represent items.boolean
boolean
This is XSD annotation that specifies whether a property should be indexed in the storage.boolean
boolean
isVisible
(PrismContainerValueWrapper<?> parent, ItemVisibilityHandler visibilityHandler) mutator()
Returns an interface to mutate this definition.void
replaceDefinition
(QName itemName, ItemDefinition newDefinition) TODOvoid
setExpanded
(boolean expanded) void
setIdentifier
(String identifier) void
setShowEmpty
(boolean isShowEmpty, boolean recursive) void
setVirtual
(boolean virtual) Methods inherited from class com.evolveum.midpoint.gui.impl.prism.wrapper.ItemWrapperImpl
add, addValueToDelta, canAdd, canModify, canRead, checkRequired, computeDeltaInternal, debugDump, debugDumpShortToString, deepClone, findItemDefinition, findObjectStatus, findObjectWrapper, getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayHint, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getFormComponentValidator, getHelp, getItem, getItemName, getMaxOccurs, getMergerIdentifier, getMergerInstance, getMinOccurs, getNaturalKeyConstituents, getNaturalKeyInstance, getOldItem, getParent, getParentContainerValue, getPath, getPlannedRemoval, getPreconditionDeltas, getProcessing, getRemovedSince, getSchemaMigrations, getStatus, getSubstitutionHead, getTypeName, getValue, getValueEnumerationRef, getValues, getVisibleOverwrite, instantiate, instantiate, isAbstract, isAlwaysUseForEquals, isColumn, isDeprecated, isDynamic, isElaborate, isEmphasized, isEmpty, isExperimental, isHeterogeneousListItem, isIgnored, isIndexOnly, isInherited, isMetadata, isOperational, isOptionalCleanup, isProcessProvenanceMetadata, isReadOnly, isRemoved, isRuntimeSchema, isShowEmpty, isShowInVirtualContainer, isShowMetadataDetails, isValidated, isValidFor, isVisibleByVisibilityHandler, remove, removeAll, removeNotChangedStatusValue, revive, setColumn, setDisplayName, setDisplayOrder, setHelp, setMetadata, setProcessProvenanceMetadata, setReadOnly, setShowInVirtualContainer, setShowMetadataDetails, setValidated, setVisibleOverwrite, structuredType, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.prism.Definition
checkMutableOnExposing, debugDump, getAnnotation, getAnnotations, getMergerIdentifier, getMergerInstance, getMutabilityFlag, getNaturalKeyConstituents, getNaturalKeyInstance, getTypeName, isAbstract, isElaborate, isOptionalCleanup, isRuntimeSchema
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
debugDumpShortToString, deepClone, getProcessing, getSubstitutionHead, getValueEnumerationRef, instantiate, instantiate, isAlwaysUseForEquals, isDynamic, isHeterogeneousListItem, isIgnored, isInherited, isOperational
Methods inherited from interface com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper
add, checkRequired, debugDump, findObjectStatus, findObjectWrapper, getFormComponentValidator, getItem, getParent, getParentContainerValue, getPath, getPreconditionDeltas, getValue, getValues, getVisibleOverwrite, isColumn, isEmpty, isMetadata, isProcessProvenanceMetadata, isReadOnly, isShowEmpty, isShowInVirtualContainer, isShowMetadataDetails, isValidated, remove, removeAll, setColumn, setMetadata, setProcessProvenanceMetadata, setReadOnly, setShowInVirtualContainer, setShowMetadataDetails, setValidated, setVisibleOverwrite
Methods inherited from interface com.evolveum.midpoint.prism.LivePrismItemDefinition
findItemDefinition, isValidFor
Methods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinitionByIteration, findPropertyDefinition, findReferenceDefinition
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerDefinition
getAlwaysUseForEquals, getItemNames, isAlwaysUseForEquals, isCompletelyDefined, isEmpty, schemaLookup, structuredType
Methods inherited from interface com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerWrapper
getStatus
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
canAdd, canModify, canRead, getInfo
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition
getItemName, getMaxOccurs, getMinOccurs, getTypeName, isMandatory, isMultiValue, isOptional, isSingleValue
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemStorageDefinition
isIndexOnly, isSearchable
Methods inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition
getDeprecatedSince, getPlannedRemoval, getRemovedSince, getSchemaMigrations, isDeprecated, isExperimental, isRemoved
Methods inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
getDiagrams, getDisplayHint, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, isEmphasized
-
Constructor Details
-
PrismContainerWrapperImpl
public PrismContainerWrapperImpl(PrismContainerValueWrapper<?> parent, PrismContainer<C> item, ItemStatus status)
-
-
Method Details
-
setExpanded
public void setExpanded(boolean expanded) - Specified by:
setExpanded
in interfacePrismContainerWrapper<C extends Containerable>
-
isExpanded
public boolean isExpanded()- Specified by:
isExpanded
in interfacePrismContainerWrapper<C extends Containerable>
-
setShowEmpty
public void setShowEmpty(boolean isShowEmpty, boolean recursive) - Specified by:
setShowEmpty
in interfaceItemWrapper<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>> - Overrides:
setShowEmpty
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>>
-
getCompileTimeClass
Description copied from interface:PrismContainerDefinition
Static (compile-time) class holding the container values. May be null. (Let's not mark it as @Nullable to avoid lots of warnings.)- Specified by:
getCompileTimeClass
in interfacePrismContainerDefinition<C extends Containerable>
-
getComplexTypeDefinition
Description copied from interface:PrismContainerDefinition
Definition of the container values. May be null. (Let's not mark it as @Nullable to avoid lots of warnings.) Note that individual values can hold their own (more specific) complex type definitions.- Specified by:
getComplexTypeDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
getDefinitions
Description copied from interface:PrismContainerDefinition
Returns a list of item definitions in this container. It is intentionally aList
because it is ordered. (To provide standard format for serialization.) Usually obtained fromComplexTypeDefinition
. So please do not modify the content of the list!- Specified by:
getDefinitions
in interfaceLocalItemDefinitionStore
- Specified by:
getDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
-
findLocalItemDefinition
public <ID extends ItemDefinition<?>> ID findLocalItemDefinition(@NotNull @NotNull QName name, @NotNull @NotNull Class<ID> clazz, boolean caseInsensitive) Description copied from interface:LocalItemDefinitionStore
Returns the local item definition corresponding to given item name (optionally case-insensitive) and definition class. Does not try to resolve items globally (in the case of "any" content). BEWARE: In the case of ambiguities, returns any suitable definition. (This may change.)- Specified by:
findLocalItemDefinition
in interfaceLocalItemDefinitionStore
-
getPropertyDefinitions
Description copied from interface:PrismContainerDefinition
Returns set of property definitions. The set contains all property definitions of all types that were parsed. Order of definitions is insignificant. The returned collection is immutable or detached from the source. Don't try to modify it. It may fail or the changes may be lost.- Specified by:
getPropertyDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
-
createEmptyDelta
Description copied from interface:ItemDefinition
Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.- Specified by:
createEmptyDelta
in interfaceItemDefinition<C extends Containerable>
- Specified by:
createEmptyDelta
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
createEmptyDelta
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>>
-
clone
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<C extends Containerable>
- Specified by:
clone
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
clone
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>>
-
cloneWithNewDefinition
public PrismContainerDefinition<C> cloneWithNewDefinition(QName newItemName, ItemDefinition newDefinition) Description copied from interface:PrismContainerDefinition
TODO- Specified by:
cloneWithNewDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
cloneWithNewName
@NotNull public @NotNull ItemDefinition<PrismContainer<C>> cloneWithNewName(@NotNull @NotNull ItemName itemName) Description copied from interface:ItemDefinition
Returns a clone of this definition, but with name changed to the provided one.- Specified by:
cloneWithNewName
in interfaceItemDefinition<C extends Containerable>
- See Also:
-
cloneWithNewType
@NotNull public @NotNull PrismContainerDefinition<?> cloneWithNewType(@NotNull @NotNull QName newTypeName, @NotNull @NotNull ComplexTypeDefinition newCtd) Description copied from interface:PrismContainerDefinition
Changes the type name and definition for this PCD. Use only in special cases.- Specified by:
cloneWithNewType
in interfacePrismContainerDefinition<C extends Containerable>
-
isIndexed
Description copied from interface:PrismItemStorageDefinition
This is XSD annotation that specifies whether a property should be indexed in the storage. It can only apply to properties. It has following meaning: true: the property must be indexed. If the storage is not able to index the value, it should indicate an error. false: the property should not be indexed. null: data store decides whether to index the property or not.- Specified by:
isIndexed
in interfacePrismItemStorageDefinition
-
replaceDefinition
Description copied from interface:PrismContainerDefinition
TODO- Specified by:
replaceDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
createValue
Description copied from interface:PrismContainerDefinition
TODO- Specified by:
createValue
in interfacePrismContainerDefinition<C extends Containerable>
-
canRepresent
Description copied from interface:PrismContainerDefinition
TODO- Specified by:
canRepresent
in interfacePrismContainerDefinition<C extends Containerable>
-
mutator
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
mutator
in interfaceDefinition
- Specified by:
mutator
in interfaceItemDefinition<C extends Containerable>
- Specified by:
mutator
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
mutator
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>>
-
findContainer
public <T extends Containerable> PrismContainerWrapper<T> findContainer(ItemPath path) throws SchemaException - Specified by:
findContainer
in interfacePrismContainerWrapper<C extends Containerable>
- Throws:
SchemaException
-
findContainer
- Specified by:
findContainer
in interfacePrismContainerWrapper<C extends Containerable>
-
findProperty
- Specified by:
findProperty
in interfacePrismContainerWrapper<C extends Containerable>
- Throws:
SchemaException
-
findReference
- Specified by:
findReference
in interfacePrismContainerWrapper<C extends Containerable>
- Throws:
SchemaException
-
findContainerValue
- Specified by:
findContainerValue
in interfacePrismContainerWrapper<C extends Containerable>
-
getItemDefinition
-
findItem
- Specified by:
findItem
in interfacePrismContainerWrapper<C extends Containerable>
- Throws:
SchemaException
-
getDelta
public <D extends ItemDelta<? extends PrismValue,? extends ItemDefinition>> Collection<D> getDelta() throws SchemaException- Specified by:
getDelta
in interfaceItemWrapper<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>> - Overrides:
getDelta
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>> - Throws:
SchemaException
-
computeDeltasInternal
protected <D extends ItemDelta<? extends PrismValue,? extends ItemDefinition>> Collection<D> computeDeltasInternal() throws SchemaException- Throws:
SchemaException
-
getDeltaPathForStatus
-
isVisible
public boolean isVisible(PrismContainerValueWrapper<?> parent, ItemVisibilityHandler visibilityHandler) - Specified by:
isVisible
in interfaceItemWrapper<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>> - Overrides:
isVisible
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>>
-
setVirtual
public void setVirtual(boolean virtual) - Specified by:
setVirtual
in interfacePrismContainerWrapper<C extends Containerable>
-
isVirtual
public boolean isVirtual()- Specified by:
isVirtual
in interfacePrismContainerWrapper<C extends Containerable>
-
isImmutable
public boolean isImmutable()- Specified by:
isImmutable
in interfaceFreezable
-
freeze
public void freeze() -
accept
- Specified by:
accept
in interfaceSmartVisitable<C extends Containerable>
- Returns:
- false if we already was here
-
accept
- Specified by:
accept
in interfaceVisitable<C extends Containerable>
-
createNewEmptyValue
- Specified by:
createNewEmptyValue
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>>
-
getSelectedChild
- Specified by:
getSelectedChild
in interfacePrismContainerWrapper<C extends Containerable>
-
getIdentifier
- Specified by:
getIdentifier
in interfacePrismContainerWrapper<C extends Containerable>
-
setIdentifier
- Specified by:
setIdentifier
in interfacePrismContainerWrapper<C extends Containerable>
-
getTypeClass
Description copied from interface:Definition
Returns a compile-time class that is used to represent items. E.g. returns String, Integer, subclasses of Objectable and Containerable and so on.- Specified by:
getTypeClass
in interfaceDefinition
- Specified by:
getTypeClass
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
getTypeClass
in classItemWrapperImpl<PrismContainer<C extends Containerable>,
PrismContainerValueWrapper<C extends Containerable>>
-
getSchemaContextDefinition
- Specified by:
getSchemaContextDefinition
in interfaceDefinition
-
cloneVirtualContainerWithNewValue
public PrismContainerWrapper<C> cloneVirtualContainerWithNewValue(PrismContainerValueWrapper<? extends Containerable> parent, ModelServiceLocator modelServiceLocator) - Specified by:
cloneVirtualContainerWithNewValue
in interfacePrismContainerWrapper<C extends Containerable>
-