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,ResourceObjectInboundProcessingDefinition.ItemInboundProcessingDefinition,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>
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.DefinitionMutatorNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.ItemDefinition
ItemDefinition.ItemDefinitionLikeBuilder, ItemDefinition.ItemDefinitionMutatorNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
PrismItemAccessDefinition.Data, PrismItemAccessDefinition.Delegable, PrismItemAccessDefinition.Info, PrismItemAccessDefinition.MutableNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition
PrismItemBasicDefinition.Data, PrismItemBasicDefinition.Delegable, PrismItemBasicDefinition.MutableNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemMatchingDefinition
PrismItemMatchingDefinition.Data<T>, PrismItemMatchingDefinition.Delegable<T>, PrismItemMatchingDefinition.MutatorNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemMiscDefinition
PrismItemMiscDefinition.Data, PrismItemMiscDefinition.Delegable, PrismItemMiscDefinition.MutableNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismItemStorageDefinition
PrismItemStorageDefinition.MutableNested 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.MutableNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
PrismPresentationDefinition.Data, PrismPresentationDefinition.Delegable, PrismPresentationDefinition.MutableNested 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) voidUsed in debugDumping items.deepClone(@NotNull DeepCloneOperation operation) TODO documentbooleanprotected 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 resolvedMatchingRulefor 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 QNameReturns a name of the type for this definition.inthashCode()booleanIs this attribute configured to serve as a display name?Is this attribute designated as a secondary identifier via `schemaHandling`?booleanIf `true`, the item does not exist on the resource, but is simulated by midPoint.booleanisValidFor(@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.voidrevive(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, toStringMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.Definition
checkMutableOnExposing, debugDump, getAnnotation, getAnnotations, getMergerIdentifier, getMergerInstance, getMutabilityFlag, getNaturalKeyConstituents, getNaturalKeyInstance, isAbstract, isElaborate, isOptionalCleanup, isRuntimeSchemaMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
getProcessing, getSubstitutionHead, getValueEnumerationRef, instantiate, instantiate, isAlwaysUseForEquals, isDynamic, isHeterogeneousListItem, isIgnored, isInherited, isOperational, structuredTypeMethods inherited from interface com.evolveum.midpoint.schema.processor.LayeredDefinition
getCurrentLayerMethods inherited from interface com.evolveum.midpoint.prism.PrismItemAccessDefinition
canAdd, canModify, canRead, getInfoMethods inherited from interface com.evolveum.midpoint.prism.PrismItemBasicDefinition
getItemName, getMaxOccurs, getMinOccurs, isMandatory, isMultiValue, isOptional, isSingleValueMethods inherited from interface com.evolveum.midpoint.prism.PrismItemInstantiableDefinition
instantiate, instantiateMethods inherited from interface com.evolveum.midpoint.prism.PrismItemMatchingDefinition
getNormalizer, getStringNormalizerForPolyStringProperty, getStringNormalizerIfApplicable, isCustomPolyStringMethods inherited from interface com.evolveum.midpoint.prism.PrismItemMiscDefinition
getProcessingMethods inherited from interface com.evolveum.midpoint.prism.PrismItemStorageDefinition
isIndexed, isIndexOnly, isSearchableMethods inherited from interface com.evolveum.midpoint.prism.PrismItemValuesDefinition
getValueEnumerationRefMethods inherited from interface com.evolveum.midpoint.prism.PrismLifecycleDefinition
getSchemaMigrationsMethods inherited from interface com.evolveum.midpoint.prism.PrismPresentationDefinition
getDiagrams, getDisplayHint, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, isEmphasizedMethods inherited from interface com.evolveum.midpoint.prism.PrismPropertyDefinition
convertStringValueToPolyString, getTypeClassLegacy, isAnyTypeMethods inherited from interface com.evolveum.midpoint.prism.schema.SchemaLookup.Aware
schemaLookupMethods 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, isVolatileOnAddOperation, isVolatileOnModifyOperation, isVolatilityTrigger, setOverrideCanAdd, setOverrideCanModify, setOverrideCanReadMethods inherited from interface com.evolveum.midpoint.schema.processor.ShadowAttributeUcfDefinition
getFrameworkAttributeName, getNativeAttributeName, getReturnedByDefaultMethods inherited from interface com.evolveum.midpoint.schema.processor.ShadowItemDefinition
isVisibleMethods inherited from interface com.evolveum.midpoint.schema.processor.ShadowItemLayeredDefinition
canAdd, canModify, canRead, getLimitations, getMaxOccurs, getMinOccurs, getProcessing, isMandatory, isMultiValue, isOptional, isSingleValueMethods inherited from interface com.evolveum.midpoint.schema.processor.ShadowItemLifecycleDefinitionDefaults
getDeprecatedSince, getPlannedRemoval, getRemovedSince, isDeprecated, isExperimental, isRemovedMethods inherited from interface com.evolveum.midpoint.schema.processor.ShadowSimpleAttributeDefinition
convertPrismValue, createEmptyDelta, toNormalizationAwareMethods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDump, shortDumpLazilyMethods 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 ConfigurationException This is the main creation point.- Throws:
ConfigurationException- If there's a problem with the customization bean.
-
create
public static <T> ShadowSimpleAttributeDefinition<T> create(@NotNull @NotNull NativeShadowSimpleAttributeDefinition<T> nativeDefinition) throws ConfigurationException This is the creation point from native form only.- Throws:
ConfigurationException
-
forLayer
@NotNull public @NotNull ShadowSimpleAttributeDefinitionImpl<T> forLayer(@NotNull @NotNull LayerType layer) Description copied from interface:ShadowAttributeDefinitionCreates 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:
forLayerin interfaceShadowAttributeDefinition<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Specified by:
forLayerin interfaceShadowSimpleAttributeDefinition<T>
-
clone
- Specified by:
clonein interfaceDefinition- Specified by:
clonein interfaceItemDefinition<T>- Specified by:
clonein interfacePrismPropertyDefinition<T>- Specified by:
clonein interfaceShadowAttributeDefinition<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Specified by:
clonein interfaceShadowSimpleAttributeDefinition<T>- Specified by:
clonein classShadowAttributeDefinitionImpl<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>, NativeShadowSimpleAttributeDefinition<T>>
-
isSecondaryIdentifierOverride
Description copied from interface:ShadowSimpleAttributeDefinitionIs this attribute designated as a secondary identifier via `schemaHandling`?- Specified by:
isSecondaryIdentifierOverridein interfaceShadowSimpleAttributeDefinition<T>- See Also:
-
getMatchingRuleQName
Description copied from interface:PrismItemMatchingDefinitionReturns 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:
getMatchingRuleQNamein interfacePrismItemMatchingDefinition<T>- Returns:
- matching rule name
-
getMatchingRule
Description copied from interface:PrismItemMatchingDefinitionReturns the resolvedMatchingRulefor this property.- Specified by:
getMatchingRulein interfacePrismItemMatchingDefinition<T>
-
getTypeName
Description copied from interface:DefinitionReturns 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:
getTypeNamein interfaceDefinition- Specified by:
getTypeNamein interfacePrismItemBasicDefinition- Specified by:
getTypeNamein interfacePrismItemMatchingDefinition<T>- Returns:
- the type name
-
getTypeClass
Description copied from interface:DefinitionReturns 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:
getTypeClassin interfaceDefinition- Specified by:
getTypeClassin interfacePrismItemMatchingDefinition<T>- Specified by:
getTypeClassin interfacePrismPropertyDefinition<T>- Specified by:
getTypeClassin interfaceShadowAttributeDefinition<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Specified by:
getTypeClassin interfaceShadowSimpleAttributeDefinition<T>
-
createPrismValueFromRealValue
public PrismPropertyValue<T> createPrismValueFromRealValue(@NotNull @NotNull Object realValue) throws SchemaException - Specified by:
createPrismValueFromRealValuein interfaceShadowAttributeDefinition<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>> - Throws:
SchemaException
-
getSchemaContextDefinition
- Specified by:
getSchemaContextDefinitionin interfaceDefinition
-
getAllowedValues
Description copied from interface:PrismItemValuesDefinitionReturns allowed values for this property.- Specified by:
getAllowedValuesin interfacePrismItemValuesDefinition<T>
-
getSuggestedValues
Description copied from interface:PrismItemValuesDefinitionReturns suggested values for this property.- Specified by:
getSuggestedValuesin interfacePrismItemValuesDefinition<T>
-
defaultValue
- Specified by:
defaultValuein interfacePrismItemValuesDefinition<T>
-
isDisplayNameAttribute
public boolean isDisplayNameAttribute()Description copied from interface:ShadowSimpleAttributeDefinitionIs this attribute configured to serve as a display name?- Specified by:
isDisplayNameAttributein interfaceShadowSimpleAttributeDefinition<T>- See Also:
-
getCorrelatorDefinition
- Specified by:
getCorrelatorDefinitionin interfaceResourceObjectInboundProcessingDefinition.ItemInboundProcessingDefinition- Specified by:
getCorrelatorDefinitionin interfaceShadowSimpleAttributeDefinition<T>- See Also:
-
deepClone
Description copied from interface:ItemDefinitionTODO document- Specified by:
deepClonein interfaceItemDefinition<T>- Specified by:
deepClonein interfaceShadowSimpleAttributeDefinition<T>
-
revive
Description copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary) -
debugDumpShortToString
Description copied from interface:ItemDefinitionUsed 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:
debugDumpShortToStringin interfaceItemDefinition<T>
-
getDebugDumpClassName
Description copied from class:ShadowAttributeDefinitionImplReturn 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:LivePrismItemDefinitionReturns 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:
isValidForin interfaceLivePrismItemDefinition
-
findItemDefinition
public <T2 extends ItemDefinition<?>> T2 findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<T2> clazz) Description copied from interface:LivePrismItemDefinitionUsed to find a matching item definition _within_ this definition. Treats e.g. de-referencing in prism references.- Specified by:
findItemDefinitionin interfaceLivePrismItemDefinition- Specified by:
findItemDefinitionin interfaceShadowSimpleAttributeDefinition<T>
-
createEmptyDelta
Description copied from interface:ItemDefinitionCreates an empty delta (with appropriate implementation class), pointing to this item definition, with a given path.- Specified by:
createEmptyDeltain interfaceItemDefinition<T>- Specified by:
createEmptyDeltain interfacePrismItemInstantiableDefinition<T,PrismPropertyValue<T>, PrismProperty<T>, PrismPropertyDefinition<T>, PropertyDelta<T>>
-
mutator
Description copied from interface:DefinitionReturns an interface to mutate this definition.- Specified by:
mutatorin interfaceDefinition- Specified by:
mutatorin interfaceItemDefinition<T>- Specified by:
mutatorin interfacePrismPropertyDefinition<T>- Specified by:
mutatorin interfaceShadowSimpleAttributeDefinition<T>
-
extendToString
-
cloneWithNewName
@NotNull public @NotNull ShadowSimpleAttributeDefinitionImpl<T> cloneWithNewName(@NotNull @NotNull ItemName itemName) Description copied from interface:ItemDefinitionReturns a clone of this definition, but with name changed to the provided one.- Specified by:
cloneWithNewNamein interfaceItemDefinition<T>- See Also:
-
equals
-
hashCode
public int hashCode() -
getHumanReadableDescription
- Specified by:
getHumanReadableDescriptionin interfaceShadowAttributeDefinition<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>>
-
isSimulated
public boolean isSimulated()Description copied from interface:ShadowAttributeDefinitionIf `true`, the item does not exist on the resource, but is simulated by midPoint. Applies to reference attributes for now.- Specified by:
isSimulatedin interfaceShadowAttributeDefinition<PrismPropertyValue<T>,ShadowSimpleAttributeDefinition<T>, T, ShadowSimpleAttribute<T>>
-