Package com.evolveum.midpoint.prism
Interface ItemDefinition<I extends Item>
-
- All Superinterfaces:
Cloneable
,DebugDumpable
,Definition
,Freezable
,PrismContextSensitive
,PrismItemAccessDefinition
,Revivable
,Serializable
,SmartVisitable<Definition>
,Visitable<Definition>
- All Known Subinterfaces:
AttributeContainerDefinitionDelegator
,AttributeDefinitionDelegator<T>
,ContainerDefinitionDelegator<C>
,ItemDefinitionDelegator<I>
,LayerRefinedAttributeDefinition<T>
,MutableItemDefinition<I>
,MutablePrismContainerDefinition<C>
,MutablePrismObjectDefinition<O>
,MutablePrismPropertyDefinition<T>
,MutablePrismReferenceDefinition
,MutableResourceAttributeDefinition<T>
,ObjectDefinitionDelegator<O>
,PrismContainerDefinition<C>
,PrismObjectDefinition<O>
,PrismPropertyDefinition<T>
,PrismReferenceDefinition
,PropertyDefinitionDelegator<T>
,ReferenceDefinitionDelegator
,RefinedAttributeDefinition<T>
,RefinedAttributeDefinitionDelegator<T>
,ResourceAttributeContainerDefinition
,ResourceAttributeDefinition<T>
- All Known Implementing Classes:
com.evolveum.midpoint.prism.impl.ItemDefinitionImpl
,LayerRefinedAttributeDefinitionImpl
,com.evolveum.midpoint.prism.impl.PrismContainerDefinitionImpl
,com.evolveum.midpoint.prism.impl.PrismPropertyDefinitionImpl
,RefinedAttributeDefinitionImpl
,ResourceAttributeContainerDefinitionImpl
,ResourceAttributeDefinitionImpl
public interface ItemDefinition<I extends Item> extends Definition, PrismItemAccessDefinition
- Author:
- mederly
-
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
adoptElementDefinitionFrom(ItemDefinition otherDef)
boolean
canBeDefinitionOf(PrismValue pvalue)
boolean
canBeDefinitionOf(I item)
@NotNull ItemDefinition<I>
clone()
ItemDelta
createEmptyDelta(ItemPath path)
void
debugDumpShortToString(StringBuilder sb)
Used in debugDumping items.ItemDefinition<I>
deepClone(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
ItemDefinition<I>
deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
<T extends ItemDefinition>
TfindItemDefinition(@NotNull ItemPath path, @NotNull Class<T> clazz)
@NotNull ItemName
getItemName()
int
getMaxOccurs()
int
getMinOccurs()
String
getNamespace()
QName
getSubstitutionHead()
Returns the name of an element this one can be substituted for (e.g.PrismReferenceValue
getValueEnumerationRef()
I
instantiate()
Create an item instance.I
instantiate(QName name)
Create an item instance.boolean
isDynamic()
Returns true if definition was created during the runtime based on a dynamic information such as xsi:type attributes in XML.boolean
isHeterogeneousListItem()
Can be used in heterogeneous lists as a list item.boolean
isIndexOnly()
EXPERIMENTAL.boolean
isInherited()
Whether an item is inherited from a supertype.default boolean
isMandatory()
default boolean
isMultiValue()
boolean
isOperational()
default boolean
isOptional()
default boolean
isSingleValue()
boolean
isValidFor(@NotNull QName elementQName, @NotNull Class<? extends ItemDefinition> clazz, boolean caseInsensitive)
boolean
isValidFor(QName elementQName, Class<? extends ItemDefinition> clazz)
void
revive(PrismContext prismContext)
Optional<ComplexTypeDefinition>
structuredType()
Returns complex type definition of item, if underlying value is possible structured.MutableItemDefinition<I>
toMutable()
-
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.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
canAdd, canModify, canRead
-
Methods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
accept
-
-
-
-
Method Detail
-
getItemName
@NotNull @NotNull ItemName getItemName()
-
getNamespace
String getNamespace()
-
getMinOccurs
int getMinOccurs()
-
getMaxOccurs
int getMaxOccurs()
-
isSingleValue
default boolean isSingleValue()
-
isMultiValue
default boolean isMultiValue()
-
isMandatory
default boolean isMandatory()
-
isOptional
default boolean isOptional()
-
isOperational
boolean isOperational()
-
isIndexOnly
@Experimental boolean isIndexOnly()
EXPERIMENTAL. If true, this item is not stored in XML representation in repo. TODO better name
-
isInherited
boolean isInherited()
Whether an item is inherited from a supertype.
-
isDynamic
boolean isDynamic()
Returns true if definition was created during the runtime based on a dynamic information such as xsi:type attributes in XML. This means that the definition needs to be stored alongside the data to have a successful serialization "roundtrip". The definition is not part of any schema and therefore cannot be determined. It may even be different for every instance of the associated item (element name).
-
getSubstitutionHead
@Experimental QName getSubstitutionHead()
Returns the name of an element this one can be substituted for (e.g. c:user -> c:object, s:pipeline -> s:expression, etc). EXPERIMENTAL
-
isHeterogeneousListItem
@Experimental boolean isHeterogeneousListItem()
Can be used in heterogeneous lists as a list item. EXPERIMENTAL.
-
getValueEnumerationRef
PrismReferenceValue getValueEnumerationRef()
-
isValidFor
boolean isValidFor(QName elementQName, Class<? extends ItemDefinition> clazz)
-
isValidFor
boolean isValidFor(@NotNull @NotNull QName elementQName, @NotNull @NotNull Class<? extends ItemDefinition> clazz, boolean caseInsensitive)
-
adoptElementDefinitionFrom
void adoptElementDefinitionFrom(ItemDefinition otherDef)
-
instantiate
@NotNull I instantiate() throws SchemaException
Create an item instance. Definition name or default name will used as an element name for the instance. The instance will otherwise be empty.- Returns:
- created item instance
- Throws:
SchemaException
-
instantiate
@NotNull I instantiate(QName name) throws SchemaException
Create an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.- Returns:
- created item instance
- Throws:
SchemaException
-
findItemDefinition
<T extends ItemDefinition> T findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<T> clazz)
-
clone
@NotNull @NotNull ItemDefinition<I> clone()
- Specified by:
clone
in interfaceDefinition
-
deepClone
ItemDefinition<I> deepClone(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
-
deepClone
ItemDefinition<I> deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
-
revive
void revive(PrismContext prismContext)
-
debugDumpShortToString
void debugDumpShortToString(StringBuilder sb)
Used in debugDumping items. Does not need to have name in it as item already has it. Does not need to have class as that is just too much info that is almost anytime pretty obvious anyway.
-
canBeDefinitionOf
boolean canBeDefinitionOf(I item)
-
canBeDefinitionOf
boolean canBeDefinitionOf(PrismValue pvalue)
-
toMutable
MutableItemDefinition<I> toMutable()
- Specified by:
toMutable
in interfaceDefinition
-
structuredType
@Experimental Optional<ComplexTypeDefinition> structuredType()
Returns complex type definition of item, if underlying value is possible structured. NOTE: This seems weird, since properties and references are simple values, but actually object reference is serialized as structured value and some of properties are also.- Returns:
-
-