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
,Definition.DefinitionMutator
,ContainerDefinitionDelegator<C>
,DefinitionDelegator
,ItemDefinitionDelegator<PrismContainer<C>>
,Freezable
,ItemDefinition<PrismContainer<C>>
,ItemDefinition.ItemDefinitionMutator
,LivePrismItemDefinition
,LocalItemDefinitionStore
,PrismContainerDefinition<C>
,PrismContainerDefinition.PrismContainerDefinitionMutator<C>
,PrismItemAccessDefinition
,PrismItemAccessDefinition.Mutable
,PrismItemBasicDefinition
,PrismItemBasicDefinition.Mutable
,PrismItemStorageDefinition
,PrismItemStorageDefinition.Mutable
,PrismLifecycleDefinition
,PrismLifecycleDefinition.Mutable
,PrismPresentationDefinition
,PrismPresentationDefinition.Mutable
,Revivable
,SchemaLookup.Aware
,SmartVisitable<Definition>
,Visitable<Definition>
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
TransformableObjectDefinition
public class TransformableContainerDefinition<C extends Containerable>
extends TransformableItemDefinition<PrismContainer<C>,PrismContainerDefinition<C>>
implements ContainerDefinitionDelegator<C>, PartiallyMutableItemDefinition.Container<C>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.Definition
Definition.DefinitionBuilder, Definition.DefinitionMutator
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.ItemDefinition
ItemDefinition.ItemDefinitionLikeBuilder, ItemDefinition.ItemDefinitionMutator
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.PrismContainerDefinition
PrismContainerDefinition.PrismContainerDefinitionMutator<C extends Containerable>
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
PrismItemAccessDefinition.Data, PrismItemAccessDefinition.Delegable, PrismItemAccessDefinition.Info, PrismItemAccessDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition.Mutable
PrismItemAccessDefinition.Mutable.Delegable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition
PrismItemBasicDefinition.Data, PrismItemBasicDefinition.Delegable, PrismItemBasicDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition.Mutable
PrismItemBasicDefinition.Mutable.Delegable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemStorageDefinition
PrismItemStorageDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition
PrismLifecycleDefinition.Data, PrismLifecycleDefinition.Delegable, PrismLifecycleDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition.Mutable
PrismLifecycleDefinition.Mutable.Delegable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
PrismPresentationDefinition.Data, PrismPresentationDefinition.Delegable, PrismPresentationDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition.Mutable
PrismPresentationDefinition.Mutable.Delegable
-
Field Summary
FieldsFields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TransformableContainerDefinition
(PrismContainerDefinition<C> delegate, ComplexTypeDefinition typeDef) -
Method Summary
Modifier and TypeMethodDescription@NotNull PrismContainerDefinition<C>
clone()
cloneWithNewDefinition
(QName newItemName, ItemDefinition<?> newDefinition) TODO@NotNull ItemDefinition<PrismContainer<C>>
cloneWithNewName
(@NotNull ItemName itemName) Returns a clone of this definition, but with name changed to the provided one.@NotNull PrismContainerDefinition<?>
cloneWithNewType
(@NotNull QName newTypeName, @NotNull ComplexTypeDefinition newCtd) Changes the type name and definition for this PCD.protected 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) <C2 extends Containerable>
PrismContainerDefinition<C2>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.<ID extends ItemDefinition<?>>
IDfindLocalItemDefinition
(@NotNull QName name, @NotNull Class<ID> clazz, boolean caseInsensitive) Returns the local item definition corresponding to given item name (optionally case-insensitive) and definition class.void
freeze()
Should be no-op (or very quick) if the object is already immutable.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.@Nullable SchemaContextDefinition
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
mutator()
Returns an interface to mutate this definition.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) void
setSchemaContextDefinition
(SchemaContextDefinition schemaContextDefinition) Methods inherited from class com.evolveum.midpoint.model.impl.schema.transform.TransformableItemDefinition
access, applyTemplate, canAdd, canModify, canRead, delegate, delegatedItem, from, getDisplayHint, getDisplayName, getDisplayOrder, getHelp, getMaxOccurs, getMergerIdentifier, getMergerInstance, getMinOccurs, getNaturalKeyConstituents, getNaturalKeyInstance, getProcessing, getValueEnumerationRef, isAlwaysUseForEquals, isDeprecated, isEmphasized, isExperimental, publicFrom, revive, setAlwaysUseForEquals, setCanAdd, setCanModify, setCanRead, setDeprecated, setDisplayHint, setDisplayName, setDisplayOrder, setEmphasized, setExperimental, setHelp, setMaxOccurs, setMergerIdentifier, setMinOccurs, setNaturalKeyConstituents, 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, getDisplayName, getDisplayOrder, getItemNames, isEmphasized, structuredType
Methods inherited from interface com.evolveum.midpoint.prism.Definition
checkMutableOnExposing
Methods inherited from interface com.evolveum.midpoint.prism.Definition.DefinitionMutator
setAnnotation, setMergerIdentifier, setNaturalKeyConstituents
Methods inherited from interface com.evolveum.midpoint.prism.deleg.DefinitionDelegator
accept, accept, debugDump, debugDump, debugDump, debugDumpLazily, debugDumpLazily, getAnnotation, getAnnotations, getDeprecatedSince, getDisplayHint, getDocumentation, getDocumentationPreview, getMergerIdentifier, getMergerInstance, getMutabilityFlag, getNaturalKeyConstituents, getNaturalKeyInstance, getPlannedRemoval, getRemovedSince, getSchemaMigrations, isAbstract, isDeprecated, isElaborate, isExperimental, isOptionalCleanup, isRemoved, isRuntimeSchema
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
getProcessing, isAlwaysUseForEquals, isIgnored
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition.ItemDefinitionMutator
setAlwaysUseForEquals, setIgnored
Methods inherited from interface com.evolveum.midpoint.prism.deleg.ItemDefinitionDelegator
canAdd, canModify, canRead, debugDumpShortToString, getDiagrams, getHelp, getItemName, getMaxOccurs, getMinOccurs, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexed, isIndexOnly, isInherited, isOperational, isSearchable, isValidFor
Methods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findItemDefinition, findLocalItemDefinition, findLocalItemDefinitionByIteration, findPropertyDefinition, findReferenceDefinition
Methods inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition
addSchemaMigration, setCanAdd, setCanModify, setCanRead, setDeprecated, setDeprecatedSince, setDiagrams, setDisplayName, setDisplayOrder, setDocumentation, setDynamic, setElaborate, setEmphasized, setExperimental, setHelp, setHeterogeneousListItem, setIndexed, setIndexOnly, setInherited, setMaxOccurs, setMinOccurs, setOperational, setOptionalCleanup, setPlannedRemoval, setProcessing, setReadOnly, setRemoved, setRemovedSince, setRuntimeSchema, setSchemaMigrations, setSearchable, setSubstitutionHead, 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, schemaLookup
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerDefinition.PrismContainerDefinitionMutator
setAlwaysUseForEquals
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
getInfo
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition.Mutable
setInfo
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition
isMandatory, isMultiValue, isOptional, isSingleValue
Methods inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition.Mutable
setDisplayHint
-
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 interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getTypeName
in interfaceDefinition
- Specified by:
getTypeName
in interfaceDefinitionDelegator
- Specified by:
getTypeName
in interfaceItemDefinitionDelegator<C extends Containerable>
- Specified by:
getTypeName
in interfacePrismItemBasicDefinition
- 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>
-
getSchemaContextDefinition
- Specified by:
getSchemaContextDefinition
in interfaceDefinition
- Specified by:
getSchemaContextDefinition
in interfaceDefinitionDelegator
-
findItemDefinition
public <T extends ItemDefinition<?>> T findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<T> clazz) Description copied from interface:LivePrismItemDefinition
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 interfaceItemDefinitionDelegator<C extends Containerable>
- Specified by:
findItemDefinition
in interfaceLivePrismItemDefinition
- Specified by:
findItemDefinition
in interfaceLocalItemDefinitionStore
-
findContainerDefinition
public <C2 extends Containerable> PrismContainerDefinition<C2> 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>
-
findLocalItemDefinition
public <ID extends ItemDefinition<?>> ID findLocalItemDefinition(@NotNull @NotNull QName name, @NotNull @NotNull Class<ID> clazz, boolean caseInsensitive) Description copied from interface:LocalItemDefinitionStore
Returns the local item definition corresponding to given item name (optionally case-insensitive) and definition class. Does not try to resolve items globally (in the case of "any" content). BEWARE: In the case of ambiguities, returns any suitable definition. (This may change.)- Specified by:
findLocalItemDefinition
in interfaceLocalItemDefinitionStore
-
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 collection is immutable or detached from the source. Don't try to modify it. It may fail or the changes may be lost.- Specified by:
getPropertyDefinitions
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getPropertyDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
-
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>>
-
cloneWithNewType
@NotNull public @NotNull PrismContainerDefinition<?> cloneWithNewType(@NotNull @NotNull QName newTypeName, @NotNull @NotNull ComplexTypeDefinition newCtd) Description copied from interface:PrismContainerDefinition
Changes the type name and definition for this PCD. Use only in special cases.- Specified by:
cloneWithNewType
in interfacePrismContainerDefinition<C extends Containerable>
-
cloneWithNewName
@NotNull public @NotNull ItemDefinition<PrismContainer<C>> cloneWithNewName(@NotNull @NotNull ItemName itemName) Description copied from interface:ItemDefinition
Returns a clone of this definition, but with name changed to the provided one.- Specified by:
cloneWithNewName
in interfaceItemDefinition<C extends Containerable>
- Overrides:
cloneWithNewName
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,
PrismContainerDefinition<C extends Containerable>> - See Also:
-
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
-
cloneWithNewDefinition
public PrismContainerDefinition<C> cloneWithNewDefinition(QName newItemName, ItemDefinition<?> newDefinition) Description copied from interface:PrismContainerDefinition
TODO- Specified by:
cloneWithNewDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
cloneWithNewDefinition
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>
-
mutator
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
mutator
in interfaceDefinition
- Specified by:
mutator
in interfaceItemDefinition<C extends Containerable>
- Specified by:
mutator
in interfacePrismContainerDefinition<C extends Containerable>
- Overrides:
mutator
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()Description copied from interface:Freezable
Should be no-op (or very quick) if the object is already immutable.- 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>>
-
setSchemaContextDefinition
- Specified by:
setSchemaContextDefinition
in interfaceDefinition.DefinitionMutator
-