[midPoint-git] [Evolveum/midpoint] 1b5650: Polish associations code, part 1

mederly noreply at github.com
Mon Dec 30 10:22:43 CET 2024


  Branch: refs/heads/support-4.9
  Home:   https://github.com/Evolveum/midpoint
  Commit: 1b5650bdef27ca90d341e7dacc89fc7af6cafa48
      https://github.com/Evolveum/midpoint/commit/1b5650bdef27ca90d341e7dacc89fc7af6cafa48
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2024-12-30 (Mon, 30 Dec 2024)

  Changed paths:
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAssociation.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAssociationDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAssociationValue.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAttributesContainer.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowReferenceAttribute.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowReferenceAttributeDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowReferenceAttributeValue.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/AbstractShadow.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ShadowBuilder.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ShadowUtil.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/evaluator/ReferenceAttributeFromLinkExpressionEvaluator.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/EntitlementReader.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ShadowPostProcessor.java
    M provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/dummy/TestDummy.java
    M provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/dummy/TestDummyComplexAssociations.java
    M provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnIdToUcfObjectConversion.java
    M provisioning/ucf-impl-connid/src/test/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/TestUcfDummy.java
    M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/tasks/TaskPersister.java

  Log Message:
  -----------
  Polish associations code, part 1

Getting rid of ShadowReferenceAttributeValue#isFullObject ugly hack;
also documenting parts of the code.

(cherry picked from commit c421e8b5a5201ee064111cda63e9bd0590291ed3)


  Commit: bbbe81276ed3cfcba488d33aa28838d5a0a168e2
      https://github.com/Evolveum/midpoint/commit/bbbe81276ed3cfcba488d33aa28838d5a0a168e2
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2024-12-30 (Mon, 30 Dec 2024)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/panel/ResourceObjectClassFactory.java
    M infra/common/src/test/java/com/evolveum/midpoint/common/refinery/TestRefinedSchema.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/config/AssociationConfigItem.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/config/SchemaHandlingConfigItem.java
    R infra/schema/src/main/java/com/evolveum/midpoint/schema/config/SimulatedAssociationClassParticipantConfigItem.java
    R infra/schema/src/main/java/com/evolveum/midpoint/schema/config/SimulatedAssociationClassParticipantDelineationConfigItem.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/config/SimulatedReferenceTypeConfigItem.java
    A infra/schema/src/main/java/com/evolveum/midpoint/schema/config/SimulatedReferenceTypeParticipantConfigItem.java
    A infra/schema/src/main/java/com/evolveum/midpoint/schema/config/SimulatedReferenceTypeParticipantDelineationConfigItem.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/AbstractResourceObjectDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/AbstractShadowReferenceTypeDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/CompositeObjectDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/CompositeObjectDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/LayeredDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/NativeComplexTypeDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/NativeObjectClassUcfDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/NativeReferenceTypeDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/NativelyProvidedShadowReferenceTypeDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ObjectFactory.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceDefinitionFeatures.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceObjectClassDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceObjectClassDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceObjectDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceObjectIdentifier.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceObjectIdentifiers.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceObjectTypeDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceSchema.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceSchemaImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ResourceSchemaParser.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAssociation.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAssociationDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAssociationDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAssociationValue.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAttribute.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAttributeDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAttributeDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowAttributesContainer.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowItemDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowItemLayeredDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowReferenceAttribute.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowReferenceAttributeDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowReferenceAttributeDefinitionImpl.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowReferenceAttributeValue.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowRelationParticipantType.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowSimpleAttribute.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/ShadowSimpleAttributeDefinitionImpl.java
    R infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/SimulatedAssociationClassParticipantDefinition.java
    A infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/SimulatedReferenceTypeParticipantDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/SimulatedShadowReferenceTypeDefinition.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/deleg/ResourceObjectClassDefinitionDelegator.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/processor/deleg/ResourceObjectDefinitionDelegator.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/AbstractShadow.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ObjectTypeUtil.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ShadowReferenceAttributesCollection.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ShadowUtil.java
    M infra/schema/src/main/resources/xml/ns/public/common/common-model-context-3.xsd
    M infra/schema/src/main/resources/xml/ns/public/common/common-provisioning-3.xsd
    M infra/schema/src/main/resources/xml/ns/public/resource/capabilities-3.xsd
    M infra/test-util/src/main/java/com/evolveum/midpoint/test/ldap/OpenDJController.java
    M infra/test-util/src/main/java/com/evolveum/midpoint/test/util/MidPointTestConstants.java
    M infra/test-util/src/main/java/com/evolveum/midpoint/test/util/TestUtil.java
    M model/model-api/src/main/java/com/evolveum/midpoint/model/api/InboundSourceData.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/evaluator/AssociationTargetSearchExpressionEvaluator.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/evaluator/ReferenceAttributeTargetSearchExpressionEvaluator.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/AssociationSynchronizationExpressionEvaluator.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensProjectionContext.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/ReconciliationProcessor.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/evaluators/ObjectModificationConstraintEvaluator.java
    M model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java
    M provisioning/provisioning-api/src/main/java/com/evolveum/midpoint/provisioning/api/ProvisioningService.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ProvisioningContext.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ProvisioningServiceImpl.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/Shadow.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/operations/ProvisioningGetOperation.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/operations/ProvisioningSearchLikeOperation.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/EntitlementConverter.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/EntitlementObjectSearch.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/EntitlementReader.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/EntitlementUtils.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/ResourceObjectChange.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/ResourceObjectConverter.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/ResourceObjectFound.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/ResourceObjectReferenceResolver.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/AbstractLazilyInitializableShadowedEntity.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/AssociationsHelper.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ConstraintsChecker.java
    A provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ReturnedShadowValidityChecker.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ShadowPostProcessor.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ShadowsFacade.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ShadowsUtil.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/manager/ShadowDeltaComputerAbsolute.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/manager/ShadowObjectComputer.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/util/ProvisioningUtil.java
    M provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/dummy/TestDummy.java
    A provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/opendj/AbstractOpenDjAssociationsTest.java
    A provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/opendj/AbstractOpenDjSimulatedAssociationsTest.java
    M provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/opendj/AbstractOpenDjTest.java
    A provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/opendj/TestOpenDjAssociationsLegacySimulated.java
    A provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/opendj/TestOpenDjAssociationsModernSimulated.java
    A provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/opendj/TestOpenDjAssociationsNative.java
    A provisioning/provisioning-impl/src/test/resources/opendj/associations/resource-opendj-legacy.xml
    A provisioning/provisioning-impl/src/test/resources/opendj/associations/resource-opendj-modern.xml
    A provisioning/provisioning-impl/src/test/resources/opendj/associations/resource-opendj-native.xml
    A provisioning/provisioning-impl/src/test/resources/opendj/associations/resource-opendj-template.xml
    M provisioning/provisioning-impl/testng-integration.xml
    M provisioning/ucf-api/src/main/java/com/evolveum/midpoint/provisioning/ucf/api/UcfResourceObjectFragment.java
    M provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnIdObjectConvertor.java
    M provisioning/ucf-impl-connid/src/test/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/TestUcfDummy.java
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/run/SearchBasedActivityRun.java
    M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/AbstractIntegrationTest.java
    M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/ObjectClassName.java
    M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/ShadowAsserter.java
    M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/ShadowAssociationsAsserter.java
    M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/ShadowAttributesAsserter.java

  Log Message:
  -----------
  Review and fix associations implementation

This commit reviews and fixes the code related to reference
attributes and associations, primarily aiming at definitions
immutability (to avoid issues like the one documented in MID-9932).

Other changes:

1. Removed ambiguous method getRepresentativeObjectDefinition()
from reference type definition (and analogous methods from reference
attribute and association definitions and from simulated reference type
definition).

They were replaced by getGeneralizedObjectSideObjectDefinition()
on reference type definition, which is more robust even in cases when
administrator makes slight mistakes while defining the references.

2. Fixed the class/method naming, especially by removing the obsolete
term "association class" (created and then replaced during the
development of 4.9).

3. Added AbstractOpenDjAssociationsTest, aiming at testing simulated and
native references and associations in the presence of auxiliary object
classes and hierarchy-based object-side delineations.

The main goal is to ensure that no major functionality is removed with
regard to 4.8.x.

4. Enabled temporarily disabled consistency checks of shadows returning
from the "shadows" package in provisioning-impl (and fixed them).

5. To ensure that the returned objects will have their reference
attributes resolved, we carry that out even if there are no associations
defined. So the returned objects will be consistent for both cases:
with associations definitions and without them.

6. Added/clarified a few pieces of the documentation. Simplified code
here and there a bit. Improved debugDump/shortDump/toString at some
places. Other minor fixes and improvements.

Related to MID-9932.

(cherry picked from commit e33af875ae8de0a84c78af8c1f1efe4025ae472c)


Compare: https://github.com/Evolveum/midpoint/compare/9809ee857ad3...bbbe81276ed3

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


More information about the midPoint-svn mailing list