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.ReferenceNested 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) voidbooleancanAdd()Returns true if this item can be added: it can be part of an object that is created.booleanReturns true if this item can be modified (updated).booleancanRead()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 voiddelegatedItem(DelegatedItem<D> deleg) voidfreeze()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.intReturn the number of maximal value occurrences.intReturn 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.booleanbooleanTrue for definitions that are more important than others and that should be emphasized during presentation.booleanExperimental functionality is not stable and it may be changed in any future release without any warning.booleanstatic <ID extends ItemDefinition<?>>
IDpublicFrom(ID definition) protected abstract Dvoidrevive(PrismContext prismContext) TODO: Is revive necessary if prism context is static?voidsetCanAdd(boolean val) voidsetCanModify(boolean val) voidsetCanRead(boolean val) voidsetDeprecated(boolean deprecated) voidsetDisplayName(String displayName) voidsetDisplayOrder(Integer displayOrder) voidsetEmphasized(boolean emphasized) voidsetExperimental(boolean experimental) voidvoidsetMaxOccurs(int value) voidsetMinOccurs(int value) voidsetProcessing(ItemProcessing itemProcessing) voidsetValueEnumerationRef(PrismReferenceValue valueEnumerationRVal) Returns an interface to mutate this definition.toString()Methods inherited from class com.evolveum.midpoint.model.impl.schema.transform.TransformableDefinition
annotationsOverrides, getAnnotation, setAnnotationMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, setAnnotationMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutableMethods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
isMandatory, isMultiValue, isOptional, isSingleValueMethods 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, structuredTypeMethods 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:
delegatein interfaceDefinitionDelegator- Specified by:
delegatein interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
canAdd
public boolean canAdd()Description copied from interface:PrismItemAccessDefinitionReturns 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:
canAddin interfaceItemDefinitionDelegator<I extends Item<?,?>> - Specified by:
canAddin interfacePrismItemAccessDefinition
-
canModify
public boolean canModify()Description copied from interface:PrismItemAccessDefinitionReturns 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:
canModifyin interfaceItemDefinitionDelegator<I extends Item<?,?>> - Specified by:
canModifyin interfacePrismItemAccessDefinition
-
canRead
public boolean canRead()Description copied from interface:PrismItemAccessDefinitionReturns 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:
canReadin interfaceItemDefinitionDelegator<I extends Item<?,?>> - Specified by:
canReadin interfacePrismItemAccessDefinition
-
getMinOccurs
public int getMinOccurs()Description copied from interface:ItemDefinitionReturn the number of minimal value occurrences.- Specified by:
getMinOccursin interfaceItemDefinition<I extends Item<?,?>> - Specified by:
getMinOccursin interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
getMaxOccurs
public int getMaxOccurs()Description copied from interface:ItemDefinitionReturn the number of maximal value occurrences. Any negative number means "unbounded".- Specified by:
getMaxOccursin interfaceItemDefinition<I extends Item<?,?>> - Specified by:
getMaxOccursin interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
getProcessing
Description copied from interface:DefinitionLevel of processing (ignore, minimal, auto, full) for this item/type.- Specified by:
getProcessingin interfaceDefinition- Specified by:
getProcessingin interfaceDefinitionDelegator
-
setCanAdd
public void setCanAdd(boolean val) - Specified by:
setCanAddin interfaceMutableItemDefinition<I extends Item<?,?>> - Specified by:
setCanAddin interfacePartiallyMutableItemDefinition<I extends Item<?,?>> - Specified by:
setCanAddin interfacePrismItemAccessDefinition.Mutable
-
setCanModify
public void setCanModify(boolean val) - Specified by:
setCanModifyin interfaceMutableItemDefinition<I extends Item<?,?>> - Specified by:
setCanModifyin interfacePartiallyMutableItemDefinition<I extends Item<?,?>> - Specified by:
setCanModifyin interfacePrismItemAccessDefinition.Mutable
-
setCanRead
public void setCanRead(boolean val) - Specified by:
setCanReadin interfaceMutableItemDefinition<I extends Item<?,?>> - Specified by:
setCanReadin interfacePartiallyMutableItemDefinition<I extends Item<?,?>> - Specified by:
setCanReadin interfacePrismItemAccessDefinition.Mutable
-
publicView
-
clone
- Specified by:
clonein interfaceDefinition- Specified by:
clonein interfaceItemDefinition<I extends Item<?,?>> - Overrides:
clonein classTransformableDefinition
-
freeze
public void freeze() -
isImmutable
public boolean isImmutable()- Specified by:
isImmutablein interfaceFreezable
-
revive
Description copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary) -
access
-
applyTemplate
-
getDisplayName
Description copied from interface:DefinitionReturns 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:
getDisplayNamein interfaceDefinition- Specified by:
getDisplayNamein interfaceDefinitionDelegator- Returns:
- display name string or catalog key
-
getHelp
Description copied from interface:DefinitionReturns 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:
getHelpin interfaceDefinition- Specified by:
getHelpin interfaceDefinitionDelegator- Returns:
- help string or catalog key
-
getDisplayOrder
Description copied from interface:DefinitionSpecifies 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:
getDisplayOrderin interfaceDefinition- Specified by:
getDisplayOrderin interfaceDefinitionDelegator
-
isEmphasized
public boolean isEmphasized()Description copied from interface:DefinitionTrue 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:
isEmphasizedin interfaceDefinition- Specified by:
isEmphasizedin interfaceDefinitionDelegator
-
isDeprecated
public boolean isDeprecated()- Specified by:
isDeprecatedin interfaceDefinition- Specified by:
isDeprecatedin interfaceDefinitionDelegator
-
isExperimental
public boolean isExperimental()Description copied from interface:DefinitionExperimental functionality is not stable and it may be changed in any future release without any warning. Use at your own risk.- Specified by:
isExperimentalin interfaceDefinition- Specified by:
isExperimentalin interfaceDefinitionDelegator
-
setMinOccurs
public void setMinOccurs(int value) - Specified by:
setMinOccursin interfaceMutableItemDefinition<I extends Item<?,?>> - Specified by:
setMinOccursin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setMaxOccurs
public void setMaxOccurs(int value) - Specified by:
setMaxOccursin interfaceMutableItemDefinition<I extends Item<?,?>> - Specified by:
setMaxOccursin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setValueEnumerationRef
- Specified by:
setValueEnumerationRefin interfaceMutableItemDefinition<I extends Item<?,?>> - Specified by:
setValueEnumerationRefin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setDisplayName
- Specified by:
setDisplayNamein interfaceMutableDefinition- Specified by:
setDisplayNamein interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setHelp
- Specified by:
setHelpin interfaceMutableDefinition- Specified by:
setHelpin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setDisplayOrder
- Specified by:
setDisplayOrderin interfaceMutableDefinition- Specified by:
setDisplayOrderin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setEmphasized
public void setEmphasized(boolean emphasized) - Specified by:
setEmphasizedin interfaceMutableDefinition- Specified by:
setEmphasizedin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setDeprecated
public void setDeprecated(boolean deprecated) - Specified by:
setDeprecatedin interfaceMutableDefinition- Specified by:
setDeprecatedin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
setExperimental
public void setExperimental(boolean experimental) - Specified by:
setExperimentalin interfaceMutableDefinition- Specified by:
setExperimentalin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
getValueEnumerationRef
Description copied from interface:ItemDefinitionReference 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:
getValueEnumerationRefin interfaceItemDefinition<I extends Item<?,?>> - Specified by:
getValueEnumerationRefin interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
setProcessing
- Specified by:
setProcessingin interfaceMutableDefinition- Specified by:
setProcessingin interfacePartiallyMutableItemDefinition<I extends Item<?,?>>
-
toMutable
Description copied from interface:DefinitionReturns an interface to mutate this definition.- Specified by:
toMutablein interfaceDefinition- Specified by:
toMutablein interfaceItemDefinition<I extends Item<?,?>>
-
deepClone
Description copied from interface:ItemDefinitionTODO document- Specified by:
deepClonein interfaceItemDefinition<I extends Item<?,?>> - Specified by:
deepClonein interfaceItemDefinitionDelegator<I extends Item<?,?>>
-
copy
-
toString
-
instantiate
Description copied from interface:ItemDefinitionCreate an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.- Specified by:
instantiatein interfaceItemDefinition<I extends Item<?,?>> - Specified by:
instantiatein interfaceItemDefinitionDelegator<I extends Item<?,?>> - Throws:
SchemaException
-
delegatedItem
-