Class PrismContainerDefinitionImpl<C extends Containerable>
- All Implemented Interfaces:
- Definition,- Freezable,- ItemDefinition<PrismContainer<C>>,- ItemDefinitionTestAccess,- LocalItemDefinitionStore,- MutableDefinition,- MutableItemDefinition<PrismContainer<C>>,- MutablePrismContainerDefinition<C>,- PrismContainerDefinition<C>,- PrismContextSensitive,- PrismItemAccessDefinition,- Revivable,- SmartVisitable<Definition>,- Visitable<Definition>,- DebugDumpable,- Serializable,- Cloneable
- Direct Known Subclasses:
- PrismObjectDefinitionImpl,- ResourceAttributeContainerDefinitionImpl
Property container groups properties into logical blocks. The reason for grouping may be as simple as better understandability of data structure. But the group usually means different meaning, source or structure of the data. For example, the property container is frequently used to hold properties that are dynamic, not fixed by a static schema. Such grouping also naturally translates to XML and helps to "quarantine" such properties to avoid Unique Particle Attribute problems.
Property Container contains a set of (potentially multi-valued) properties. The order of properties is not significant, regardless of the fact that it may be fixed in the XML representation. In the XML representation, each element inside Property Container must be either Property or a Property Container.
 This class represents schema definition for property container. See
 Definition for more details.
- Author:
- Radovan Semancik
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinitionPrismItemAccessDefinition.Mutable
- 
Field SummaryFieldsFields inherited from class com.evolveum.midpoint.prism.impl.ItemDefinitionImplheterogeneousListItem, itemName, substitutionHeadFields inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpldeprecated, deprecatedSince, displayName, displayOrder, documentation, elaborate, emphasized, experimental, help, isAbstract, isRuntimeSchema, plannedRemoval, processing, removed, removedSince, typeNameFields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
- 
Constructor SummaryConstructorsConstructorDescriptionPrismContainerDefinitionImpl(@NotNull QName name, ComplexTypeDefinition complexTypeDefinition) The constructors should be used only occasionally (if used at all).PrismContainerDefinitionImpl(@NotNull QName name, ComplexTypeDefinition complexTypeDefinition, Class<C> compileTimeClass) PrismContainerDefinitionImpl(@NotNull QName name, ComplexTypeDefinition complexTypeDefinition, Class<C> compileTimeClass, QName definedInType) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaccept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation) booleancanBeDefinitionOf(PrismValue pvalue) TODO documentbooleancanRepresent(@NotNull QName typeName) TODOvoid@NotNull PrismContainerDefinitionImpl<C>clone()Shallow clone@NotNull PrismContainerDefinition<C>cloneWithReplacedDefinition(QName itemName, ItemDefinition<?> newDefinition) TODOprotected voidcreateContainerDefinition(QName name, ComplexTypeDefinition complexTypeDefinition, int minOccurs, int maxOccurs) createContainerDefinition(QName name, QName typeName) createContainerDefinition(QName name, QName typeName, int minOccurs, int maxOccurs) @NotNull ContainerDelta<C>createEmptyDelta(ItemPath path) Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.createPropertyDefinition(String localName, String localTypeName) Creates new instance of property definition and adds it to the container.createPropertyDefinition(String localName, String localTypeName, int minOccurs, int maxOccurs) Creates new instance of property definition and adds it to the container.createPropertyDefinition(String localName, QName typeName) Creates new instance of property definition and adds it to the container.createPropertyDefinition(QName name, QName typeName) Creates new instance of property definition and adds it to the container.createPropertyDefinition(QName name, QName typeName, int minOccurs, int maxOccurs) Creates new instance of property definition and adds it to the container.TODOdebugDump(int indent) debugDump(int indent, IdentityHashMap<Definition, Object> seen) deepClone(@NotNull DeepCloneOperation operation) Make a deep clone, cloning all the sub-items and definitions.<ID extends ItemDefinition<?>>
 IDfindItemDefinition(@NotNull ItemPath path, @NotNull Class<ID> clazz) Used to find a matching item definition _within_ this definition.Returns list of items which should be always used for equals, even if they are operational, and equivalence strategy does not consider operational data.Static (compile-time) class holding the container values.Definition of the container values.Return a human readable name of this class suitable for logs.@NotNull List<? extends ItemDefinition<?>>FIXME this looks like outdated description Returns set of property definitions.Returns human-readable name of this class suitable for documentation.Returns set of property definitions.protected StringReturns a compile-time class that is used to represent items.@NotNull PrismContainer<C>Create an item instance.@NotNull PrismContainer<C>instantiate(QName elementName) Create an item instance.booleanFor types: is the type abstract so that it should not be instantiated directly?booleanisEmpty()TODOvoidvoidreplaceDefinition(QName itemName, ItemDefinition<?> newDefinition) TODOvoidrevive(PrismContext prismContext) TODO: Is revive necessary if prism context is static?voidsetAlwaysUseForEquals(@NotNull Collection<QName> keysElem) Experimental: USe only with care, this overrides behavior of listed operational=true items in equivalence strategies for containers.voidsetCompileTimeClass(Class<C> compileTimeClass) voidsetComplexTypeDefinition(ComplexTypeDefinition complexTypeDefinition) Returns an interface to mutate this definition.Methods inherited from class com.evolveum.midpoint.prism.impl.ItemDefinitionImpladoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canModify, canRead, copyDefinitionDataFrom, debugDisplayOrder, debugDumpShortToString, debugFlags, debugMultiplicity, equals, extendToString, getItemName, getMaxOccurs, getMinOccurs, getSubstitutionHead, getValueEnumerationRef, hashCode, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isOperational, isSearchable, isValidFor, replaceName, setCanAdd, setCanModify, setCanRead, setDynamic, setHeterogeneousListItem, setIndexOnly, setInherited, setItemName, setMaxOccurs, setMinOccurs, setOperational, setReadOnly, setSearchable, setSubstitutionHead, setValueEnumerationRef, toString, useSerializationProxy, writeReplaceMethods inherited from class com.evolveum.midpoint.prism.impl.DefinitionImplaccept, addDiagram, addSchemaMigration, checkMutableOnExposing, copyDefinitionDataFrom, extendDumpHeader, getAnnotation, getAnnotations, getDeprecatedSince, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getPlannedRemoval, getPrismContext, getProcessing, getRemovedSince, getSchemaMigrations, getTypeName, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRemoved, isRuntimeSchema, setAbstract, setAnnotation, setDeprecated, setDeprecatedSince, setDisplayName, setDisplayOrder, setDocumentation, setElaborate, setEmphasized, setExperimental, setHelp, setPlannedRemoval, setProcessing, setRemoved, setRemovedSince, setRuntimeSchema, setTypeNameMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezablefreeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.DefinitiongetAnnotation, getAnnotations, getDeprecatedSince, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getRemovedSince, getSchemaMigrations, getSchemaRegistry, getTypeName, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRemoved, isRuntimeSchema, setAnnotationMethods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.ItemDefinitionadoptElementDefinitionFrom, canBeDefinitionOf, debugDumpShortToString, getItemName, getMaxOccurs, getMinOccurs, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSearchable, isSingleValue, isValidForMethods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStorecontainsItemDefinition, findContainerDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinitionMethods inherited from interface com.evolveum.midpoint.prism.MutableDefinitionaddDiagram, addSchemaMigration, setDeprecated, setDisplayName, setDisplayOrder, setDocumentation, setEmphasized, setExperimental, setHelp, setProcessing, setRemoved, setRemovedSince, setRuntimeSchema, setTypeNameMethods inherited from interface com.evolveum.midpoint.prism.MutableItemDefinitionsetCanAdd, setCanModify, setCanRead, setDeprecatedSince, setDynamic, setElaborate, setHeterogeneousListItem, setIndexOnly, setInherited, setItemName, setMaxOccurs, setMinOccurs, setOperational, setPlannedRemoval, setReadOnly, setSearchable, setSubstitutionHead, setValueEnumerationRefMethods inherited from interface com.evolveum.midpoint.prism.PrismContainerDefinitiongetItemNames, isAlwaysUseForEquals, isCompletelyDefined, structuredTypeMethods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitivegetPrismContextMethods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinitioncanAdd, canModify, canRead
- 
Field Details- 
complexTypeDefinition
- 
compileTimeClass
 
- 
- 
Constructor Details- 
PrismContainerDefinitionImplpublic PrismContainerDefinitionImpl(@NotNull @NotNull QName name, ComplexTypeDefinition complexTypeDefinition) The constructors should be used only occasionally (if used at all). Use the factory methods in the ResourceObjectDefintion instead.
- 
PrismContainerDefinitionImplpublic PrismContainerDefinitionImpl(@NotNull @NotNull QName name, ComplexTypeDefinition complexTypeDefinition, Class<C> compileTimeClass) 
- 
PrismContainerDefinitionImplpublic PrismContainerDefinitionImpl(@NotNull @NotNull QName name, ComplexTypeDefinition complexTypeDefinition, Class<C> compileTimeClass, QName definedInType) 
 
- 
- 
Method Details- 
getCompileTimeClassDescription copied from interface:PrismContainerDefinitionStatic (compile-time) class holding the container values. May be null. (Let's not mark it as @Nullable to avoid lots of warnings.)- Specified by:
- getCompileTimeClassin interface- PrismContainerDefinition<C extends Containerable>
 
- 
setCompileTimeClass- Specified by:
- setCompileTimeClassin interface- MutablePrismContainerDefinition<C extends Containerable>
 
- 
getTypeClassDescription copied from interface:DefinitionReturns 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:
- getTypeClassin interface- Definition
- Specified by:
- getTypeClassin interface- PrismContainerDefinition<C extends Containerable>
- Overrides:
- getTypeClassin class- DefinitionImpl
 
- 
getSchemaNamespace
- 
getComplexTypeDefinitionDescription copied from interface:PrismContainerDefinitionDefinition 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:
- getComplexTypeDefinitionin interface- PrismContainerDefinition<C extends Containerable>
 
- 
setComplexTypeDefinition- Specified by:
- setComplexTypeDefinitionin interface- MutablePrismContainerDefinition<C extends Containerable>
 
- 
isAbstractpublic boolean isAbstract()Description copied from interface:DefinitionFor types: is the type abstract so that it should not be instantiated directly? For items: TODO- Specified by:
- isAbstractin interface- Definition
- Overrides:
- isAbstractin class- DefinitionImpl
 
- 
reviveDescription copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)- Specified by:
- revivein interface- Revivable
- Overrides:
- revivein class- ItemDefinitionImpl<PrismContainer<C extends Containerable>>
 
- 
findItemDefinitionpublic <ID extends ItemDefinition<?>> ID findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<ID> clazz) Description copied from interface:ItemDefinitionUsed to find a matching item definition _within_ this definition. Treats e.g. de-referencing in prism references.- Specified by:
- findItemDefinitionin interface- ItemDefinition<C extends Containerable>
- Specified by:
- findItemDefinitionin interface- LocalItemDefinitionStore
- Overrides:
- findItemDefinitionin class- ItemDefinitionImpl<PrismContainer<C extends Containerable>>
 
- 
getDefinitionsFIXME this looks like outdated description Returns set of property definitions.WARNING: This may return definitions from the associated complex type. Therefore changing the returned set may influence also the complex type definition. The set contains all property definitions of all types that were parsed. Order of definitions is insignificant. - Specified by:
- getDefinitionsin interface- LocalItemDefinitionStore
- Specified by:
- getDefinitionsin interface- PrismContainerDefinition<C extends Containerable>
- Returns:
- set of definitions
 
- 
checkMutablepublic void checkMutable()- Specified by:
- checkMutablein interface- Freezable
 
- 
getPropertyDefinitionsDescription copied from interface:PrismContainerDefinitionReturns 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:
- getPropertyDefinitionsin interface- PrismContainerDefinition<C extends Containerable>
- Returns:
- set of definitions
 
- 
instantiateDescription copied from interface:ItemDefinitionCreate an item instance. Definition name or default name will be used as an element name for the instance. The instance will otherwise be empty.- Specified by:
- instantiatein interface- ItemDefinition<C extends Containerable>
- Throws:
- SchemaException
 
- 
instantiateDescription copied from interface:ItemDefinitionCreate an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.- Specified by:
- instantiatein interface- ItemDefinition<C extends Containerable>
- Throws:
- SchemaException
 
- 
createEmptyDeltaDescription copied from interface:ItemDefinitionCreates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.- Specified by:
- createEmptyDeltain interface- ItemDefinition<C extends Containerable>
- Specified by:
- createEmptyDeltain interface- PrismContainerDefinition<C extends Containerable>
 
- 
accept- Specified by:
- acceptin interface- SmartVisitable<C extends Containerable>
- Overrides:
- acceptin class- DefinitionImpl
- Returns:
- false if we already was here
 
- 
cloneShallow clone- Specified by:
- clonein interface- Definition
- Specified by:
- clonein interface- ItemDefinition<C extends Containerable>
- Specified by:
- clonein interface- PrismContainerDefinition<C extends Containerable>
- Specified by:
- clonein class- ItemDefinitionImpl<PrismContainer<C extends Containerable>>
 
- 
copyDefinitionDataFrom
- 
deepCloneDescription copied from class:ItemDefinitionImplMake a deep clone, cloning all the sub-items and definitions.- Specified by:
- deepClonein interface- ItemDefinition<C extends Containerable>
- Overrides:
- deepClonein class- ItemDefinitionImpl<PrismContainer<C extends Containerable>>
 
- 
cloneWithReplacedDefinition@NotNull public @NotNull PrismContainerDefinition<C> cloneWithReplacedDefinition(QName itemName, ItemDefinition<?> newDefinition) Description copied from interface:PrismContainerDefinitionTODO- Specified by:
- cloneWithReplacedDefinitionin interface- PrismContainerDefinition<C extends Containerable>
 
- 
replaceDefinitionDescription copied from interface:PrismContainerDefinitionTODO- Specified by:
- replaceDefinitionin interface- PrismContainerDefinition<C extends Containerable>
 
- 
createPropertyDefinitionCreates new instance of property definition and adds it to the container.This is the preferred method of creating a new definition. - Specified by:
- createPropertyDefinitionin interface- MutablePrismContainerDefinition<C extends Containerable>
- Parameters:
- name- name of the property (element name)
- typeName- XSD type of the property
- Returns:
- created property definition
 
- 
createPropertyDefinitionpublic MutablePrismPropertyDefinition<?> createPropertyDefinition(QName name, QName typeName, int minOccurs, int maxOccurs) Creates new instance of property definition and adds it to the container.This is the preferred method of creating a new definition. - Specified by:
- createPropertyDefinitionin interface- MutablePrismContainerDefinition<C extends Containerable>
- Parameters:
- name- name of the property (element name)
- typeName- XSD type of the property
- minOccurs- minimal number of occurrences
- maxOccurs- maximal number of occurrences (-1 means unbounded)
- Returns:
- created property definition
 
- 
createPropertyDefinition
- 
createPropertyDefinitionCreates new instance of property definition and adds it to the container.This is the preferred method of creating a new definition. - Specified by:
- createPropertyDefinitionin interface- MutablePrismContainerDefinition<C extends Containerable>
- Parameters:
- localName- name of the property (element name) relative to the schema namespace
- typeName- XSD type of the property
- Returns:
- created property definition
 
- 
createPropertyDefinitionCreates new instance of property definition and adds it to the container.This is the preferred method of creating a new definition. - Parameters:
- localName- name of the property (element name) relative to the schema namespace
- localTypeName- XSD type of the property
- Returns:
- created property definition
 
- 
createPropertyDefinitionpublic PrismPropertyDefinition<?> createPropertyDefinition(String localName, String localTypeName, int minOccurs, int maxOccurs) Creates new instance of property definition and adds it to the container.This is the preferred method of creating a new definition. - Parameters:
- localName- name of the property (element name) relative to the schema namespace
- localTypeName- XSD type of the property
- minOccurs- minimal number of occurrences
- maxOccurs- maximal number of occurrences (-1 means unbounded)
- Returns:
- created property definition
 
- 
createContainerDefinition
- 
createContainerDefinitionpublic MutablePrismContainerDefinition<?> createContainerDefinition(QName name, QName typeName, int minOccurs, int maxOccurs) - Specified by:
- createContainerDefinitionin interface- MutablePrismContainerDefinition<C extends Containerable>
 
- 
createContainerDefinitionpublic MutablePrismContainerDefinition<?> createContainerDefinition(QName name, ComplexTypeDefinition complexTypeDefinition, int minOccurs, int maxOccurs) - Specified by:
- createContainerDefinitionin interface- MutablePrismContainerDefinition<C extends Containerable>
 
- 
canBeDefinitionOfDescription copied from interface:ItemDefinitionTODO document- Specified by:
- canBeDefinitionOfin interface- ItemDefinition<C extends Containerable>
 
- 
canRepresentDescription copied from interface:PrismContainerDefinitionTODO- Specified by:
- canRepresentin interface- PrismContainerDefinition<C extends Containerable>
 
- 
createValueDescription copied from interface:PrismContainerDefinitionTODO- Specified by:
- createValuein interface- PrismContainerDefinition<C extends Containerable>
 
- 
getDiagrams- Specified by:
- getDiagramsin interface- Definition
- Overrides:
- getDiagramsin class- DefinitionImpl
 
- 
debugDump- Specified by:
- debugDumpin interface- DebugDumpable
- Overrides:
- debugDumpin class- DefinitionImpl
 
- 
debugDump- Specified by:
- debugDumpin interface- Definition
 
- 
isEmptypublic boolean isEmpty()Description copied from interface:PrismContainerDefinitionTODO- Specified by:
- isEmptyin interface- PrismContainerDefinition<C extends Containerable>
 
- 
getDebugDumpClassNameReturn a human readable name of this class suitable for logs.- Specified by:
- getDebugDumpClassNamein class- DefinitionImpl
 
- 
getDocClassNameDescription copied from class:DefinitionImplReturns human-readable name of this class suitable for documentation. (e.g. "property")- Specified by:
- getDocClassNamein class- DefinitionImpl
 
- 
toMutableDescription copied from interface:DefinitionReturns an interface to mutate this definition.- Specified by:
- toMutablein interface- Definition
- Specified by:
- toMutablein interface- ItemDefinition<C extends Containerable>
- Specified by:
- toMutablein interface- PrismContainerDefinition<C extends Containerable>
 
- 
setAlwaysUseForEqualsDescription copied from interface:MutablePrismContainerDefinitionExperimental: USe only with care, this overrides behavior of listed operational=true items in equivalence strategies for containers.- Specified by:
- setAlwaysUseForEqualsin interface- MutablePrismContainerDefinition<C extends Containerable>
 
- 
getAlwaysUseForEqualsDescription copied from interface:PrismContainerDefinitionReturns list of items which should be always used for equals, even if they are operational, and equivalence strategy does not consider operational data.- Specified by:
- getAlwaysUseForEqualsin interface- PrismContainerDefinition<C extends Containerable>
 
- 
performFreezepublic void performFreeze()- Overrides:
- performFreezein class- AbstractFreezable
 
 
-