Class PrismPropertyWrapperImpl<T>
- java.lang.Object
-
- com.evolveum.midpoint.gui.impl.prism.wrapper.ItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
- com.evolveum.midpoint.gui.impl.prism.wrapper.PrismPropertyWrapperImpl<T>
-
- All Implemented Interfaces:
ItemWrapper<PrismProperty<T>,PrismPropertyValueWrapper<T>>
,PrismPropertyWrapper<T>
,Definition
,Freezable
,ItemDefinition<PrismProperty<T>>
,PrismContextSensitive
,PrismItemAccessDefinition
,PrismPropertyDefinition<T>
,Revivable
,SmartVisitable<Definition>
,Visitable<Definition>
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
ExpressionWrapper
,ProtectedStringTypeWrapperImpl
,ResourceAttributeWrapperImpl
public class PrismPropertyWrapperImpl<T> extends ItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>> implements PrismPropertyWrapper<T>
- Author:
- katka
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
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 Constructor Description PrismPropertyWrapperImpl(PrismContainerValueWrapper<?> parent, PrismProperty<T> item, ItemStatus status)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor<Definition> visitor)
boolean
accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
@NotNull PrismPropertyDefinition<T>
clone()
@NotNull PropertyDelta<T>
createEmptyDelta(ItemPath path)
Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.protected PrismPropertyValue<T>
createNewEmptyValue(ModelServiceLocator locator)
T
defaultValue()
void
freeze()
Collection<? extends DisplayableValue<T>>
getAllowedValues()
Returns allowed values for this property.PrismPropertyDefinition<T>
getItemDefinition()
QName
getMatchingRuleQName()
Returns matching rule name.String
getPredefinedValuesOid()
Collection<? extends DisplayableValue<T>>
getSuggestedValues()
Returns suggested values for this property.Class<T>
getTypeClass()
Returns a compile-time class that is used to represent items.@NotNull PrismProperty<T>
instantiate()
Create an item instance.@NotNull PrismProperty<T>
instantiate(QName name)
Create an item instance.boolean
isEmpty()
boolean
isImmutable()
Boolean
isIndexed()
This is XSD annotation that specifies whether a property should be indexed in the storage.void
setPredefinedValuesOid(String predefinedValuesOid)
MutablePrismPropertyDefinition<T>
toMutable()
Returns an interface to mutate this definition.-
Methods inherited from class com.evolveum.midpoint.gui.impl.prism.wrapper.ItemWrapperImpl
add, addValueToDelta, adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canBeDefinitionOf, canModify, canRead, checkRequired, debugDump, debugDumpShortToString, deepClone, findItemDefinition, findObjectStatus, findObjectWrapper, getAnnotation, getAnnotations, getDelta, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getFormComponentValidator, getHelp, getItem, getItemName, getMaxOccurs, getMinOccurs, getOldItem, getParent, getParentContainerValue, getPath, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getStatus, getSubstitutionHead, getTypeName, getValue, getValueEnumerationRef, getValues, getVisibleOverwrite, isAbstract, isColumn, isDeprecated, isDynamic, isElaborate, isEmphasized, isExperimental, isHeterogeneousListItem, isIgnored, isIndexOnly, isInherited, isMetadata, isOperational, isProcessProvenanceMetadata, isReadOnly, isRuntimeSchema, isShowEmpty, isShowInVirtualContainer, isShowMetadataDetails, isValidFor, isVisible, isVisibleByVisibilityHandler, remove, removeAll, revive, setAnnotation, setColumn, setMetadata, setProcessProvenanceMetadata, setReadOnly, setShowEmpty, setShowInVirtualContainer, setShowMetadataDetails, setVisibleOverwrite, structuredType
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
debugDump, getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getSchemaMigrations, getSchemaRegistry, getTypeName, 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
adoptElementDefinitionFrom, canBeDefinitionOf, canBeDefinitionOf, debugDumpShortToString, deepClone, findItemDefinition, getItemName, getMaxOccurs, getMinOccurs, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSingleValue, isValidFor, structuredType
-
Methods inherited from interface com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper
add, checkRequired, debugDump, findObjectStatus, findObjectWrapper, getDelta, getFormComponentValidator, getItem, getParent, getParentContainerValue, getPath, getStatus, getValue, getValues, getVisibleOverwrite, isColumn, isMetadata, isProcessProvenanceMetadata, isReadOnly, isShowEmpty, isShowInVirtualContainer, isShowMetadataDetails, isVisible, remove, removeAll, setColumn, setMetadata, setProcessProvenanceMetadata, setReadOnly, setShowEmpty, setShowInVirtualContainer, setShowMetadataDetails, setVisibleOverwrite
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
canAdd, canModify, canRead
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismPropertyDefinition
isAnyType
-
-
-
-
Constructor Detail
-
PrismPropertyWrapperImpl
public PrismPropertyWrapperImpl(PrismContainerValueWrapper<?> parent, PrismProperty<T> item, ItemStatus status)
-
-
Method Detail
-
getAllowedValues
public Collection<? extends DisplayableValue<T>> getAllowedValues()
Description copied from interface:PrismPropertyDefinition
Returns allowed values for this property.- Specified by:
getAllowedValues
in interfacePrismPropertyDefinition<T>
-
getSuggestedValues
public Collection<? extends DisplayableValue<T>> getSuggestedValues()
Description copied from interface:PrismPropertyDefinition
Returns suggested values for this property.- Specified by:
getSuggestedValues
in interfacePrismPropertyDefinition<T>
-
defaultValue
public T defaultValue()
- Specified by:
defaultValue
in interfacePrismPropertyDefinition<T>
-
isIndexed
public Boolean isIndexed()
Description copied from interface:PrismPropertyDefinition
This is XSD annotation that specifies whether a property should be indexed in the storage. It can only apply to properties. It has following meaning: true: the property must be indexed. If the storage is not able to index the value, it should indicate an error. false: the property should not be indexed. null: data store decides whether to index the property or not.- Specified by:
isIndexed
in interfacePrismPropertyDefinition<T>
-
getMatchingRuleQName
public QName getMatchingRuleQName()
Description copied from interface:PrismPropertyDefinition
Returns matching rule name. Matching rules are algorithms that specify how to compare, normalize and/or order the values. E.g. there are matching rules for case insensitive string comparison, for LDAP DNs, etc.- Specified by:
getMatchingRuleQName
in interfacePrismPropertyDefinition<T>
- Returns:
- matching rule name
-
createEmptyDelta
@NotNull public @NotNull PropertyDelta<T> createEmptyDelta(ItemPath path)
Description copied from interface:ItemDefinition
Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.- Specified by:
createEmptyDelta
in interfaceItemDefinition<T>
- Specified by:
createEmptyDelta
in interfacePrismPropertyDefinition<T>
- Overrides:
createEmptyDelta
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
clone
@NotNull public @NotNull PrismPropertyDefinition<T> clone()
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<T>
- Specified by:
clone
in interfacePrismPropertyDefinition<T>
- Overrides:
clone
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
toMutable
public MutablePrismPropertyDefinition<T> toMutable()
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceItemDefinition<T>
- Specified by:
toMutable
in interfacePrismPropertyDefinition<T>
- Overrides:
toMutable
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
instantiate
@NotNull public @NotNull PrismProperty<T> instantiate()
Description copied from interface:ItemDefinition
Create an item instance. Definition name or default name will be used as an element name for the instance. The instance will otherwise be empty.- Specified by:
instantiate
in interfaceItemDefinition<T>
- Specified by:
instantiate
in interfacePrismPropertyDefinition<T>
- Overrides:
instantiate
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
instantiate
@NotNull public @NotNull PrismProperty<T> instantiate(QName name)
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<T>
- Specified by:
instantiate
in interfacePrismPropertyDefinition<T>
- Overrides:
instantiate
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
getPredefinedValuesOid
public String getPredefinedValuesOid()
- Specified by:
getPredefinedValuesOid
in interfacePrismPropertyWrapper<T>
-
setPredefinedValuesOid
public void setPredefinedValuesOid(String predefinedValuesOid)
- Specified by:
setPredefinedValuesOid
in interfacePrismPropertyWrapper<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceItemWrapper<PrismProperty<T>,PrismPropertyValueWrapper<T>>
- Overrides:
isEmpty
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
getItemDefinition
public PrismPropertyDefinition<T> getItemDefinition()
-
isImmutable
public boolean isImmutable()
- Specified by:
isImmutable
in interfaceFreezable
-
accept
public boolean accept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation)
- Specified by:
accept
in interfaceSmartVisitable<T>
- Returns:
- false if we already was here
-
accept
public void accept(Visitor<Definition> visitor)
-
createNewEmptyValue
protected PrismPropertyValue<T> createNewEmptyValue(ModelServiceLocator locator)
- Specified by:
createNewEmptyValue
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
getTypeClass
public Class<T> getTypeClass()
Description copied from interface:Definition
Returns a compile-time class that is used to represent items. E.g. returns String, Integer, subclasses of Objectable and Containerable and so on.- Specified by:
getTypeClass
in interfaceDefinition
- Specified by:
getTypeClass
in interfacePrismPropertyDefinition<T>
- Overrides:
getTypeClass
in classItemWrapperImpl<PrismProperty<T>,PrismPropertyValueWrapper<T>>
-
-