[midPoint-git] [Evolveum/midpoint] 7d6fb8: Cleanup permissions confirmation dialog panel

Andrej noreply at github.com
Mon Mar 16 16:50:10 CET 2026


  Branch: refs/heads/master
  Home:   https://github.com/Evolveum/midpoint
  Commit: 7d6fb8e9ed2784e346be0be95b13098872d5903f
      https://github.com/Evolveum/midpoint/commit/7d6fb8e9ed2784e346be0be95b13098872d5903f
  Author: Andrej Zan <andrej.zan at evolveum.com>
  Date:   2026-03-16 (Mon, 16 Mar 2026)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/MultiSelectContainerActionTileTablePanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/AssociationTypesPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/SchemaHandlingObjectsPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/attribute/mapping/AttributeMappingsTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/CorrelationItemsTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/SmartCorrelationTable.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartAlertGeneratingPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/page/SmartObjectTypeSuggestionWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/table/SmartObjectTypeSuggestionPanel.java
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationOption.java
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsDto.java
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsPanel.html
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsPanel.java
    R gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/DataAccessPermission.java
    R gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/RequestDetailsConfirmationPanel.html
    R gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/RequestDetailsConfirmationPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/RequestDetailsRecordDto.java
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/privacy/DataAccessPermission.java
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/util/Describable.java

  Log Message:
  -----------
  Cleanup permissions confirmation dialog panel

**What**

Cleanup the dialog panel, which is used (mainly) to confirm data access
permissions.

**Why**

- The panel and its content had a very confusing naming (considering
  very dynamic nature of development, it is understandable).
  Hopefully I have been more lucky with naming this time.
- The panel was customized by overriding methods also for such
  customizations which could be made through static "configuration" via
  the panel's model. That in my opinion helps with clarity a lot.
- The panel contained defaults, which were too specific and
  were not suitable for their generic nature. These default were then
  overridden in some cases, but in some they were not. That made things
  very hard to navigate. I tried to remove such defaults.
- The default messages (these which are not too specific) are defined in
  the panel's model instead of the panel's component code.

**Task**: 11131


  Commit: a8e1366b9b72ad4c6d9d22670955bbf2dbbde097
      https://github.com/Evolveum/midpoint/commit/a8e1366b9b72ad4c6d9d22670955bbf2dbbde097
  Author: Andrej Zan <andrej.zan at evolveum.com>
  Date:   2026-03-16 (Mon, 16 Mar 2026)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/AssociationTypesPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/SchemaHandlingObjectsPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/attribute/mapping/AttributeMappingsTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/CorrelationItemsTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartAlertGeneratingPanel.java
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartSuggestButtonWithConfirmation.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsPanel.java
    A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/input/ButtonWithConfirmationOptionsDialog.java

  Log Message:
  -----------
  Create "smart generate button" component

**What**

Create two new button components. One is a generic button, which upon
click shows a confirmation dialog with optional confirmation options.
The second button uses that to implement a "generate" button,
encapsulating common confirmation dialog texts and messages.

This change also integrates this new "smart" button into the
`SmartAlertGeneratingPanel` panel.

**Why**

Currently, the confirmation dialog has been explicitly defined in many
places, which deals with the suggestions generation. That makes things
quite complex and hard to navigate.

I think that moving the dialog creation and logic into the button itself
simplifies it.

**Notes**

This commit integrates the button just to one panel
(`SmartAlertGeneratingPanel`) which is in turn used by many other
pages. Later commits will integrate this panel also to other places.

Some notes regarding the implementation.

I have decided, that in contrast to the usual practice in our GUI code
(and in Wicket code in general), I will not allow customization of the
button through the overriding mechanism by subclasses (other then the
required public `onClick` method). Instead I leveraged customization by
composition.

To customize certain actions (currently just two), the client can supply
the wished actions as a handler functions (consumer and bi-consumer to
be precise), via the button's model object during the instantiation.

That has several benefits:

- **Easier navigation through the code**: It is often very hard to
  navigate all the overridden methods in a big inheritance hierarchy. I
  believe this approach makes that a bit easier.
- **Composition over inheritance practice**: It is widely recognized
  these days, that it is better to utilize composition whenever we can
  instead of relying on inheritance. Unfortunately the Wicket framework
  does the opposite (maybe given the web domain it's understandable, I
  don't know). Anyway, I believe, that aside of the parts where Wickets
  forces us to use inheritance, or parts where the inheritance give us
  some big undoubted benefit, we should try to avoid it.
- **Less code on the client side**: If the initializers/builders are
  written in a good way, this approach can reduce the boiler plate
  required by the anonymous implementations.

There is one drawback though. Specifying that specification of some
function is **required** is not so easy as defining `abstract` method.
However, there are mechanisms (e.g. "staged builder") which allows to
overcome this issue. I may introduce it in later commits to make sure,
that the "confirmation click" handler is always specified.

**Task**: 11131


  Commit: 0156a18f081b7b0512a7f0fbb8676c48aff1cd2b
      https://github.com/Evolveum/midpoint/commit/0156a18f081b7b0512a7f0fbb8676c48aff1cd2b
  Author: Andrej Zan <andrej.zan at evolveum.com>
  Date:   2026-03-16 (Mon, 16 Mar 2026)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/SchemaHandlingObjectsPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/attribute/mapping/AttributeMappingsTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/CorrelationItemsTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartAlertGeneratingPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartSuggestButtonWithConfirmation.java

  Log Message:
  -----------
  Integrate "smart generate button" to the mappings page.

**What**

Integrate the new button component to the mappings page.

**Why**

It allows us to get rid of the code for permissions confirmation from
the panel.

**Task**: 11131


  Commit: 4f7e97ee2472caa8eb81587463bfbb2cf2c479ad
      https://github.com/Evolveum/midpoint/commit/4f7e97ee2472caa8eb81587463bfbb2cf2c479ad
  Author: Andrej Zan <andrej.zan at evolveum.com>
  Date:   2026-03-16 (Mon, 16 Mar 2026)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/MultiSelectContainerActionTileTablePanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/AssociationTypesPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/SchemaHandlingObjectsPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/CorrelationItemsTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/SmartCorrelationTable.java
    R gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/RequestDetailsRecordDto.java

  Log Message:
  -----------
  Integrate "smart generate button" to other pages

**What**

- Integrate the button to the associations page and correlations page.
- Make the "generate" button purple as it should be according to the
  recommendation from our UX team.

**Task**: 11131


  Commit: 9b513b93b887fff9fc1b30271bdd0a9b58c61ce7
      https://github.com/Evolveum/midpoint/commit/9b513b93b887fff9fc1b30271bdd0a9b58c61ce7
  Author: Andrej Zan <andrej.zan at evolveum.com>
  Date:   2026-03-16 (Mon, 16 Mar 2026)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/SchemaHandlingObjectsPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/page/ResourceSuggestedObjectTypeTableWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/page/SmartObjectTypeSuggestionWizardPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/table/SmartObjectTypeSuggestionPanel.java

  Log Message:
  -----------
  Integrate "smart generate button" to other pages

**What**

Integrate the button to the page with object types in resource wizard.

**Task**: 11131


  Commit: 0ecf68aeea796340755d2e0d53b89b3fdc266829
      https://github.com/Evolveum/midpoint/commit/0ecf68aeea796340755d2e0d53b89b3fdc266829
  Author: Andrej Zan <andrej.zan at evolveum.com>
  Date:   2026-03-16 (Mon, 16 Mar 2026)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/page/SmartObjectTypeSuggestionWizardPanel.java

  Log Message:
  -----------
  Integrate "smart generate button" to other page

**What**

Integrate the new button component to the page with selection of object
class for which you want to generate suggestions.

**Task**: 11131


Compare: https://github.com/Evolveum/midpoint/compare/bce7bee14aaa...0ecf68aeea79

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