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:
- Serialized Form
-
-
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 Modifier Constructor Description protected
TransformableItemDefinition(D delegate)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static TransformableItemDefinition<?,?>
access(ItemDefinition<?> itemDef)
void
applyTemplate(ObjectTemplateItemDefinitionType apply)
boolean
canAdd()
Returns true if this item can be added: it can be part of an object that is created.boolean
canModify()
Returns true if this item can be modified (updated).boolean
canRead()
Returns true if this item can be read (displayed).ItemDefinition<I>
clone()
protected abstract TransformableItemDefinition<I,D>
copy()
ItemDefinition<I>
deepClone(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
ItemDefinition<I>
deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
D
delegate()
protected void
delegatedItem(DelegatedItem<D> deleg)
void
freeze()
static <ID extends ItemDefinition<?>>
TransformableItemDefinition<?,ID>from(ID originalItem)
String
getDisplayName()
Returns display name.Integer
getDisplayOrder()
Specifies an order in which the item should be displayed relative to other items at the same level.String
getHelp()
Returns help string.int
getMaxOccurs()
int
getMinOccurs()
ItemProcessing
getProcessing()
PrismReferenceValue
getValueEnumerationRef()
I
instantiate(QName name)
Create an item instance.boolean
isDeprecated()
boolean
isEmphasized()
True for definitions that are more important than others and that should be emphasized during presentation.boolean
isExperimental()
Experimental functionality is not stable and it may be changed in any future release without any warning.boolean
isImmutable()
static boolean
isMutableAccess(ItemDefinition<?> definition)
static <ID extends ItemDefinition<?>>
IDpublicFrom(ID definition)
protected abstract D
publicView()
void
revive(PrismContext prismContext)
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
setHelp(String help)
void
setMaxOccurs(int value)
void
setMinOccurs(int value)
void
setProcessing(ItemProcessing itemProcessing)
void
setValueEnumerationRef(PrismReferenceValue valueEnumerationRVal)
MutableItemDefinition<I>
toMutable()
String
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, getDeprecatedSince, getDocumentation, getDocumentationPreview, getMutabilityFlag, getPlannedRemoval, getPrismContext, getSchemaMigrations, getSchemaRegistry, getTypeClass, getTypeClassIfKnown, getTypeName, isAbstract, isElaborate, isIgnored, 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, getNamespace, getSubstitutionHead, instantiate, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isOperational, isValidFor, isValidFor, structuredType
-
Methods inherited from interface com.evolveum.midpoint.model.impl.schema.transform.PartiallyMutableItemDefinition
addDiagram, addSchemaMigration, setDeprecatedSince, setDocumentation, setDynamic, setElaborate, setHeterogeneousListItem, setIndexOnly, setItemName, setOperational, setPlannedRemoval, setReadOnly, setRuntimeSchema, setSubstitutionHead, setTypeName
-
-
-
-
Constructor Detail
-
TransformableItemDefinition
protected TransformableItemDefinition(D delegate)
-
-
Method Detail
-
from
public static <ID extends ItemDefinition<?>> TransformableItemDefinition<?,ID> from(ID originalItem)
-
publicFrom
public static <ID extends ItemDefinition<?>> ID publicFrom(ID definition)
-
isMutableAccess
public static boolean isMutableAccess(ItemDefinition<?> definition)
-
delegate
public D 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()
- Specified by:
getMinOccurs
in interfaceItemDefinition<I extends Item<?,?>>
- Specified by:
getMinOccurs
in interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
getMaxOccurs
public int getMaxOccurs()
- Specified by:
getMaxOccurs
in interfaceItemDefinition<I extends Item<?,?>>
- Specified by:
getMaxOccurs
in interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
getProcessing
public ItemProcessing getProcessing()
- 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
protected abstract D publicView()
-
clone
public ItemDefinition<I> clone()
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<I extends Item<?,?>>
- Overrides:
clone
in classTransformableDefinition
-
isImmutable
public boolean isImmutable()
- Specified by:
isImmutable
in interfaceFreezable
-
revive
public void revive(PrismContext prismContext)
-
access
public static TransformableItemDefinition<?,?> access(ItemDefinition<?> itemDef)
-
applyTemplate
public void applyTemplate(ObjectTemplateItemDefinitionType apply)
-
getDisplayName
public String 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
public String 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
public Integer 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
public void setValueEnumerationRef(PrismReferenceValue valueEnumerationRVal)
- Specified by:
setValueEnumerationRef
in interfaceMutableItemDefinition<I extends Item<?,?>>
- Specified by:
setValueEnumerationRef
in interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setDisplayName
public void setDisplayName(String displayName)
- Specified by:
setDisplayName
in interfaceMutableDefinition
- Specified by:
setDisplayName
in interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setHelp
public void setHelp(String help)
- Specified by:
setHelp
in interfaceMutableDefinition
- Specified by:
setHelp
in interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setDisplayOrder
public void setDisplayOrder(Integer displayOrder)
- 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
public PrismReferenceValue getValueEnumerationRef()
- Specified by:
getValueEnumerationRef
in interfaceItemDefinition<I extends Item<?,?>>
- Specified by:
getValueEnumerationRef
in interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
setProcessing
public void setProcessing(ItemProcessing itemProcessing)
- Specified by:
setProcessing
in interfaceMutableDefinition
- Specified by:
setProcessing
in interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
toMutable
public MutableItemDefinition<I> toMutable()
- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceItemDefinition<I extends Item<?,?>>
-
deepClone
public ItemDefinition<I> deepClone(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
- Specified by:
deepClone
in interfaceItemDefinition<I extends Item<?,?>>
- Specified by:
deepClone
in interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
deepClone
public ItemDefinition<I> deepClone(Map<QName,ComplexTypeDefinition> ctdMap, Map<QName,ComplexTypeDefinition> onThisPath, Consumer<ItemDefinition> postCloneAction)
- Specified by:
deepClone
in interfaceItemDefinition<I extends Item<?,?>>
- Specified by:
deepClone
in interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
copy
protected abstract TransformableItemDefinition<I,D> copy()
-
instantiate
@NotNull public I instantiate(QName name) 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<I extends Item<?,?>>
- Specified by:
instantiate
in interfaceItemDefinitionDelegator<I extends Item<?,?>>
- Returns:
- created item instance
- Throws:
SchemaException
-
delegatedItem
protected void delegatedItem(DelegatedItem<D> deleg)
-
-