[midPoint-git] [Evolveum/prism] b1cfda: Decouple normalization from matching rules

mederly noreply at github.com
Thu Nov 23 22:55:49 CET 2023


  Branch: refs/heads/feature/attributes-as-polystrings
  Home:   https://github.com/Evolveum/prism
  Commit: b1cfda4dbe44bdd779284ed4864ab39fcf548e1a
      https://github.com/Evolveum/prism/commit/b1cfda4dbe44bdd779284ed4864ab39fcf548e1a
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2023-11-20 (Mon, 20 Nov 2023)

  Changed paths:
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismConstants.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismPropertyDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ValueBasedDefinitionLookupHelper.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/PropertyDefinitionDelegator.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/match/MatchingRule.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/match/MatchingRuleRegistry.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/normalization/Normalizer.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/normalization/StringNormalizer.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/polystring/NormalizerRegistry.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/polystring/PolyStringNormalizer.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/polystring/PolyStringNormalizerRegistry.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/PrismTestUtil.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContextImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyDefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyValueImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/DefaultMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/DistinguishedNameMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/ExchangeEmailAddressesMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/MatchingRuleRegistryImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/PolyStringNormMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/PolyStringOrigMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/PolyStringStrictMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/StringIgnoreCaseMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/UuidMatchingRule.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/match/XmlMatchingRule.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/AbstractConfigurablePolyStringNormalizer.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/AbstractPolyStringNormalizer.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/AlphanumericPolyStringNormalizer.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/Ascii7PolyStringNormalizer.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/BaseStringNormalizer.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/DefaultNormalizer.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/DistinguishedNameNormalizer.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/ExchangeEmailAddressNormalizer.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/LowercaseStringNormalizer.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/NormalizerRegistryFactory.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/NormalizerRegistryImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/PassThroughPolyStringNormalizer.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/PolyStringNormalizerRegistryFactory.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/PolyStringNormalizerRegistryImpl.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/UuidNormalizer.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/polystring/XmlNormalizer.java
    M infra/util/src/main/java/com/evolveum/midpoint/util/MiscUtil.java

  Log Message:
  -----------
  Decouple normalization from matching rules

For a long time, the idea of normalization was tightly coupled with
the concept of matching rule. For example, distinguishedName matching
rule involved the normalization algorithm for LDAP Distinguished names.

This was now changed. A normalizer prescribes the normalization
and matching algorithm, i.e. how a value is normalized, and how
two values are matched. This can be applied to polystring creation, by
specifying how the "norm" values should be derived from "orig" ones.
But for the actual querying that involves polystrings, two distinct
matching rules are to be used: polyStringOrig (matching original value)
and polyStringNorm (matching the normalized value).

Work in progress. This approach is not definite. The code is not
complete.

We may consider replacing the term "matchingRule" by "normalization"
for attribute definitions.


  Commit: 04edc0c7fe322b64d864783af761d0dbda15ebfa
      https://github.com/Evolveum/prism/commit/04edc0c7fe322b64d864783af761d0dbda15ebfa
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2023-11-23 (Thu, 23 Nov 2023)

  Changed paths:
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ComplexTypeDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Item.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ItemDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableItemDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainer.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerValue.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismObject.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismPropertyDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismReferenceValue.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismValue.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/ContainerDefinitionDelegator.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/ItemDefinitionDelegator.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/ItemDeltaDelegator.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/ObjectDefinitionDelegator.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/PropertyDefinitionDelegator.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ItemDelta.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ItemDeltaCollectionsUtil.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/ObjectDelta.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/match/MatchingRuleRegistry.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/ItemDeltaItem.java
    M infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/RawType.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ComplexTypeDefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/DefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ItemDefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ItemFactoryImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/ItemImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerValueImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyDefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismPropertyValueImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismValueImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ItemDeltaImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ObjectDeltaImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/item/DummyItem.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/metadata/ValueMetadataAdapter.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaRegistryImpl.java
    M infra/util/src/main/java/com/evolveum/midpoint/util/MiscUtil.java
    M infra/util/src/main/java/com/evolveum/midpoint/util/exception/SchemaException.java

  Log Message:
  -----------
  Clarify applyDefinition contract/implementation

Related to MID-2119.


Compare: https://github.com/Evolveum/prism/compare/b1cfda4dbe44%5E...04edc0c7fe32


More information about the midPoint-svn mailing list