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:
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:
- Serialized Form
-
-
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
Constructors Constructor Description PrismContainerWrapperImpl(PrismContainerValueWrapper<?> parent, PrismContainer<C> item, ItemStatus status)
-
Method Summary
-
Methods inherited from class com.evolveum.midpoint.gui.impl.prism.wrapper.ItemWrapperImpl
add, addValueToDelta, adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canBeDefinitionOf, canModify, canRead, checkRequired, 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, 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, isRuntimeSchema, isShowEmpty, isShowInVirtualContainer, isShowMetadataDetails, isValidFor, isVisibleByVisibilityHandler, remove, removeAll, revive, setAnnotation, setColumn, setMetadata, setProcessProvenanceMetadata, setReadOnly, setShowInVirtualContainer, setShowMetadataDetails, 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, getSchemaMigrations, getSchemaRegistry, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, 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, 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, remove, removeAll, setColumn, setMetadata, setProcessProvenanceMetadata, setReadOnly, setShowInVirtualContainer, setShowMetadataDetails, 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 Detail
-
PrismContainerWrapperImpl
public PrismContainerWrapperImpl(PrismContainerValueWrapper<?> parent, PrismContainer<C> item, ItemStatus status)
-
-
Method Detail
-
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
public Class<C> 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
public ComplexTypeDefinition 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
@NotNull public @NotNull List<? extends ItemDefinition<?>> 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
public List<PrismPropertyDefinition<?>> 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
@NotNull public @NotNull ContainerDelta<C> createEmptyDelta(ItemPath path)
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
@NotNull public @NotNull PrismContainerDefinition<C> 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
public void replaceDefinition(QName itemName, ItemDefinition newDefinition)
Description copied from interface:PrismContainerDefinition
TODO- Specified by:
replaceDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
createValue
public PrismContainerValue<C> createValue()
Description copied from interface:PrismContainerDefinition
TODO- Specified by:
createValue
in interfacePrismContainerDefinition<C extends Containerable>
-
canRepresent
public boolean canRepresent(@NotNull @NotNull QName type)
Description copied from interface:PrismContainerDefinition
TODO- Specified by:
canRepresent
in interfacePrismContainerDefinition<C extends Containerable>
-
toMutable
public MutablePrismContainerDefinition<C> 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
public <T extends Containerable> PrismContainerWrapper<T> findContainer(String identifier)
- Specified by:
findContainer
in interfacePrismContainerWrapper<C extends Containerable>
-
findProperty
public <X> PrismPropertyWrapper<X> findProperty(ItemPath propertyPath) throws SchemaException
- Specified by:
findProperty
in interfacePrismContainerWrapper<C extends Containerable>
- Throws:
SchemaException
-
findReference
public PrismReferenceWrapper findReference(ItemPath path) throws SchemaException
- Specified by:
findReference
in interfacePrismContainerWrapper<C extends Containerable>
- Throws:
SchemaException
-
findContainerValue
public PrismContainerValueWrapper<C> findContainerValue(ItemPath path)
- Specified by:
findContainerValue
in interfacePrismContainerWrapper<C extends Containerable>
-
getItemDefinition
public PrismContainerDefinition<C> getItemDefinition()
-
findItem
public <IW extends ItemWrapper> IW findItem(ItemPath path, Class<IW> type) throws SchemaException
- 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
-
getDeltaPathForStatus
protected ItemPath getDeltaPathForStatus(ItemStatus status)
-
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
-
accept
public boolean accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
- Specified by:
accept
in interfaceSmartVisitable<C extends Containerable>
- Returns:
- false if we already was here
-
accept
public void accept(Visitor<Definition> visitor)
- Specified by:
accept
in interfaceVisitable<C extends Containerable>
-
createNewEmptyValue
protected PrismContainerValue<C> createNewEmptyValue(ModelServiceLocator locator)
- Specified by:
createNewEmptyValue
in classItemWrapperImpl<PrismContainer<C extends Containerable>,PrismContainerValueWrapper<C extends Containerable>>
-
getSelectedChild
public PrismContainerWrapper<? extends Containerable> getSelectedChild()
- Specified by:
getSelectedChild
in interfacePrismContainerWrapper<C extends Containerable>
-
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifier
in interfacePrismContainerWrapper<C extends Containerable>
-
setIdentifier
public void setIdentifier(String identifier)
- Specified by:
setIdentifier
in interfacePrismContainerWrapper<C extends Containerable>
-
getTypeClass
public Class<C> 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>
-
-