Package com.evolveum.midpoint.prism
Interface ComplexTypeDefinition
-
- All Superinterfaces:
Cloneable,DebugDumpable,Definition,Freezable,LocalDefinitionStore,PrismContextSensitive,Revivable,Serializable,SmartVisitable<Definition>,TypeDefinition,Visitable<Definition>
- All Known Subinterfaces:
ComplexTypeDefinitionDelegator,CompositeRefinedObjectClassDefinition,LayerRefinedObjectClassDefinition,MutableComplexTypeDefinition,MutableObjectClassComplexTypeDefinition,ObjectClassComplexTypeDefinition,ObjectClassTypeDefinitionDelegator,RefinedObjectClassDefinition
- All Known Implementing Classes:
com.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl,CompositeRefinedObjectClassDefinitionImpl,LayerRefinedObjectClassDefinitionImpl,ObjectClassComplexTypeDefinitionImpl,RefinedObjectClassDefinitionImpl
public interface ComplexTypeDefinition extends TypeDefinition, LocalDefinitionStore
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, mederly
-
-
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 ComplexTypeDefinitionclone()Does a shallow clone of this definition (i.e.default booleancontainsItemDefinition(QName itemName)@NotNull ComplexTypeDefinitiondeepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)Does a deep clone of this definition.@Nullable StringgetDefaultNamespace()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 QNamegetExtensionForType()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.booleanhasSubstitutions()booleanisContainerMarker()Flag 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.booleanisListMarker()booleanisObjectMarker()Flag indicating whether this type was marked as "object" in the original schema.booleanisReferenceMarker()Flag indicating whether this type was marked as "objectReference" in the original schema.booleanisShared()Is this definition shared, i.e.booleanisXsdAnyMarker()True 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.voidrevive(PrismContext prismContext)Optional<ItemDefinition<?>>substitution(QName name)MutableComplexTypeDefinitiontoMutable()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.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getAnnotation, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getSchemaMigrations, getSchemaRegistry, getTypeClass, getTypeClassIfKnown, 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.LocalDefinitionStore
findContainerDefinition, findContainerDefinition, findItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findNamedItemDefinition, findPropertyDefinition, findReferenceDefinition, 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 type ItemDefinition. However, very often subtypes of this type are used, e.g. ResourceAttributeDefinition, RefinedAttributeDefinition, LayerRefinedAttributeDefinition, and so on. Although returned as a list, the order of definitions is insignificant. (TODO change to set?) The list is unmodifiable.
-
isShared
@Experimental boolean isShared()
Is this definition shared, i.e. used by more than one prism object? If so, it should not be e.g. trimmed. EXPERIMENTAL
-
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()
-
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).
-
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).
-
merge
void merge(ComplexTypeDefinition otherComplexTypeDef)
Copies cloned definitions from the other type definition into this one. (TODO remove from the interface?)
-
revive
void revive(PrismContext prismContext)
-
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:
clonein interfaceDefinition
-
deepClone
@NotNull @NotNull ComplexTypeDefinition deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
Does a deep clone of this definition.- Parameters:
ctdMap- Keeps already cloned definitions when 'ultra deep cloning' is not requested. Each definition is then cloned only once.onThisPath- Keeps already cloned definitions on the path from root to current node; in order to prevent infinite loops when doing ultra deep cloning.
-
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!
-
containsItemDefinition
default boolean containsItemDefinition(QName itemName)
-
hasSubstitutions
@Experimental boolean hasSubstitutions()
-
substitution
@Experimental Optional<ItemDefinition<?>> substitution(QName name)
-
itemOrSubstitution
@Experimental default Optional<ItemDefinition<?>> itemOrSubstitution(QName name)
-
toMutable
MutableComplexTypeDefinition toMutable()
- Specified by:
toMutablein interfaceDefinition
-
isItemDefinitionRemoved
default boolean isItemDefinitionRemoved(QName itemName)
This allows to distinguish between missing and explicitly removed definitions.
-
-