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
,DefinitionDelegator
,ItemDefinitionDelegator<I>
,Freezable
,ItemDefinition<I>
,MutableDefinition
,MutableItemDefinition<I>
,PrismContextSensitive
,PrismItemAccessDefinition
,PrismItemAccessDefinition.Mutable
,Revivable
,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.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
Constructors -
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()
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) 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
Return the number of maximal value occurrences.int
Return the number of minimal value occurrences.Level of processing (ignore, minimal, auto, full) for this item/type.Reference to an object that directly or indirectly represents possible values for this item.instantiate
(QName name) Create an item instance.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
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
setCanAdd
(boolean val) void
setCanModify
(boolean val) void
setCanRead
(boolean val) void
setDeprecated
(boolean deprecated) void
setDisplayName
(String displayName) void
setDisplayOrder
(Integer displayOrder) void
setEmphasized
(boolean emphasized) void
setExperimental
(boolean experimental) void
void
setMaxOccurs
(int value) void
setMinOccurs
(int value) void
setProcessing
(ItemProcessing itemProcessing) void
setValueEnumerationRef
(PrismReferenceValue valueEnumerationRVal) Returns an interface to mutate this definition.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.DefinitionDelegator
accept, accept, debugDump, debugDump, debugDump, debugDumpLazily, debugDumpLazily, getAnnotation, getAnnotations, getDeprecatedSince, getDocumentation, getDocumentationPreview, getMutabilityFlag, getPlannedRemoval, getPrismContext, getRemovedSince, getSchemaMigrations, getSchemaRegistry, getTypeClass, getTypeName, isAbstract, isElaborate, 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, canBeDefinitionOf, canBeDefinitionOf, createEmptyDelta, debugDumpShortToString, findItemDefinition, getDiagrams, getItemName, getSubstitutionHead, instantiate, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isOperational, isSearchable, isValidFor, structuredType
Methods inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition
addDiagram, addSchemaMigration, setDeprecatedSince, setDocumentation, setDynamic, setElaborate, setHeterogeneousListItem, setIndexOnly, setInherited, setItemName, setOperational, setPlannedRemoval, setReadOnly, setRemoved, setRemovedSince, setRuntimeSchema, setSearchable, setSubstitutionHead, setTypeName
-
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:ItemDefinition
Return the number of minimal value occurrences.- Specified by:
getMinOccurs
in interfaceItemDefinition<I extends Item<?,
?>> - Specified by:
getMinOccurs
in interfaceItemDefinitionDelegator<I extends Item<?,
?>>
-
getMaxOccurs
public int getMaxOccurs()Description copied from interface:ItemDefinition
Return the number of maximal value occurrences. Any negative number means "unbounded".- Specified by:
getMaxOccurs
in interfaceItemDefinition<I extends Item<?,
?>> - Specified by:
getMaxOccurs
in interfaceItemDefinitionDelegator<I extends Item<?,
?>>
-
getProcessing
Description copied from interface:Definition
Level of processing (ignore, minimal, auto, full) for this item/type.- Specified by:
getProcessing
in interfaceDefinition
- Specified by:
getProcessing
in interfaceDefinitionDelegator
-
setCanAdd
public void setCanAdd(boolean val) - Specified by:
setCanAdd
in interfaceMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setCanAdd
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setCanAdd
in interfacePrismItemAccessDefinition.Mutable
-
setCanModify
public void setCanModify(boolean val) - Specified by:
setCanModify
in interfaceMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setCanModify
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setCanModify
in interfacePrismItemAccessDefinition.Mutable
-
setCanRead
public void setCanRead(boolean val) - Specified by:
setCanRead
in interfaceMutableItemDefinition<I extends Item<?,
?>> - 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
-
freeze
public void freeze() -
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:Definition
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 interfaceDefinition
- Specified by:
getDisplayName
in interfaceDefinitionDelegator
- Returns:
- display name string or catalog key
-
getHelp
Description copied from interface:Definition
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 interfaceDefinition
- Specified by:
getHelp
in interfaceDefinitionDelegator
- Returns:
- help string or catalog key
-
getDisplayOrder
Description copied from interface:Definition
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 interfaceDefinition
- Specified by:
getDisplayOrder
in interfaceDefinitionDelegator
-
isEmphasized
public boolean isEmphasized()Description copied from interface:Definition
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.- Specified by:
isEmphasized
in interfaceDefinition
- Specified by:
isEmphasized
in interfaceDefinitionDelegator
-
isDeprecated
public boolean isDeprecated()- Specified by:
isDeprecated
in interfaceDefinition
- Specified by:
isDeprecated
in interfaceDefinitionDelegator
-
isExperimental
public boolean isExperimental()Description copied from interface:Definition
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 interfaceDefinition
- Specified by:
isExperimental
in interfaceDefinitionDelegator
-
setMinOccurs
public void setMinOccurs(int value) - Specified by:
setMinOccurs
in interfaceMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setMinOccurs
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setMaxOccurs
public void setMaxOccurs(int value) - Specified by:
setMaxOccurs
in interfaceMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setMaxOccurs
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setValueEnumerationRef
- Specified by:
setValueEnumerationRef
in interfaceMutableItemDefinition<I extends Item<?,
?>> - Specified by:
setValueEnumerationRef
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setDisplayName
- Specified by:
setDisplayName
in interfaceMutableDefinition
- Specified by:
setDisplayName
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setHelp
- Specified by:
setHelp
in interfaceMutableDefinition
- Specified by:
setHelp
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setDisplayOrder
- Specified by:
setDisplayOrder
in interfaceMutableDefinition
- Specified by:
setDisplayOrder
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setEmphasized
public void setEmphasized(boolean emphasized) - Specified by:
setEmphasized
in interfaceMutableDefinition
- Specified by:
setEmphasized
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setDeprecated
public void setDeprecated(boolean deprecated) - Specified by:
setDeprecated
in interfaceMutableDefinition
- Specified by:
setDeprecated
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
setExperimental
public void setExperimental(boolean experimental) - Specified by:
setExperimental
in interfaceMutableDefinition
- Specified by:
setExperimental
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
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 interfaceMutableDefinition
- Specified by:
setProcessing
in interfacePartiallyMutableItemDefinition<I extends Item<?,
?>>
-
toMutable
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
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
-