Class ShadowSimpleAttributeDefinitionImpl<T>
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.schema.processor.ShadowAttributeDefinitionImpl<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>,T,ShadowSimpleAttribute<T>,NativeShadowSimpleAttributeDefinition<T>>
com.evolveum.midpoint.schema.processor.ShadowSimpleAttributeDefinitionImpl<T>
- All Implemented Interfaces:
Definition
,Freezable
,ItemDefinition<PrismProperty<T>>
,LivePrismItemDefinition
,PrismItemAccessDefinition
,PrismItemBasicDefinition
,PrismItemInstantiableDefinition<T,
,PrismPropertyValue<T>, PrismProperty<T>, PrismPropertyDefinition<T>, PropertyDelta<T>> PrismItemMatchingDefinition<T>
,PrismItemMiscDefinition
,PrismItemStorageDefinition
,PrismItemValuesDefinition<T>
,PrismLifecycleDefinition
,PrismPresentationDefinition
,PrismPropertyDefinition<T>
,Revivable
,SchemaLookup.Aware
,SmartVisitable<Definition>
,Visitable<Definition>
,LayeredDefinition
,ResourceObjectInboundDefinition.ItemInboundDefinition
,ShadowAttributeDefinition<PrismPropertyValue<T>,
,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> ShadowAttributeUcfDefinition
,ShadowItemDefinition
,ShadowItemLayeredDefinition
,ShadowItemLifecycleDefinitionDefaults
,ShadowSimpleAttributeDefinition<T>
,DebugDumpable
,ShortDumpable
,Serializable
,Cloneable
public class ShadowSimpleAttributeDefinitionImpl<T>
extends ShadowAttributeDefinitionImpl<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>,T,ShadowSimpleAttribute<T>,NativeShadowSimpleAttributeDefinition<T>>
implements ShadowSimpleAttributeDefinition<T>, ShadowItemDefinition
An attribute definition (obtained typically from the connector),
optionally refined by information from `schemaHandling` section of a resource definition.
The implementation consists of a pair of
ShadowAttributeDefinitionImpl.nativeDefinition
and ShadowAttributeDefinitionImpl.customizationBean
,
plus some auxiliary information for faster access.
This class intentionally does NOT inherit from PrismPropertyDefinitionImpl
. Instead, a large part of the required
functionality is delegated to ShadowAttributeDefinitionImpl.nativeDefinition
which provides analogous functionality.-
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.prism.PrismItemAccessDefinition
PrismItemAccessDefinition.Data, PrismItemAccessDefinition.Delegable, PrismItemAccessDefinition.Info, PrismItemAccessDefinition.Mutable
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.PrismItemMatchingDefinition
PrismItemMatchingDefinition.Data<T>, PrismItemMatchingDefinition.Delegable<T>, PrismItemMatchingDefinition.Mutator
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemMiscDefinition
PrismItemMiscDefinition.Data, PrismItemMiscDefinition.Delegable, PrismItemMiscDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemStorageDefinition
PrismItemStorageDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemValuesDefinition
PrismItemValuesDefinition.Data<T>, PrismItemValuesDefinition.Delegable<T>, PrismItemValuesDefinition.Mutator<T>
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.PrismPresentationDefinition
PrismPresentationDefinition.Data, PrismPresentationDefinition.Delegable, PrismPresentationDefinition.Mutable
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismPropertyDefinition
PrismPropertyDefinition.PrismPropertyDefinitionMutator<T>, PrismPropertyDefinition.PrismPropertyLikeDefinitionBuilder<T>
Nested classes/interfaces inherited from interface com.evolveum.midpoint.schema.processor.ShadowAttributeUcfDefinition
ShadowAttributeUcfDefinition.Data, ShadowAttributeUcfDefinition.Delegable, ShadowAttributeUcfDefinition.Mutable
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescription@NotNull ShadowSimpleAttributeDefinitionImpl<T>
clone()
@NotNull ShadowSimpleAttributeDefinitionImpl<T>
cloneWithNewName
(@NotNull ItemName itemName) Returns a clone of this definition, but with name changed to the provided one.static <T> ShadowSimpleAttributeDefinition<T>
create
(@NotNull NativeShadowSimpleAttributeDefinition<T> nativeDefinition) This is the creation point from native form only.static <T> ShadowSimpleAttributeDefinition<T>
create
(@NotNull NativeShadowSimpleAttributeDefinition<T> nativeDefinition, @Nullable ResourceAttributeDefinitionType customizationBean, boolean ignored) This is the main creation point.@NotNull PropertyDelta<T>
createEmptyDelta
(ItemPath path) Creates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.createPrismValueFromRealValue
(@NotNull Object realValue) void
Used in debugDumping items.deepClone
(@NotNull DeepCloneOperation operation) TODO documentboolean
protected void
<T2 extends ItemDefinition<?>>
T2findItemDefinition
(@NotNull ItemPath path, @NotNull Class<T2> clazz) Used to find a matching item definition _within_ this definition.@NotNull ShadowSimpleAttributeDefinitionImpl<T>
Creates a view of the current definition for a given layer.@Nullable Collection<? extends DisplayableValue<T>>
Returns allowed values for this property.Return a human readable name of this class suitable for logs.@NotNull MatchingRule<T>
Returns the resolvedMatchingRule
for this property.Returns matching rule name.@Nullable SchemaContextDefinition
@Nullable Collection<? extends DisplayableValue<T>>
Returns suggested values for this property.Returns a compile-time class that is used to represent items.@NotNull QName
Returns a name of the type for this definition.int
hashCode()
boolean
Is this attribute configured to serve as a display name?Is this attribute designated as a secondary identifier via `schemaHandling`?boolean
If `true`, the item does not exist on the resource, but is simulated by midPoint.boolean
isValidFor
(@NotNull QName elementQName, @NotNull Class<? extends ItemDefinition<?>> clazz, boolean caseInsensitive) Returns true if this definition is valid for given element name and definition class, in either case-sensitive (the default) or case-insensitive way.mutator()
Returns an interface to mutate this definition.void
revive
(PrismContext prismContext) TODO: Is revive necessary if prism context is static?Methods inherited from class com.evolveum.midpoint.schema.processor.ShadowAttributeDefinitionImpl
accept, accept, canAdd, canAdd, canModify, canModify, canRead, canRead, debugDump, debugDump, getAnnotation, getAnnotations, getChangeApplicationMode, getCurrentLayer, getDescription, getDiagrams, getDisplayHint, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getFetchStrategy, getFrameworkAttributeName, getHelp, getInboundMappingBeans, getIntolerantValuePatterns, getItemName, getLifecycleState, getLimitations, getMaxOccurs, getMaxOccurs, getMergerIdentifier, getMergerInstance, getMinOccurs, getMinOccurs, getModificationPriority, getNativeAttributeName, getNaturalKeyConstituents, getNaturalKeyInstance, getOutboundMappingBean, getProcessing, getProcessing, getReadReplaceMode, getReturnedByDefault, getSchemaMigrations, getStorageStrategy, getSubstitutionHead, getTolerantValuePatterns, getValueEnumerationRef, hasRefinements, instantiate, instantiate, isAbstract, isAlwaysUseForEquals, isCached, isDynamic, isElaborate, isEmphasized, isExclusiveStrong, isHeterogeneousListItem, isIndexed, isIndexOnly, isInherited, isOperational, isOptionalCleanup, isRuntimeSchema, isTolerant, isVolatileOnAddOperation, isVolatileOnModifyOperation, isVolatilityTrigger, performFreeze, setAnnotation, setOverrideCanAdd, setOverrideCanModify, setOverrideCanRead, shortDump, structuredType, toString
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.prism.Definition
checkMutableOnExposing, debugDump, getAnnotation, getAnnotations, getMergerIdentifier, getMergerInstance, getMutabilityFlag, getNaturalKeyConstituents, getNaturalKeyInstance, isAbstract, isElaborate, isOptionalCleanup, isRuntimeSchema
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
getProcessing, getSubstitutionHead, getValueEnumerationRef, instantiate, instantiate, isAlwaysUseForEquals, isDynamic, isHeterogeneousListItem, isIgnored, isInherited, isOperational, structuredType
Methods inherited from interface com.evolveum.midpoint.schema.processor.LayeredDefinition
getCurrentLayer
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
canAdd, canModify, canRead, getInfo
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition
getItemName, getMaxOccurs, getMinOccurs, isMandatory, isMultiValue, isOptional, isSingleValue
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemInstantiableDefinition
instantiate, instantiate
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemMatchingDefinition
getNormalizer, getStringNormalizerForPolyStringProperty, getStringNormalizerIfApplicable, isCustomPolyString
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemMiscDefinition
getProcessing
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemStorageDefinition
isIndexed, isIndexOnly, isSearchable
Methods inherited from interface com.evolveum.midpoint.prism.PrismItemValuesDefinition
getValueEnumerationRef
Methods inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition
getSchemaMigrations
Methods inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
getDiagrams, getDisplayHint, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, isEmphasized
Methods inherited from interface com.evolveum.midpoint.prism.PrismPropertyDefinition
convertStringValueToPolyString, getTypeClassLegacy, isAnyType
Methods inherited from interface com.evolveum.midpoint.prism.schema.SchemaLookup.Aware
schemaLookup
Methods inherited from interface com.evolveum.midpoint.schema.processor.ShadowAttributeDefinition
debugDump, getChangeApplicationMode, getDescription, getFetchStrategy, getInboundMappingBeans, getIntolerantValuePatterns, getLifecycleState, getModificationPriority, getOutboundMappingBean, getReadReplaceMode, getStandardPath, getStorageStrategy, getTolerantValuePatterns, hasOutboundMapping, hasRefinements, instantiate, instantiate, instantiateFrom, instantiateFromRealValue, instantiateFromRealValues, isCached, isEffectivelyCached, isExclusiveStrong, isIgnored, isReturnedByDefault, isTolerant, isVisible, isVisible, isVolatileOnAddOperation, isVolatileOnModifyOperation, isVolatilityTrigger, setOverrideCanAdd, setOverrideCanModify, setOverrideCanRead
Methods inherited from interface com.evolveum.midpoint.schema.processor.ShadowAttributeUcfDefinition
getFrameworkAttributeName, getNativeAttributeName, getReturnedByDefault
Methods inherited from interface com.evolveum.midpoint.schema.processor.ShadowItemLayeredDefinition
canAdd, canModify, canRead, getLimitations, getMaxOccurs, getMinOccurs, getProcessing, isMandatory, isMultiValue, isOptional, isSingleValue
Methods inherited from interface com.evolveum.midpoint.schema.processor.ShadowItemLifecycleDefinitionDefaults
getDeprecatedSince, getPlannedRemoval, getRemovedSince, isDeprecated, isExperimental, isRemoved
Methods inherited from interface com.evolveum.midpoint.schema.processor.ShadowSimpleAttributeDefinition
convertPrismValue, createEmptyDelta, toNormalizationAware
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDump, shortDumpLazily
Methods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
accept
-
Method Details
-
create
public static <T> ShadowSimpleAttributeDefinition<T> create(@NotNull @NotNull NativeShadowSimpleAttributeDefinition<T> nativeDefinition, @Nullable @Nullable ResourceAttributeDefinitionType customizationBean, boolean ignored) throws SchemaException This is the main creation point.- Throws:
SchemaException
- If there's a problem with the customization bean.
-
create
public static <T> ShadowSimpleAttributeDefinition<T> create(@NotNull @NotNull NativeShadowSimpleAttributeDefinition<T> nativeDefinition) throws SchemaException This is the creation point from native form only.- Throws:
SchemaException
-
forLayer
@NotNull public @NotNull ShadowSimpleAttributeDefinitionImpl<T> forLayer(@NotNull @NotNull LayerType layer) Description copied from interface:ShadowAttributeDefinition
Creates a view of the current definition for a given layer. (May return even the original object e.g. if the layer matches the current one.)- Specified by:
forLayer
in interfaceShadowAttributeDefinition<PrismPropertyValue<T>,
ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Specified by:
forLayer
in interfaceShadowSimpleAttributeDefinition<T>
-
clone
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<T>
- Specified by:
clone
in interfacePrismPropertyDefinition<T>
- Specified by:
clone
in interfaceShadowAttributeDefinition<PrismPropertyValue<T>,
ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Specified by:
clone
in interfaceShadowSimpleAttributeDefinition<T>
- Specified by:
clone
in classShadowAttributeDefinitionImpl<PrismPropertyValue<T>,
ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>, NativeShadowSimpleAttributeDefinition<T>>
-
isSecondaryIdentifierOverride
Description copied from interface:ShadowSimpleAttributeDefinition
Is this attribute designated as a secondary identifier via `schemaHandling`?- Specified by:
isSecondaryIdentifierOverride
in interfaceShadowSimpleAttributeDefinition<T>
- See Also:
-
getMatchingRuleQName
Description copied from interface:PrismItemMatchingDefinition
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. TODO describe the semantics where special normalizations are to be used Use with care until this description is complete.- Specified by:
getMatchingRuleQName
in interfacePrismItemMatchingDefinition<T>
- Returns:
- matching rule name
-
getMatchingRule
Description copied from interface:PrismItemMatchingDefinition
Returns the resolvedMatchingRule
for this property.- Specified by:
getMatchingRule
in interfacePrismItemMatchingDefinition<T>
-
getTypeName
Description copied from interface:Definition
Returns a name of the type for this definition. The type can be part of the compile-time schema or it can be defined at run time. Examples of the former case are types like c:UserType, xsd:string, or even flexible ones like c:ExtensionType or c:ShadowAttributesType. Examples of the latter case are types used in - custom extensions, like ext:LocationsType (where ext = e.g. http://example.com/extension), - resource schema, like ri:inetOrgPerson (ri = http://.../resource/instance-3), - connector schema, like TODO In XML representation that corresponds to the name of the XSD type. Although beware, the run-time types do not have statically defined structure. And the resource and connector-related types may even represent different kinds of objects within different contexts (e.g. two distinct resources both with ri:AccountObjectClass types). Also note that for complex type definitions, the type name serves as a unique identifier. On the other hand, for item definitions, it is just one of its attributes; primary key is item name in that case. The type name should be fully qualified. (TODO reconsider this)- Specified by:
getTypeName
in interfaceDefinition
- Specified by:
getTypeName
in interfacePrismItemBasicDefinition
- Specified by:
getTypeName
in interfacePrismItemMatchingDefinition<T>
- Returns:
- the type name
-
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 interfacePrismItemMatchingDefinition<T>
- Specified by:
getTypeClass
in interfacePrismPropertyDefinition<T>
- Specified by:
getTypeClass
in interfaceShadowAttributeDefinition<PrismPropertyValue<T>,
ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Specified by:
getTypeClass
in interfaceShadowSimpleAttributeDefinition<T>
-
createPrismValueFromRealValue
public PrismPropertyValue<T> createPrismValueFromRealValue(@NotNull @NotNull Object realValue) throws SchemaException - Specified by:
createPrismValueFromRealValue
in interfaceShadowAttributeDefinition<PrismPropertyValue<T>,
ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Throws:
SchemaException
-
getSchemaContextDefinition
- Specified by:
getSchemaContextDefinition
in interfaceDefinition
-
getAllowedValues
Description copied from interface:PrismItemValuesDefinition
Returns allowed values for this property.- Specified by:
getAllowedValues
in interfacePrismItemValuesDefinition<T>
-
getSuggestedValues
Description copied from interface:PrismItemValuesDefinition
Returns suggested values for this property.- Specified by:
getSuggestedValues
in interfacePrismItemValuesDefinition<T>
-
defaultValue
- Specified by:
defaultValue
in interfacePrismItemValuesDefinition<T>
-
isDisplayNameAttribute
public boolean isDisplayNameAttribute()Description copied from interface:ShadowSimpleAttributeDefinition
Is this attribute configured to serve as a display name?- Specified by:
isDisplayNameAttribute
in interfaceShadowSimpleAttributeDefinition<T>
- See Also:
-
getCorrelatorDefinition
- Specified by:
getCorrelatorDefinition
in interfaceResourceObjectInboundDefinition.ItemInboundDefinition
- Specified by:
getCorrelatorDefinition
in interfaceShadowSimpleAttributeDefinition<T>
- See Also:
-
deepClone
Description copied from interface:ItemDefinition
TODO document- Specified by:
deepClone
in interfaceItemDefinition<T>
- Specified by:
deepClone
in interfaceShadowSimpleAttributeDefinition<T>
-
revive
Description copied from interface:Revivable
TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary) -
debugDumpShortToString
Description copied from interface:ItemDefinition
Used in debugDumping items. Does not need to have name in it as item already has it. Does not need to have class as that is just too much info that is almost anytime pretty obvious anyway.- Specified by:
debugDumpShortToString
in interfaceItemDefinition<T>
-
getDebugDumpClassName
Description copied from class:ShadowAttributeDefinitionImpl
Return a human readable name of this class suitable for logs. -
isValidFor
public boolean isValidFor(@NotNull @NotNull QName elementQName, @NotNull @NotNull Class<? extends ItemDefinition<?>> clazz, boolean caseInsensitive) Description copied from interface:LivePrismItemDefinition
Returns true if this definition is valid for given element name and definition class, in either case-sensitive (the default) or case-insensitive way. Used e.g. for "slow" path lookup where we iterate over all definitions in a complex type.- Specified by:
isValidFor
in interfaceLivePrismItemDefinition
-
findItemDefinition
public <T2 extends ItemDefinition<?>> T2 findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<T2> clazz) Description copied from interface:LivePrismItemDefinition
Used to find a matching item definition _within_ this definition. Treats e.g. de-referencing in prism references.- Specified by:
findItemDefinition
in interfaceLivePrismItemDefinition
- Specified by:
findItemDefinition
in interfaceShadowItemDefinition
- Specified by:
findItemDefinition
in interfaceShadowSimpleAttributeDefinition<T>
-
createEmptyDelta
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 interfacePrismItemInstantiableDefinition<T,
PrismPropertyValue<T>, PrismProperty<T>, PrismPropertyDefinition<T>, PropertyDelta<T>>
-
mutator
Description copied from interface:Definition
Returns an interface to mutate this definition.- Specified by:
mutator
in interfaceDefinition
- Specified by:
mutator
in interfaceItemDefinition<T>
- Specified by:
mutator
in interfacePrismPropertyDefinition<T>
- Specified by:
mutator
in interfaceShadowSimpleAttributeDefinition<T>
-
extendToString
-
cloneWithNewName
@NotNull public @NotNull ShadowSimpleAttributeDefinitionImpl<T> cloneWithNewName(@NotNull @NotNull ItemName itemName) Description copied from interface:ItemDefinition
Returns a clone of this definition, but with name changed to the provided one.- Specified by:
cloneWithNewName
in interfaceItemDefinition<T>
- See Also:
-
equals
-
hashCode
public int hashCode() -
getHumanReadableDescription
- Specified by:
getHumanReadableDescription
in interfaceShadowAttributeDefinition<PrismPropertyValue<T>,
ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>>
-
isSimulated
public boolean isSimulated()Description copied from interface:ShadowAttributeDefinition
If `true`, the item does not exist on the resource, but is simulated by midPoint.- Specified by:
isSimulated
in interfaceShadowAttributeDefinition<PrismPropertyValue<T>,
ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>>
-