Package com.evolveum.midpoint.prism
Interface ComplexTypeDefinition
-
- All Superinterfaces:
Cloneable
,DebugDumpable
,Definition
,Freezable
,LocalItemDefinitionStore
,PrismContextSensitive
,Revivable
,Serializable
,SmartVisitable<Definition>
,TypeDefinition
,Visitable<Definition>
- All Known Subinterfaces:
ComplexTypeDefinitionDelegator
,CompositeObjectDefinition
,CompositeObjectDefinitionDelegator
,MutableComplexTypeDefinition
,MutableResourceObjectClassDefinition
,ResourceObjectClassDefinition
,ResourceObjectClassDefinitionDelegator
,ResourceObjectDefinition
,ResourceObjectDefinitionDelegator
,ResourceObjectTypeDefinition
,ResourceObjectTypeDefinitionDelegator
- All Known Implementing Classes:
AbstractResourceObjectDefinitionImpl
,ComplexTypeDefinitionImpl
,CompositeObjectDefinitionImpl
,ResourceObjectClassDefinitionImpl
,ResourceObjectTypeDefinitionImpl
,TransformableComplexTypeDefinition
,TransformableComplexTypeDefinition.TrCompositeObjectDefinition
,TransformableComplexTypeDefinition.TrResourceObjectClassDefinition
,TransformableComplexTypeDefinition.TrResourceObjectDefinition
,TransformableComplexTypeDefinition.TrResourceObjectTypeDefinition
public interface ComplexTypeDefinition extends TypeDefinition, LocalItemDefinitionStore
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
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull ComplexTypeDefinition
clone()
Does a shallow clone of this definition (i.e.@NotNull ComplexTypeDefinition
deepClone(@NotNull DeepCloneOperation operation)
Does a deep clone of this definition.@Nullable String
getDefaultNamespace()
When resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first.@NotNull List<? extends ItemDefinition<?>>
getDefinitions()
Returns definitions for all inner items.@Nullable QName
getExtensionForType()
If not null, indicates that this type defines the structure of `extension` element of a given type.@NotNull List<String>
getIgnoredNamespaces()
When resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored.default List<PrismPropertyDefinition<?>>
getXmlAttributeDefinitions()
default boolean
hasOperationalOnlyItems()
boolean
hasSubstitutions()
default boolean
hasSubstitutions(QName qName)
Returns true if item has substitutions in current container definitionboolean
isContainerMarker()
Flag indicating whether this type was marked as "container" in the original schema.boolean
isEmpty()
Returns true if there are no item definitions.default boolean
isItemDefinitionRemoved(QName itemName)
This allows to distinguish between missing and explicitly removed definitions.boolean
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].boolean
isObjectMarker()
Flag indicating whether this type was marked as "object" in the original schema.boolean
isReferenceMarker()
Flag indicating whether this type was marked as "objectReference" in the original schema.default boolean
isStrictAnyMarker()
boolean
isXsdAnyMarker()
True if the complex type definition contains xsd:any (directly or indirectly).default Optional<ItemDefinition<?>>
itemOrSubstitution(QName name)
void
merge(ComplexTypeDefinition otherComplexTypeDef)
Copies cloned definitions from the other type definition into this one.Optional<ItemDefinition<?>>
substitution(QName name)
MutableComplexTypeDefinition
toMutable()
Returns an interface to mutate this definition.void
trimTo(@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.util.DebugDumpable
debugDump, 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, getTypeClass, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, setAnnotation
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
-
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.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
accept
-
Methods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
canRepresent, getCompileTimeClass, getInstantiationOrder, getStaticSubTypes, getSuperType, isAssignableFrom
-
-
-
-
Method Detail
-
getDefinitions
@NotNull @NotNull List<? extends ItemDefinition<?>> 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 aList
because the ordering is significant, e.g. for serialization purposes. The list is unmodifiable.- Specified by:
getDefinitions
in interfaceLocalItemDefinitionStore
-
getExtensionForType
@Nullable @Nullable QName 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
@Experimental boolean 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_NAME
andItemDefinition.isHeterogeneousListItem()
.
-
getDefaultNamespace
@Nullable @Nullable String 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
@NotNull @NotNull List<String> 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
void merge(ComplexTypeDefinition otherComplexTypeDef)
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
@NotNull @NotNull ComplexTypeDefinition clone()
Does a shallow clone of this definition (i.e. item definitions themselves are NOT cloned).- Specified by:
clone
in interfaceDefinition
-
deepClone
@NotNull @NotNull ComplexTypeDefinition deepClone(@NotNull @NotNull DeepCloneOperation operation)
Does a deep clone of this definition.
-
trimTo
void trimTo(@NotNull @NotNull Collection<ItemPath> paths)
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
@Experimental boolean hasSubstitutions()
-
hasSubstitutions
@Experimental default boolean hasSubstitutions(QName qName)
Returns true if item has substitutions in current container definition
-
substitution
@Experimental Optional<ItemDefinition<?>> substitution(QName name)
-
itemOrSubstitution
@Experimental default Optional<ItemDefinition<?>> itemOrSubstitution(QName name)
-
toMutable
MutableComplexTypeDefinition toMutable()
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
toMutable
in interfaceDefinition
-
getXmlAttributeDefinitions
@Experimental default List<PrismPropertyDefinition<?>> getXmlAttributeDefinitions()
-
isStrictAnyMarker
@Experimental default boolean isStrictAnyMarker()
-
isItemDefinitionRemoved
default boolean isItemDefinitionRemoved(QName itemName)
This allows to distinguish between missing and explicitly removed definitions.
-
hasOperationalOnlyItems
@Experimental default boolean hasOperationalOnlyItems()
-
-