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>>
,LocalItemDefinitionStore
,PrismContainerDefinition<C>
,PrismContextSensitive
,PrismItemAccessDefinition
,Revivable
,SmartVisitable<Definition>
,Visitable<Definition>
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
AuthenticationBehaviorWrapper
,CaseWorkItemTypeWrapper
,PrismObjectWrapperImpl
,ProfilingClassLoggerContainerWrapperImpl
,ResourceAttributeMappingWrapper
,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.PrismItemAccessDefinition
PrismItemAccessDefinition.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) cloneWithReplacedDefinition
(QName itemName, ItemDefinition newDefinition) TODOprotected <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<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.PrismContainerWrapper<? extends Containerable>
Returns a compile-time class that is used to represent items.boolean
boolean
boolean
boolean
isVisible
(PrismContainerValueWrapper<?> parent, ItemVisibilityHandler visibilityHandler) void
replaceDefinition
(QName itemName, ItemDefinition newDefinition) TODOvoid
setExpanded
(boolean expanded) void
setIdentifier
(String identifier) void
setShowEmpty
(boolean isShowEmpty, boolean recursive) void
setVirtual
(boolean virtual) Returns an interface to mutate this definition.Methods inherited from class com.evolveum.midpoint.gui.impl.prism.wrapper.ItemWrapperImpl
add, addValueToDelta, adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canBeDefinitionOf, canModify, canRead, checkRequired, computeDeltaInternal, debugDump, debugDumpShortToString, deepClone, findItemDefinition, findObjectStatus, findObjectWrapper, getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getFormComponentValidator, getHelp, getItem, getItemName, getMaxOccurs, getMinOccurs, getOldItem, getParent, getParentContainerValue, getPath, getPlannedRemoval, getPrismContext, getProcessing, getRemovedSince, getSchemaMigrations, getStatus, getSubstitutionHead, getTypeName, getValue, getValueEnumerationRef, getValues, getVisibleOverwrite, instantiate, instantiate, isAbstract, isColumn, isDeprecated, isDynamic, isElaborate, isEmphasized, isEmpty, isExperimental, isHeterogeneousListItem, isIgnored, isIndexOnly, isInherited, isMetadata, isOperational, isProcessProvenanceMetadata, isReadOnly, isRemoved, isRuntimeSchema, isShowEmpty, isShowInVirtualContainer, isShowMetadataDetails, isValidated, isValidFor, isVisibleByVisibilityHandler, remove, removeAll, revive, setAnnotation, setColumn, setDisplayName, setDisplayOrder, setMetadata, setProcessProvenanceMetadata, setReadOnly, setShowInVirtualContainer, setShowMetadataDetails, setValidated, setVisibleOverwrite, structuredType
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, 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.Definition
debugDump, getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getRemovedSince, getSchemaMigrations, getSchemaRegistry, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRemoved, isRuntimeSchema, setAnnotation
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
adoptElementDefinitionFrom, canBeDefinitionOf, canBeDefinitionOf, debugDumpShortToString, deepClone, findItemDefinition, getItemName, getMaxOccurs, getMinOccurs, getSubstitutionHead, getValueEnumerationRef, instantiate, instantiate, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSearchable, isSingleValue, isValidFor
Methods inherited from interface com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper
add, checkRequired, debugDump, findObjectStatus, findObjectWrapper, getFormComponentValidator, getItem, getParent, getParentContainerValue, getPath, 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.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinition
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerDefinition
getAlwaysUseForEquals, getItemNames, isAlwaysUseForEquals, isCompletelyDefined, isEmpty, structuredType
Methods inherited from interface com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerWrapper
getStatus
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
canAdd, canModify, canRead
-
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>
-
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 set is immutable! All changes may be lost.- Specified by:
getPropertyDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
- Returns:
- set of definitions
-
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>>
-
cloneWithReplacedDefinition
public PrismContainerDefinition<C> cloneWithReplacedDefinition(QName itemName, ItemDefinition newDefinition) Description copied from interface:PrismContainerDefinition
TODO- Specified by:
cloneWithReplacedDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
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>
-
toMutable
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceItemDefinition<C extends Containerable>
- Specified by:
toMutable
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
toMutable
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>>
-
cloneVirtualContainerWithNewValue
public PrismContainerWrapper<C> cloneVirtualContainerWithNewValue(PrismContainerValueWrapper<? extends Containerable> parent, ModelServiceLocator modelServiceLocator) - Specified by:
cloneVirtualContainerWithNewValue
in interfacePrismContainerWrapper<C extends Containerable>
-