Class TransformableContainerDefinition<C extends Containerable>
- java.lang.Object
-
- 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>>
,LocalDefinitionStore
,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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransformableContainerDefinition.AttributeContainer
-
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 Modifier and Type Field Description protected TransformableComplexTypeDefinition
complexTypeDefinition
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransformableContainerDefinition(PrismContainerDefinition<C> delegate)
TransformableContainerDefinition(PrismContainerDefinition<C> delegate, ComplexTypeDefinition typeDef)
-
Method Summary
-
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, isMutableAccess, publicFrom, revive, setCanAdd, setCanModify, setCanRead, setDeprecated, setDisplayName, setDisplayOrder, setEmphasized, setExperimental, setHelp, setMaxOccurs, setMinOccurs, setProcessing, setValueEnumerationRef, toString
-
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, getDeprecatedSince, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getSchemaRegistry, getTypeClassIfKnown, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, setAnnotation
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
-
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
isMultiValue, isSingleValue, revive
-
Methods inherited from interface com.evolveum.midpoint.prism.deleg.ItemDefinitionDelegator
adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canBeDefinitionOf, canModify, canRead, debugDumpShortToString, getDiagrams, getItemName, getMaxOccurs, getMinOccurs, getNamespace, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isOperational, isOptional, isValidFor, isValidFor
-
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, setItemName, setMaxOccurs, setMinOccurs, setOperational, setPlannedRemoval, setProcessing, setReadOnly, setRuntimeSchema, setSubstitutionHead, setTypeName, setValueEnumerationRef
-
Methods inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition.Container
createContainerDefinition, createContainerDefinition, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, setCompileTimeClass, setComplexTypeDefinition, setInherited
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerDefinition
structuredType
-
-
-
-
Field Detail
-
complexTypeDefinition
protected final TransformableComplexTypeDefinition complexTypeDefinition
-
-
Constructor Detail
-
TransformableContainerDefinition
protected TransformableContainerDefinition(PrismContainerDefinition<C> delegate)
-
TransformableContainerDefinition
public TransformableContainerDefinition(PrismContainerDefinition<C> delegate, ComplexTypeDefinition typeDef)
-
-
Method Detail
-
of
public static <C extends Containerable> TransformableContainerDefinition<C> of(PrismContainerDefinition<C> originalItem)
-
getTypeName
@NotNull public @NotNull QName 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
public Class getTypeClass()
Description copied from interface:Definition
Returns a compile-time class that is used to represent items. E.g. returns String, Integer, sublcasses 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 <ID extends ItemDefinition> ID findItemDefinition(@NotNull @NotNull ItemPath path)
- Specified by:
findItemDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findItemDefinition
in interfaceLocalDefinitionStore
-
findItemDefinition
public <T extends ItemDefinition> T findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<T> clazz)
- 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 interfaceLocalDefinitionStore
-
findLocalItemDefinition
public <ID extends ItemDefinition> ID findLocalItemDefinition(@NotNull @NotNull QName name, @NotNull @NotNull Class<ID> clazz, boolean caseInsensitive)
- Specified by:
findLocalItemDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findLocalItemDefinition
in interfaceLocalDefinitionStore
-
findNamedItemDefinition
public <ID extends ItemDefinition> ID findNamedItemDefinition(@NotNull @NotNull QName firstName, @NotNull @NotNull ItemPath rest, @NotNull @NotNull Class<ID> clazz)
- Specified by:
findNamedItemDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findNamedItemDefinition
in interfaceLocalDefinitionStore
-
findContainerDefinition
public <C extends Containerable> PrismContainerDefinition<C> findContainerDefinition(@NotNull @NotNull ItemPath path)
- Specified by:
findContainerDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findContainerDefinition
in interfaceLocalDefinitionStore
-
findLocalItemDefinition
public <ID extends ItemDefinition> ID findLocalItemDefinition(@NotNull @NotNull QName name)
- Specified by:
findLocalItemDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findLocalItemDefinition
in interfaceLocalDefinitionStore
-
findPropertyDefinition
public <T> PrismPropertyDefinition<T> findPropertyDefinition(@NotNull @NotNull ItemPath path)
- Specified by:
findPropertyDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findPropertyDefinition
in interfaceLocalDefinitionStore
-
findReferenceDefinition
public PrismReferenceDefinition findReferenceDefinition(@NotNull @NotNull ItemName name)
- Specified by:
findReferenceDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findReferenceDefinition
in interfaceLocalDefinitionStore
-
findReferenceDefinition
public PrismReferenceDefinition findReferenceDefinition(@NotNull @NotNull ItemPath path)
- Specified by:
findReferenceDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findReferenceDefinition
in interfaceLocalDefinitionStore
-
findContainerDefinition
public <C extends Containerable> PrismContainerDefinition<C> findContainerDefinition(@NotNull @NotNull String name)
- Specified by:
findContainerDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
findContainerDefinition
in interfaceLocalDefinitionStore
-
getCompileTimeClass
public Class<C> getCompileTimeClass()
- Specified by:
getCompileTimeClass
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getCompileTimeClass
in interfacePrismContainerDefinition<C extends Containerable>
-
getComplexTypeDefinition
public TransformableComplexTypeDefinition getComplexTypeDefinition()
- Specified by:
getComplexTypeDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getComplexTypeDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
isEmpty
in interfacePrismContainerDefinition<C extends Containerable>
-
getDefaultNamespace
public String getDefaultNamespace()
- Specified by:
getDefaultNamespace
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getDefaultNamespace
in interfacePrismContainerDefinition<C extends Containerable>
-
getIgnoredNamespaces
public List<String> getIgnoredNamespaces()
- Specified by:
getIgnoredNamespaces
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getIgnoredNamespaces
in interfacePrismContainerDefinition<C extends Containerable>
-
getDefinitions
public List<? extends ItemDefinition> getDefinitions()
- Specified by:
getDefinitions
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
-
isCompletelyDefined
public boolean isCompletelyDefined()
Description copied from interface:PrismContainerDefinition
Returns true if the instantiated container can contain only items that are explicitly defined here.- Specified by:
isCompletelyDefined
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
isCompletelyDefined
in interfacePrismContainerDefinition<C extends Containerable>
-
getPropertyDefinitions
public List<PrismPropertyDefinition> getPropertyDefinitions()
- Specified by:
getPropertyDefinitions
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
getPropertyDefinitions
in interfacePrismContainerDefinition<C extends Containerable>
-
createEmptyDelta
public ContainerDelta<C> createEmptyDelta(ItemPath 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
@NotNull public @NotNull PrismContainerDefinition<C> 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
public ItemDefinition<PrismContainer<C>> deepClone(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
- 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>>
-
deepClone
public ItemDefinition<PrismContainer<C>> deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
- 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
protected TransformableContainerDefinition<C> copy(ComplexTypeDefinition def)
-
cloneWithReplacedDefinition
public PrismContainerDefinition<C> cloneWithReplacedDefinition(QName itemName, ItemDefinition newDefinition)
- Specified by:
cloneWithReplacedDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
cloneWithReplacedDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
replaceDefinition
public void replaceDefinition(QName itemName, ItemDefinition newDefinition)
- Specified by:
replaceDefinition
in interfaceContainerDefinitionDelegator<C extends Containerable>
- Specified by:
replaceDefinition
in interfacePrismContainerDefinition<C extends Containerable>
-
toMutable
public MutablePrismContainerDefinition<C> toMutable()
- 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
public PrismContainer<C> instantiate() throws SchemaException
Description copied from interface:ItemDefinition
Create an item instance. Definition name or default name will 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>
- Returns:
- created item instance
- Throws:
SchemaException
-
instantiate
@NotNull public @NotNull PrismContainer<C> instantiate(QName elementName) throws SchemaException
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>>
- Returns:
- created item instance
- Throws:
SchemaException
-
publicView
protected PrismContainerDefinition<C> publicView()
- Specified by:
publicView
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
ensureMutableType
public static void ensureMutableType(PrismContainerValue<?> pcv)
-
require
public static <C extends Containerable> TransformableContainerDefinition<C> require(PrismContainerDefinition<C> assocContainer)
-
copy
protected TransformableContainerDefinition<C> copy()
- Specified by:
copy
in classTransformableItemDefinition<PrismContainer<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
-