You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/07/26 13:01:17 UTC

[isis] branch ISIS-2329 created (now 7605ef2)

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a change to branch ISIS-2329
in repository https://gitbox.apache.org/repos/asf/isis.git.


      at 7605ef2  ISIS-2329: adds 1-arg constructors for domain events

This branch includes the following new commits:

     new 7605ef2  ISIS-2329: adds 1-arg constructors for domain events

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[isis] 01/01: ISIS-2329: adds 1-arg constructors for domain events

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2329
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 7605ef206d2e3a9826c0ea4ad8eb8c89d10f71d2
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jul 26 14:00:45 2021 +0100

    ISIS-2329: adds 1-arg constructors for domain events
---
 .../apache/isis/applib/events/domain/AbstractDomainEvent.java | 11 +++++++++++
 .../apache/isis/applib/events/domain/ActionDomainEvent.java   |  8 ++++++++
 .../isis/applib/events/domain/CollectionDomainEvent.java      | 10 ++++++++--
 .../apache/isis/applib/events/domain/PropertyDomainEvent.java |  8 ++++++++
 4 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/domain/AbstractDomainEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/domain/AbstractDomainEvent.java
index 033da3f..46ae8ff 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/domain/AbstractDomainEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/domain/AbstractDomainEvent.java
@@ -73,6 +73,17 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
         this(null, null);
     }
 
+    /**
+     * If used then the framework will set the remaining state via (non-API) setters.
+     *
+     * <p>
+     *     Provided to allow nested non-static implementations, for use in nested non-static mixins.
+     * </p>
+     */
+    public AbstractDomainEvent(final S source) {
+        this(source, null);
+    }
+
     public AbstractDomainEvent(
             final S source,
             final Identifier identifier) {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/domain/ActionDomainEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/domain/ActionDomainEvent.java
index fb21014..5688e88 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/domain/ActionDomainEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/domain/ActionDomainEvent.java
@@ -94,6 +94,14 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
     }
 
     /**
+     * Subtypes can define a one-arg constructor (for nested non-static classes of nested non-static mixins);
+     * the framework sets state via (non-API) setters.
+     */
+    public ActionDomainEvent(final S source) {
+        super(source);
+    }
+
+    /**
      * The semantics of the action being invoked.
      *
      * <p>
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/domain/CollectionDomainEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/domain/CollectionDomainEvent.java
index 91ee8b8..3e427dd 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/domain/CollectionDomainEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/domain/CollectionDomainEvent.java
@@ -21,8 +21,6 @@ package org.apache.isis.applib.events.domain;
 import org.apache.isis.applib.util.ObjectContracts;
 import org.apache.isis.applib.util.ToString;
 
-import lombok.Getter;
-
 /**
  * Fired whenever the framework interacts with a domain object's collection.
  *
@@ -75,6 +73,14 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
     public CollectionDomainEvent() {
     }
 
+    /**
+     * Subtypes can define a one-arg constructor (for nested non-static classes of nested non-static mixins);
+     * the framework sets state via (non-API) setters.
+     */
+    public CollectionDomainEvent(final S source) {
+        super(source);
+    }
+
 
 
     private static final ToString<CollectionDomainEvent<?,?>> toString =
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/domain/PropertyDomainEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/domain/PropertyDomainEvent.java
index 5886dfa..ba86bb5 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/domain/PropertyDomainEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/domain/PropertyDomainEvent.java
@@ -87,6 +87,14 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
     }
 
     /**
+     * Subtypes can define a one-arg constructor (for nested non-static classes of nested non-static mixins);
+     * the framework sets state via (non-API) setters.
+     */
+    public PropertyDomainEvent(final S source) {
+        super(source);
+    }
+
+    /**
      * The current (pre-modification) value of the property.
      *
      * <p>