[midPoint-git] [Evolveum/midpoint] e32824: Do minor refactorings related to notifications

mederly noreply at github.com
Sat Mar 14 19:38:03 CET 2020


  Branch: refs/heads/support-4.0
  Home:   https://github.com/Evolveum/midpoint
  Commit: e3282416333a7955058a32cd0882be1b2f674a0b
      https://github.com/Evolveum/midpoint/commit/e3282416333a7955058a32cd0882be1b2f674a0b
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M infra/util/src/main/java/com/evolveum/midpoint/util/PrettyPrinter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationFunctionsImpl.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/TextFormatter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/GeneralNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleFocalObjectNotifier.java
    M model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/TestTextFormatter.java

  Log Message:
  -----------
  Do minor refactorings related to notifications

Preparing for MID-5849 and MID-5350 resolution.

(cherry picked from commit 5037a4c3d25698fe432b56826495a936be5ab7f9)


  Commit: 26273558ef3d133faa707aed8a0666c1f31c40c0
      https://github.com/Evolveum/midpoint/commit/26273558ef3d133faa707aed8a0666c1f31c40c0
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/DeltaFormatter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/TextFormatter.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/ValueFormatter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/GeneralNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleReviewerNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleWorkflowNotifier.java

  Log Message:
  -----------
  Split TextFormatter to Value- and DeltaFormatter

Preparing for MID-5849 and MID-5350 resolution.

(cherry picked from commit e5df24fbef95cc6fc1657dca325220a61799d6ed)


  Commit: af423387509c5a27b19e40b0130d1f59a7b54d8b
      https://github.com/Evolveum/midpoint/commit/af423387509c5a27b19e40b0130d1f59a7b54d8b
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/result/OperationResult.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestNotifications.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/EventHandler.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/NotificationManager.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/CertReviewEvent.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/AccountOperationListener.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/EventHandlerRegistry.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationHook.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationManagerImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/TransportRegistry.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/api/transports/CustomTransport.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/api/transports/FileTransport.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/api/transports/MailTransport.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/api/transports/SimpleSmsTransport.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/DeltaFormatter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/handlers/AggregatedEventHandler.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/handlers/BaseHandler.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractFocalObjectNotifier.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractGeneralNotifier.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractPolicyRuleNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AccountActivationNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AccountPasswordNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/ConfirmationNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/CustomNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/GeneralNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/PasswordResetNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/RegistrationConfirmationNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleCampaignNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleCampaignStageNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleFocalObjectNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimplePolicyRuleNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleReportNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleResourceObjectNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleReviewerNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleTaskNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleUserNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleWorkflowNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/TimeValidityNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/UserPasswordNotifier.java

  Log Message:
  -----------
  Clean up notifications code a little bit

Preparing for MID-5849 and MID-5350 resolution.

(cherry picked from commit 9849faa5c81eb88cc8d3e73b5c797323b362c4e7)


  Commit: 671c141e510f6ac344bf0fa758512366fea9f460
      https://github.com/Evolveum/midpoint/commit/671c141e510f6ac344bf0fa758512366fea9f460
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M model/model-api/src/main/java/com/evolveum/midpoint/model/api/expr/MidpointFunctions.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/MidpointFunctionsImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensElementContext.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/BaseEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/ModelEvent.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationFunctionsImpl.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractFocalObjectNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractGeneralNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleFocalObjectNotifier.java

  Log Message:
  -----------
  Generalize notifications a bit

- password related functionality: UserType -> FocusType
- focal notifier: FocusType -> AssignmentHolderType

(cherry picked from commit ad0ce7c1070a2f09d245562bbaa5cb96098fc641)


  Commit: e937ccde2a17b5a57fe756a17cb58723ef03c63e
      https://github.com/Evolveum/midpoint/commit/e937ccde2a17b5a57fe756a17cb58723ef03c63e
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/EventHandler.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/EventHandlerRegistry.java
    R model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractFocalObjectNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleFocalObjectNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleUserNotifier.java

  Log Message:
  -----------
  Simplify notifier class hierarchy

Preparing for MID-5849 and MID-5350 resolution.

(cherry picked from commit 10d7d6b20302b7dadc2d747c7d06369478199e3b)


  Commit: aac7b859b75a21dc9486535125e388af62293190
      https://github.com/Evolveum/midpoint/commit/aac7b859b75a21dc9486535125e388af62293190
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/actions/NotifyExecutor.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestNotifications.java
    M model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java
    M model/notifications-api/pom.xml
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/NotificationFunctions.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/AccessCertificationEvent.java
    R model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/BaseEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/CertCampaignEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/CertCampaignStageEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/CertReviewEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/CustomEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/Event.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/ModelEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/PolicyRuleEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/ResourceObjectEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/SimpleObjectRef.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/TaskEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/WorkItemAllocationEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/WorkItemCustomEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/WorkItemEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/WorkItemLifecycleEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/WorkflowEvent.java
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/WorkflowProcessEvent.java
    A model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/factory/CustomEventFactory.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/AccountOperationListener.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/CertificationListener.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationFunctionsImpl.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationHook.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationManagerImpl.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationTaskListener.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/SimpleObjectRefImpl.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/WorkflowListenerImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/AccessCertificationEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/BaseEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/CertCampaignEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/CertCampaignStageEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/CertReviewEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/CustomEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/ModelEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/PolicyRuleEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/ResourceObjectEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/TaskEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemAllocationEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemCustomEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemLifecycleEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkflowEventImpl.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkflowProcessEventImpl.java
    R model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/cert/CertEventFactory.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/factory/CertEventFactory.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/factory/CustomEventFactoryImpl.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/DeltaFormatter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/TextFormatter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/formatters/ValueFormatter.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/FocusTypeFilterHelper.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/KindIntentFilterHelper.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/NotificationExpressionHelper.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractGeneralNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractPolicyRuleNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AccountActivationNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AccountPasswordNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/PasswordResetNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/RegistrationConfirmationNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleCampaignNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleCampaignStageNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleFocalObjectNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleResourceObjectNotifier.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleWorkflowNotifier.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/util/ApplicationContextHolder.java
    A model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/util/EventHelper.java
    M model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/TestTextFormatter.java
    M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/LightweightIdentifier.java

  Log Message:
  -----------
  Align applicability checks with text generation

Notifiers were applied to events based on criteria that were different
from those used to generate textual representation of the events.
This sometimes lead to events with empty list of modifications
(e.g. in MID-5849). This commit aligns those two aspects.

Also we have refactored some years-old code e.g. cleaned up Event class
hierarchy. Quick applicability check is now carried out before nested
event handlers are invoked, making their execution more intuitive
and robust.

(cherry picked from commit fce73aeafe03260680ae992a8417b31722e0e6dc)


  Commit: e136c2e10597cdf92b25610c599060ef14a916d2
      https://github.com/Evolveum/midpoint/commit/e136c2e10597cdf92b25610c599060ef14a916d2
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/Event.java

  Log Message:
  -----------
  Add event.requesteeIs method (MID-4598)

Also with shortcut event.requesteeIsUser().

(cherry picked from commit 5319ef315a6b6268e6d90e997f3b46cc62e000ee)


  Commit: ce8180700f8b7390e6b3204bbb96e557ce9a21b9
      https://github.com/Evolveum/midpoint/commit/ce8180700f8b7390e6b3204bbb96e557ce9a21b9
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M model/model-api/src/main/java/com/evolveum/midpoint/model/api/expr/MidpointFunctions.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/MidpointFunctionsImpl.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/ModelEventImpl.java
    M model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/TestTextFormatter.java

  Log Message:
  -----------
  Fix compilation errors after cherry-picking

These deal with User->Focus generalization w.r.t. passwords.
(These are in UserType only in 4.0.x.)


  Commit: 27313f5e9d1beaafd89011559c4d50976760be2b
      https://github.com/Evolveum/midpoint/commit/27313f5e9d1beaafd89011559c4d50976760be2b
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/FocusProcessor.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestNotifications.java
    A model/model-intest/src/test/resources/notifications/archetype-dummy.xml
    A model/model-intest/src/test/resources/notifications/role-dummy.xml
    M model/model-intest/src/test/resources/notifications/system-configuration.xml
    M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/Event.java
    M model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/TestTextFormatter.java

  Log Message:
  -----------
  Fix assignment activation deltas

These deltas were usually created as "replace Activation container
with new one containing (effectiveStatus=ENABLED)". Notification module
currently cannot render these deltas correctly. So these deltas were
changed to simpler form of "replace activation/effectiveStatus with
ENABLED" that are processable by notifications.

See MID-5350 and MID-6111.

(cherry picked from commit 4f10f92a2bdd2496d38b25671b717e8589f5b9f6)


  Commit: f41a1cfb0eac05e19929b2a6f6b4a20646291e12
      https://github.com/Evolveum/midpoint/commit/f41a1cfb0eac05e19929b2a6f6b4a20646291e12
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2020-03-14 (Sat, 14 Mar 2020)

  Changed paths:
    M model/model-intest/src/test/resources/notifications/archetype-dummy.xml
    M model/model-intest/src/test/resources/notifications/role-dummy.xml

  Log Message:
  -----------
  Fix two checkstyle errors

Relates to MID-5350.

(cherry picked from commit 906033c9caaad8a28794f4f17dc397ff50f11647)


Compare: https://github.com/Evolveum/midpoint/compare/a59d71a1f58c...f41a1cfb0eac


More information about the midPoint-svn mailing list