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/03/03 22:08:11 UTC

[isis] branch ISIS-2444 updated (81b06c3 -> b015575)

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

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


 discard 81b06c3  ISIS-439: removes disabled interaction advisor reponsibility from CollectionDomainEventFacet (dead code)
 discard 8973bc2  ISIS-2444: more on domain event docs
 discard cc5cda0  ISIS-439: further work removing dead code re: mutable collections
 discard 50d7ae3  ISIS-439: further work removing dead code re: mutable collections
 discard 7c2eb7a  ISIS-439: further work removing dead code re: mutable collections
 discard 4796927  ISIS-2444: cleaning up domain event docs
     add 3d43024  ISIS-2553: promote ApplicationFeatureId to applib
     add ec7c553  ISIS-2553: simplify static functions
     add 547202f  ISIS-2553: remove redundant natural comp.
     add 23426dc  ISIS-2553: rename PACKAGE -> NAMESPACE, rename CLASS -> TYPE
     add c0cc90d  ISIS-2553: rename ApplicationFeatureType->ApplicationFeatureSort
     add 9e3d54e  ISIS-2553: refactor ApplicationFeatureId to have only a single constructor
     add 10aa6a3  ISIS-2553: simplify ApplicationFeatureSort
     add 099e65a  ISIS-2553: memoization for ApplicationFeatureId#getPathIds
     add 3fbcd98  ISIS-2553: add ApplicationFeatureId to doc index
     new 343feeb  ISIS-2444: cleaning up domain event docs
     new 4cb2def  ISIS-439: further work removing dead code re: mutable collections
     new 4c97222  ISIS-439: further work removing dead code re: mutable collections
     new e88486d  ISIS-439: further work removing dead code re: mutable collections
     new 827a0dc  ISIS-2444: more on domain event docs
     new df6eca9  ISIS-439: removes disabled interaction advisor reponsibility from CollectionDomainEventFacet (dead code)
     new b015575  ISIS-2444: event docs

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (81b06c3)
            \
             N -- N -- N   refs/heads/ISIS-2444 (b015575)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 7 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.


Summary of changes:
 .../applib-classes/pages/events/domainevent.adoc   |  21 +-
 .../pages/events/lifecycleevent.adoc               |  99 ++--
 .../lifecycleevent/AbstractLifecycleEvent.adoc     |  20 -
 .../events/lifecycleevent/ObjectCreatedEvent.adoc  |  14 -
 .../events/lifecycleevent/ObjectLoadedEvent.adoc   |  12 -
 .../lifecycleevent/ObjectPersistedEvent.adoc       |  11 -
 .../lifecycleevent/ObjectPersistingEvent.adoc      |  12 -
 .../events/lifecycleevent/ObjectRemovingEvent.adoc |  12 -
 .../events/lifecycleevent/ObjectUpdatedEvent.adoc  |  13 -
 .../events/lifecycleevent/ObjectUpdatingEvent.adoc |  13 -
 .../applib-classes/pages/events/uievent.adoc       |  76 ++-
 .../pages/events/uievent/CssClassUiEvent.adoc      |  17 -
 .../pages/events/uievent/IconUiEvent.adoc          |  19 -
 .../pages/events/uievent/TitleUiEvent.adoc         |  17 -
 ...ng.adoc => TranslatableString_usage-notes.adoc} |   0
 .../events/lifecycle/AbstractLifecycleEvent.java   |   5 +
 .../events/lifecycle/ObjectCreatedEvent.java       |  25 +-
 .../applib/events/lifecycle/ObjectLoadedEvent.java |  21 +-
 .../events/lifecycle/ObjectPersistedEvent.java     |   8 +
 .../events/lifecycle/ObjectPersistingEvent.java    |   8 +
 .../events/lifecycle/ObjectRemovingEvent.java      |   8 +
 .../events/lifecycle/ObjectUpdatedEvent.java       |   5 +
 .../events/lifecycle/ObjectUpdatingEvent.java      |   5 +
 .../isis/applib/events/ui/CssClassUiEvent.java     |  40 +-
 .../apache/isis/applib/events/ui/IconUiEvent.java  |  51 +-
 .../isis/applib/events/ui/LayoutUiEvent.java       |  38 +-
 .../apache/isis/applib/events/ui/TitleUiEvent.java |  39 +-
 .../services/appfeat/ApplicationFeatureId.java     | 396 ++++++++++++++++
 .../appfeat/ApplicationFeatureRepository.java      |   5 +
 ...MemberType.java => ApplicationFeatureSort.java} |  41 +-
 .../isis/commons/internal/base/_Strings.java       |  33 +-
 .../services/appfeat/ApplicationFeature.java       |  25 +-
 .../services/appfeat/ApplicationFeatureId.java     | 514 ---------------------
 .../ApplicationFeatureRepositoryDefault.java       | 108 ++---
 .../services/appfeat/ApplicationFeatureType.java   | 115 -----
 .../core/metamodel/services/appfeat/_Asserts.java  |  51 ++
 .../metamodel/services/appfeat/_Predicates.java    |  53 +++
 .../metamodel/MetaModelServiceDefault.java         |   6 +-
 .../specloader/SpecificationLoaderDefault.java     |   4 +-
 .../services/appfeat/ApplicationFeatureIdTest.java | 252 +++++-----
 .../ApplicationFeatureRepositoryDefaultTest.java   |  33 +-
 .../services/appfeat/ApplicationFeatureTest.java   |  29 +-
 .../appfeat/ApplicationFeatureTypeTest.java        |  62 ++-
 .../secman/api/authorizor/AuthorizorSecman.java    |   2 +-
 .../api/permission/ApplicationPermission.java      |  12 +-
 .../ApplicationPermissionRepository.java           |  20 +-
 .../api/permission/ApplicationPermissionValue.java |   5 +-
 .../permission/ApplicationPermissionValueSet.java  |   8 +-
 .../permission/PermissionsEvaluationService.java   |   2 +-
 .../PermissionsEvaluationServiceAbstract.java      |   2 +-
 .../secman/api/role/ApplicationRole.java           |   7 +-
 .../secman/model/app/feature/ApplicationClass.java |   2 +-
 .../model/app/feature/ApplicationClassAction.java  |   2 +-
 .../app/feature/ApplicationClassCollection.java    |   2 +-
 .../model/app/feature/ApplicationClassMember.java  |   2 +-
 .../app/feature/ApplicationClassProperty.java      |   2 +-
 .../app/feature/ApplicationFeatureViewModel.java   |  28 +-
 .../model/app/feature/ApplicationPackage.java      |   6 +-
 .../app/feature/ApplicationPermission_feature.java |   2 +-
 .../user/ApplicationUser_filterPermissions.java    |  16 +-
 .../app/user/ApplicationUser_permissions.java      |   4 +-
 .../model/app/user/UserPermissionViewModel.java    |  29 +-
 .../ApplicationOrphanedPermissionManager.java      |   9 +-
 ...OrphanedPermissionManager_relocateSelected.java |   2 +-
 .../permission/ApplicationPermission_allow.java    |   8 +-
 .../permission/ApplicationPermission_changing.java |   8 +-
 .../permission/ApplicationPermission_delete.java   |  10 +-
 .../ApplicationPermission_updateRole.java          |  12 +-
 .../dom/permission/ApplicationPermission_veto.java |  12 +-
 .../permission/ApplicationPermission_viewing.java  |  12 +-
 .../model/dom/role/ApplicationRole_addAction.java  |  10 +-
 .../model/dom/role/ApplicationRole_addClass.java   |  12 +-
 .../dom/role/ApplicationRole_addCollection.java    |  10 +-
 .../model/dom/role/ApplicationRole_addPackage.java |  12 +-
 ...ion.java => ApplicationRole_addPermission.java} |  87 ++--
 .../dom/role/ApplicationRole_addProperty.java      |  10 +-
 .../model/dom/role/ApplicationRole_addUser.java    |   8 +-
 .../dom/role/ApplicationRole_removePermission.java |  22 +-
 .../role/ApplicationRole_removePermissions.java    |   8 +-
 .../model/dom/role/ApplicationRole_removeUser.java |  10 +-
 .../dom/role/ApplicationRole_removeUsers.java      |   8 +-
 .../role/ApplicationRole_updateDescription.java    |  12 +-
 .../model/dom/role/ApplicationRole_updateName.java |  12 +-
 .../dom/tenancy/ApplicationTenancy_addChild.java   |   6 +-
 .../dom/tenancy/ApplicationTenancy_addUser.java    |   8 +-
 .../dom/tenancy/ApplicationTenancy_delete.java     |   4 +-
 .../tenancy/ApplicationTenancy_removeChild.java    |  12 +-
 .../dom/tenancy/ApplicationTenancy_removeUser.java |  12 +-
 .../dom/tenancy/ApplicationTenancy_updateName.java |  14 +-
 .../tenancy/ApplicationTenancy_updateParent.java   |   8 +-
 .../dom/tenancy/ApplicationTenancy_users.java      |   4 +-
 .../ApplicationUserManager_newDelegateUser.java    |   6 +-
 .../user/ApplicationUserManager_newLocalUser.java  |   6 +-
 .../model/dom/user/ApplicationUser_addRole.java    |  12 +-
 .../model/dom/user/ApplicationUser_delete.java     |   6 +-
 .../model/dom/user/ApplicationUser_duplicate.java  |   6 +-
 .../model/dom/user/ApplicationUser_lock.java       |  10 +-
 .../model/dom/user/ApplicationUser_removeRole.java |  12 +-
 .../dom/user/ApplicationUser_removeRoles.java      |   8 +-
 .../dom/user/ApplicationUser_resetPassword.java    |  10 +-
 .../model/dom/user/ApplicationUser_unlock.java     |   8 +-
 .../user/ApplicationUser_updateAccountType.java    |  10 +-
 .../dom/user/ApplicationUser_updateAtPath.java     |   8 +-
 .../user/ApplicationUser_updateEmailAddress.java   |  10 +-
 .../model/dom/user/ApplicationUser_updateName.java |  18 +-
 .../dom/user/ApplicationUser_updatePassword.java   |  18 +-
 .../user/ApplicationUser_updatePhoneNumber.java    |  10 +-
 .../dom/user/ApplicationUser_updateUsername.java   |   8 +-
 .../secman/model/dom/user/HasUsername_open.java    |  10 +-
 .../jdo/dom/permission/ApplicationPermission.java  |  10 +-
 .../ApplicationPermissionRepository.java           |  56 ++-
 .../secman/jdo/dom/user/ApplicationUser.java       |   2 +-
 .../AbstractRoleAndPermissionsFixtureScript.java   |  10 +-
 .../jpa/dom/permission/ApplicationPermission.java  |  10 +-
 .../ApplicationPermissionRepository.java           |  42 +-
 .../secman/jpa/dom/user/ApplicationUser.java       |   2 +-
 .../AbstractRoleAndPermissionsFixtureScript.java   |  10 +-
 .../secman/shiro/PermissionForMember.java          |   2 +-
 118 files changed, 1564 insertions(+), 1607 deletions(-)
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/AbstractLifecycleEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectCreatedEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectLoadedEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistedEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistingEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectRemovingEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatedEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatingEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/uievent/CssClassUiEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/uievent/IconUiEvent.adoc
 delete mode 100644 antora/components/refguide/modules/applib-classes/pages/events/uievent/TitleUiEvent.adoc
 rename antora/components/refguide/modules/applib-classes/pages/i18n/{TranslatableString.adoc => TranslatableString_usage-notes.adoc} (100%)
 create mode 100644 api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java
 copy api/applib/src/main/java/org/apache/isis/applib/services/appfeat/{ApplicationMemberType.java => ApplicationFeatureSort.java} (56%)
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/appfeat/ApplicationFeatureId.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/appfeat/ApplicationFeatureType.java
 create mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/appfeat/_Asserts.java
 create mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/appfeat/_Predicates.java
 copy extensions/security/secman/model/src/main/java/org/apache/isis/extensions/secman/model/dom/role/{ApplicationRole_addAction.java => ApplicationRole_addPermission.java} (53%)


[isis] 05/07: ISIS-2444: more on domain event docs

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

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

commit 827a0dc9d44c1a32a707ef02b97ba17ca3a3749e
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Mar 3 07:22:48 2021 +0000

    ISIS-2444: more on domain event docs
---
 .../applib-classes/pages/events/domainevent.adoc   |  4 +-
 .../events/domainevent/CollectionDomainEvent.adoc  | 50 ---------------
 .../events/domainevent/PropertyDomainEvent.adoc    | 46 --------------
 .../applib/events/domain/ActionDomainEvent.java    | 19 +++---
 .../events/domain/CollectionDomainEvent.java       | 13 ++--
 .../applib/events/domain/PropertyDomainEvent.java  | 73 +++++++++++++++++-----
 6 files changed, 80 insertions(+), 125 deletions(-)

diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
index a26d546..8dcc604 100644
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
+++ b/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
@@ -6,10 +6,8 @@
 
 This section catalogues the various domain event classes defined by Apache Isis.
 
-These events are broadcast on the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService].
-The domain events are broadcast as a result of being specified in the ,   or xref:refguide:applib:index/annotation/Collection.adoc#domainEvent[@Collection#domainEvent()] attributes.
+These events are broadcast through the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService] whenever the framework interacts with the domain object members
 
-They are listed in the table below.
 
 .Domain Event Classes
 [cols="1a,2a,2a,2a", options="header"]
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/CollectionDomainEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent/CollectionDomainEvent.adoc
deleted file mode 100644
index e35af06..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/CollectionDomainEvent.adoc
+++ /dev/null
@@ -1,50 +0,0 @@
-[[CollectionDomainEvent]]
-= `CollectionDomainEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-== API
-
-The API of the class is:
-
-// TODO: v2: use include::[]
-
-[source,java]
-----
-public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S> {
-
-    public static class Default                                 // <.>
-        extends CollectionDomainEvent<Object, Object> { }
-    public static class Noop                                    // <.>
-        extends CollectionDomainEvent<Object, Object> { }
-    public static class Doop                                    // <.>
-        extends CollectionDomainEvent<Object, Object> { }
-
-    public T getValue();                                        // <.>
-    public Of getOf();                                          // <.>
-}
-----
-<1> The `Default` nested static class is the default for the xref:refguide:applib:index/annotation/Collection.adoc#domainEvent[@Collection#domainEvent()] annotation attribute.
-Whether this raises an event or not depends upon the
-`isis.reflector.facet.collectionAnnotation.domainEvent.postForDefault` configuration property.
-<2> The `Noop` class is provided as a convenience to indicate that an event should _not_ be posted (irrespective of the configuration property setting).
-<3> Similarly, the `Doop` class is provided as a convenience to indicate that an event _should_ be raised (irrespective of the configuration property setting).
-<4> the object being added or removed
-<5> whether this is to add or to remove
-
-where the `Of` enum indicates in turn how the collection is being interacted with:
-
-[source,java]
-----
-public static enum Of {
-    ACCESS,         // <1>
-    ADD_TO,         // <2>
-    REMOVE_FROM     // <3>
-}
-----
-<1> collection is being rendered; set during for hide and disable phases
-<2> collection is being added to; set for validate, executing and executed phases
-<3> or, collection is being removed from; set for validate, executing and executed phases
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/PropertyDomainEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent/PropertyDomainEvent.adoc
deleted file mode 100644
index 6f37046..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/PropertyDomainEvent.adoc
+++ /dev/null
@@ -1,46 +0,0 @@
-[[PropertyDomainEvent]]
-= `PropertyDomainEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractDomainEvent[AbstractDomainEvent] for properties.
-
-The class has a couple of responsibilities (in addition to those it inherits):
-
-* capture the target object being interacted with
-
-* capture the old and new values of the property
-
-
-The class itself is instantiated automatically by the framework whenever interacting with a rendered object's property.
-
-== API
-
-The API of the class is:
-
-// TODO: v2: use include::[]
-
-[source,java]
-----
-public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
-
-    public static class Default                                 // <.>
-        extends PropertyDomainEvent<Object, Object> { }
-    public static class Noop                                    // <.>
-        extends PropertyDomainEvent<Object, Object> { }
-    public static class Doop                                    // <.>
-        extends PropertyDomainEvent<Object, Object> { }
-
-    public T getOldValue();                                     // <.>
-    public T getNewValue();                                     // <.>
-}
-----
-<1> The `Default` nested static class is the default for the xref:refguide:applib:index/annotation/Property.adoc#domainEvent[@Property#domainEvent()] annotation attribute.
-Whether this raises an event or not depends upon the
-`isis.reflector.facet.propertyAnnotation.domainEvent.postForDefault` configuration property.
-<2> The `Noop` class is provided as a convenience to indicate that an event should _not_ be posted (irrespective of the configuration property setting).
-<3> Similarly, the `Doop` class is provided as a convenience to indicate that an event _should_ be raised (irrespective of the configuration property setting).
-<4> The pre-modification value of the property; populated at validate and subsequent phases.
-<5> The proposed (post-modification) value of the property; populated at validate and subsequent phases
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 983b711..fb21014 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
@@ -29,17 +29,20 @@ import lombok.Getter;
 import lombok.Setter;
 
 /**
- * Subclass of {@link AbstractDomainEvent} for actions.
+ * Fired whenever the framework interacts with a domain object's action.
  *
  * <p>
- * The class has a number of responsibilities (in addition to those it inherits):
+ * This is the specialization of {@link AbstractDomainEvent}, for actions,
+ * which should then be further subclassed by domain application.
+ * </p>
+ *
+ * <p>
+ * The class has a number of responsibilities (in addition to those it
+ * inherits):
  * </p>
  *
  * <ul>
  *     <li>
- *          capture the target object being interacted with
- *     </li>
- *     <li>
  *          capture the arguments for each of the action's parameters
  *     </li>
  *     <li>
@@ -49,8 +52,8 @@ import lombok.Setter;
  * </ul>
  *
  * <p>
- * The class itself is instantiated automatically by the framework whenever
- * interacting with a rendered object's action.
+ * The class itself is instantiated automatically by the framework using a
+ * no-arg constructor; fields are set reflectively.
  * </p>
  *
  * @since 1.x {@index}
@@ -63,7 +66,7 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
      *
      * <p>
      * Whether this raises an event or not depends upon the
-     * <tt>isis.core.meta-model.annotation.action.domain-event.post-for-default</tt>
+     * <tt>isis.applib.annotation.action.domain-event.post-for-default</tt>
      * configuration property.
      * </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 a126c76..91ee8b8 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
@@ -24,11 +24,16 @@ import org.apache.isis.applib.util.ToString;
 import lombok.Getter;
 
 /**
- * Subclass of {@link AbstractDomainEvent} for collections.
+ * Fired whenever the framework interacts with a domain object's collection.
  *
  * <p>
- * The class itself is instantiated automatically by the framework whenever
- * interacting with a rendered object's collection.
+ * This is the specialization of {@link AbstractDomainEvent}, for collections,
+ *  * which should then be further subclassed by domain application. .
+ * </p>
+ *
+ * <p>
+ * The class itself is instantiated automatically by the framework using a
+ * no-arg constructor; fields are set reflectively.
  * </p>
  *
  * @since 1.x {@index}
@@ -42,7 +47,7 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
      *
      * <p>
      * Whether this raises an event or not depends upon the
-     * <tt>isis.core.meta-model.annotation.collection.domain-event.post-for-default</tt>
+     * <tt>isis.applib.annotation.collection.domain-event.post-for-default</tt>
      * configuration property.
      * </p>
      */
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 2801a66..5886dfa 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
@@ -25,27 +25,57 @@ import lombok.Getter;
 import lombok.Setter;
 
 /**
+ * Fired whenever the framework interacts with a domain object's property.
+ *
+ * <p>
+ * This is the specialization of {@link AbstractDomainEvent}, for properties,
+ *  * which should then be further subclassed by domain application.
+ * </p>
+ *
+ * <p>
+ * The class has a number of responsibilities (in addition to those it
+ * inherits):
+ * </p>
+ *
+ * <ul>
+ *     <li>
+ *          capture the old and new values of the property
+ *     </li>
+ * </ul>
+ *
+ * <p>
+ * The class itself is instantiated automatically by the framework using a
+ * no-arg constructor; fields are set reflectively.
+ * </p>
+ *
  * @since 1.x {@index}
  */
 public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.Property#domainEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.property.domain-event.post-for-default</tt>
+     * {@link org.apache.isis.applib.annotation.Property#domainEvent()}
+     * annotation attribute.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.applib.annotation.property.domain-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends PropertyDomainEvent<Object, Object> {}
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends PropertyDomainEvent<Object, Object> {}
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event..
      */
     public static class Doop extends PropertyDomainEvent<Object, Object> {}
 
@@ -57,21 +87,37 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
     }
 
     /**
-     * The current (pre-modification) value of the property; populated at {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#VALIDATE} and subsequent phases
-     * (but null for {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hidden} and {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#DISABLE disable} phases).
+     * The current (pre-modification) value of the property.
+     *
+     * <p>
+     * Populated at {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#VALIDATE} and subsequent
+     * phases (but null for
+     * {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hidden}
+     * and {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#DISABLE disable}
+     * phases).
+     * </p>
      */
     @Getter @Setter
     private T oldValue;
 
     /**
-     * The proposed (post-modification) value of the property; populated at {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#VALIDATE} and subsequent phases
-     * (but null for {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hidden} and {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#DISABLE disable} phases).
+     * The proposed (post-modification) value of the property.
+     *
+     * <p>
+     * Populated at
+     * {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#VALIDATE}
+     * and subsequent phases (but null for
+     * {@link Phase#HIDE hidden}
+     * and {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#DISABLE disable}
+     * phases).
+     * </p>
      *
      * <p>
      *     The proposed new value can also be modified by event handlers
-     *     during the {@link Phase#EXECUTING} phase.  The new value must be
-     *     the same type as the expected value; the framework performs
-     *     no sanity checks.
+     *     during the
+     *     {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#EXECUTING executing}
+     *     phase.  The new value must be the same type as the expected value;
+     *     the framework performs no sanity checks.
      * </p>
      */
     @Getter @Setter
@@ -79,7 +125,6 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
 
 
 
-
     private static final ToString<PropertyDomainEvent<?,?>> toString =
             ObjectContracts.<PropertyDomainEvent<?,?>>
     toString("source", PropertyDomainEvent::getSource)


[isis] 07/07: ISIS-2444: event docs

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

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

commit b015575f57754b44c00a3a1eea1478e0981dd67f
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Mar 3 22:07:08 2021 +0000

    ISIS-2444: event docs
---
 .../applib-classes/pages/events/domainevent.adoc   | 21 ++---
 .../pages/events/lifecycleevent.adoc               | 99 +++++++++-------------
 .../lifecycleevent/AbstractLifecycleEvent.adoc     | 20 -----
 .../events/lifecycleevent/ObjectCreatedEvent.adoc  | 14 ---
 .../events/lifecycleevent/ObjectLoadedEvent.adoc   | 12 ---
 .../lifecycleevent/ObjectPersistedEvent.adoc       | 11 ---
 .../lifecycleevent/ObjectPersistingEvent.adoc      | 12 ---
 .../events/lifecycleevent/ObjectRemovingEvent.adoc | 12 ---
 .../events/lifecycleevent/ObjectUpdatedEvent.adoc  | 13 ---
 .../events/lifecycleevent/ObjectUpdatingEvent.adoc | 13 ---
 .../applib-classes/pages/events/uievent.adoc       | 76 ++++++++---------
 .../pages/events/uievent/CssClassUiEvent.adoc      | 17 ----
 .../pages/events/uievent/IconUiEvent.adoc          | 19 -----
 .../pages/events/uievent/TitleUiEvent.adoc         | 17 ----
 ...ng.adoc => TranslatableString_usage-notes.adoc} |  0
 .../events/lifecycle/AbstractLifecycleEvent.java   |  5 ++
 .../events/lifecycle/ObjectCreatedEvent.java       | 25 ++++--
 .../applib/events/lifecycle/ObjectLoadedEvent.java | 21 +++--
 .../events/lifecycle/ObjectPersistedEvent.java     |  8 ++
 .../events/lifecycle/ObjectPersistingEvent.java    |  8 ++
 .../events/lifecycle/ObjectRemovingEvent.java      |  8 ++
 .../events/lifecycle/ObjectUpdatedEvent.java       |  5 ++
 .../events/lifecycle/ObjectUpdatingEvent.java      |  5 ++
 .../isis/applib/events/ui/CssClassUiEvent.java     | 40 +++++++--
 .../apache/isis/applib/events/ui/IconUiEvent.java  | 51 ++++++++---
 .../isis/applib/events/ui/LayoutUiEvent.java       | 38 +++++++--
 .../apache/isis/applib/events/ui/TitleUiEvent.java | 39 +++++++--
 27 files changed, 290 insertions(+), 319 deletions(-)

diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
index 8dcc604..b5f9e1b 100644
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
+++ b/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
@@ -4,43 +4,38 @@
 :page-partial:
 
 
-This section catalogues the various domain event classes defined by Apache Isis.
+Domain events are broadcast through the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService] whenever the framework interacts with the domain object members.
+
+They allow subscribers to change either veto the interaction, or to trigger other operations as a result of the interaction.
 
-These events are broadcast through the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService] whenever the framework interacts with the domain object members
 
 
 .Domain Event Classes
-[cols="1a,2a,2a,2a", options="header"]
+[cols="2a,2a,2a", options="header"]
 |===
 
 |API
-|Raised by
-|Fallback +
-Implementation
+|Event class defined by
 |Published when
 
 
 |xref:refguide:applib:index/events/domain/AbstractDomainEvent.adoc[AbstractDomainEvent]
 |n/a
-|(abstract class)
-|Superclass of the other domain events, listed below in this table.
+|n/a - superclass of the other domain events.
 
 
 |xref:refguide:applib:index/events/domain/ActionDomainEvent.adoc[ActionDomainEvent]
 |xref:refguide:applib:index/annotation/Action.adoc#domainEvent[@Action#domainEvent()]
-|`ActionDomainEvent.Default`
-|(hide/disable/validate/pre-execute/post-execute) with an object's action.
+|interact with (hide, disable, validate, pre-execute, post-execute) an object's action.
 
 |xref:refguide:applib:index/events/domain/CollectionDomainEvent.adoc[CollectionDomainEvent]
 |xref:refguide:applib:index/annotation/Collection.adoc#domainEvent[@Collection#domainEvent()]
-|`CollectionDomainEvent.Default`
 |hide an object's collection.
 
 
 |xref:refguide:applib:index/events/domain/PropertyDomainEvent.adoc[PropertyDomainEvent]
 |xref:refguide:applib:index/annotation/Property.adoc#domainEvent[@Property#domainEvent()]
-|`PropertyDomainEvent.Default`
-|hide/disable/validate/pre-edit/post-edit with an object's property.
+|interact with (hide, disable, validate, pre-edit, post-edit) an object's property.
 
 
 |===
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent.adoc
index 969c9b4..b6717b6 100644
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent.adoc
+++ b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent.adoc
@@ -5,95 +5,74 @@
 :page-partial:
 
 
-This section catalogues the various lifecycle event classes defined by Apache Isis.
-These events are fired automatically when a domain object is loaded, created, updated and so forth.
+Lifecycle events are broadcast through the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService] when a domain entity is loaded, created, updated to/from the database.
 
-The lifecycle event classes are listed in the table below:
+They allow subscribers to trigger other operations as a result of these persistence operations.
+One use case is to maintain an alternate data store.
 
 
 .Lifecycle Event Classes
-[cols="1a,2a,2a", options="header"]
+[cols="2a,2a,2a", options="header"]
 |===
 
 |API
-|Implementation
-|Notes
+|Event class defined by
+|Raised when
 
 
-|xref:applib-classes:events.adoc#AbstractLifecycleEvent[`o.a.i.applib.` +
-`AbstractLifecycleEvent`]
-|(abstract class)
-|Superclass of the other lifecycle events, listed below in this table.
+|xref:refguide:applib:index/events/lifecycle/AbstractLifecycleEvent.adoc[AbstractLifecycleEvent]
+|n/a
+|n/a - superclass of the other lifecycle events.
 
 
-|xref:applib-classes:events.adoc#ObjectCreatedEvent[`o.a.i.applib.` +
-`ObjectCreatedEvent`]
-|(abstract class). +
-`ObjectCreatedEvent.Default` is the concrete implementation that is used.
-|Broadcast when an object is first instantiated using the xref:refguide:applib:index/services/factory/FactoryService.adoc[FactoryService]'s
-`#instantiate(...)` method.
+|xref:refguide:applib:index/events/lifecycle/ObjectCreatedEvent.adoc[ObjectCreatedEvent]
+|xref:refguide:applib:index/annotation/DomainObject.adoc#createdLifecycleEvent[DomainObject +
+#createdLifecycleEvent()]
+|entity is first instantiated using  xref:refguide:applib:index/services/factory/FactoryService.adoc[FactoryService] +
 
+Also raised for view models.
 
-|xref:applib-classes:events.adoc#ObjectLoadedEvent[`o.a.i.applib.` +
-`ObjectLoadedEvent`]
-|(abstract class). +
-`ObjectLoadedEvent.Default` is the concrete implementation that is used.
-|Broadcast when an object is retrieved from the database.
 
+|xref:refguide:applib:index/events/lifecycle/ObjectLoadedEvent.adoc[ObjectLoadedEvent]
+|xref:refguide:applib:index/annotation/DomainObject.adoc#loadedLifecycleEvent[DomainObject +
+#loadedLifecycleEvent()]
+|entity is retrieved from the database.
 
-|xref:applib-classes:events.adoc#ObjectPersistedEvent[`o.a.i.applib.` +
-`ObjectPersistedEvent`]
-|(abstract class). +
-`ObjectPersistedEvent.Default` is the concrete implementation that is used.
-|Broadcast when an object is first saved (inserted) into the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s
+
+|xref:refguide:applib:index/events/lifecycle/ObjectPersistedEvent.adoc[ObjectPersistedEvent]
+|xref:refguide:applib:index/annotation/DomainObject.adoc#persistedLifecycleEvent[DomainObject +
+#persistedLifecycleEvent()]
+|entity is first saved (inserted) into the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s
 `#persist(...)` method.
 
 
-|xref:applib-classes:events.adoc#ObjectPersistingEvent[`o.a.i.applib.` +
-`ObjectPersistingEvent`]
-|(abstract class). +
-`ObjectPersistingEvent.Default` is the concrete implementation that is used.
-|Broadcast when an object is about to be saved (inserted) into the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s
+|xref:refguide:applib:index/events/lifecycle/ObjectPersistingEvent.adoc[ObjectPersistingEvent]
+|xref:refguide:applib:index/annotation/DomainObject.adoc#persistingLifecycleEvent[DomainObject +
+#persistingLifecycleEvent()]
+|entity is about to be saved (inserted) into the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s
 `#persist(...)` method.
 
 
-|xref:applib-classes:events.adoc#ObjectRemovingEvent[`o.a.i.applib.` +
-`ObjectRemovingEvent`]
-|(abstract class). +
-`ObjectRemovingEvent.Default` is the concrete implementation that is used.
-|Broadcast when an object is about to be deleted from the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s
+|xref:refguide:applib:index/events/lifecycle/ObjectRemovingEvent.adoc[ObjectRemovingEvent]
+|xref:refguide:applib:index/annotation/DomainObject.adoc#removingLifecycleEvent[DomainObject +
+#removingLifecycleEvent()]
+|entity is about to be deleted from the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s
 `#remove(...)` method.
 
 
-|xref:applib-classes:events.adoc#ObjectUpdatedEvent[`o.a.i.applib.` +
-`ObjectUpdatedEvent`]
-|(abstract class). +
-`ObjectUpdatedEvent.Default` is the concrete implementation that is used.
-|Broadcast when an object has just been updated in the database.
-This is done either explicitly when the current transaction is flushed using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s `#flush(...)` method, else is done implicitly when the transaction commits at the end of the user request.
+|xref:refguide:applib:index/events/lifecycle/ObjectUpdatedEvent.adoc[ObjectUpdatedEvent]
+|xref:refguide:applib:index/annotation/DomainObject.adoc#updatingLifecycleEvent[DomainObject +
+#updatingLifecycleEvent()]
+|entity has just been updated in the database.
 
 
-|xref:applib-classes:events.adoc#ObjectUpdatingEvent[`o.a.i.applib.` +
-`ObjectUpdatingEvent`]
-|``o.a.i.core`` +
-``events.lifecycle`` +
-``isis-applib``
-|(abstract class). +
-`ObjectUpdatingEvent.Default` is the concrete implementation that is used.
-|Broadcast when an object is about to be updated in the database.
-This is done either explicitly when the current transaction is flushed using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s `#flush(...)` method, else is done implicitly when the transaction commits at the end of the user request.
+|xref:refguide:applib:index/events/lifecycle/ObjectUpdatingEvent.adoc[ObjectUpdatingEvent]
+|xref:refguide:applib:index/annotation/DomainObject.adoc#updatedLifecycleEvent[DomainObject +
+#updatedLifecycleEvent()]
+|entity is about to be updated in the database.
 
 
 |===
 
 
 
-
-include::lifecycleevent/AbstractLifecycleEvent.adoc[leveloffset=+1]
-include::lifecycleevent/ObjectCreatedEvent.adoc[leveloffset=+1]
-include::lifecycleevent/ObjectLoadedEvent.adoc[leveloffset=+1]
-include::lifecycleevent/ObjectPersistedEvent.adoc[leveloffset=+1]
-include::lifecycleevent/ObjectPersistingEvent.adoc[leveloffset=+1]
-include::lifecycleevent/ObjectRemovingEvent.adoc[leveloffset=+1]
-include::lifecycleevent/ObjectUpdatedEvent.adoc[leveloffset=+1]
-include::lifecycleevent/ObjectUpdatingEvent.adoc[leveloffset=+1]
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/AbstractLifecycleEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/AbstractLifecycleEvent.adoc
deleted file mode 100644
index 2fff7df..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/AbstractLifecycleEvent.adoc
+++ /dev/null
@@ -1,20 +0,0 @@
-[[AbstractLifecycleEvent]]
-= `AbstractLifecycleEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-This class is the superclass for all lifecycle events that are raised by the framework when loading, saving, updating or deleting objects from the database.
-
-Its immediate subclasses are:
-
-* xref:applib-classes:events.adoc#ObjectCreatedEvent[ObjectCreatedEvent]
-* xref:applib-classes:events.adoc#ObjectLoadedEvent[ObjectLoadedEvent]
-* xref:applib-classes:events.adoc#ObjectPersistedEvent[ObjectPersistedEvent]
-* xref:applib-classes:events.adoc#ObjectPersistingEvent[ObjectPersistingEvent]
-* xref:applib-classes:events.adoc#ObjectRemovingEvent[ObjectRemovingEvent]
-* xref:applib-classes:events.adoc#ObjectUpdatedEvent[ObjectUpdatedEvent]
-* xref:applib-classes:events.adoc#ObjectUpdatingEvent[ObjectUpdatingEvent]
-
-
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectCreatedEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectCreatedEvent.adoc
deleted file mode 100644
index 913bc4f..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectCreatedEvent.adoc
+++ /dev/null
@@ -1,14 +0,0 @@
-[[ObjectCreatedEvent]]
-= `ObjectCreatedEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractLifecycleEvent[AbstractLifecycleEvent], broadcast when an object is first instantiated using the xref:refguide:applib:index/services/factory/FactoryService.adoc[FactoryServuce]'s `#instantiate(...)` method.
-
-`ObjectCreatedEvent.Default` is the implementation that is used by default, but this can be overridden using xref:refguide:applib:index/annotation/DomainObject.adoc#createdLifecycleEvent[@DomainObject#createdLifecycleEvent].
-
-
-
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectLoadedEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectLoadedEvent.adoc
deleted file mode 100644
index e49f0e5..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectLoadedEvent.adoc
+++ /dev/null
@@ -1,12 +0,0 @@
-[[ObjectLoadedEvent]]
-= `ObjectLoadedEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractLifecycleEvent[AbstractLifecycleEvent], broadcast when an object is retrieved from the database.
-
-`ObjectLoadedEvent.Default` is the concrete implementation that is used.
-
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistedEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistedEvent.adoc
deleted file mode 100644
index 38dc32f..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistedEvent.adoc
+++ /dev/null
@@ -1,11 +0,0 @@
-[[ObjectPersistedEvent]]
-= `ObjectPersistedEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractLifecycleEvent[AbstractLifecycleEvent], broadcast when an object is first saved (inserted) into the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s `#persist(...)` method.
-
-
-`ObjectPersistedEvent.Default` is the implementation that is used by default, but this can be overridden using xref:refguide:applib:index/annotation/DomainObject.adoc#persistedLifecycleEvent[@DomainObject#persistedLifecycleEvent].
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistingEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistingEvent.adoc
deleted file mode 100644
index 1d122be..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectPersistingEvent.adoc
+++ /dev/null
@@ -1,12 +0,0 @@
-[[ObjectPersistingEvent]]
-= `ObjectPersistingEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractLifecycleEvent[AbstractLifecycleEvent], broadcast when an object is about to be saved (inserted) into the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s `#persist(...)` method.
-
-
-`ObjectPersistingEvent.Default` is the implementation that is used by default, but this can be overridden using xref:refguide:applib:index/annotation/DomainObject.adoc#persistingLifecycleEvent[@DomainObject#persistingLifecycleEvent].
-
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectRemovingEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectRemovingEvent.adoc
deleted file mode 100644
index 776575d..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectRemovingEvent.adoc
+++ /dev/null
@@ -1,12 +0,0 @@
-[[ObjectRemovingEvent]]
-= `ObjectRemovingEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractLifecycleEvent[AbstractLifecycleEvent], broadcast when an object is about to be deleted from the database using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s `#remove(...)` method.
-
-
-`ObjectRemovingEvent.Default` is the implementation that is used by default, but this can be overridden using xref:refguide:applib:index/annotation/DomainObject.adoc#removingLifecycleEvent[@DomainObject#removingLifecycleEvent].
-
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatedEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatedEvent.adoc
deleted file mode 100644
index 235f5ff..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatedEvent.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-[[ObjectUpdatedEvent]]
-= `ObjectUpdatedEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractLifecycleEvent[AbstractLifecycleEvent], broadcast when an object has just been updated in the database.
-This is done either explicitly when the current transaction is flushed using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s `#flush(...)` method, else is done implicitly when the transaction commits at the end of the user request.
-
-`ObjectUpdatedEvent.Default` is the implementation that is used by default, but this can be overridden using xref:refguide:applib:index/annotation/DomainObject.adoc#updatedLifecycleEvent[@DomainObject#updatedLifecycleEvent].
-
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatingEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatingEvent.adoc
deleted file mode 100644
index 21611d7..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/lifecycleevent/ObjectUpdatingEvent.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-[[ObjectUpdatingEvent]]
-= `ObjectUpdatingEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractLifecycleEvent[AbstractLifecycleEvent], broadcast when an object is about to be updated in the database.
-This is done either explicitly when the current transaction is flushed using the xref:refguide:applib:index/services/repository/RepositoryService.adoc[RepositoryService]'s `#flush(...)` method, else is done implicitly when the transaction commits at the end of the user request.
-
-
-`ObjectUpdatingEvent.Default` is the implementation that is used by default, but this can be overridden using xref:refguide:applib:index/annotation/DomainObject.adoc#updatingLifecycleEvent[@DomainObject#updatingLifecycleEvent].
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/uievent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/uievent.adoc
index 4ad6ff7..ac3033a 100644
--- a/antora/components/refguide/modules/applib-classes/pages/events/uievent.adoc
+++ b/antora/components/refguide/modules/applib-classes/pages/events/uievent.adoc
@@ -4,58 +4,50 @@
 :page-partial:
 
 
-This section catalogues the various UI event classes defined by Apache Isis.
+UI events are broadcast on the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService] as the result of rendering a domain object.
+
+They allow subscribers to change various presentation aspects of the rendered object.
+
+Note that if the domain object defines its own layout preferences (for example, a xref:refguide:applib-methods:reserved.adoc#title[title()] supporting method) then these will take precedence.
 
-These events are broadcast on the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService].  The domain
-events are broadcast as a result of being specified in the xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#titleUiEvent[@DomainObjectLayout#titleUiEvent()],  xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#iconUiEvent[@DomainObjectLayout#iconUiEvent()] or xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClassUiEvent[@DomainObjectLayout#cssClassUiEvent()] attributes.
 
-They are listed in the table below.
 
 .UI Event Classes
-[cols="1a,2a,2a", options="header"]
+[cols="2a,2a,2a,2a", options="header"]
 |===
 
 |API
-|Implementation
-|Notes
-
-
-|xref:applib-classes:events.adoc#TitleUiEvent[`o.a.i.applib.` +
-`TitleUiEvent`]
-|(abstract class). +
-`TitleUiEvent.Default` is the concrete implementation used if no `@DomainObjectLayout#titleUiEvent` attribute is specified
-|Broadcast whenever there is a requirement to obtain a title for a domain object.
-Note that if the domain object defines its own xref:refguide:applib-methods:reserved.adoc#title[title()] supporting method, or has xref:refguide:applib:index/annotation/Title.adoc[@Title] annotation(s) on its properties, then these will take precedence.
-
-|xref:applib-classes:events.adoc#IconUiEvent[`o.a.i.applib.` +
-`IconUiEvent`]
-|(abstract class). +
-`IconUiEvent.Default` is the concrete implementation used if no `@DomainObjectLayout#iconUiEvent` attribute is specified
-|Broadcast whenever there is a requirement to obtain an icon (or rather, the name of an icon) for a domain object.
-Note that if the domain object defines its own xref:refguide:applib-methods:reserved.adoc#iconName[iconName()] supporting method, or if it has the xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClassFa[@DomainObjectLayout#cssClassFa()] attribute, then these will take precedence.
-
-|xref:applib-classes:events.adoc#CssClassUiEvent[`o.a.i.applib.` +
-`CssClassUiEvent`]
-|(abstract class). +
-`CssClassUiEvent.Default` is the concrete implementation used if no `@DomainObjectLayout#cssClassUiEvent` attribute is specified
-|Broadcast whenever there is a requirement to obtain a CSS class hint for a domain object.
-Note that if the domain object defines its own xref:refguide:applib-methods:reserved.adoc#cssClass[cssClass()] supporting method then this
-will take precedence.
-
-|xref:applib-classes:events.adoc#LayoutUiEvent[`o.a.i.applib.` +
-`LayoutUiEvent`]
-|(abstract class). +
-`LayoutUiEvent.Default` is the concrete implementation used if no `@DomainObjectLayout#layoutUiEvent` attribute is specified
-|Broadcast whenever there is a requirement to obtain an alternative layout for a domain object.
-Note that if the domain object defines its own xref:refguide:applib-methods:reserved.adoc#layout[layout()] supporting method then this
-will take precedence.
+|Event class defined by
+|Raised when
+|Overridden by
+
+
+|xref:refguide:applib:index/events/ui/TitleUiEvent.adoc[TitleUiEvent]
+|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#titleUiEvent[@DomainObjectLayout#titleUiEvent()]
+|\... rendering the title for a domain object.
+|xref:refguide:applib-methods:reserved.adoc#title[title()] +
+xref:refguide:applib:index/annotation/Title.adoc[@Title]
+
 
-|===
 
+|xref:refguide:applib:index/events/ui/IconUiEvent.adoc[IconUiEvent]
+|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#iconUiEvent[@DomainObjectLayout#iconUiEvent()]
+|\... rendering an icon for a domain object.
+|xref:refguide:applib-methods:reserved.adoc#iconName[iconName()]
+
+
+|xref:refguide:applib:index/events/ui/CssClassUiEvent.adoc[CssClassUiEvent]
+|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClassUiEvent[@DomainObjectLayout#cssClassUiEvent()]
+|\... obtaining a CSS class hint for a domain object.
+|xref:refguide:applib-methods:reserved.adoc#cssClass[cssClass()]
+
+|xref:refguide:applib:index/events/ui/LayoutUiEvent.adoc[LayoutUiEvent]
+|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#layoutUiEvent[@DomainObjectLayout#layoutUiEvent()]
+|\... obtain an alternative layout for a domain object.
+|xref:refguide:applib-methods:reserved.adoc#layout[layout()]
+
+|===
 
 
 
 
-include::uievent/TitleUiEvent.adoc[leveloffset=+1]
-include::uievent/IconUiEvent.adoc[leveloffset=+1]
-include::uievent/CssClassUiEvent.adoc[leveloffset=+1]
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/uievent/CssClassUiEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/uievent/CssClassUiEvent.adoc
deleted file mode 100644
index 9d92bac..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/uievent/CssClassUiEvent.adoc
+++ /dev/null
@@ -1,17 +0,0 @@
-[[CssClassUiEvent]]
-= `CssClassUiEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-This event class represents a request to obtain the a CSS class hint of a domain object.
-The class has a number of responsibilities:
-
-* capture the target object being interacted with
-
-* capture the CSS class, if any, as specified to one of the subscribers
-
-The class itself is instantiated automatically by the framework whenever interacting with a rendered object's action.
-
-If the domain object defines its own xref:refguide:applib-methods:reserved.adoc#cssClass[cssClass()] supporting method then this will take precedence.
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/uievent/IconUiEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/uievent/IconUiEvent.adoc
deleted file mode 100644
index 5d086d2..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/uievent/IconUiEvent.adoc
+++ /dev/null
@@ -1,19 +0,0 @@
-[[IconUiEvent]]
-= `IconUiEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-This event class represents a request to obtain the icon (or rather, name of icon) of a domain object.
-The class has a number of responsibilities:
-
-* capture the target object being interacted with
-
-* capture the icon (name), if any, as specified to one of the subscribers
-
-The class itself is instantiated automatically by the framework whenever interacting with a rendered object's action.
-
-If the domain object defines its own xref:refguide:applib-methods:reserved.adoc#iconName[iconName()] supporting method, or if it has the
-xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClassFa[@DomainObjectLayout#cssClassFa()] attribute, then these will take precedence.
-r
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/uievent/TitleUiEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/uievent/TitleUiEvent.adoc
deleted file mode 100644
index 55a7fb2..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/uievent/TitleUiEvent.adoc
+++ /dev/null
@@ -1,17 +0,0 @@
-[[TitleUiEvent]]
-= `TitleUiEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-This event class represents a request to obtain the title of a domain object.
-The class has a number of responsibilities:
-
-* capture the target object being interacted with
-
-* capture the title, if any, as specified to one of the subscribers
-
-The class itself is instantiated automatically by the framework whenever interacting with a rendered object's action.
-
-If the domain object defines its own xref:refguide:applib-methods:reserved.adoc#title[title()] supporting method, or has xref:refguide:applib:index/annotation/Title.adoc[@Title] annotation(s) on its properties, then these will take precedence.
diff --git a/antora/components/refguide/modules/applib-classes/pages/i18n/TranslatableString.adoc b/antora/components/refguide/modules/applib-classes/pages/i18n/TranslatableString_usage-notes.adoc
similarity index 100%
rename from antora/components/refguide/modules/applib-classes/pages/i18n/TranslatableString.adoc
rename to antora/components/refguide/modules/applib-classes/pages/i18n/TranslatableString_usage-notes.adoc
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/AbstractLifecycleEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/AbstractLifecycleEvent.java
index 2d1c726..33b9a45 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/AbstractLifecycleEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/AbstractLifecycleEvent.java
@@ -18,9 +18,14 @@
  */
 package org.apache.isis.applib.events.lifecycle;
 
+import javax.annotation.Nullable;
+
 import org.apache.isis.applib.events.EventObjectBase;
 
 /**
+ * Superclass for all lifecycle events that are raised by the framework when
+ * loading, saving, updating or deleting objects from the database.
+ *
  * @since 1.x {@index}
  */
 public abstract class AbstractLifecycleEvent<S> extends EventObjectBase<S> {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectCreatedEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectCreatedEvent.java
index 831c2e5..87bc51d 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectCreatedEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectCreatedEvent.java
@@ -19,27 +19,40 @@
 package org.apache.isis.applib.events.lifecycle;
 
 /**
+ * Broadcast when an object (entiy or view model) is first instantiated using
+ * the {@link org.apache.isis.applib.services.factory.FactoryService}.
+ *
+ * @see org.apache.isis.applib.services.factory.FactoryService#detachedEntity(Class)
+ * @see org.apache.isis.applib.services.factory.FactoryService#viewModel(Class)
+ *
  * @since 1.x {@index}
  */
 public abstract class ObjectCreatedEvent<S> extends AbstractLifecycleEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.DomainObject#createdLifecycleEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.domain-object.created-lifecycle-event.post-for-default</tt>
+     * {@link org.apache.isis.applib.annotation.DomainObject#createdLifecycleEvent()}
+     * annotation element.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.applib.annotation.domain-object.created-lifecycle-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends ObjectCreatedEvent<Object> {}
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends ObjectCreatedEvent<Object> {}
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event..
      */
     public static class Doop extends ObjectCreatedEvent<Object> {}
 
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectLoadedEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectLoadedEvent.java
index 82aaf11..4463f0b 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectLoadedEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectLoadedEvent.java
@@ -19,27 +19,36 @@
 package org.apache.isis.applib.events.lifecycle;
 
 /**
+ * Broadcast when an entity is retrieved from the database.
+ *
  * @since 1.x {@index}
  */
 public abstract class ObjectLoadedEvent<S> extends AbstractLifecycleEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.DomainObject#loadedLifecycleEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.domain-object.loaded-lifecycle-event.post-for-default</tt>
+     * {@link org.apache.isis.applib.annotation.DomainObject#loadedLifecycleEvent()}
+     * annotation element.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.applib.annotation.domain-object.loaded-lifecycle-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends ObjectLoadedEvent<Object> {}
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends ObjectLoadedEvent<Object> {}
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event..
      */
     public static class Doop extends ObjectLoadedEvent<Object> {}
 
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistedEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistedEvent.java
index 9f1d5f6..43f900f 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistedEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistedEvent.java
@@ -19,6 +19,14 @@
 package org.apache.isis.applib.events.lifecycle;
 
 /**
+ * Broadcast when an entity is first saved (inserted) into the database either
+ * explicitly using the
+ * {@link org.apache.isis.applib.services.repository.RepositoryService}, or
+ * implicitly, for example due to persistence-by-reachability or similar
+ * persistence mechanisms.
+ *
+ * @see ObjectPersistingEvent
+ *
  * @since 1.x {@index}
  */
 public abstract class ObjectPersistedEvent<S> extends AbstractLifecycleEvent<S> {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistingEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistingEvent.java
index 74c0dcb..d7518ba 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistingEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectPersistingEvent.java
@@ -19,6 +19,14 @@
 package org.apache.isis.applib.events.lifecycle;
 
 /**
+ * Broadcast when an entity is about to be saved (inserted) into the database
+ * either explicitly using the
+ * {@link org.apache.isis.applib.services.repository.RepositoryService}, or
+ * implicitly, for example due to persistence-by-reachability or similar
+ * persistence mechanisms.
+ *
+ * @see ObjectPersistedEvent
+ *
  * @since 1.x {@index}
  */
 public abstract class ObjectPersistingEvent<S> extends AbstractLifecycleEvent<S> {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectRemovingEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectRemovingEvent.java
index aa23e84..0ff9995 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectRemovingEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectRemovingEvent.java
@@ -19,6 +19,14 @@
 package org.apache.isis.applib.events.lifecycle;
 
 /**
+ * Broadcast when an entity is about to be removed (deleted) into the database
+ * either explicitly using the
+ * {@link org.apache.isis.applib.services.repository.RepositoryService}, or
+ * implicitly, for example due to cascade delete or similar
+ * persistence mechanisms.
+ *
+ * @see ObjectRemovingEvent
+ *
  * @since 1.x {@index}
  */
 public abstract class ObjectRemovingEvent<S> extends AbstractLifecycleEvent<S> {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatedEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatedEvent.java
index b835a38..860873b 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatedEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatedEvent.java
@@ -19,6 +19,11 @@
 package org.apache.isis.applib.events.lifecycle;
 
 /**
+ * Broadcast when an entity has just been updated in the database, usually
+ * as the result of the ORM dirty tracking mechanisms.
+ *
+ * @see ObjectUpdatingEvent
+ *
  * @since 1.x {@index}
  */
 public abstract class ObjectUpdatedEvent<S> extends AbstractLifecycleEvent<S> {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatingEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatingEvent.java
index ca3ff49..1c6764d 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatingEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/lifecycle/ObjectUpdatingEvent.java
@@ -19,6 +19,11 @@
 package org.apache.isis.applib.events.lifecycle;
 
 /**
+ * Broadcast when an entity is about to be updated in the database, usually
+ * as the result of the ORM dirty tracking mechanisms.
+ *
+ * @see ObjectUpdatedEvent
+ *
  * @since 1.x {@index}
  */
 public abstract class ObjectUpdatingEvent<S> extends AbstractLifecycleEvent<S> {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/ui/CssClassUiEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/ui/CssClassUiEvent.java
index bc84e18..cee48d0 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/ui/CssClassUiEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/ui/CssClassUiEvent.java
@@ -23,7 +23,26 @@ import org.apache.isis.applib.annotation.DomainObjectLayout;
 import lombok.Getter;
 
 /**
- * Emitted for subscribers to obtain a cssClass hint (equivalent to the <tt>cssClass()</tt> supporting method or the {@link DomainObjectLayout#cssClass()} attribute).
+ * Emitted for subscribers to provide a cssClass hint (equivalent to the
+ * <tt>cssClass()</tt> supporting method or the
+ * {@link DomainObjectLayout#cssClass()} element).
+ *
+ * <p>
+ * The class has a number of responsibilities:
+ * </p>
+ *
+ * <ul>
+ *     <li>
+ *          capture the target object being interacted with
+ *     </li>
+ *     <li>
+ *          capture the CSS class, if any, as specified to one of the subscribers
+ *     </li>
+ * </ul>
+ *
+ * <p>
+ *  The class itself is instantiated automatically by the framework.
+ * </p>
  *
  * @since 1.x {@index}
  */
@@ -31,21 +50,28 @@ public abstract class CssClassUiEvent<S> extends AbstractUiEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#cssClassUiEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.domain-object-layout.css-class-ui-event.post-for-default</tt>
+     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#cssClassUiEvent()}
+     * annotation element.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.applib.annotation.domain-object-layout.css-class-ui-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends CssClassUiEvent<Object> {}
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends CssClassUiEvent<Object> {}
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event..
      */
     public static class Doop extends CssClassUiEvent<Object> {}
 
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/ui/IconUiEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/ui/IconUiEvent.java
index fc70cab..2173e88 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/ui/IconUiEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/ui/IconUiEvent.java
@@ -21,13 +21,38 @@ package org.apache.isis.applib.events.ui;
 import java.util.EventObject;
 
 /**
- * Emitted for subscribers to obtain a cssClass hint (equivalent to the <tt>iconName()</tt> supporting method).
+ * Emitted for subscribers to provide a cssClass hint (equivalent to the
+ * <tt>iconName()</tt> supporting method).
+ *
+ * <p>
+ * The class has a number of responsibilities:
+ * </p>
+ *
+ * <ul>
+ *     <li>
+ *       capture the target object being interacted with
+ *     </li>
+ *     <li>
+ *      capture the icon (name), if any, as specified to one of the subscribers
+ *     </li>
+ * </ul>
+ *
+ * <p>
+ * The class itself is instantiated automatically by the framework.
+ * </p>
+ *
+ *
+ * *
+ *
+ *
+ * If the domain object defines its own xref:refguide:applib-methods:reserved.adoc#iconName[iconName()] supporting method, or if it has the
+ * xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClassFa[@DomainObjectLayout#cssClassFa()] attribute, then these will take precedence.
+ * </p>
  *
  * @since 1.x {@index}
  */
 public abstract class IconUiEvent<S> extends AbstractUiEvent<S> {
 
-    // -- constructors
     /**
      * If used then the framework will set state via (non-API) setters.
      *
@@ -45,21 +70,24 @@ public abstract class IconUiEvent<S> extends AbstractUiEvent<S> {
 
 
 
-    // -- Default class
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#iconUiEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.domain-object-layout.icon-ui-event.post-for-default</tt>
+     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#iconUiEvent()}
+     * annotation element.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.applib.annotation.domain-object-layout.icon-ui-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends IconUiEvent<Object> { }
 
 
-    // -- Noop class
-
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends IconUiEvent<Object> { }
 
@@ -67,8 +95,9 @@ public abstract class IconUiEvent<S> extends AbstractUiEvent<S> {
     // -- Doop class
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event..
      */
     public static class Doop extends IconUiEvent<Object> { }
 
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/ui/LayoutUiEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/ui/LayoutUiEvent.java
index 06be512..610e0c2 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/ui/LayoutUiEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/ui/LayoutUiEvent.java
@@ -25,7 +25,25 @@ import org.apache.isis.applib.annotation.DomainObjectLayout;
 import lombok.Getter;
 
 /**
- * Emitted for subscribers to obtain a layout hint (equivalent to the <tt>layout()</tt> supporting method).
+ * Emitted for subscribers to obtain a layout hint (equivalent to the
+ * <tt>layout()</tt> supporting method).
+ *
+ * <p>
+ * The class has a number of responsibilities:
+ * </p>
+ *
+ * <ul>
+ *     <li>
+ *          capture the target object being interacted with
+ *     </li>
+ *     <li>
+ *          capture the layout, if any, as specified to one of the subscribers
+ *     </li>
+ * </ul>
+ *
+ * <p>
+ *  The class itself is instantiated automatically by the framework.
+ * </p>
  *
  * @since 1.x {@index}
  */
@@ -33,21 +51,27 @@ public abstract class LayoutUiEvent<S> extends AbstractUiEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link DomainObjectLayout#layoutUiEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.domain-object-layout.layout-ui-event.post-for-default</tt>
+     * {@link DomainObjectLayout#layoutUiEvent()} annotation element.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.applib.annotation.domain-object-layout.layout-ui-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends LayoutUiEvent<Object> { }
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends LayoutUiEvent<Object> { }
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event..
      */
     public static class Doop extends LayoutUiEvent<Object> { }
 
diff --git a/api/applib/src/main/java/org/apache/isis/applib/events/ui/TitleUiEvent.java b/api/applib/src/main/java/org/apache/isis/applib/events/ui/TitleUiEvent.java
index 121f281..f8332e7 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/events/ui/TitleUiEvent.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/events/ui/TitleUiEvent.java
@@ -25,7 +25,25 @@ import org.apache.isis.applib.services.i18n.TranslatableString;
 import lombok.Getter;
 
 /**
- * Emitted for subscribers to obtain a cssClass hint (equivalent to the <tt>title()</tt> supporting method).
+ * Emitted for subscribers to obtain a title hint (equivalent to the
+ * <tt>title()</tt> supporting method).
+ *
+ * <p>
+ * The class has a number of responsibilities:
+ * </p>
+ *
+ * <ul>
+ *     <li>
+ *          capture the target object being interacted with
+ *     </li>
+ *     <li>
+ *          capture the title, if any, as specified to one of the subscribers
+ *     </li>
+ * </ul>
+ *
+ * <p>
+ *  The class itself is instantiated automatically by the framework.
+ * </p>
  *
  * @since 1.x {@index}
  */
@@ -33,21 +51,28 @@ public abstract class TitleUiEvent<S> extends AbstractUiEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#titleUiEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.domain-object-layout.title-ui-event.post-for-default</tt>
+     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#titleUiEvent()}
+     * annotation element.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.applib.annotation.domain-object-layout.title-ui-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends TitleUiEvent<Object> {}
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property seting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property seting for the
+     * {@link Default} event.
      */
     public static class Noop extends TitleUiEvent<Object> {}
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Doop extends TitleUiEvent<Object> {}
 


[isis] 03/07: ISIS-439: further work removing dead code re: mutable collections

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

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

commit 4c97222e00f2f7d81e6435f598d8810469477790
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Mar 3 07:04:12 2021 +0000

    ISIS-439: further work removing dead code re: mutable collections
---
 .../events/domain/CollectionDomainEvent.java       |  35 -------
 .../core/metamodel/facets/DomainEventHelper.java   | 110 ++++++++-------------
 .../modify/CollectionDomainEventFacetAbstract.java |   2 -
 ...HelperTest_newCollectionDomainEvent_forAdd.java |   6 +-
 ...perTest_newCollectionDomainEvent_forRemove.java |   6 +-
 5 files changed, 49 insertions(+), 110 deletions(-)

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 6d4c57c..7b1c489 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
@@ -93,32 +93,6 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
     @Getter
     private T value;
 
-    public static enum Of {
-        /**
-         * The collection is being accessed
-         * ({@link AbstractDomainEvent.Phase#HIDE hide} and
-         * {@link AbstractDomainEvent.Phase#DISABLE disable}) checks.
-         */
-        ACCESS,
-
-        /**
-         * The collection is being added to
-         * ({@link AbstractDomainEvent.Phase#VALIDATE validity} check and
-         * {@link AbstractDomainEvent.Phase#EXECUTED execution}).
-         */
-        ADD_TO,
-
-        /**
-         * The collection is being removed from
-         * ({@link AbstractDomainEvent.Phase#VALIDATE validity} check and
-         * {@link AbstractDomainEvent.Phase#EXECUTED execution}).
-         */
-        REMOVE_FROM
-
-    }
-
-    @Getter
-    private Of of;
 
     /**
      * Not API, set by the framework.
@@ -126,14 +100,6 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
     public void setValue(T value) {
         this.value = value;
     }
-    /**
-     * Not API; updates from {@link Of#ACCESS} to either {@link Of#ADD_TO}
-     * or {@link Of#REMOVE_FROM} when hits the
-     * {@link AbstractDomainEvent.Phase#VALIDATE validation phase}.
-     */
-    public void setOf(Of of) {
-        this.of = of;
-    }
 
 
     private static final ToString<CollectionDomainEvent<?,?>> toString =
@@ -141,7 +107,6 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
     toString("source", CollectionDomainEvent::getSource)
     .thenToString("identifier", CollectionDomainEvent::getIdentifier)
     .thenToString("eventPhase", CollectionDomainEvent::getEventPhase)
-    .thenToString("of", CollectionDomainEvent::getOf)
     .thenToString("value", CollectionDomainEvent::getValue)
     ;
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java
index 8029c45..56cb6d6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java
@@ -67,7 +67,7 @@ public class DomainEventHelper {
     private final MetamodelEventService metamodelEventService;
 
     // -- postEventForAction
-    
+
     // variant using eventType and no existing event
     public ActionDomainEvent<?> postEventForAction(
             final AbstractDomainEvent.Phase phase,
@@ -77,12 +77,12 @@ public class DomainEventHelper {
             final InteractionHead head,
             final Can<ManagedObject> argumentAdapters,
             final ManagedObject resultAdapter) {
-        
-        return postEventForAction(phase, uncheckedCast(eventType), /*existingEvent*/null, 
-                objectAction, identified, 
+
+        return postEventForAction(phase, uncheckedCast(eventType), /*existingEvent*/null,
+                objectAction, identified,
                 head, argumentAdapters, resultAdapter);
     }
-    
+
     // variant using existing event and not eventType (is derived from event)
     public ActionDomainEvent<?> postEventForAction(
             final AbstractDomainEvent.Phase phase,
@@ -92,9 +92,9 @@ public class DomainEventHelper {
             final InteractionHead head,
             final Can<ManagedObject> argumentAdapters,
             final ManagedObject resultAdapter) {
-        
-        return postEventForAction(phase, 
-                uncheckedCast(existingEvent.getClass()), existingEvent, objectAction, identified, 
+
+        return postEventForAction(phase,
+                uncheckedCast(existingEvent.getClass()), existingEvent, objectAction, identified,
                 head, argumentAdapters, resultAdapter);
     }
 
@@ -107,7 +107,7 @@ public class DomainEventHelper {
             final InteractionHead head,
             final Can<ManagedObject> argumentAdapters,
             final ManagedObject resultAdapter) {
-        
+
         _Assert.assertTypeIsInstanceOf(eventType, ActionDomainEvent.class);
 
         try {
@@ -166,7 +166,7 @@ public class DomainEventHelper {
             final Class<? extends ActionDomainEvent<S>> type,
             final Identifier identifier,
             final S source,
-            final Object... arguments) 
+            final Object... arguments)
         throws IllegalArgumentException,
             NoSuchMethodException, SecurityException {
 
@@ -174,19 +174,19 @@ public class DomainEventHelper {
 
         val noArgConstructor = constructors.filter(paramCount(0)).getFirst().orElse(null);
         if(noArgConstructor!=null) {
-            
+
             final Object event = invokeConstructor(noArgConstructor);
             final ActionDomainEvent<S> ade = uncheckedCast(event);
-            
+
             ade.initSource(source);
             ade.setIdentifier(identifier);
             ade.setArguments(asList(arguments));
             return ade;
         }
-        
+
 
         // else
-        
+
         val updateEventConstructor = constructors
                 .filter(paramCount(3)
                         .and(paramAssignableFrom(0, source.getClass()))
@@ -195,12 +195,12 @@ public class DomainEventHelper {
                         )
                 .getFirst()
                 .orElse(null);
-        
+
         if(updateEventConstructor!=null) {
             val event = invokeConstructor(updateEventConstructor, source, identifier, arguments);
-            return uncheckedCast(event);    
+            return uncheckedCast(event);
         }
-        
+
         throw new NoSuchMethodException(type.getName()+".<init>(? super " + source.getClass().getName() + ", " + Identifier.class.getName() + ", [Ljava.lang.Object;)");
     }
 
@@ -221,7 +221,7 @@ public class DomainEventHelper {
             final InteractionHead head,
             final T oldValue,
             final T newValue) {
-        
+
         _Assert.assertTypeIsInstanceOf(eventType, PropertyDomainEvent.class);
 
         try {
@@ -232,10 +232,10 @@ public class DomainEventHelper {
                 event = existingEvent;
             } else {
                 // all other phases, create a new event
-                
+
                 final S source = uncheckedCast(UnwrapUtil.single(head.getTarget()));
                 final Identifier identifier = identified.getIdentifier();
-                
+
                 event = newPropertyDomainEvent(eventType, identifier, source, oldValue, newValue);
 
                 // copy over if have
@@ -271,7 +271,7 @@ public class DomainEventHelper {
         val constructors = _Reflect.getPublicConstructors(type);
 
         val noArgConstructors = constructors.filter(paramCount(0));
-        
+
         for (val constructor : noArgConstructors) {
             final Object event = invokeConstructor(constructor);
             final PropertyDomainEvent<S, T> pde = uncheckedCast(event);
@@ -292,7 +292,7 @@ public class DomainEventHelper {
                         .and(paramAssignableFromValue(2, oldValue))
                         .and(paramAssignableFromValue(3, newValue))
                         );
-        
+
         for (val constructor : updateEventConstructors) {
             val event = invokeConstructor(constructor, source, identifier, oldValue, newValue);
             return uncheckedCast(event);
@@ -308,14 +308,13 @@ public class DomainEventHelper {
     public <S, T> CollectionDomainEvent<S, T> postEventForCollection(
             AbstractDomainEvent.Phase phase,
             final Class<? extends CollectionDomainEvent<S, T>> eventType,
-                    final CollectionDomainEvent<S, T> existingEvent,
-                    final IdentifiedHolder identified,
-                    final InteractionHead head,
-                    final CollectionDomainEvent.Of of,
-                    final T reference) {
-        
+            final CollectionDomainEvent<S, T> existingEvent,
+            final IdentifiedHolder identified,
+            final InteractionHead head,
+            final T reference) {
+
         _Assert.assertTypeIsInstanceOf(eventType, CollectionDomainEvent.class);
-        
+
         try {
             final CollectionDomainEvent<S, T> event;
             if (existingEvent != null && phase.isExecuted()) {
@@ -325,7 +324,7 @@ public class DomainEventHelper {
                 // all other phases, create a new event
                 final S source = uncheckedCast(UnwrapUtil.single(head.getTarget()));
                 final Identifier identifier = identified.getIdentifier();
-                event = newCollectionDomainEvent(eventType, phase, identifier, source, of, reference);
+                event = newCollectionDomainEvent(eventType, phase, identifier, source, reference);
 
                 // copy over if have
                 head.getMixedIn()
@@ -344,72 +343,49 @@ public class DomainEventHelper {
 
     <S, T> CollectionDomainEvent<S, T> newCollectionDomainEvent(
             final Class<? extends CollectionDomainEvent<S, T>> type,
-                    final AbstractDomainEvent.Phase phase,
-                    final Identifier identifier,
-                    final S source,
-                    final CollectionDomainEvent.Of of,
-                    final T value)
-                            throws NoSuchMethodException, SecurityException, InstantiationException,
-                            IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+            final AbstractDomainEvent.Phase phase,
+            final Identifier identifier,
+            final S source,
+            final T value)
+            throws NoSuchMethodException, SecurityException,
+            IllegalArgumentException {
 
         val constructors = _Reflect.getPublicConstructors(type);
 
         val noArgConstructors = constructors.filter(paramCount(0));
-        
+
         for (val constructor : noArgConstructors) {
             final Object event = invokeConstructor(constructor);
             final CollectionDomainEvent<S, T> cde = uncheckedCast(event);
 
             cde.initSource(source);
             cde.setIdentifier(identifier);
-            cde.setOf(of);
             cde.setValue(value);
             return cde;
         }
-        
+
         // else
         // search for constructor accepting source, identifier, type, value
         val updateEventConstructors = constructors
                 .filter(paramCount(4)
                         .and(paramAssignableFrom(0, source.getClass()))
                         .and(paramAssignableFrom(1, Identifier.class))
-                        .and(paramAssignableFrom(2, CollectionDomainEvent.Of.class))
-                        .and(paramAssignableFromValue(3, value))
+                        .and(paramAssignableFromValue(2, value))
                         );
-        
+
         for (val constructor : updateEventConstructors) {
-            val event = invokeConstructor(constructor, source, identifier, of, value);
+            val event = invokeConstructor(constructor, source, identifier, value);
             return uncheckedCast(event);
         }
-        
-        // else
 
-        if(phase == AbstractDomainEvent.Phase.EXECUTED) {
-            if(of == CollectionDomainEvent.Of.ADD_TO 
-                    || of == CollectionDomainEvent.Of.REMOVE_FROM) {
-                // support for annotations @PostsCollectionAddedTo and @PostsCollectionRemovedFrom:
-                // search for constructor accepting source, identifier, value
-                val eventConstructors = constructors
-                        .filter(paramCount(3)
-                                .and(paramAssignableFrom(0, source.getClass()))
-                                .and(paramAssignableFrom(1, Identifier.class))
-                                .and(paramAssignableFromValue(2, value))
-                                );
-                for (val constructor : eventConstructors) {
-                    val event = invokeConstructor(constructor, source, identifier, value);
-                    return uncheckedCast(event);
-                }
-            }
-        }
-        
         // else
         throw new NoSuchMethodException(type.getName()+".<init>(? super " + source.getClass().getName() + ", " + Identifier.class.getName() + ", java.lang.Object)");
     }
 
     private static <T> T invokeConstructor(
-            @NonNull final Constructor<T> constructor, 
+            @NonNull final Constructor<T> constructor,
             final Object... args){
-        
+
         try {
             return constructor.newInstance(args);
         } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
@@ -418,6 +394,6 @@ public class DomainEventHelper {
                     "failed to invoke constructor %s", constructor, e);
         }
     }
-    
+
 
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
index d63ec04..e400f70 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
@@ -76,7 +76,6 @@ public abstract class CollectionDomainEventFacetAbstract
                         AbstractDomainEvent.Phase.HIDE,
                         getEventType(), null,
                         getIdentified(), ic.getHead(),
-                        CollectionDomainEvent.Of.ACCESS,
                         null);
         if (event != null && event.isHidden()) {
             return "Hidden by subscriber";
@@ -92,7 +91,6 @@ public abstract class CollectionDomainEventFacetAbstract
                         AbstractDomainEvent.Phase.DISABLE,
                         getEventType(), null,
                         getIdentified(), ic.getHead(),
-                        CollectionDomainEvent.Of.ACCESS,
                         null);
         if (event != null && event.isDisabled()) {
             final TranslatableString reasonTranslatable = event.getDisabledReasonTranslatable();
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
index d586a41..5ae89a1 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
@@ -48,7 +48,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, null, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
+                CollectionDomainEvent.Default.class, null, identifier, sdo, other);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
@@ -63,7 +63,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
@@ -78,7 +78,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<SomeDomainObject, SomeReferencedObject> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                SomeDomainObjectCollectionDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
+                SomeDomainObjectCollectionDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
         assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
index b07c9e2..dc2c6d0 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
@@ -48,7 +48,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
@@ -63,7 +63,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
@@ -78,7 +78,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<SomeDomainObject, SomeReferencedObject> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                SomeDomainObjectCollectionRemovedFromDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
+                SomeDomainObjectCollectionRemovedFromDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
         assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));


[isis] 06/07: ISIS-439: removes disabled interaction advisor reponsibility from CollectionDomainEventFacet (dead code)

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

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

commit df6eca99839bbaa59ae3be0b0d5251acbabaaa19
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Mar 3 09:06:11 2021 +0000

    ISIS-439: removes disabled interaction advisor reponsibility from CollectionDomainEventFacet (dead code)
---
 .../modify/CollectionDomainEventFacet.java         |  2 +-
 .../modify/CollectionDomainEventFacetAbstract.java | 29 ----------------------
 2 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java
index 6ebc17a..8d79acb 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java
@@ -28,7 +28,7 @@ import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
  * Corresponds to <tt>@Collection(domainEvent=...)</tt> annotation in the Isis programming model.
  */
 public interface CollectionDomainEventFacet
-extends SingleClassValueFacet, HidingInteractionAdvisor, DisablingInteractionAdvisor {
+extends SingleClassValueFacet, HidingInteractionAdvisor {
 
 }
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
index 7046627..39c1bdc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
@@ -21,14 +21,10 @@ package org.apache.isis.core.metamodel.facets.collections.collection.modify;
 
 import org.apache.isis.applib.events.domain.AbstractDomainEvent;
 import org.apache.isis.applib.events.domain.CollectionDomainEvent;
-import org.apache.isis.applib.services.i18n.TranslatableString;
-import org.apache.isis.applib.services.i18n.TranslationService;
 import org.apache.isis.commons.internal.base._Casts;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
 import org.apache.isis.core.metamodel.facets.DomainEventHelper;
 import org.apache.isis.core.metamodel.facets.SingleClassValueFacetAbstract;
-import org.apache.isis.core.metamodel.interactions.UsabilityContext;
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
 
 public abstract class CollectionDomainEventFacetAbstract
@@ -36,8 +32,6 @@ public abstract class CollectionDomainEventFacetAbstract
         implements CollectionDomainEventFacet {
 
     private final DomainEventHelper domainEventHelper;
-    private final TranslationService translationService;
-    private final String translationContext;
 
     public CollectionDomainEventFacetAbstract(
             final Class<? extends CollectionDomainEvent<?, ?>> eventType,
@@ -46,10 +40,6 @@ public abstract class CollectionDomainEventFacetAbstract
         super(CollectionDomainEventFacet.class, holder, eventType);
         this.eventType = eventType;
 
-        this.translationService = getTranslationService();
-        // sadness: same as in TranslationFactory
-        this.translationContext = ((IdentifiedHolder)holder).getIdentifier().getTranslationContext();
-
         domainEventHelper = DomainEventHelper.ofServiceRegistry(getServiceRegistry());
     }
 
@@ -83,23 +73,4 @@ public abstract class CollectionDomainEventFacetAbstract
         return null;
     }
 
-    @Override
-    public String disables(final UsabilityContext ic) {
-
-        final CollectionDomainEvent<?, ?> event =
-                domainEventHelper.postEventForCollection(
-                        AbstractDomainEvent.Phase.DISABLE,
-                        getEventType(),
-                        getIdentified(), ic.getHead()
-                );
-        if (event != null && event.isDisabled()) {
-            final TranslatableString reasonTranslatable = event.getDisabledReasonTranslatable();
-            if(reasonTranslatable != null) {
-                return reasonTranslatable.translate(translationService, translationContext);
-            }
-            return event.getDisabledReason();
-        }
-        return null;
-    }
-
 }


[isis] 01/07: ISIS-2444: cleaning up domain event docs

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

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

commit 343feebd3c2e8a6b77a01e3f0014bb8d1a8c684c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Mar 3 06:44:19 2021 +0000

    ISIS-2444: cleaning up domain event docs
---
 .../applib-classes/pages/events/domainevent.adoc   |  51 ++++-----
 .../events/domainevent/AbstractDomainEvent.adoc    | 109 -------------------
 .../events/domainevent/ActionDomainEvent.adoc      |  49 ---------
 .../events/domainevent/CollectionDomainEvent.adoc  |  12 --
 .../applib/events/domain/AbstractDomainEvent.java  | 121 ++++++++++++++++-----
 .../applib/events/domain/ActionDomainEvent.java    | 105 ++++++++++++++----
 .../events/domain/CollectionDomainEvent.java       |  52 ++++++---
 .../applib/events/domain/PropertyDomainEvent.java  |   7 +-
 .../main/adoc/modules/metamodel/pages/about.adoc   |   2 +-
 persistence/jpa/adoc/modules/ROOT/pages/about.adoc |   2 +-
 security/adoc/modules/ROOT/pages/about.adoc        |   4 +-
 testing/adoc/modules/ROOT/pages/about.adoc         |   4 +-
 12 files changed, 240 insertions(+), 278 deletions(-)

diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
index 8be777f..a26d546 100644
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
+++ b/antora/components/refguide/modules/applib-classes/pages/events/domainevent.adoc
@@ -7,54 +7,43 @@
 This section catalogues the various domain event classes defined by Apache Isis.
 
 These events are broadcast on the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService].
-The domain events are broadcast as a result of being specified in the xref:refguide:applib:index/annotation/Action.adoc#domainEvent[@Action#domainEvent()],  xref:refguide:applib:index/annotation/Property.adoc#domainEvent[@Property#domainEvent()] or xref:refguide:applib:index/annotation/Collection.adoc#domainEvent[@Collection#domainEvent()] attributes.
+The domain events are broadcast as a result of being specified in the ,   or xref:refguide:applib:index/annotation/Collection.adoc#domainEvent[@Collection#domainEvent()] attributes.
 
 They are listed in the table below.
 
 .Domain Event Classes
-[cols="1a,2a,2a", options="header"]
+[cols="1a,2a,2a,2a", options="header"]
 |===
 
 |API
-|Implementation
-|Notes
+|Raised by
+|Fallback +
+Implementation
+|Published when
 
 
-|xref:applib-classes:events.adoc#AbstractDomainEvent[`o.a.i.applib.` +
-`AbstractDomainEvent`]
+|xref:refguide:applib:index/events/domain/AbstractDomainEvent.adoc[AbstractDomainEvent]
+|n/a
 |(abstract class)
 |Superclass of the other domain events, listed below in this table.
 
 
-|xref:applib-classes:events.adoc#ActionDomainEvent[`o.a.i.applib.` +
-`ActionDomainEvent`]
-|(abstract class). +
-`ActionDomainEvent.Default` is the concrete implementation used if no `@Action#domainEvent` attribute is specified
-|Broadcast whenever there is an interaction (hide/disable/validate/pre-execute/post-execute) with an object's action.
+|xref:refguide:applib:index/events/domain/ActionDomainEvent.adoc[ActionDomainEvent]
+|xref:refguide:applib:index/annotation/Action.adoc#domainEvent[@Action#domainEvent()]
+|`ActionDomainEvent.Default`
+|(hide/disable/validate/pre-execute/post-execute) with an object's action.
 
+|xref:refguide:applib:index/events/domain/CollectionDomainEvent.adoc[CollectionDomainEvent]
+|xref:refguide:applib:index/annotation/Collection.adoc#domainEvent[@Collection#domainEvent()]
+|`CollectionDomainEvent.Default`
+|hide an object's collection.
 
-|xref:applib-classes:events.adoc#CollectionDomainEvent[`o.a.i.applib.` +
-`CollectionDomainEvent`]
-|(abstract class). +
-`CollectionDomainEvent.Default` is the concrete implementation used if no `@Collection#domainEvent` attribute
-is specified.
-|Broadcast whenever there is an interaction (hide/disable/validate/access) with an object's collection.
 
-
-|xref:applib-classes:events.adoc#PropertyDomainEvent[`o.a.i.applib.` +
-`PropertyDomainEvent`]
-|(abstract class). +
-`PropertyDomainEvent.Default` is the concrete implementation used if no `@Propert#domainEvent` attribute is specified
-|Broadcast whenever there is an interaction (hide/disable/validate/access) with an object's property.
+|xref:refguide:applib:index/events/domain/PropertyDomainEvent.adoc[PropertyDomainEvent]
+|xref:refguide:applib:index/annotation/Property.adoc#domainEvent[@Property#domainEvent()]
+|`PropertyDomainEvent.Default`
+|hide/disable/validate/pre-edit/post-edit with an object's property.
 
 
 |===
 
-
-
-
-
-include::domainevent/AbstractDomainEvent.adoc[leveloffset=+1]
-include::domainevent/ActionDomainEvent.adoc[leveloffset=+1]
-include::domainevent/CollectionDomainEvent.adoc[leveloffset=+1]
-include::domainevent/PropertyDomainEvent.adoc[leveloffset=+1]
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/AbstractDomainEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent/AbstractDomainEvent.adoc
deleted file mode 100644
index a20d5d8..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/AbstractDomainEvent.adoc
+++ /dev/null
@@ -1,109 +0,0 @@
-[[AbstractDomainEvent]]
-= `AbstractDomainEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-This class is the superclass for all domain events that are raised by the framework when interacting with actions, properties or collections.
-
-Its immediate subclasses are:
-
-* xref:applib-classes:events.adoc#ActionDomainEvent[ActionDomainEvent]
-* xref:applib-classes:events.adoc#PropertyDomainEvent[PropertyDomainEvent]
-* xref:applib-classes:events.adoc#CollectionDomainEvent[CollectionDomainEvent]
-
-The main purpose of the class is to define the protocol by which subscribers can influence an interaction (eg hide a collection, disable a property, validate action arguments).
-It class also provides a simple mechanism to allow adhoc sharing of user data between different phases.
-
-== API
-
-The API of the class is:
-
-// TODO: v2: use include::[]
-
-[source,java]
-----
-public abstract class AbstractDomainEvent<S> extends java.util.EventObject {
-
-    public S getSource();                                           // <.>
-    public Object getMixedIn();                                     // <.>
-    public Object getSubject();                                     // <.>
-
-    public Identifier getIdentifier();                              // <.>
-
-    public Phase getEventPhase();                                   // <.>
-
-    public void hide();                                             // <.>
-    public boolean isHidden();                                      // <.>
-
-    public void disable(final String reason);                       // <.>
-    public void disable(final TranslatableString reason);
-    public String getDisabledReason();                              // <.>
-    public TranslatableString getDisabledReasonTranslatable();
-    public boolean isDisabled();
-
-    public void invalidate(final String reason);                    // <.>
-    public void invalidate(final TranslatableString reason);
-    public String getInvalidityReason();                            // <.>
-    public TranslatableString getInvalidityReasonTranslatable();
-    public boolean isInvalid();
-
-    public void veto(final String reason, final Object... args);    // <.>
-    public void veto(final TranslatableString translatableReason);
-
-    public Object get(Object key);                                  // <.>
-    public void put(Object key, Object value);
-}
-----
-
-<.> The domain object raising this event.
-+
-For a "regular" action, property or collection then this will be the target domain object.
-But for a "mixin" action, this will be an instance of the mixin itself.
-
-<.> For a "mixin", this will be the target object that is being contributed to.
-+
-For a "regular" action, this will return `null`.
-
-<.> Returns the domain object being interacted with, irrespective of whether this is a "regular" action/property/collection or a "mixin".
-+
-* For a regular member, this will return the same as `getSource()`.
-+
-* For a mixin, this will return the same as `getMixedIn()`.
-
-<.> Identifier of the action, property or collection being interacted with.
-
-<.> Whether the framework is checking visibility, enablement, validity or actually executing (invoking action, editing property), as per the `Phase` enum (defined below).
-
-<.> API for subscribers to hide the member
-
-<.> Used by the framework to determine if the member should be hidden (not rendered)
-
-<.> API for subscribers to disable the member, specifying the reason why (possibly translated)
-
-<.> Used by the framework to determine whether the member should be disabled (greyed out) when rendered.
-
-<.> API for subscribers to invalidate an interaction, eg invalid arguments to an action
-
-<.> Used by the framework to determine whether the interaction is invalid and should be blocked (eg pressing OK shows message)
-
-<.> Convenience API for subscribers to veto; will automatically call either `hide()`, `disable(...)` or `invalidate(...)` based on the phase
-
-<.> Mechanism to allow subscribers to share arbitrary information between phases.
-One event instance is used for both the hide and disable phases, and a different event instance is shared between validate/pre-execute/post-execute.
-
-The referenced `Phase` enum is in turn:
-
-[source,java]
-----
-public enum Phase {
-    HIDE,
-    DISABLE,
-    VALIDATE,
-    EXECUTING,
-    EXECUTED;
-    public boolean isValidatingOrLater();    // <.>
-}
-----
-<.> The significance being that at this point the proposed values/arguments are known, and so the event can be fully populated.
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/ActionDomainEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent/ActionDomainEvent.adoc
deleted file mode 100644
index d647dcf..0000000
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/ActionDomainEvent.adoc
+++ /dev/null
@@ -1,49 +0,0 @@
-[[ActionDomainEvent]]
-= `ActionDomainEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Subclass of xref:applib-classes:events.adoc#AbstractDomainEvent[AbstractDomainEvent] for actions.
-
-The class has a number of responsibilities (in addition to those it inherits):
-
-* capture the target object being interacted with
-* capture the arguments for each of the action's parameters
-* provide selected metadata about the action parameters from the metamodel (names, types)
-
-The class itself is instantiated automatically by the framework whenever interacting with a rendered object's action.
-
-== API
-
-The API of the class is:
-
-// TODO: v2: use include::[]
-
-[source,java]
-----
-public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
-
-    public static class Default extends ActionDomainEvent<Object> { }   // <.>
-    public static class Noop extends ActionDomainEvent<Object> { }      // <.>
-    public static class Doop extends ActionDomainEvent<Object> { }      // <.>
-
-    public SemanticsOf getSemantics();
-
-    public List<String> getParameterNames();
-    public List<Class<?>> getParameterTypes();
-
-    public List<Object> getArguments();                                 // <.>
-    public Object getReturnValue();                                     // <.>
-    public void setReturnValue();                                       // <.>
-}
-----
-<.> The `Default` nested static class is the default for the xref:refguide:applib:index/annotation/Action.adoc#domainEvent[@Action#domainEvent()]
-annotation attribute.
-Whether this raises an event or not depends upon the `isis.reflector.facet.actionAnnotation.domainEvent.postForDefault` configuration property.
-<.> The `Noop` class is provided as a convenience to indicate that an event should _not_ be posted (irrespective of the configuration property setting).
-<.> Similarly, the `Doop` class is provided as a convenience to indicate that an event _should_ be raised (irrespective of the configuration property setting).
-<.> The arguments being used to invoke the action; populated during validate phase and subsequent phases.
-<.> The value returned by the action; populated only in the executed phase.
-<.> Allows the subscriber to effectively change the value returned by the action; may only be called in the executed phase.
diff --git a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/CollectionDomainEvent.adoc b/antora/components/refguide/modules/applib-classes/pages/events/domainevent/CollectionDomainEvent.adoc
index 02826ac..e35af06 100644
--- a/antora/components/refguide/modules/applib-classes/pages/events/domainevent/CollectionDomainEvent.adoc
+++ b/antora/components/refguide/modules/applib-classes/pages/events/domainevent/CollectionDomainEvent.adoc
@@ -5,18 +5,6 @@
 :page-partial:
 
 
-Subclass of xref:applib-classes:events.adoc#AbstractDomainEvent[AbstractDomainEvent] for collections.
-
-The class has a couple of responsibilities (in addition to those it inherits):
-
-* capture the target object being interacted with
-
-* indicate whether the interaction is to add or remove an object from the collection (or simply to indicate that the collection is being accessed/read)
-
-* capture the object reference being added or removed
-
-
-The class itself is instantiated automatically by the framework whenever interacting with a rendered object's collection.
 
 == API
 
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 08ddedf..2bfa27e 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
@@ -21,6 +21,8 @@ package org.apache.isis.applib.events.domain;
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.annotation.Nullable;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.events.EventObjectBase;
 import org.apache.isis.applib.services.i18n.TranslatableString;
@@ -31,6 +33,24 @@ import org.apache.isis.commons.internal.exceptions._Exceptions;
 import lombok.Getter;
 
 /**
+ * Superclass for all domain events that are raised by the framework when
+ * interacting with actions, properties or collections.
+ *
+ * <p>
+ *     The main purpose of the class is to define the protocol by which
+ *     subscribers can influence an interaction (eg hide a collection,
+ *     disable a property, validate action arguments).
+ * </p>
+ *
+ * <p>
+ *     The class also provides a simple mechanism to allow adhoc sharing of
+ *     user data between different phases.
+ * </p>
+ *
+ * @see ActionDomainEvent
+ * @see PropertyDomainEvent
+ * @see CollectionDomainEvent
+ *
  * @since 1.x {@index}
  */
 public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
@@ -55,7 +75,31 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
     }
 
     /**
-     * Populated only for mixins; holds the underlying domain object that the mixin contributes to.
+     * The domain object raising this event.
+     *
+     * <p>
+     * For a "regular" action, property or collection then this will be the
+     * target domain object.
+     * </p>
+     *
+     * <p>
+     *     But for a "mixin" action, this will be an instance of the mixin
+     *     itself.
+     * </p>
+     */
+    @Nullable
+    @Override
+    public S getSource() {
+        return super.getSource();
+    }
+
+    /**
+     * Populated only for mixins; holds the underlying domain object that the
+     * mixin contributes to.
+     *
+     * <p>
+     * For a "regular" action, this will return <code>null</code>.
+     * </p>
      */
     @Getter
     private Object mixedIn;
@@ -69,7 +113,8 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
 
 
     /**
-     * The subject of the event, which will be either the {@link #getSource() source} for a regular action, or the
+     * The subject of the event, which will be either the
+     * {@link #getSource() source} for a regular action, or the
      * {@link #getMixedIn() mixed-in} domain object for a mixin.
      */
     public Object getSubject() {
@@ -77,6 +122,10 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
         return mixedIn != null ? mixedIn : getSource();
     }
 
+    /**
+     *
+     * {@index}
+     */
     public enum Phase {
 
         HIDE,
@@ -132,7 +181,8 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
     }
 
     /**
-     * If the no-arg constructor is used, then the framework will populate this field reflectively.
+     * Identifier of the action, property or collection being interacted with.
+     *
      */
     @Getter
     private Identifier identifier;
@@ -144,21 +194,25 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
         this.identifier = identifier;
     }
 
+    /**
+     * Used by the framework to determine if the member should be hidden (not
+     * rendered).
+     */
     @Getter
     private boolean hidden;
 
     /**
+     * API for subscribers to hide the member.
+     *
      * @see #veto(String, Object...)
      */
     public void hide() {
-
         this.hidden = true;
-
-        // ...
     }
 
     /**
-     * If {@link #isDisabled() disabled}, then either this method returns non-null or {@link #getDisabledReasonTranslatable()} will.
+     * If {@link #isDisabled() disabled}, then either this method returns
+     * non-null or {@link #getDisabledReasonTranslatable()} will.
      */
     @Getter
     private String disabledReason;
@@ -175,36 +229,47 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
 
 
     /**
+     * API for subscribers to disable the member, specifying the reason why.
+     *
      * @see #disable(org.apache.isis.applib.services.i18n.TranslatableString)
      * @see #veto(String, Object...)
      */
     public void disable(final String reason) {
-
         this.disabledReason = reason;
-
-        // ...
     }
 
     /**
+     * API for subscribers to disable the member, specifying the reason why as
+     * a {@link TranslatableString}.
+     *
      * @see #disable(java.lang.String)
      * @see #veto(org.apache.isis.applib.services.i18n.TranslatableString)
      */
     public void disable(final TranslatableString reason) {
-
         this.disabledReasonTranslatable = reason;
-
-        // ...
     }
 
 
     /**
-     * If {@link #isInvalid() invalid}, then either this method returns non-null or {@link #getInvalidityReasonTranslatable()} will.
+     * Used by the framework to determine whether the interaction is invalid
+     * and should be blocked (eg pressing OK shows message).
+     *
+     * <p>
+     * If {@link #isInvalid() invalid}, then either this method returns
+     * non-null or {@link #getInvalidityReasonTranslatable()} will.
+     * </p>
      */
     @Getter
     private String invalidityReason;
 
     /**
-     * If {@link #isInvalid() invalid}, then either this method returns non-null or {@link #getInvalidityReason()} will.
+     * Used by the framework to determine whether the interaction is invalid
+     * and should be blocked (eg pressing OK shows message).
+     *
+     * <p>
+     * If {@link #isInvalid() invalid}, then either this method returns non-null
+     * or {@link #getInvalidityReason()} will.
+     * </p>
      */
     @Getter
     private TranslatableString invalidityReasonTranslatable;
@@ -214,36 +279,38 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
     }
 
     /**
+     * API for subscribers to invalidate an interaction, eg invalid arguments
+     * to an action.
+     *
      * @see #invalidate(org.apache.isis.applib.services.i18n.TranslatableString)
      * @see #veto(String, Object...)
      */
     public void invalidate(final String reason) {
-
         this.invalidityReason = reason;
-
-        // ...
     }
 
     /**
+     * API for subscribers to invalidate an interaction, specifying the reason
+     * as a {@link TranslatableString}.
+     *
      * @see #invalidate(String)
      * @see #veto(org.apache.isis.applib.services.i18n.TranslatableString)
      */
     public void invalidate(final TranslatableString reason) {
-
         this.invalidityReasonTranslatable = reason;
-
-        // ...
     }
 
     /**
-     * Use instead of {@link #hide()}, {@link #disable(String)} and {@link #invalidate(String)}; just delegates to
+     * Use instead of {@link #hide()}, {@link #disable(String)} and
+     * {@link #invalidate(String)}; just delegates to
      * appropriate vetoing method based upon the {@link #getEventPhase() phase}.
      *
      * <p>
      *     If hiding, just pass <tt>null</tt> for the parameter.
      * </p>
      *
-     * @param reason - reason why the interaction is being invalidated (ignored if in {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hide} phase).
+     * @param reason - reason why the interaction is being invalidated (ignored
+     *              if in {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hide} phase).
      * @param args
      *
      * @see #veto(org.apache.isis.applib.services.i18n.TranslatableString)
@@ -272,8 +339,6 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
         default:
             throw _Exceptions.unmatchedCase(getEventPhase());
         }
-
-        // ...
     }
 
     /**
@@ -306,8 +371,6 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
         default:
             throw _Exceptions.unmatchedCase(getEventPhase());
         }
-
-        // ...
     }
 
     /**
@@ -323,6 +386,10 @@ public abstract class AbstractDomainEvent<S> extends EventObjectBase<S> {
     }
 
     /**
+     * Mechanism to allow subscribers to share arbitrary information between
+     * phases. One event instance is used for both the hide and disable phases,
+     * and a different event instance is shared between validate/pre-execute/post-execute.
+     *
      * Set user-data, for the use of a subsequent {@link #getEventPhase() phase}.
      */
     public void put(Object key, Object value) {
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 a327141..983b711 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
@@ -20,6 +20,7 @@ package org.apache.isis.applib.events.domain;
 
 import java.util.List;
 
+import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.util.ObjectContracts;
 import org.apache.isis.applib.util.ToString;
@@ -28,47 +29,97 @@ import lombok.Getter;
 import lombok.Setter;
 
 /**
+ * Subclass of {@link AbstractDomainEvent} for actions.
+ *
+ * <p>
+ * The class has a number of responsibilities (in addition to those it inherits):
+ * </p>
+ *
+ * <ul>
+ *     <li>
+ *          capture the target object being interacted with
+ *     </li>
+ *     <li>
+ *          capture the arguments for each of the action's parameters
+ *     </li>
+ *     <li>
+ *          provide selected metadata about the action parameters from the
+ *          metamodel (names, types)
+ *     </li>
+ * </ul>
+ *
+ * <p>
+ * The class itself is instantiated automatically by the framework whenever
+ * interacting with a rendered object's action.
+ * </p>
+ *
  * @since 1.x {@index}
  */
 public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.Action#domainEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the 
+     * {@link org.apache.isis.applib.annotation.Action#domainEvent()} annotation attribute.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
      * <tt>isis.core.meta-model.annotation.action.domain-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends ActionDomainEvent<Object> {}
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted 
-     * (irrespective of the configuration property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends ActionDomainEvent<Object> {}
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event..
      */
     public static class Doop extends ActionDomainEvent<Object> {}
 
     /**
-     * If used then the framework will set state via (non-API) setters.
-     *
-     * <p>
-     *     Recommended because it reduces the amount of boilerplate in the domain object classes.
-     * </p>
+     * Subtypes can define a no-arg constructor; the framework sets state
+     * via (non-API) setters.
      */
     public ActionDomainEvent() {
     }
 
+    /**
+     * The semantics of the action being invoked.
+     *
+     * <p>
+     *     Copied over from {@link Action#semantics()}
+     * </p>
+     */
     @Getter
     private SemanticsOf semantics;
 
+    /**
+     * The names of the parameters of the actions.
+     *
+     * @see #getParameterTypes()
+     * @see #getArguments()
+     */
     @Getter
     private List<String> parameterNames;
 
+    /**
+     * The types of the parameters of the actions.
+     *
+     * <p>
+     *     The {@link #getArguments() arguments} will be castable to the
+     *     parameter types here.
+     * </p>
+     *
+     * @see #getParameterNames()
+     * @see #getArguments()
+     */
     @Getter
     private List<Class<?>> parameterTypes;
 
@@ -79,17 +130,23 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
     private Object mixedIn;
 
     /**
-     * The arguments being used to invoke the action;
-     * populated at {@link AbstractDomainEvent.Phase#VALIDATE} and subsequent phases
-     * (but null for {@link AbstractDomainEvent.Phase#HIDE hidden} and 
+     * The arguments being used to invoke the action.
+     *
+     * <p>
+     * Populated at {@link AbstractDomainEvent.Phase#VALIDATE} and subsequent
+     * phases (but null for {@link AbstractDomainEvent.Phase#HIDE hidden} and
      * {@link AbstractDomainEvent.Phase#DISABLE disable} phases).
+     * </p>
      *
      * <p>
      *     The argument values can also be modified by event handlers
-     *     during the {@link AbstractDomainEvent.Phase#EXECUTING} phase. The new value must be
-     *     the same type as the expected value; the framework performs
-     *     no sanity checks.
+     *     during the {@link AbstractDomainEvent.Phase#EXECUTING} phase. The
+     *     new value must be the same type as the expected value; the framework
+     *     performs no sanity checks.
      * </p>
+     *
+     * @see #getParameterNames()
+     * @see #getParameterTypes()
      */
     @Getter @Setter
     private List<Object> arguments;
@@ -108,33 +165,35 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
     /**
      * Set by the framework.
      *
-     * Event subscribers can replace the value with some other value if they wish, though only in the
-     * {@link AbstractDomainEvent.Phase#EXECUTED} phase.
+     * <p>
+     * Event subscribers can replace the value with some other value if they
+     * wish, though only in the {@link AbstractDomainEvent.Phase#EXECUTED} phase.
+     * </p>
      */
     public void setReturnValue(final Object returnValue) {
         this.returnValue = returnValue;
     }
 
     /**
-     * Not API - set by the framework.
+     * @apiNote : NOT API, set by the framework
      */
     public void setSemantics(SemanticsOf semantics) {
         this.semantics = semantics;
     }
     /**
-     * Not API - set by the framework.
+     * @apiNote : NOT API, set by the framework
      */
     public void setParameterNames(final List<String> parameterNames) {
         this.parameterNames = parameterNames;
     }
     /**
-     * Not API - set by the framework.
+     * @apiNote : NOT API, set by the framework
      */
     public void setParameterTypes(final List<Class<?>> parameterTypes) {
         this.parameterTypes = parameterTypes;
     }
     /**
-     * Not API - set by the framework.
+     * @apiNote : NOT API, set by the framework
      */
     @Override
     public void setMixedIn(final Object mixedIn) {
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 8b843e6..6d4c57c 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
@@ -24,37 +24,59 @@ import org.apache.isis.applib.util.ToString;
 import lombok.Getter;
 
 /**
+ * Subclass of {@link AbstractDomainEvent} for collections.
+ *
+ * <p>
+ * The class has a couple of responsibilities (in addition to those it
+ * inherits):
+ * </p>
+ *
+ * <ul>
+ *     <li>
+ *      capture the target object being interacted with
+ *     </li>
+ * </ul>
+ *
+ * <p>
+ * The class itself is instantiated automatically by the framework whenever
+ * interacting with a rendered object's collection.
+ * </p>
+ *
  * @since 1.x {@index}
  */
 public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S> {
 
     /**
      * This class is the default for the
-     * {@link org.apache.isis.applib.annotation.Collection#domainEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the <tt>isis.core.meta-model.annotation.collection.domain-event.post-for-default</tt>
+     * {@link org.apache.isis.applib.annotation.Collection#domainEvent()}
+     * annotation attribute.
+     *
+     * <p>
+     * Whether this raises an event or not depends upon the
+     * <tt>isis.core.meta-model.annotation.collection.domain-event.post-for-default</tt>
      * configuration property.
+     * </p>
      */
     public static class Default extends CollectionDomainEvent<Object, Object> { }
 
     /**
-     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event.
+     * Convenience class to use indicating that an event should <i>not</i> be
+     * posted (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Noop extends CollectionDomainEvent<Object, Object> {}
 
     /**
-     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
-     * property setting for the {@link Default} event..
+     * Convenience class meaning that an event <i>should</i> be posted
+     * (irrespective of the configuration property setting for the
+     * {@link Default} event.
      */
     public static class Doop extends CollectionDomainEvent<Object, Object> {}
 
 
     /**
-     * If used then the framework will set state via (non-API) setters.
-     *
-     * <p>
-     *     Recommended because it reduces the amount of boilerplate in the domain object classes.
-     * </p>
+     * Subtypes can define a no-arg constructor; the framework sets state
+     * via (non-API) setters.
      */
     public CollectionDomainEvent() {
     }
@@ -62,10 +84,10 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
 
 
     /**
-     * The proposed reference to either add or remove (per {@link #getOf()}), populated at 
+     * The proposed reference to either add or remove (per {@link #getOf()}), populated at
      * {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#VALIDATE}
-     * and subsequent phases (is null for 
-     * {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hidden} 
+     * and subsequent phases (is null for
+     * {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hidden}
      * and {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#DISABLE disable} phases).
      */
     @Getter
@@ -105,7 +127,7 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
         this.value = value;
     }
     /**
-     * Not API; updates from {@link Of#ACCESS} to either {@link Of#ADD_TO} 
+     * Not API; updates from {@link Of#ACCESS} to either {@link Of#ADD_TO}
      * or {@link Of#REMOVE_FROM} when hits the
      * {@link AbstractDomainEvent.Phase#VALIDATE validation phase}.
      */
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 43c390f..2801a66 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
@@ -50,11 +50,8 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
     public static class Doop extends PropertyDomainEvent<Object, Object> {}
 
     /**
-     * If used then the framework will set state via (non-API) setters.
-     *
-     * <p>
-     *     Recommended because it reduces the amount of boilerplate in the domain object classes.
-     * </p>
+     * Subtypes can define a no-arg constructor; the framework sets state
+     * via (non-API) setters.
      */
     public PropertyDomainEvent() {
     }
diff --git a/legacy/extensions/core/metamodel/src/main/adoc/modules/metamodel/pages/about.adoc b/legacy/extensions/core/metamodel/src/main/adoc/modules/metamodel/pages/about.adoc
index 8c28ea0..1bf059a 100644
--- a/legacy/extensions/core/metamodel/src/main/adoc/modules/metamodel/pages/about.adoc
+++ b/legacy/extensions/core/metamodel/src/main/adoc/modules/metamodel/pages/about.adoc
@@ -2,5 +2,5 @@
 
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
 
-WARNING: TODO: v2: placeholder for documentation about legacy/metamodel
+WARNING: TODO: v2: to document
 
diff --git a/persistence/jpa/adoc/modules/ROOT/pages/about.adoc b/persistence/jpa/adoc/modules/ROOT/pages/about.adoc
index ecb2a85..b977118 100644
--- a/persistence/jpa/adoc/modules/ROOT/pages/about.adoc
+++ b/persistence/jpa/adoc/modules/ROOT/pages/about.adoc
@@ -4,5 +4,5 @@
 
 :page-toc: ~
 
-WARNING: TODO: v2 - in development.
+WARNING: TODO: v2 - to document.
 
diff --git a/security/adoc/modules/ROOT/pages/about.adoc b/security/adoc/modules/ROOT/pages/about.adoc
index 0905a6b..b48aa37 100644
--- a/security/adoc/modules/ROOT/pages/about.adoc
+++ b/security/adoc/modules/ROOT/pages/about.adoc
@@ -70,11 +70,11 @@ The framework provides a "bypass" implementation, useful for quick-n-dirty proto
 
 === KeyCloak
 
-WARNING: TODO: v2 - not yet documented.
+WARNING: TODO: v2 - to document.
 
 === Spring
 
-WARNING: TODO: v2 - WIP, not yet documented.
+WARNING: TODO: v2 - WIP, to document
 
 == SecMan
 
diff --git a/testing/adoc/modules/ROOT/pages/about.adoc b/testing/adoc/modules/ROOT/pages/about.adoc
index 6c3897e..a1074c0 100644
--- a/testing/adoc/modules/ROOT/pages/about.adoc
+++ b/testing/adoc/modules/ROOT/pages/about.adoc
@@ -131,12 +131,10 @@ Apache Isis provides the xref:testing:fakedata:about.adoc[Fake Data] library to
 Using fake data works very well with fixture scripts; the fixture script can invoke the business action with sensible (fake/random) defaults, and only require that the essential information is passed into it by the test.
 ====
 
-
 == Feature Toggles
 
 Writing automated tests is just good development practice.
-Also good practice is developing on the mainline (master, trunk); so that your continuous integration system really is integrating all code.
-Said another way: link:http://martinfowler.com/bliki/FeatureBranch.html[don't use branches]!
+Also good practice is developing on the mainline (main, trunk); so that your continuous integration system really is integrating all code.
 
 Sometimes, though, a feature will take longer to implement than your iteration cycle.
 In such a case, how do you use continuous integration to keep everyone working on the mainline without revealing a half-implemented feature on your releases?


[isis] 04/07: ISIS-439: further work removing dead code re: mutable collections

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

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

commit e88486d06a084effad623d94ddcaece2563b6636
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Mar 3 07:09:21 2021 +0000

    ISIS-439: further work removing dead code re: mutable collections
---
 .../events/domain/CollectionDomainEvent.java       | 31 -------------------
 .../core/metamodel/facets/DomainEventHelper.java   | 36 ++++++++--------------
 .../modify/CollectionDomainEventFacetAbstract.java | 12 ++++----
 ...HelperTest_newCollectionDomainEvent_forAdd.java |  6 ++--
 ...perTest_newCollectionDomainEvent_forRemove.java |  6 ++--
 5 files changed, 25 insertions(+), 66 deletions(-)

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 7b1c489..a126c76 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
@@ -27,17 +27,6 @@ import lombok.Getter;
  * Subclass of {@link AbstractDomainEvent} for collections.
  *
  * <p>
- * The class has a couple of responsibilities (in addition to those it
- * inherits):
- * </p>
- *
- * <ul>
- *     <li>
- *      capture the target object being interacted with
- *     </li>
- * </ul>
- *
- * <p>
  * The class itself is instantiated automatically by the framework whenever
  * interacting with a rendered object's collection.
  * </p>
@@ -83,31 +72,11 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
 
 
 
-    /**
-     * The proposed reference to either add or remove (per {@link #getOf()}), populated at
-     * {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#VALIDATE}
-     * and subsequent phases (is null for
-     * {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#HIDE hidden}
-     * and {@link org.apache.isis.applib.events.domain.AbstractDomainEvent.Phase#DISABLE disable} phases).
-     */
-    @Getter
-    private T value;
-
-
-    /**
-     * Not API, set by the framework.
-     */
-    public void setValue(T value) {
-        this.value = value;
-    }
-
-
     private static final ToString<CollectionDomainEvent<?,?>> toString =
             ObjectContracts.<CollectionDomainEvent<?,?>>
     toString("source", CollectionDomainEvent::getSource)
     .thenToString("identifier", CollectionDomainEvent::getIdentifier)
     .thenToString("eventPhase", CollectionDomainEvent::getEventPhase)
-    .thenToString("value", CollectionDomainEvent::getValue)
     ;
 
     @Override
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java
index 56cb6d6..2eb6e2c 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/DomainEventHelper.java
@@ -306,31 +306,24 @@ public class DomainEventHelper {
     // -- postEventForCollection, newCollectionDomainEvent
 
     public <S, T> CollectionDomainEvent<S, T> postEventForCollection(
-            AbstractDomainEvent.Phase phase,
+            final AbstractDomainEvent.Phase phase,
             final Class<? extends CollectionDomainEvent<S, T>> eventType,
-            final CollectionDomainEvent<S, T> existingEvent,
             final IdentifiedHolder identified,
-            final InteractionHead head,
-            final T reference) {
+            final InteractionHead head) {
 
         _Assert.assertTypeIsInstanceOf(eventType, CollectionDomainEvent.class);
 
         try {
             final CollectionDomainEvent<S, T> event;
-            if (existingEvent != null && phase.isExecuted()) {
-                // reuse existing event from the executing phase
-                event = existingEvent;
-            } else {
-                // all other phases, create a new event
-                final S source = uncheckedCast(UnwrapUtil.single(head.getTarget()));
-                final Identifier identifier = identified.getIdentifier();
-                event = newCollectionDomainEvent(eventType, phase, identifier, source, reference);
 
-                // copy over if have
-                head.getMixedIn()
-                .ifPresent(mixedInAdapter->
-                    event.setMixedIn(mixedInAdapter.getPojo()));
-            }
+            final S source = uncheckedCast(UnwrapUtil.single(head.getTarget()));
+            final Identifier identifier = identified.getIdentifier();
+            event = newCollectionDomainEvent(eventType, phase, identifier, source);
+
+            // copy over if have
+            head.getMixedIn()
+            .ifPresent(mixedInAdapter->
+                event.setMixedIn(mixedInAdapter.getPojo()));
 
             event.setEventPhase(phase);
 
@@ -345,8 +338,7 @@ public class DomainEventHelper {
             final Class<? extends CollectionDomainEvent<S, T>> type,
             final AbstractDomainEvent.Phase phase,
             final Identifier identifier,
-            final S source,
-            final T value)
+            final S source)
             throws NoSuchMethodException, SecurityException,
             IllegalArgumentException {
 
@@ -360,21 +352,19 @@ public class DomainEventHelper {
 
             cde.initSource(source);
             cde.setIdentifier(identifier);
-            cde.setValue(value);
             return cde;
         }
 
         // else
-        // search for constructor accepting source, identifier, type, value
+        // search for constructor accepting source, identifier
         val updateEventConstructors = constructors
                 .filter(paramCount(4)
                         .and(paramAssignableFrom(0, source.getClass()))
                         .and(paramAssignableFrom(1, Identifier.class))
-                        .and(paramAssignableFromValue(2, value))
                         );
 
         for (val constructor : updateEventConstructors) {
-            val event = invokeConstructor(constructor, source, identifier, value);
+            val event = invokeConstructor(constructor, source, identifier);
             return uncheckedCast(event);
         }
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
index e400f70..7046627 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
@@ -74,9 +74,9 @@ public abstract class CollectionDomainEventFacetAbstract
         final CollectionDomainEvent<?, ?> event =
                 domainEventHelper.postEventForCollection(
                         AbstractDomainEvent.Phase.HIDE,
-                        getEventType(), null,
-                        getIdentified(), ic.getHead(),
-                        null);
+                        getEventType(),
+                        getIdentified(), ic.getHead()
+                );
         if (event != null && event.isHidden()) {
             return "Hidden by subscriber";
         }
@@ -89,9 +89,9 @@ public abstract class CollectionDomainEventFacetAbstract
         final CollectionDomainEvent<?, ?> event =
                 domainEventHelper.postEventForCollection(
                         AbstractDomainEvent.Phase.DISABLE,
-                        getEventType(), null,
-                        getIdentified(), ic.getHead(),
-                        null);
+                        getEventType(),
+                        getIdentified(), ic.getHead()
+                );
         if (event != null && event.isDisabled()) {
             final TranslatableString reasonTranslatable = event.getDisabledReasonTranslatable();
             if(reasonTranslatable != null) {
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
index 5ae89a1..5abc008 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
@@ -48,7 +48,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, null, identifier, sdo, other);
+                CollectionDomainEvent.Default.class, null, identifier, sdo);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
@@ -63,7 +63,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
@@ -78,7 +78,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<SomeDomainObject, SomeReferencedObject> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                SomeDomainObjectCollectionDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
+                SomeDomainObjectCollectionDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo);
         assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
index dc2c6d0..b4e2a52 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
@@ -48,7 +48,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
@@ -63,7 +63,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<Object, Object> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo);
         assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
@@ -78,7 +78,7 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
                 LogicalType.fqcn(SomeDomainObject.class), "references");
 
         final CollectionDomainEvent<SomeDomainObject, SomeReferencedObject> ev = Utils.domainEventHelper().newCollectionDomainEvent(
-                SomeDomainObjectCollectionRemovedFromDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, other);
+                SomeDomainObjectCollectionRemovedFromDomainEvent.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo);
         assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));


[isis] 02/07: ISIS-439: further work removing dead code re: mutable collections

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

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

commit 4cb2def049c589a207c708eb64b085d1b6a35d40
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Mar 3 06:56:44 2021 +0000

    ISIS-439: further work removing dead code re: mutable collections
---
 .../modify/CollectionDomainEventFacet.java         |  2 +-
 .../modify/CollectionDomainEventFacetAbstract.java | 41 +----------
 .../validate/CollectionValidateAddToFacet.java     | 40 -----------
 .../CollectionValidateAddToFacetAbstract.java      | 47 ------------
 .../CollectionValidateAddToFacetViaMethod.java     | 83 ---------------------
 .../CollectionValidateRemoveFromFacet.java         | 39 ----------
 .../CollectionValidateRemoveFromFacetAbstract.java | 46 ------------
 ...CollectionValidateRemoveFromFacetViaMethod.java | 84 ----------------------
 .../interactions/CollectionAddToContext.java       | 62 ----------------
 .../interactions/CollectionRemoveFromContext.java  | 62 ----------------
 .../services/metamodel/DomainMemberDefault.java    | 17 ++---
 .../rendering/domainobjects/MemberType.java        |  2 -
 12 files changed, 10 insertions(+), 515 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java
index da2afed..6ebc17a 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacet.java
@@ -28,7 +28,7 @@ import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
  * Corresponds to <tt>@Collection(domainEvent=...)</tt> annotation in the Isis programming model.
  */
 public interface CollectionDomainEventFacet
-extends SingleClassValueFacet, HidingInteractionAdvisor, DisablingInteractionAdvisor, ValidatingInteractionAdvisor {
+extends SingleClassValueFacet, HidingInteractionAdvisor, DisablingInteractionAdvisor {
 
 }
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
index 23cb8b9..d63ec04 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetAbstract.java
@@ -28,13 +28,12 @@ import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
 import org.apache.isis.core.metamodel.facets.DomainEventHelper;
 import org.apache.isis.core.metamodel.facets.SingleClassValueFacetAbstract;
-import org.apache.isis.core.metamodel.interactions.CollectionAddToContext;
-import org.apache.isis.core.metamodel.interactions.ProposedHolder;
 import org.apache.isis.core.metamodel.interactions.UsabilityContext;
-import org.apache.isis.core.metamodel.interactions.ValidityContext;
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
 
-public abstract class CollectionDomainEventFacetAbstract extends SingleClassValueFacetAbstract implements CollectionDomainEventFacet {
+public abstract class CollectionDomainEventFacetAbstract
+        extends SingleClassValueFacetAbstract
+        implements CollectionDomainEventFacet {
 
     private final DomainEventHelper domainEventHelper;
     private final TranslationService translationService;
@@ -105,38 +104,4 @@ public abstract class CollectionDomainEventFacetAbstract extends SingleClassValu
         return null;
     }
 
-    @Override
-    public String invalidates(final ValidityContext ic) {
-
-        // if this is a mixin, then this ain't true.
-        if(!(ic instanceof ProposedHolder)) {
-            return null;
-        }
-        final ProposedHolder catc = (ProposedHolder) ic;
-        final Object proposed = catc.getProposed().getPojo();
-
-        final CollectionDomainEvent.Of of =
-                ic instanceof CollectionAddToContext
-                ? CollectionDomainEvent.Of.ADD_TO
-                        : CollectionDomainEvent.Of.REMOVE_FROM;
-
-        final CollectionDomainEvent<?, ?> event =
-                domainEventHelper.postEventForCollection(
-                        AbstractDomainEvent.Phase.VALIDATE,
-                        getEventType(), null,
-                        getIdentified(), ic.getHead(),
-                        of,
-                        proposed);
-        if (event != null && event.isInvalid()) {
-            final TranslatableString reasonTranslatable = event.getInvalidityReasonTranslatable();
-            if(reasonTranslatable != null) {
-                return reasonTranslatable.translate(translationService, translationContext);
-            }
-            return event.getInvalidityReason();
-        }
-
-        return null;
-    }
-
-
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacet.java
deleted file mode 100644
index b6a97f0..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacet.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.validate;
-
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
-import org.apache.isis.core.metamodel.spec.ManagedObject;
-
-/**
- * Validate that an object can be added to a collection.
- *
- * <p>
- * In the standard Apache Isis Programming Model, corresponds to invoking the
- * <tt>validateAddToXxx</tt> support method for a collection.
- *
- */
-public interface CollectionValidateAddToFacet extends Facet, ValidatingInteractionAdvisor {
-
-    /**
-     * Reason the object cannot be added, or <tt>null</tt> if okay.
-     */
-    public String invalidReason(ManagedObject target, ManagedObject proposedArgument);
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacetAbstract.java
deleted file mode 100644
index 0cdeb01..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacetAbstract.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.validate;
-
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.interactions.CollectionAddToContext;
-import org.apache.isis.core.metamodel.interactions.ValidityContext;
-
-public abstract class CollectionValidateAddToFacetAbstract extends FacetAbstract implements CollectionValidateAddToFacet {
-
-    public static Class<? extends Facet> type() {
-        return CollectionValidateAddToFacet.class;
-    }
-
-    public CollectionValidateAddToFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, Derivation.NOT_DERIVED);
-    }
-
-    @Override
-    public String invalidates(final ValidityContext context) {
-        if (!(context instanceof CollectionAddToContext)) {
-            return null;
-        }
-        final CollectionAddToContext collectionAddToContext = (CollectionAddToContext) context;
-        return invalidReason(context.getTarget(), collectionAddToContext.getProposed());
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacetViaMethod.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacetViaMethod.java
deleted file mode 100644
index 7d1427b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateAddToFacetViaMethod.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.validate;
-
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.isis.applib.services.i18n.TranslatableString;
-import org.apache.isis.applib.services.i18n.TranslationService;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet;
-import org.apache.isis.core.metamodel.spec.ManagedObject;
-import org.apache.isis.core.metamodel.spec.ManagedObjects;
-
-public class CollectionValidateAddToFacetViaMethod extends CollectionValidateAddToFacetAbstract implements ImperativeFacet {
-
-    private final Method method;
-    private final TranslationService translationService;
-    private final String translationContext;
-
-    public CollectionValidateAddToFacetViaMethod(final Method method, final TranslationService translationService, final String translationContext, final FacetHolder holder) {
-        super(holder);
-        this.method = method;
-        this.translationService = translationService;
-        this.translationContext = translationContext;
-    }
-
-    /**
-     * Returns a singleton list of the {@link Method} provided in the
-     * constructor.
-     */
-    @Override
-    public List<Method> getMethods() {
-        return Collections.singletonList(method);
-    }
-
-    @Override
-    public Intent getIntent(final Method method) {
-        return Intent.CHECK_IF_VALID;
-    }
-
-    @Override
-    public String invalidReason(final ManagedObject owningAdapter, final ManagedObject proposedAdapter) {
-        final Object returnValue = ManagedObjects.InvokeUtil.invoke(method, owningAdapter, proposedAdapter);
-        if(returnValue instanceof String) {
-            return (String) returnValue;
-        }
-        if(returnValue instanceof TranslatableString) {
-            final TranslatableString ts = (TranslatableString) returnValue;
-            return ts.translate(translationService, translationContext);
-        }
-        return null;
-    }
-
-    @Override
-    protected String toStringValues() {
-        return "method=" + method;
-    }
-
-    @Override public void appendAttributesTo(final Map<String, Object> attributeMap) {
-        super.appendAttributesTo(attributeMap);
-        ImperativeFacet.Util.appendAttributesTo(this, attributeMap);
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacet.java
deleted file mode 100644
index e097440..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacet.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.validate;
-
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
-import org.apache.isis.core.metamodel.spec.ManagedObject;
-
-/**
- * Validate that an object can be removed to a collection.
- *
- * <p>
- * In the standard Apache Isis Programming Model, corresponds to invoking the
- * <tt>validateRemoveFromXxx</tt> support method for a collection.
- */
-public interface CollectionValidateRemoveFromFacet extends Facet, ValidatingInteractionAdvisor {
-
-    /**
-     * Reason the object cannot be removed, or <tt>null</tt> if okay.
-     */
-    public String invalidReason(ManagedObject inObject, ManagedObject value);
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacetAbstract.java
deleted file mode 100644
index 97a779b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacetAbstract.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.validate;
-
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.interactions.CollectionRemoveFromContext;
-import org.apache.isis.core.metamodel.interactions.ValidityContext;
-
-public abstract class CollectionValidateRemoveFromFacetAbstract extends FacetAbstract implements CollectionValidateRemoveFromFacet {
-
-    public static Class<? extends Facet> type() {
-        return CollectionValidateRemoveFromFacet.class;
-    }
-
-    public CollectionValidateRemoveFromFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, Derivation.NOT_DERIVED);
-    }
-
-    @Override
-    public String invalidates(final ValidityContext context) {
-        if (!(context instanceof CollectionRemoveFromContext)) {
-            return null;
-        }
-        final CollectionRemoveFromContext collectionRemoveFromContext = (CollectionRemoveFromContext) context;
-        return invalidReason(context.getTarget(), collectionRemoveFromContext.getProposed());
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacetViaMethod.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacetViaMethod.java
deleted file mode 100644
index 978287b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/validate/CollectionValidateRemoveFromFacetViaMethod.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.validate;
-
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.isis.applib.services.i18n.TranslatableString;
-import org.apache.isis.applib.services.i18n.TranslationService;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet;
-import org.apache.isis.core.metamodel.spec.ManagedObject;
-import org.apache.isis.core.metamodel.spec.ManagedObjects;
-
-public class CollectionValidateRemoveFromFacetViaMethod extends CollectionValidateRemoveFromFacetAbstract implements ImperativeFacet {
-
-    private final Method method;
-    private final TranslationService translationService;
-    private final String translationContext;
-
-    public CollectionValidateRemoveFromFacetViaMethod(final Method method, final TranslationService translationService, final String translationContext, final FacetHolder holder) {
-        super(holder);
-        this.method = method;
-        this.translationService = translationService;
-        this.translationContext = translationContext;
-    }
-
-    /**
-     * Returns a singleton list of the {@link Method} provided in the
-     * constructor.
-     */
-    @Override
-    public List<Method> getMethods() {
-        return Collections.singletonList(method);
-    }
-
-    @Override
-    public Intent getIntent(final Method method) {
-        return Intent.CHECK_IF_VALID;
-    }
-
-    @Override
-    public String invalidReason(final ManagedObject owningAdapter, final ManagedObject proposedAdapter) {
-        final Object returnValue = ManagedObjects.InvokeUtil.invoke(method, owningAdapter, proposedAdapter);
-        if(returnValue instanceof String) {
-            return (String) returnValue;
-        }
-        if(returnValue instanceof TranslatableString) {
-            final TranslatableString ts = (TranslatableString) returnValue;
-            return ts.translate(translationService, translationContext);
-        }
-        return null;
-    }
-
-    @Override
-    protected String toStringValues() {
-        return "method=" + method;
-    }
-
-    @Override public void appendAttributesTo(final Map<String, Object> attributeMap) {
-        super.appendAttributesTo(attributeMap);
-        ImperativeFacet.Util.appendAttributesTo(this, attributeMap);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionAddToContext.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionAddToContext.java
deleted file mode 100644
index 9ac9bfc..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionAddToContext.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.interactions;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.services.wrapper.events.CollectionAddToEvent;
-import org.apache.isis.core.metamodel.consent.InteractionContextType;
-import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
-import org.apache.isis.core.metamodel.spec.ManagedObject;
-import org.apache.isis.core.metamodel.spec.ManagedObjects.UnwrapUtil;
-
-/**
- * See {@link InteractionContext} for overview; analogous to
- * {@link CollectionAddToEvent}.
- */
-public class CollectionAddToContext 
-extends ValidityContext 
-implements ProposedHolder {
-
-    private final ManagedObject proposed;
-
-    public CollectionAddToContext(
-            final InteractionHead head,
-            final Identifier id,
-            final ManagedObject proposed,
-            final InteractionInitiatedBy interactionInitiatedBy) {
-        super(InteractionContextType.COLLECTION_ADD_TO, head, id, interactionInitiatedBy);
-
-        this.proposed = proposed;
-    }
-
-    @Override
-    public ManagedObject getProposed() {
-        return proposed;
-    }
-
-    @Override
-    public CollectionAddToEvent createInteractionEvent() {
-        return new CollectionAddToEvent(
-                UnwrapUtil.single(getTarget()), 
-                getIdentifier(), 
-                UnwrapUtil.single(getProposed()));
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionRemoveFromContext.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionRemoveFromContext.java
deleted file mode 100644
index 088cf24..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionRemoveFromContext.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.interactions;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.services.wrapper.events.CollectionRemoveFromEvent;
-import org.apache.isis.core.metamodel.consent.InteractionContextType;
-import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
-import org.apache.isis.core.metamodel.spec.ManagedObject;
-import org.apache.isis.core.metamodel.spec.ManagedObjects.UnwrapUtil;
-
-/**
- * See {@link InteractionContext} for overview; analogous to
- * {@link CollectionRemoveFromEvent}.
- */
-public class CollectionRemoveFromContext 
-extends ValidityContext 
-implements ProposedHolder{
-
-    private final ManagedObject proposed;
-
-    public CollectionRemoveFromContext(
-            final InteractionHead head,
-            final Identifier identifier,
-            final ManagedObject proposed,
-            final InteractionInitiatedBy interactionInitiatedBy) {
-        super(InteractionContextType.COLLECTION_REMOVE_FROM, head, identifier, interactionInitiatedBy);
-
-        this.proposed = proposed;
-    }
-
-    @Override
-    public ManagedObject getProposed() {
-        return proposed;
-    }
-
-    @Override
-    public CollectionRemoveFromEvent createInteractionEvent() {
-        return new CollectionRemoveFromEvent(
-                UnwrapUtil.single(getTarget()), 
-                getIdentifier(), 
-                UnwrapUtil.single(getProposed()));
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/DomainMemberDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/DomainMemberDefault.java
index 253704c..c5287a9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/DomainMemberDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/DomainMemberDefault.java
@@ -37,8 +37,6 @@ import org.apache.isis.core.metamodel.facets.ImperativeFacet;
 import org.apache.isis.core.metamodel.facets.actions.defaults.ActionDefaultsFacet;
 import org.apache.isis.core.metamodel.facets.actions.validate.ActionValidationFacet;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
-import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateAddToFacet;
-import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateRemoveFromFacet;
 import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
 import org.apache.isis.core.metamodel.facets.param.autocomplete.ActionParameterAutoCompleteFacet;
 import org.apache.isis.core.metamodel.facets.param.choices.ActionChoicesFacet;
@@ -69,7 +67,7 @@ public class DomainMemberDefault implements DomainMember {
     private final ObjectMember member;
     private ObjectAction action;
 
-    // to support JAX-B marshaling 
+    // to support JAX-B marshaling
     DomainMemberDefault(){
         throw _Exceptions.unexpectedCodeReach();
     }
@@ -209,7 +207,7 @@ public class DomainMemberDefault implements DomainMember {
                 addIfNotEmpty(interpretFacet(facet), interpretations);
             }
             return !interpretations.isEmpty()
-                    ? interpretations.stream().collect(Collectors.joining(";"))
+                    ? String.join(";", interpretations)
                             : interpretRowAndFacet(ActionDefaultsFacet.class);
         }
     }
@@ -219,10 +217,7 @@ public class DomainMemberDefault implements DomainMember {
         if(memberType == MemberType.PROPERTY) {
             return interpretRowAndFacet(PropertyValidateFacet.class);
         } else if(memberType == MemberType.COLLECTION) {
-            final SortedSet<String> interpretations = _Sets.newTreeSet();
-            addIfNotEmpty(interpretRowAndFacet(CollectionValidateAddToFacet.class), interpretations);
-            addIfNotEmpty(interpretRowAndFacet(CollectionValidateRemoveFromFacet.class), interpretations);
-            return interpretations.stream().collect(Collectors.joining(";"));
+            return String.join(";", _Sets.newTreeSet());
         } else {
             return interpretRowAndFacet(ActionValidationFacet.class);
         }
@@ -264,7 +259,7 @@ public class DomainMemberDefault implements DomainMember {
         if (ignore(name)) {
             return "";
         }
-        //[ahuber] not sure why abbreviated, so I disabled abbreviation        
+        //[ahuber] not sure why abbreviated, so I disabled abbreviation
         //        final String abbr = StringExtensions.toAbbreviation(name);
         //        return abbr.length()>0 ? abbr : name;
 
@@ -276,11 +271,11 @@ public class DomainMemberDefault implements DomainMember {
                 .contains(name);
     }
 
-    private static final Comparator<DomainMember> comparator = 
+    private static final Comparator<DomainMember> comparator =
             Comparator.comparing(DomainMember::getClassType)
             .thenComparing(DomainMember::getClassName)
             .thenComparing(DomainMember::getType, Comparator.reverseOrder()) // desc
             .thenComparing(DomainMember::getMemberName);
 
 
-}
\ No newline at end of file
+}
diff --git a/viewers/restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/MemberType.java b/viewers/restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/MemberType.java
index 42207b7..3e35181 100644
--- a/viewers/restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/MemberType.java
+++ b/viewers/restfulobjects/rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/MemberType.java
@@ -25,8 +25,6 @@ import org.apache.isis.applib.util.Enums;
 import org.apache.isis.commons.internal.collections._Maps;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacet;
 import org.apache.isis.core.metamodel.facets.actions.validate.ActionValidationFacet;
-import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateAddToFacet;
-import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateRemoveFromFacet;
 import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacet;
 import org.apache.isis.core.metamodel.facets.properties.update.modify.PropertySetterFacet;
 import org.apache.isis.core.metamodel.facets.properties.validating.PropertyValidateFacet;