Class TransformableItemDefinition<I extends Item<?,?>,D extends ItemDefinition<I>>
java.lang.Object
com.evolveum.midpoint.model.impl.schema.transform.TransformableDefinition
com.evolveum.midpoint.model.impl.schema.transform.TransformableItemDefinition<I,D>
- All Implemented Interfaces:
PartiallyMutableItemDefinition<I>
,Definition
,Definition.DefinitionMutator
,DefinitionDelegator
,ItemDefinitionDelegator<I>
,Freezable
,ItemDefinition<I>
,ItemDefinition.ItemDefinitionMutator
,LivePrismItemDefinition
,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:
TransformableContainerDefinition
,TransformablePropertyDefinition
,TransformableReferenceDefinition
public abstract class TransformableItemDefinition<I extends Item<?,?>,D extends ItemDefinition<I>>
extends TransformableDefinition
implements ItemDefinitionDelegator<I>, PrismItemAccessDefinition.Mutable, PartiallyMutableItemDefinition<I>
- 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.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
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TransformableItemDefinition<?,
?> access
(ItemDefinition<?> itemDef) void
boolean
canAdd()
Returns true if this item can be added: it can be part of an object that is created.boolean
Returns true if this item can be modified (updated).boolean
canRead()
Returns true if this item can be read (displayed).@NotNull ItemDefinition<I>
clone()
@NotNull ItemDefinition<I>
cloneWithNewName
(@NotNull ItemName itemName) Returns a clone of this definition, but with name changed to the provided one.protected abstract TransformableItemDefinition<I,
D> copy()
deepClone
(@NotNull DeepCloneOperation operation) TODO documentdelegate()
protected void
delegatedItem
(DelegatedItem<D> deleg) void
freeze()
static <ID extends ItemDefinition<?>>
TransformableItemDefinition<?,ID> from
(ID originalItem) Enumeration annotation that specifies how/whether the item should be displayed.Returns display name.Specifies an order in which the item should be displayed relative to other items at the same level.getHelp()
Returns help string.int
Returns the number of maximal value occurrences.@Nullable String
@Nullable ItemMerger
getMergerInstance
(@NotNull MergeStrategy strategy, @Nullable OriginMarker originMarker) int
Returns the number of minimal value occurrences.@Nullable NaturalKeyDefinition
Reference to an object that directly or indirectly represents possible values for this item.instantiate
(QName name) Create an item instance.boolean
Item which should always be used for equals even if it is operational and strategy does not consider operational items.boolean
boolean
True for definitions that are more important than others and that should be emphasized during presentation.boolean
Experimental functionality is not stable and it may be changed in any future release without any warning.boolean
mutator()
Returns an interface to mutate this definition.static <ID extends ItemDefinition<?>>
IDpublicFrom
(ID definition) protected abstract D
void
revive
(PrismContext prismContext) TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)void
setAlwaysUseForEquals
(boolean alwaysUseForEquals) void
setCanAdd
(boolean val) void
setCanModify
(boolean val) void
setCanRead
(boolean val) void
setDeprecated
(boolean deprecated) void
setDisplayHint
(DisplayHint displayHint) void
setDisplayName
(String displayName) void
setDisplayOrder
(Integer displayOrder) void
setEmphasized
(boolean emphasized) void
setExperimental
(boolean experimental) void
void
setMaxOccurs
(int value) void
setMergerIdentifier
(String mergerIdentifier) void
setMinOccurs
(int value) void
setNaturalKeyConstituents
(List<QName> naturalKeyConstituents) void
setProcessing
(ItemProcessing itemProcessing) void
setValueEnumerationRef
(PrismReferenceValue valueEnumerationRVal) 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.Definition
checkMutableOnExposing
Methods inherited from interface com.evolveum.midpoint.prism.Definition.DefinitionMutator
setAnnotation, setSchemaContextDefinition
Methods inherited from interface com.evolveum.midpoint.prism.deleg.DefinitionDelegator
accept, accept, debugDump, debugDump, debugDump, debugDumpLazily, debugDumpLazily, getAnnotation, getAnnotations, getDeprecatedSince, getDocumentation, getDocumentationPreview, getMutabilityFlag, getPlannedRemoval, getRemovedSince, getSchemaContextDefinition, getSchemaMigrations, getTypeClass, isAbstract, isElaborate, isOptionalCleanup, isRemoved, isRuntimeSchema
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
isIgnored
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition.ItemDefinitionMutator
setIgnored
Methods inherited from interface com.evolveum.midpoint.prism.deleg.ItemDefinitionDelegator
createEmptyDelta, debugDumpShortToString, findItemDefinition, getDiagrams, getItemName, getSubstitutionHead, getTypeName, instantiate, isDynamic, isHeterogeneousListItem, isIndexed, isIndexOnly, isInherited, isOperational, isSearchable, isValidFor, structuredType
Methods inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition
addSchemaMigration, setDeprecatedSince, setDiagrams, setDocumentation, setDynamic, setElaborate, setHeterogeneousListItem, setIndexed, setIndexOnly, setInherited, setOperational, setOptionalCleanup, setPlannedRemoval, setReadOnly, setRemoved, setRemovedSince, setRuntimeSchema, setSchemaMigrations, setSearchable, setSubstitutionHead
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
getTypeName, isMandatory, isMultiValue, isOptional, isSingleValue
Methods inherited from interface com.evolveum.midpoint.prism.schema.SchemaLookup.Aware
schemaLookup
-
Constructor Details
-
TransformableItemDefinition
-
-
Method Details
-
from
public static <ID extends ItemDefinition<?>> TransformableItemDefinition<?,ID> from(ID originalItem) -
publicFrom
-
delegate
- Specified by:
delegate
in interfaceDefinitionDelegator
- Specified by:
delegate
in interfaceItemDefinitionDelegator<I extends Item<?,
?>>
-
canAdd
public boolean canAdd()Description copied from interface:PrismItemAccessDefinition
Returns true if this item can be added: it can be part of an object that is created. In case of containers this means that the container itself should be displayed in creation forms E.g. that the container label or block should be displayed. This usually happens if the container contains at least one createable item. This does NOT mean that also all the container items can be created. The sub-item permissions are controlled by similar properties on the items. This property only applies to the container itself: the "shell" of the container.- Specified by:
canAdd
in interfaceItemDefinitionDelegator<I extends Item<?,
?>> - Specified by:
canAdd
in interfacePrismItemAccessDefinition
-
canModify
public boolean canModify()Description copied from interface:PrismItemAccessDefinition
Returns true if this item can be modified (updated). In case of containers this means that the container itself should be displayed in modification forms E.g. that the container label or block should be displayed. This usually happens if the container contains at least one modifiable item. This does NOT mean that also all the container items can be modified. The sub-item permissions are controlled by similar properties on the items. This property only applies to the container itself: the "shell" of the container.- Specified by:
canModify
in interfaceItemDefinitionDelegator<I extends Item<?,
?>> - Specified by:
canModify
in interfacePrismItemAccessDefinition
-
canRead
public boolean canRead()Description copied from interface:PrismItemAccessDefinition
Returns true if this item can be read (displayed). In case of containers this flag is, strictly speaking, not applicable. Container is an empty shell. What matters is access to individual sub-item. However, for containers this value has a "hint" meaning. It means that the container itself contains something that is readable. Which can be used as a hint by the presentation to display container label or block. This usually happens if the container contains at least one readable item. This does NOT mean that also all the container items can be displayed. The sub-item permissions are controlled by similar properties on the items. This property only applies to the container itself: the "shell" of the container.Note: It was considered to use a different meaning for this flag - a meaning that would allow canRead()=false containers to have readable items. However, this was found not to be very useful. Therefore the "something readable inside" meaning was confirmed instead.
- Specified by:
canRead
in interfaceItemDefinitionDelegator<I extends Item<?,
?>> - Specified by:
canRead
in interfacePrismItemAccessDefinition
-
getMinOccurs
public int getMinOccurs()Description copied from interface:PrismItemBasicDefinition
Returns the number of minimal value occurrences.- Specified by:
getMinOccurs
in interfaceItemDefinitionDelegator<I extends Item<?,
?>> - Specified by:
getMinOccurs
in interfacePrismItemBasicDefinition
-
getMaxOccurs
public int getMaxOccurs()Description copied from interface:PrismItemBasicDefinition
Returns the number of maximal value occurrences. Any negative number means "unbounded".- Specified by:
getMaxOccurs
in interfaceItemDefinitionDelegator<I extends Item<?,
?>> - Specified by:
getMaxOccurs
in interfacePrismItemBasicDefinition
-
getProcessing
- Specified by:
getProcessing
in interfaceItemDefinition<I extends Item<?,
?>>
-
isAlwaysUseForEquals
public boolean isAlwaysUseForEquals()Description copied from interface:ItemDefinition
Item which should always be used for equals even if it is operational and strategy does not consider operational items. EXPERIMENTAL- Specified by:
isAlwaysUseForEquals
in interfaceItemDefinition<I extends Item<?,
?>>
-
setAlwaysUseForEquals
public void setAlwaysUseForEquals(boolean alwaysUseForEquals) - Specified by:
setAlwaysUseForEquals
in interfaceItemDefinition.ItemDefinitionMutator
-
setCanAdd
public void setCanAdd(boolean val) - Specified by:
setCanAdd
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setCanAdd
in interfacePrismItemAccessDefinition.Mutable
-
setCanModify
public void setCanModify(boolean val) - Specified by:
setCanModify
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setCanModify
in interfacePrismItemAccessDefinition.Mutable
-
setCanRead
public void setCanRead(boolean val) - Specified by:
setCanRead
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setCanRead
in interfacePrismItemAccessDefinition.Mutable
-
publicView
-
clone
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<I extends Item<?,
?>> - Overrides:
clone
in classTransformableDefinition
-
cloneWithNewName
Description copied from interface:ItemDefinition
Returns a clone of this definition, but with name changed to the provided one.- Specified by:
cloneWithNewName
in interfaceItemDefinition<I extends Item<?,
?>> - See Also:
-
freeze
public void freeze() -
getMergerIdentifier
- Specified by:
getMergerIdentifier
in interfaceDefinition
- Specified by:
getMergerIdentifier
in interfaceDefinitionDelegator
-
setMergerIdentifier
- Specified by:
setMergerIdentifier
in interfaceDefinition.DefinitionMutator
-
getMergerInstance
@Nullable public @Nullable ItemMerger getMergerInstance(@NotNull @NotNull MergeStrategy strategy, @Nullable @Nullable OriginMarker originMarker) - Specified by:
getMergerInstance
in interfaceDefinition
- Specified by:
getMergerInstance
in interfaceDefinitionDelegator
-
getNaturalKeyInstance
- Specified by:
getNaturalKeyInstance
in interfaceDefinition
- Specified by:
getNaturalKeyInstance
in interfaceDefinitionDelegator
-
getNaturalKeyConstituents
- Specified by:
getNaturalKeyConstituents
in interfaceDefinition
- Specified by:
getNaturalKeyConstituents
in interfaceDefinitionDelegator
-
setNaturalKeyConstituents
- Specified by:
setNaturalKeyConstituents
in interfaceDefinition.DefinitionMutator
-
isImmutable
public boolean isImmutable()- Specified by:
isImmutable
in interfaceFreezable
-
revive
Description copied from interface:Revivable
TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary) -
access
-
applyTemplate
-
getDisplayName
Description copied from interface:PrismPresentationDefinition
Returns display name. Specifies the printable name of the object class or attribute. It must contain a printable string. It may also contain a key to catalog file. Returns null if no display name is set. Corresponds to "displayName" XSD annotation.- Specified by:
getDisplayName
in interfaceDefinitionDelegator
- Specified by:
getDisplayName
in interfacePrismPresentationDefinition
- Returns:
- display name string or catalog key
-
getHelp
Description copied from interface:PrismPresentationDefinition
Returns help string. Specifies the help text or a key to catalog file for a help text. The help text may be displayed in any suitable way by the GUI. It should explain the meaning of an attribute or object class. Returns null if no help string is set. Corresponds to "help" XSD annotation.- Specified by:
getHelp
in interfaceDefinitionDelegator
- Specified by:
getHelp
in interfaceItemDefinitionDelegator<I extends Item<?,
?>> - Specified by:
getHelp
in interfacePrismPresentationDefinition
- Returns:
- help string or catalog key
-
getDisplayOrder
Description copied from interface:PrismPresentationDefinition
Specifies an order in which the item should be displayed relative to other items at the same level. The items will be displayed by sorting them by the values of displayOrder annotation (ascending). Items that do not have any displayOrder annotation will be displayed last. The ordering of values with the same displayOrder is undefined and it may be arbitrary.- Specified by:
getDisplayOrder
in interfaceDefinitionDelegator
- Specified by:
getDisplayOrder
in interfacePrismPresentationDefinition
-
getDisplayHint
Description copied from interface:PrismPresentationDefinition
Enumeration annotation that specifies how/whether the item should be displayed. It is also a replacement for the old "emphasized" annotation.- Specified by:
getDisplayHint
in interfaceDefinitionDelegator
- Specified by:
getDisplayHint
in interfacePrismPresentationDefinition
-
isEmphasized
public boolean isEmphasized()Description copied from interface:PrismPresentationDefinition
True for definitions that are more important than others and that should be emphasized during presentation. E.g. the emphasized definitions will always be displayed in the user interfaces (even if they are empty), they will always be included in the dumps, etc. TODO probably deprecated, isn't it?- Specified by:
isEmphasized
in interfaceDefinitionDelegator
- Specified by:
isEmphasized
in interfacePrismPresentationDefinition
-
isDeprecated
public boolean isDeprecated()- Specified by:
isDeprecated
in interfaceDefinitionDelegator
- Specified by:
isDeprecated
in interfacePrismLifecycleDefinition
-
isExperimental
public boolean isExperimental()Description copied from interface:PrismLifecycleDefinition
Experimental functionality is not stable and it may be changed in any future release without any warning. Use at your own risk.- Specified by:
isExperimental
in interfaceDefinitionDelegator
- Specified by:
isExperimental
in interfacePrismLifecycleDefinition
-
setMinOccurs
public void setMinOccurs(int value) - Specified by:
setMinOccurs
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setMinOccurs
in interfacePrismItemBasicDefinition.Mutable
-
setMaxOccurs
public void setMaxOccurs(int value) - Specified by:
setMaxOccurs
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setMaxOccurs
in interfacePrismItemBasicDefinition.Mutable
-
setValueEnumerationRef
- Specified by:
setValueEnumerationRef
in interfaceItemDefinition.ItemDefinitionMutator
- Specified by:
setValueEnumerationRef
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setDisplayName
- Specified by:
setDisplayName
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setDisplayName
in interfacePrismPresentationDefinition.Mutable
-
setHelp
- Specified by:
setHelp
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setHelp
in interfacePrismPresentationDefinition.Mutable
-
setDisplayOrder
- Specified by:
setDisplayOrder
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setDisplayOrder
in interfacePrismPresentationDefinition.Mutable
-
setDisplayHint
- Specified by:
setDisplayHint
in interfacePrismPresentationDefinition.Mutable
-
setEmphasized
public void setEmphasized(boolean emphasized) - Specified by:
setEmphasized
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setEmphasized
in interfacePrismPresentationDefinition.Mutable
-
setDeprecated
public void setDeprecated(boolean deprecated) - Specified by:
setDeprecated
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setDeprecated
in interfacePrismLifecycleDefinition.Mutable
-
setExperimental
public void setExperimental(boolean experimental) - Specified by:
setExperimental
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setExperimental
in interfacePrismLifecycleDefinition.Mutable
-
getValueEnumerationRef
Description copied from interface:ItemDefinition
Reference to an object that directly or indirectly represents possible values for this item. We do not define here what exactly the object has to be. It can be a lookup table, script that dynamically produces the values or anything similar. The object must produce the values of the correct type for this item otherwise an error occurs.- Specified by:
getValueEnumerationRef
in interfaceItemDefinition<I extends Item<?,
?>> - Specified by:
getValueEnumerationRef
in interfaceItemDefinitionDelegator<I extends Item<?,
?>>
-
setProcessing
- Specified by:
setProcessing
in interfaceItemDefinition.ItemDefinitionMutator
- Specified by:
setProcessing
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
mutator
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
mutator
in interfaceDefinition
- Specified by:
mutator
in interfaceItemDefinition<I extends Item<?,
?>>
-
deepClone
Description copied from interface:ItemDefinition
TODO document- Specified by:
deepClone
in interfaceItemDefinition<I extends Item<?,
?>> - Specified by:
deepClone
in interfaceItemDefinitionDelegator<I extends Item<?,
?>>
-
copy
-
toString
-
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<I extends Item<?,
?>> - Specified by:
instantiate
in interfaceItemDefinitionDelegator<I extends Item<?,
?>> - Throws:
SchemaException
-
delegatedItem
-