Package com.evolveum.midpoint.prism
Interface ComplexTypeDefinition
- All Superinterfaces:
AbstractTypeDefinition,Cloneable,DebugDumpable,Definition,Freezable,LocalItemDefinitionStore,PrismLifecycleDefinition,PrismPresentationDefinition,Revivable,SchemaLookup.Aware,Serializable,SmartVisitable<Definition>,TypeDefinition,Visitable<Definition>
- All Known Subinterfaces:
ComplexTypeDefinitionDelegator,ShadowAssociationsComplexTypeDefinition,ShadowAttributesComplexTypeDefinition,ShadowItemsComplexTypeDefinition
Provides a definition for a complex type, i.e. type that prescribes inner items.
It's instances may be container values or property values, depending on container/object
markers presence.
- Author:
- semancik
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAccepts information about this complex type definition during schema parsing.static interfaceAn interface to mutate the definition of a complex type.static interfaceProvides the functionality formigrateIfNeeded(PrismContainerValue).Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.Definition
Definition.DefinitionBuilder, Definition.DefinitionMutatorNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition
PrismLifecycleDefinition.Data, PrismLifecycleDefinition.Delegable, PrismLifecycleDefinition.MutableNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
PrismPresentationDefinition.Data, PrismPresentationDefinition.Delegable, PrismPresentationDefinition.MutableNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.TypeDefinition
TypeDefinition.TypeDefinitionLikeBuilder, TypeDefinition.TypeDefinitionMutator -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescription@NotNull ComplexTypeDefinitionclone()Does a shallow clone of this definition (i.e.@NotNull ComplexTypeDefinitiondeepClone(@NotNull DeepCloneOperation operation) Does a deep clone of this definition.@Nullable QNameType name for items that are not explicitly defined in this CTD.@Nullable StringWhen resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first.@Nullable QNameDefault target type name for references typed usinggetDefaultItemTypeName()set to "reference type".@NotNull List<? extends ItemDefinition<?>>Returns definitions for all inner items.@Nullable QNameIf not null, indicates that this type defines the structure of `extension` element of a given type.When resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored.default List<PrismPropertyDefinition<?>>default List<PrismPropertyDefinition<?>>default booleanbooleandefault booleanhasSubstitutions(QName qName) Returns true if item has substitutions in current container definitionbooleanFlag indicating whether this type was marked as "container" in the original schema.booleanisEmpty()Returns true if there are no item definitions.default booleanisItemDefinitionRemoved(QName itemName) This allows to distinguish between missing and explicitly removed definitions.booleanTrue if the complex type definition is a type dedicated to hold so-called https://docs.evolveum.com/midpoint/devel/design/xml-json-yaml-vs-xnode-vs-internal-data/heterogeneous-lists/[heterogeneous lists].booleanFlag indicating whether this type was marked as "object" in the original schema.booleanFlag indicating whether this type was marked as "objectReference" in the original schema.default booleanbooleanTrue if the complex type definition contains xsd:any (directly or indirectly).default Optional<ItemDefinition<?>>itemOrSubstitution(QName name) voidmerge(ComplexTypeDefinition otherComplexTypeDef) Copies cloned definitions from the other type definition into this one.default <C extends Containerable>
@NotNull PrismContainerValue<C>migrateIfNeeded(@NotNull PrismContainerValue<C> value) A hook to migrate the value after this definition was applied to it.mutator()Returns an interface to mutate this definition.substitution(QName name) voidtrimTo(@NotNull Collection<ItemPath> paths) Trims the definition (and any definitions it refers to) to contain only items related to given paths.Methods inherited from interface com.evolveum.midpoint.prism.AbstractTypeDefinition
getTypeNameMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.Definition
checkMutableOnExposing, debugDump, getAnnotation, getAnnotations, getMergerIdentifier, getMergerInstance, getMutabilityFlag, getNaturalKeyConstituents, getNaturalKeyInstance, getSchemaContextDefinition, getTypeClass, getTypeName, isAbstract, isElaborate, isOptionalCleanup, isRuntimeSchemaMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findLocalItemDefinitionByIteration, findPropertyDefinition, findReferenceDefinitionMethods inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition
getDeprecatedSince, getPlannedRemoval, getRemovedSince, getSchemaMigrations, isDeprecated, isExperimental, isRemovedMethods inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
getDiagrams, getDisplayHint, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, isEmphasizedMethods inherited from interface com.evolveum.midpoint.prism.schema.SchemaLookup.Aware
schemaLookupMethods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
acceptMethods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
canRepresent, getCompileTimeClass, getInstantiationOrder, getStaticSubTypes, getSuperType, isAssignableFrom
-
Method Details
-
getDefinitions
Returns definitions for all inner items. These are of typeItemDefinition. However, very often subtypes of this type are used, e.g. ResourceAttributeDefinition, RefinedAttributeDefinition, LayerRefinedAttributeDefinition, and so on. The returned structure is aListbecause the ordering is significant, e.g. for serialization purposes. The list is unmodifiable.- Specified by:
getDefinitionsin interfaceLocalItemDefinitionStore
-
getExtensionForType
If not null, indicates that this type defines the structure of `extension` element of a given type. E.g. `getExtensionForType()` == `c:UserType` means that this complex type defines structure of `extension` elements of `UserType` objects. -
isReferenceMarker
boolean isReferenceMarker()Flag indicating whether this type was marked as "objectReference" in the original schema. -
isContainerMarker
boolean isContainerMarker()Flag indicating whether this type was marked as "container" in the original schema. Does not provide any information to schema processing logic, just conveys the marker from original schema so we can serialize and deserialize the schema without loss of information. -
isObjectMarker
boolean isObjectMarker()Flag indicating whether this type was marked as "object" in the original schema. Does not provide any information to schema processing logic, just conveys the marker from original schema so we can serialized and deserialize the schema without loss of information. -
isXsdAnyMarker
boolean isXsdAnyMarker()True if the complex type definition contains xsd:any (directly or indirectly). -
isListMarker
True if the complex type definition is a type dedicated to hold so-called https://docs.evolveum.com/midpoint/devel/design/xml-json-yaml-vs-xnode-vs-internal-data/heterogeneous-lists/[heterogeneous lists]. See alsoDOMUtil.IS_LIST_ATTRIBUTE_NAMEandItemDefinition.isHeterogeneousListItem(). -
getDefaultItemTypeName
Type name for items that are not explicitly defined in this CTD. -
getDefaultReferenceTargetTypeName
Default target type name for references typed usinggetDefaultItemTypeName()set to "reference type". -
getDefaultNamespace
When resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first. Currently does NOT apply recursively (to inner CTDs). Set by parsing `defaultNamespace` XSD annotation. -
getIgnoredNamespaces
When resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored. Names in this list are interpreted as a namespace prefixes. Currently does NOT apply recursively (to inner CTDs). Set by parsing `ignoredNamespace` XSD annotations. -
merge
Copies cloned definitions from the other type definition into this one. (TODO remove from the interface?) -
isEmpty
boolean isEmpty()Returns true if there are no item definitions. -
clone
Does a shallow clone of this definition (i.e. item definitions themselves are NOT cloned).- Specified by:
clonein interfaceDefinition
-
deepClone
Does a deep clone of this definition. -
trimTo
Trims the definition (and any definitions it refers to) to contain only items related to given paths. USE WITH CARE. Be sure no shared definitions would be affected by this operation! -
hasSubstitutions
-
hasSubstitutions
Returns true if item has substitutions in current container definition -
substitution
-
itemOrSubstitution
-
mutator
Description copied from interface:DefinitionReturns an interface to mutate this definition.- Specified by:
mutatorin interfaceDefinition
-
getXmlAttributeDefinitions
-
isStrictAnyMarker
-
isItemDefinitionRemoved
This allows to distinguish between missing and explicitly removed definitions. -
hasOperationalOnlyItems
-
getPropertyDefinitions
-
migrateIfNeeded
@Experimental @NotNull default <C extends Containerable> @NotNull PrismContainerValue<C> migrateIfNeeded(@NotNull @NotNull PrismContainerValue<C> value) A hook to migrate the value after this definition was applied to it. Similar toPrismReferenceDefinition.migrateIfNeeded(PrismReferenceValue)with the difference that the implementation for references is simpler. See the discussion in the default implementation.
-