[midPoint-git] [Evolveum/prism] 12808d: Support native midPoint associations

mederly noreply at github.com
Tue Mar 26 00:48:44 CET 2024


  Branch: refs/heads/feature/native-associations
  Home:   https://github.com/Evolveum/prism
  Commit: 12808dc91f4ea358dda3666cd0b01eba7d08300c
      https://github.com/Evolveum/prism/commit/12808dc91f4ea358dda3666cd0b01eba7d08300c
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
    M infra/prism-api/pom.xml
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/AbstractFreezable.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/AbstractTypeDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ComplexTypeDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/Definition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/DefinitionFactory.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/DefinitionFragmentBuilder.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/EnumerationTypeDefinition.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/Itemable.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/LivePrismItemDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableComplexTypeDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableItemDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutablePrismContainerDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutablePrismObjectDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutablePrismPropertyDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutablePrismReferenceDefinition.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/MutableTypeDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismConstants.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContainerDefinition.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/PrismContext.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismContextSensitive.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemAccessDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemBasicDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemInstantiableDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemMatchingDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemMiscDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemStorageDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismItemValuesDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismLifecycleDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismObjectDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismPresentationDefinition.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/PrismReferenceDefinition.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/SchemaMigration.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/SchemaMigrationOperation.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/SimpleTypeDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/TypeDefinition.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/annotation/ItemDiagramSpecification.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/ComplexTypeDefinitionDelegator.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/DefinitionDelegator.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/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/deleg/ReferenceDefinitionDelegator.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/deleg/TypeDefinitionDelegator.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/ObjectDelta.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/query/ObjectFilter.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/DefinitionFeature.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/DefinitionFeatureParser.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/DefinitionFeatureSerializer.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/DefinitionSupplier.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/ItemDefinitionSupplier.java
    R infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/MutablePrismSchema.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/PrismSchema.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/PrismSchemaBuildingUtil.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SchemaBuilder.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SchemaDescription.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SchemaFactory.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SchemaRegistry.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SerializableComplexTypeDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SerializableContainerDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SerializableDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SerializableItemDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SerializablePropertyDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SerializableReferenceDefinition.java
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/schema/SerializableSchema.java
    M infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/RawType.java
    M infra/prism-codegen-maven-plugin/src/main/java/com/evolveum/midpoint/prism/codegen/maven/PrismCodegenMojo.java
    M infra/prism-codegen/src/main/java/com/evolveum/prism/codegen/binding/BindingContext.java
    M infra/prism-codegen/src/main/java/com/evolveum/prism/codegen/binding/StructuredContract.java
    M infra/prism-codegen/src/main/java/com/evolveum/prism/codegen/impl/ContainerableGenerator.java
    M infra/prism-codegen/src/main/java/com/evolveum/prism/codegen/impl/StructuredGenerator.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/DefinitionFactoryImpl.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/DisplayableValueImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/DummyPrismObjectDefinition.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/EnumerationTypeDefinitionImpl.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/PrismContainerDefinitionImpl.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/PrismContextImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismObjectDefinitionImpl.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/PrismReferenceDefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/SimpleTypeDefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/TypeDefinitionImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ContainerDeltaImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ReferenceDeltaImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/BeanMarshaller.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/ItemInfo.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/PrismMarshaller.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/PrismUnmarshaller.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/marshaller/QueryConverterImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/query/lang/PrismQueryLanguageParserImpl.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/DomToSchemaPostProcessor.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/DomToSchemaProcessor.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/PrismSchemaImpl.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaDefinitionFactory.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaDescriptionImpl.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaDomParser.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaDomSerializer.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaFactoryImpl.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaHandler.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaParsingUtil.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaProcessorUtil.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaRegistryImpl.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaToDomProcessor.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/SchemaXsomParser.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/AlwaysUseForEquals.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/AlwaysUseForEqualsProcessor.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/Annotation.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/AnnotationBasedFeature.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/AnnotationProcessor.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/EnumAnnotationProcessor.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/IgnoreProcessor.java
    R infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/annotation/ItemProcessingProcessor.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/axiom/AxiomBased.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/axiom/AxiomEnabledSchemaRegistry.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/AbstractValueWrapper.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/AccessXsomProcessor.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/DefinitionFeatures.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/EnumerationValuesInfoXsomParser.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/EnumerationValuesXsomParser.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/IgnoredNamespaces.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/IsAnyXsomParser.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/ItemDiagramSpecificationXsomParser.java
    A infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/schema/features/SchemaMigrationXsomParser.java
    M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/xnode/XNodeDefinition.java
    M infra/prism-impl/src/main/resources/xml/ns/public/annotation-3.xsd
    M infra/prism-impl/src/main/resources/xml/ns/test/foo-1.xsd
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/PrismInternalTestUtil.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestCompare.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestDelta.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismContext.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismParsing.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismSchemaConstruction.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/match/FuzzyStringMatchFilterImplTest.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/query/TestObjectQuery.java
    M infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/query/lang/TestBasicQueryConversions.java
    M infra/prism-impl/src/test/resources/common/xml/user-jack-adhoc.xml
    M infra/prism-impl/src/test/resources/common/xml/user-jack-filters.xml
    M infra/prism-impl/src/test/resources/common/xml/user-jack-modified.xml
    M infra/prism-impl/src/test/resources/common/xml/user-jack-no-ns.xml
    M infra/prism-impl/src/test/resources/common/xml/user-jack-object.xml
    M infra/prism-impl/src/test/resources/common/xml/user-jack.xml
    M infra/prism-impl/src/test/resources/schema/extension.xsd
    M infra/prism-maven-plugin/src/main/java/com/evolveum/midpoint/prism/maven/SchemaDocMojo.java
    M infra/util/src/main/java/com/evolveum/midpoint/util/MiscUtil.java
    M infra/util/src/main/java/com/evolveum/midpoint/util/QNameUtil.java

  Log Message:
  -----------
  Support native midPoint associations

Main goal
---------

To support native midPoint associations. It required massive
changes in handling native (formerly raw) resource schema support
in midPoint, cascading down here to prism.

Main change
-----------

Decoupled schema parsing and serialization from prism definitions
(derived from Definition interface). The parsing and serialization
now use more generic/focused interfaces, like SchemaBuilder,
DefinitionBuilder, TypeDefinitionLikeBuilder, and so on (for parsing),
and SerializableSchema, SerializableDefinition, etc (for serialization);
because we needed to parse and serialize native resource definitions,
which are no longer prism ones.

EXPERIMENTAL. To be seen if it was a good idea at all. But it helped us
to move forward with the work on shadow associations.

Specific changes:

A. Schema parsing and serialization
-----------------------------------

1. Schema XSD parsing and serialization was largely reworked. Besides
aforementioned decoupling from prism definitions, they now use
DefinitionFeature objects to be more modular and understandable.

2. Existing Annotation and AnnotationProcessor classes are now
implemented using DefinitionFeature and DefinitionFeatureParser classes.
Behavioral change: annotations are no longer stored into the dynamic
"annotations" map of the definition. To be reviewed/resolved later.

3. The access to schema parsing/serialization from upper layers was
simplified. Instead of SchemaDefinitionFactory and its extension
we use a declarative list of DefinitionFeature instances to parse or
serialize for given complex type or item.

4. Fixed the issue with putting unrelated definitions into a schema.
(Occurred when parsing a schema that referenced types from other
schemas. We now parse a set of related schemas at the same time.)

5. Naming changes: DomToSchema processor renamed to SchemaDomParser.
DomToSchemaPostProcessor renamed to SchemaXsomParser.
SchemaToDomProcessor renamed to SchemaDomSerializer.

B. Definition classes
---------------------

1. Definition, ItemDefinition, TypeDefinition and some of their children
had specific aspects factored out into separate types, like
PrismItemBasicDefinition, PrismLifecycleDefinition, and so on. This
should make the types more manageable. The primary reason is to allow
creation of non-prism definitions like for native resource attributes.

2. Changes in definitions:
- "Processing" was moved from Definition to ItemDefinition.
It has a meaning for specific item only, anyway.
- "Indexed" was moved from property definition to item definition;
it sits now well in PrismItemStorageDefinition.

2. MutableXXX classes were converted to inner classes of their
immutable counterparts. What is more important, though, that they no
longer extend them: so e.g. MutableItemDefinition no longer extends
ItemDefinition. It can be used solely for changing values.

3. Type name and item name are now immutable in definitions.
This is because these are sometimes used as keys in maps, and form
a kind of identity for the definition.

4. Removed some unused/less-used methods in the definition interfaces:
canBeDefinitionOf, adoptElementDefinitionFrom.

5. Instantiations of definition objects (like ComplexTypeDefinitionImpl)
was a bit streamlined. Many of the constructors are no longer public.
DefinitionFactory should be used instead.

C. Other
--------

1. Removed dereferencing object getter/setters like #getLink / #setLink
(meaning getLinkRef.getObject and the analogous setter). These were not
used much anyway, and complicated the code needlessly.

2. Introduced "no access" enum for AccessAnnotationType. We need that
to represent totally hidden attributes - for the hidden side of native
associations.

3. Removed deprecated PrismContextSensitive interface. Prism context
is now statically accessed at all places.

Work in progress. Not polished enough. Parts of the new code needs to
be streamlined. Maybe the whole xyzDelegator and xyzMutatorDelegator
idea in definition fragments is wrong, and they should be simply
unrolled in the class where they are needed. But that would not be
a principal change. The key question is what is the optimal form
of schema parsing and serialization.



To unsubscribe from these emails, change your notification settings at https://github.com/Evolveum/prism/settings/notifications


More information about the midPoint-svn mailing list