Class TransformableContainerDefinition<C extends Containerable>
java.lang.Object
com.evolveum.midpoint.model.impl.schema.transform.TransformableDefinition
com.evolveum.midpoint.model.impl.schema.transform.TransformableItemDefinition<PrismContainer<C>,PrismContainerDefinition<C>>
com.evolveum.midpoint.model.impl.schema.transform.TransformableContainerDefinition<C>
- All Implemented Interfaces:
PartiallyMutableItemDefinition<PrismContainer<C>>
,PartiallyMutableItemDefinition.Container<C>
,Definition
,ContainerDefinitionDelegator<C>
,DefinitionDelegator
,ItemDefinitionDelegator<PrismContainer<C>>
,Freezable
,ItemDefinition<PrismContainer<C>>
,LocalItemDefinitionStore
,MutableDefinition
,MutableItemDefinition<PrismContainer<C>>
,MutablePrismContainerDefinition<C>
,PrismContainerDefinition<C>
,PrismContextSensitive
,PrismItemAccessDefinition
,PrismItemAccessDefinition.Mutable
,Revivable
,SmartVisitable<Definition>
,Visitable<Definition>
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
TransformableContainerDefinition.AttributeContainer
,TransformableObjectDefinition
public class TransformableContainerDefinition<C extends Containerable>
extends TransformableItemDefinition<PrismContainer<C>,PrismContainerDefinition<C>>
implements ContainerDefinitionDelegator<C>, PartiallyMutableItemDefinition.Container<C>
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Nested classes/interfaces inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition
PartiallyMutableItemDefinition.Attribute<T>, PartiallyMutableItemDefinition.Container<C extends Containerable>, PartiallyMutableItemDefinition.Property<T>, PartiallyMutableItemDefinition.Reference
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
-
Constructor Summary
ModifierConstructorDescriptionprotected
TransformableContainerDefinition
(PrismContainerDefinition<C> delegate, ComplexTypeDefinition typeDef) -
Method Summary
Modifier and TypeMethodDescription@NotNull PrismContainerDefinition<C>
clone()
cloneWithReplacedDefinition
(QName itemName, ItemDefinition<?> newDefinition) TODOprotected TransformableContainerDefinition<C>
copy()
protected TransformableContainerDefinition<C>
@NotNull ContainerDelta<C>
createEmptyDelta
(ItemPath path) Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.deepClone
(@NotNull DeepCloneOperation operation) TODO documentstatic void
ensureMutableType
(PrismContainerValue<?> pcv) <C extends Containerable>
PrismContainerDefinition<C>findContainerDefinition
(@NotNull ItemPath path) ReturnsPrismContainerDefinition
corresponding to given path (rooted at this store).<T extends ItemDefinition<?>>
TfindItemDefinition
(@NotNull ItemPath path, @NotNull Class<T> clazz) Used to find a matching item definition _within_ this definition.void
freeze()
Static (compile-time) class holding the container values.Definition of the container values.@NotNull List<? extends ItemDefinition<?>>
Returns a list of item definitions in this container.Returns set of property definitions.Returns a compile-time class that is used to represent items.@NotNull QName
Returns a name of the type for this definition.@NotNull PrismContainer<C>
Create an item instance.@NotNull PrismContainer<C>
instantiate
(QName elementName) Create an item instance.boolean
isEmpty()
TODOboolean
static <C extends Containerable>
TransformableContainerDefinition<C>of
(PrismContainerDefinition<C> originalItem) protected PrismContainerDefinition<C>
void
replaceDefinition
(QName itemName, ItemDefinition<?> newDefinition) TODOstatic <C extends Containerable>
TransformableContainerDefinition<C>require
(PrismContainerDefinition<C> assocContainer) Returns an interface to mutate this definition.Methods inherited from class com.evolveum.midpoint.model.impl.schema.transform.TransformableItemDefinition
access, applyTemplate, canAdd, canModify, canRead, delegate, delegatedItem, from, getDisplayName, getDisplayOrder, getHelp, getMaxOccurs, getMinOccurs, getProcessing, getValueEnumerationRef, isDeprecated, isEmphasized, isExperimental, publicFrom, revive, setCanAdd, setCanModify, setCanRead, setDeprecated, setDisplayName, setDisplayOrder, setEmphasized, setExperimental, setHelp, setMaxOccurs, setMinOccurs, setProcessing, setValueEnumerationRef, toString
Methods inherited from class com.evolveum.midpoint.model.impl.schema.transform.TransformableDefinition
annotationsOverrides, getAnnotation, setAnnotation
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.prism.deleg.ContainerDefinitionDelegator
canRepresent, createValue, delegate, getItemNames, structuredType
Methods inherited from interface com.evolveum.midpoint.prism.deleg.DefinitionDelegator
accept, accept, debugDump, debugDump, debugDump, debugDumpLazily, debugDumpLazily, getAnnotation, getAnnotations, getDeprecatedSince, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getPrismContext, getProcessing, getRemovedSince, getSchemaMigrations, getSchemaRegistry, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRemoved, isRuntimeSchema, setAnnotation
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
isMandatory, isMultiValue, isOptional, isSingleValue
Methods inherited from interface com.evolveum.midpoint.prism.deleg.ItemDefinitionDelegator
adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canBeDefinitionOf, canModify, canRead, debugDumpShortToString, getDiagrams, getItemName, getMaxOccurs, getMinOccurs, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isOperational, isSearchable, isValidFor
Methods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinition
Methods inherited from interface com.evolveum.midpoint.prism.MutablePrismContainerDefinition
setAlwaysUseForEquals
Methods inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition
addDiagram, addSchemaMigration, setCanAdd, setCanModify, setCanRead, setDeprecated, setDeprecatedSince, setDisplayName, setDisplayOrder, setDocumentation, setDynamic, setElaborate, setEmphasized, setExperimental, setHelp, setHeterogeneousListItem, setIndexOnly, setInherited, setItemName, setMaxOccurs, setMinOccurs, setOperational, setPlannedRemoval, setProcessing, setReadOnly, setRemoved, setRemovedSince, setRuntimeSchema, setSearchable, setSubstitutionHead, setTypeName, setValueEnumerationRef
Methods inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition.Container
createContainerDefinition, createContainerDefinition, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, setCompileTimeClass, setComplexTypeDefinition
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerDefinition
getAlwaysUseForEquals, isAlwaysUseForEquals, isCompletelyDefined, structuredType
-
Field Details
-
complexTypeDefinition
-
-
Constructor Details
-
TransformableContainerDefinition
-
TransformableContainerDefinition
public TransformableContainerDefinition(PrismContainerDefinition<C> delegate, ComplexTypeDefinition typeDef)
-
-
Method Details
-
of
public static <C extends Containerable> TransformableContainerDefinition<C> of(PrismContainerDefinition<C> originalItem) -
getTypeName
Description copied from interface:Definition
Returns a name of the type for this definition. The type can be part of the compile-time schema or it can be defined at run time. Examples of the former case are types like c:UserType, xsd:string, or even flexible ones like c:ExtensionType or c:ShadowAttributesType. Examples of the latter case are types used in - custom extensions, like ext:LocationsType (where ext = e.g. http://example.com/extension), - resource schema, like ri:inetOrgPerson (ri = http://.../resource/instance-3), - connector schema, like TODO In XML representation that corresponds to the name of the XSD type. Although beware, the run-time types do not have statically defined structure. And the resource and connector-related types may even represent different kinds of objects within different contexts (e.g. two distinct resources both with ri:AccountObjectClass types). Also note that for complex type definitions, the type name serves as a unique identifier. On the other hand, for item definitions, it is just one of its attributes; primary key is item name in that case. The type name should be fully qualified. (TODO reconsider this)- Specified by:
getTypeName
in interfaceDefinition
- Specified by:
getTypeName
in interfaceDefinitionDelegator
- Returns:
- the type name
-
getTypeClass
Description copied from interface:Definition
Returns 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:
getTypeClass
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getTypeClass
in interfaceDefinition
- Specified by:
getTypeClass
in interfaceDefinitionDelegator
- Specified by:
getTypeClass
in interfacePrismContainerDefinition<C extends Containerable>
-
findItemDefinition
public <T extends ItemDefinition<?>> T findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<T> clazz) Description copied from interface:ItemDefinition
Used to find a matching item definition _within_ this definition. Treats e.g. de-referencing in prism references.- Specified by:
findItemDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findItemDefinition
in interfaceItemDefinition<C extends Containerable>
- Specified by:
findItemDefinition
in interfaceItemDefinitionDelegator<C extends Containerable>
- Specified by:
findItemDefinition
in interfaceLocalItemDefinitionStore
-
findContainerDefinition
public <C extends Containerable> PrismContainerDefinition<C> findContainerDefinition(@NotNull @NotNull ItemPath path) Description copied from interface:LocalItemDefinitionStore
ReturnsPrismContainerDefinition
corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.- Specified by:
findContainerDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findContainerDefinition
in interfaceLocalItemDefinitionStore
-
getCompileTimeClass
Description copied from interface:PrismContainerDefinition
Static (compile-time) class holding the container values. May be null. (Let's not mark it as @Nullable to avoid lots of warnings.)- Specified by:
getCompileTimeClass
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getCompileTimeClass
in interfacePrismContainerDefinition<C extends Containerable>
-
getComplexTypeDefinition
Description copied from interface:PrismContainerDefinition
Definition 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:
getComplexTypeDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getComplexTypeDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
isEmpty
public boolean isEmpty()Description copied from interface:PrismContainerDefinition
TODO- Specified by:
isEmpty
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
isEmpty
in interfacePrismContainerDefinition<C extends Containerable>
-
getDefinitions
Description copied from interface:PrismContainerDefinition
Returns a list of item definitions in this container. It is intentionally aList
because it is ordered. (To provide standard format for serialization.) Usually obtained fromComplexTypeDefinition
. So please do not modify the content of the list!- Specified by:
getDefinitions
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getDefinitions
in interfaceLocalItemDefinitionStore
- Specified by:
getDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
-
getPropertyDefinitions
Description copied from interface:PrismContainerDefinition
Returns 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:
getPropertyDefinitions
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getPropertyDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
- Returns:
- set of definitions
-
createEmptyDelta
Description copied from interface:ItemDefinition
Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.- Specified by:
createEmptyDelta
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
createEmptyDelta
in interfaceItemDefinition<C extends Containerable>
- Specified by:
createEmptyDelta
in interfaceItemDefinitionDelegator<C extends Containerable>
- Specified by:
createEmptyDelta
in interfacePrismContainerDefinition<C extends Containerable>
-
clone
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<C extends Containerable>
- Specified by:
clone
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
clone
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-
deepClone
Description copied from interface:ItemDefinition
TODO document- Specified by:
deepClone
in interfaceItemDefinition<C extends Containerable>
- Specified by:
deepClone
in interfaceItemDefinitionDelegator<C extends Containerable>
- Overrides:
deepClone
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-
copy
-
cloneWithReplacedDefinition
public PrismContainerDefinition<C> cloneWithReplacedDefinition(QName itemName, ItemDefinition<?> newDefinition) Description copied from interface:PrismContainerDefinition
TODO- Specified by:
cloneWithReplacedDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
cloneWithReplacedDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
replaceDefinition
Description copied from interface:PrismContainerDefinition
TODO- Specified by:
replaceDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
replaceDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
toMutable
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceItemDefinition<C extends Containerable>
- Specified by:
toMutable
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
toMutable
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-
isImmutable
public boolean isImmutable()- Specified by:
isImmutable
in interfaceFreezable
- Overrides:
isImmutable
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-
freeze
public void freeze()- Specified by:
freeze
in interfaceFreezable
- Overrides:
freeze
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-
instantiate
Description copied from interface:ItemDefinition
Create 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:
instantiate
in interfaceItemDefinition<C extends Containerable>
- Specified by:
instantiate
in interfaceItemDefinitionDelegator<C extends Containerable>
- Throws:
SchemaException
-
instantiate
Description copied from interface:ItemDefinition
Create an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.- Specified by:
instantiate
in interfaceItemDefinition<C extends Containerable>
- Specified by:
instantiate
in interfaceItemDefinitionDelegator<C extends Containerable>
- Overrides:
instantiate
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - Throws:
SchemaException
-
publicView
- Specified by:
publicView
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-
ensureMutableType
-
require
public static <C extends Containerable> TransformableContainerDefinition<C> require(PrismContainerDefinition<C> assocContainer) -
copy
- Specified by:
copy
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>>
-