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 2017/10/01 13:17:07 UTC

[isis] branch dev/2.0.0/ISIS-1742-remove-deprecations created (now f85d30c)

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

danhaywood pushed a change to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git.


      at f85d30c  ISIS-1742: deletes Command2 interface.

This branch includes the following new commits:

     new 58fc83f  ISIS-1742: removes AbstractInteractionEvent
     new 607cd22  ISIS-1742: removes @ActionInteraction + related events.  Also Command2 methods removed.
     new 7596150  ISIS-1742: removes N-arg constructors from ActionDomainEvent
     new d235200  ISIS-1742: deletes @PropertyInteraction and @PostsPropertyChangedEvent annotaitons + supporting event classes
     new 24a3d8b  ISIS-1742: deletes @PropertyInteaction annotation and other related event classes.
     new 7035541  ISIS-1742: removes @CollectionInteraction, @PostsCollectionAddedToEvent and @PostsCollectionRemovedFromEvent annotations and supporting event classes.
     new 22f36a6  ISIS-1742: deletes unused implementations of CollectionXxxFacets for the now-deleted annotations.
     new f01639f  ISIS-1742: deletes implementations of ActionInvocationFacetXxx for the now-deleted @ActionInteraction and @PostsActionInvokedEvent annotations.
     new 364eaff  ISIS-1742: deletes implementations of Property{Clear|Setter|Xxx}FacetXxx for the now-deleted @PropertyInteraction and @PropertyChanged annoations
     new f85d30c  ISIS-1742: deletes Command2 interface.

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


-- 
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <co...@isis.apache.org>'].

[isis] 04/10: ISIS-1742: deletes @PropertyInteraction and @PostsPropertyChangedEvent annotaitons + supporting event classes

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit d235200b449731cea77d3393d2fb36ba8c44dcd2
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 11:33:50 2017 +0200

    ISIS-1742: deletes @PropertyInteraction and @PostsPropertyChangedEvent annotaitons + supporting event classes
---
 .../org/apache/isis/applib/IsisApplibModule.java   | 16 -----
 .../annotation/PostsPropertyChangedEvent.java      |  7 --
 .../applib/annotation/PropertyInteraction.java     |  6 --
 .../services/eventbus/PropertyChangedEvent.java    | 56 ---------------
 .../services/eventbus/PropertyDomainEvent.java     | 35 +---------
 .../eventbus/PropertyInteractionEvent.java         | 62 -----------------
 .../property/PropertyAnnotationFacetFactory.java   | 80 ++++++++--------------
 ...HelperTest_newPropertyDomainEvent_forClear.java | 14 +---
 ...elperTest_newPropertyDomainEvent_forModify.java |  8 ---
 .../PropertyAnnotationFacetFactoryTest.java        | 31 ++-------
 10 files changed, 41 insertions(+), 274 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java b/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
index 4ab1232..3476842 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
@@ -18,8 +18,6 @@
  */
 package org.apache.isis.applib;
 
-import java.util.List;
-
 public final class IsisApplibModule {
 
     private IsisApplibModule(){}
@@ -48,19 +46,5 @@ public final class IsisApplibModule {
 
     public abstract static class PropertyDomainEvent<S,T> extends org.apache.isis.applib.services.eventbus.PropertyDomainEvent<S,T> {
         public PropertyDomainEvent() { }
-        /**
-         * @deprecated - use the {@link #PropertyDomainEvent() no-arg constructor} instead to avoid boilerplate.
-         */
-        @Deprecated
-        public PropertyDomainEvent(final S source, final Identifier identifier) {
-            super(source, identifier);
-        }
-        /**
-         * @deprecated - use the {@link #PropertyDomainEvent() no-arg constructor} instead to avoid boilerplate.
-         */
-        @Deprecated
-        public PropertyDomainEvent(final S source, final Identifier identifier, final T oldValue, final T newValue) {
-            super(source, identifier, oldValue, newValue);
-        }
     }
 }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsPropertyChangedEvent.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsPropertyChangedEvent.java
index e9ec821..afd4585 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsPropertyChangedEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsPropertyChangedEvent.java
@@ -24,8 +24,6 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import org.apache.isis.applib.services.eventbus.PropertyChangedEvent;
-
 /**
  * @deprecated - use instead {@link org.apache.isis.applib.annotation.Property#domainEvent()}.
  */
@@ -34,10 +32,5 @@ import org.apache.isis.applib.services.eventbus.PropertyChangedEvent;
 @Target({ElementType.TYPE, ElementType.METHOD})
 public @interface PostsPropertyChangedEvent {
 
-    /**
-     * @deprecated - use instead {@link org.apache.isis.applib.annotation.Property#domainEvent()}.
-     */
-    @Deprecated
-    Class<? extends PropertyChangedEvent<?,?>> value() default PropertyChangedEvent.Default.class;
 
 }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyInteraction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyInteraction.java
index 5ee1c96..38c15df 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyInteraction.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyInteraction.java
@@ -23,7 +23,6 @@ import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
-import org.apache.isis.applib.services.eventbus.PropertyInteractionEvent;
 
 /**
  * @deprecated - use {@link Property#domainEvent()} instead.
@@ -33,10 +32,5 @@ import org.apache.isis.applib.services.eventbus.PropertyInteractionEvent;
 @Target({ElementType.TYPE, ElementType.METHOD})
 public @interface PropertyInteraction {
 
-    /**
-     * @deprecated - use {@link Property#domainEvent()} instead.
-     */
-    @Deprecated
-    Class<? extends PropertyInteractionEvent<?,?>> value() default PropertyInteractionEvent.Default.class;
 
 }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyChangedEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyChangedEvent.java
deleted file mode 100644
index 15fad7b..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyChangedEvent.java
+++ /dev/null
@@ -1,56 +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.applib.services.eventbus;
-
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - use instead {@link PropertyDomainEvent}
- */
-@Deprecated
-public abstract class PropertyChangedEvent<S,T> extends PropertyInteractionEvent<S,T> {
-    
-    private static final long serialVersionUID = 1L;
-
-    @Deprecated
-    public static class Default extends PropertyChangedEvent<Object, Object> {
-        private static final long serialVersionUID = 1L;
-        public Default(Object source, Identifier identifier, Object oldValue, Object newValue) {
-            super(source, identifier, oldValue, newValue);
-        }
-    }
-    
-    /**
-     * @deprecated - use {@link #PropertyChangedEvent(Object, Identifier, Object, Object)}.
-     */
-    @Deprecated
-    public PropertyChangedEvent(
-            final S source, 
-            final T oldValue, final T newValue) {
-        this(source, null, oldValue, newValue);
-    }
-
-    public PropertyChangedEvent(
-            final S source, 
-            final Identifier identifier, 
-            final T oldValue, final T newValue) {
-        super(source, identifier, oldValue, newValue);
-    }
-
-}
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
index f12bb56..c3430fd 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.applib.services.eventbus;
 
-import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.util.ObjectContracts;
 
 public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
@@ -32,13 +31,8 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
      * raises an event or not depends upon the "isis.reflector.facet.propertyAnnotation.domainEvent.postForDefault"
      * configuration property.
      */
-    public static class Default extends PropertyInteractionEvent<Object, Object> {
+    public static class Default extends PropertyDomainEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
-        public Default(){}
-        @Deprecated
-        public Default(Object source, Identifier identifier, Object oldValue, Object newValue) {
-            super(source, identifier, oldValue, newValue);
-        }
     }
     //endregion
 
@@ -48,7 +42,7 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
      * 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 PropertyInteractionEvent<Object, Object> {
+    public static class Noop extends PropertyDomainEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
@@ -59,7 +53,7 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
      * 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 PropertyInteractionEvent<Object, Object> {
+    public static class Doop extends PropertyDomainEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
@@ -76,29 +70,6 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
     public PropertyDomainEvent() {
     }
 
-    /**
-     * @deprecated - the {@link #PropertyDomainEvent() no-arg constructor} is recommended instead, to reduce boilerplate.
-     */
-    @Deprecated
-    public PropertyDomainEvent(
-            final S source,
-            final Identifier identifier) {
-        super(source, identifier);
-    }
-
-    /**
-     * @deprecated - the {@link #PropertyDomainEvent() no-arg constructor} is recommended instead, to reduce boilerplate.
-     */
-    @Deprecated
-    public PropertyDomainEvent(
-            final S source,
-            final Identifier identifier,
-            final T oldValue, final T newValue) {
-        this(source, identifier);
-        this.oldValue = oldValue;
-        this.newValue = newValue;
-    }
-    //endregion
 
     //region > oldValue
     private T oldValue;
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.java
deleted file mode 100644
index 29bb13f..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.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.applib.services.eventbus;
-
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - use {@link org.apache.isis.applib.services.eventbus.PropertyDomainEvent} instead.
- */
-@Deprecated
-public abstract class PropertyInteractionEvent<S,T> extends PropertyDomainEvent<S,T> {
-
-    //region > Default class
-    /**
-     * @deprecated - use {@link org.apache.isis.applib.services.eventbus.PropertyDomainEvent.Default} instead.
-     */
-    @Deprecated
-    public static class Default extends PropertyDomainEvent.Default {
-        private static final long serialVersionUID = 1L;
-        public Default(){}
-        public Default(Object source, Identifier identifier, Object oldValue, Object newValue) {
-            super(source, identifier, oldValue, newValue);
-        }
-    }
-    //endregion
-
-    //region > constructors
-    public PropertyInteractionEvent() {}
-
-    @Deprecated
-    public PropertyInteractionEvent(
-            final S source,
-            final Identifier identifier) {
-        super(source, identifier);
-    }
-
-    @Deprecated
-    public PropertyInteractionEvent(
-            final S source,
-            final Identifier identifier,
-            final T oldValue, final T newValue) {
-        super(source, identifier, oldValue, newValue);
-    }
-    //endregion
-
-}
\ No newline at end of file
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index 489ed15..7c590ed 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@ -19,12 +19,29 @@
 
 package org.apache.isis.core.metamodel.facets.properties.property;
 
-import org.apache.isis.applib.annotation.*;
+import java.lang.reflect.Method;
+
+import javax.annotation.Nullable;
+
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.Mandatory;
+import org.apache.isis.applib.annotation.MaxLength;
+import org.apache.isis.applib.annotation.MustSatisfy;
+import org.apache.isis.applib.annotation.NotPersisted;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.PostsPropertyChangedEvent;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyInteraction;
+import org.apache.isis.applib.annotation.RegEx;
 import org.apache.isis.applib.services.HasTransactionId;
-import org.apache.isis.applib.services.eventbus.PropertyChangedEvent;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
 import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.facetapi.*;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facetapi.FacetUtil;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.MetaModelValidatorRefiner;
 import org.apache.isis.core.metamodel.facets.Annotations;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
@@ -50,7 +67,13 @@ import org.apache.isis.core.metamodel.facets.properties.property.mandatory.Manda
 import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetInvertedByOptionalAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForMaxLengthAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForPropertyAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.modify.*;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetAbstract;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetDefault;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyAnnotation;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
+import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForMustSatisfyAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.NotPersistedFacetForNotPersistedAnnotationOnProperty;
@@ -67,9 +90,6 @@ import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorFor
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
 import org.apache.isis.core.metamodel.util.EventUtil;
 
-import javax.annotation.Nullable;
-import java.lang.reflect.Method;
-
 public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner {
 
     private final MetaModelValidatorForDeprecatedAnnotation postsPropertyChangedEventValidator = new MetaModelValidatorForDeprecatedAnnotation(PostsPropertyChangedEvent.class);
@@ -118,31 +138,14 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         //
         // Set up PropertyDomainEventFacet, which will act as the hiding/disabling/validating advisor
         //
-        final PostsPropertyChangedEvent postsPropertyChangedEvent = Annotations.getAnnotation(method, PostsPropertyChangedEvent.class);
-        final PropertyInteraction propertyInteraction = Annotations.getAnnotation(method, PropertyInteraction.class);
         final Property property = Annotations.getAnnotation(method, Property.class);
         final Class<? extends PropertyDomainEvent<?, ?>> propertyDomainEventType;
 
         final PropertyDomainEventFacetAbstract propertyDomainEventFacet;
 
-        // can't really do this, because would result in the event being fired for the
-        // hidden/disable/validate phases, most likely breaking existing code.
-//        if(postsPropertyChangedEvent != null) {
-//            propertyDomainEventType = postsPropertyChangedEvent.value();
-//            propertyDomainEventFacet = postsPropertyChangedEventValidator.flagIfPresent(
-//                    new PropertyDomainEventFacetForPostsPropertyChangedEventAnnotation(
-//                        propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder));
-//        } else
-
-        // search for @PropertyInteraction(value=...)
-        if(propertyInteraction != null) {
-            propertyDomainEventType = propertyInteraction.value();
-            propertyDomainEventFacet = propertyInteractionValidator.flagIfPresent(
-                    new PropertyDomainEventFacetForPropertyInteractionAnnotation(
-                        propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder), processMethodContext);
-        } else
+
         // search for @Property(domainEvent=...)
-        if(property != null && property.domainEvent() != null) {
+        if(property != null) {
             propertyDomainEventType = property.domainEvent();
             propertyDomainEventFacet = new PropertyDomainEventFacetForPropertyAnnotation(
                     propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder);
@@ -174,18 +177,7 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         if(setterFacet != null) {
             // the current setter facet will end up as the underlying facet
             final PropertySetterFacet replacementFacet;
-            // deprecated
-            if(postsPropertyChangedEvent != null) {
-                final Class<? extends PropertyChangedEvent<?, ?>> propertySetEventType = postsPropertyChangedEvent.value();
-                replacementFacet = new PropertySetterFacetForPostsPropertyChangedEventAnnotation(
-                        propertySetEventType, getterFacet, setterFacet, propertyDomainEventFacet, holder, servicesInjector);
-            } else
-            // deprecated (but more recently)
-            if(propertyInteraction != null) {
-                replacementFacet = new PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation(
-                        propertyDomainEventType, getterFacet, setterFacet, propertyDomainEventFacet, holder, servicesInjector);
-            } else
-            // current
+
             if(property != null) {
                 replacementFacet = new PropertySetterFacetForDomainEventFromPropertyAnnotation(
                         propertyDomainEventType, getterFacet, setterFacet, propertyDomainEventFacet, holder, servicesInjector);
@@ -203,18 +195,6 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
             // the current clear facet will end up as the underlying facet
             final PropertyClearFacet replacementFacet;
 
-            // deprecated
-            if(postsPropertyChangedEvent != null) {
-                final Class<? extends PropertyChangedEvent<?, ?>> propertyClearEventType = postsPropertyChangedEvent.value();
-                replacementFacet = new PropertyClearFacetForPostsPropertyChangedEventAnnotation(
-                        propertyClearEventType, getterFacet, clearFacet, propertyDomainEventFacet, holder, servicesInjector);
-            } else
-            // deprecated (but more recently)
-            if(propertyInteraction != null) {
-                replacementFacet = new PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation(
-                        propertyDomainEventType, getterFacet, clearFacet, propertyDomainEventFacet, holder, servicesInjector);
-            } else
-            // current
             if(property != null) {
                 replacementFacet = new PropertyClearFacetForDomainEventFromPropertyAnnotation(
                         propertyDomainEventType, getterFacet, clearFacet, propertyDomainEventFacet, holder, servicesInjector);
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java
index 96a42fa..c720e1c 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java
@@ -30,14 +30,6 @@ public class DomainEventHelperTest_newPropertyDomainEvent_forClear {
     public static class SomeDomainObject {}
     
     public static class SomeDatePropertyChangedDomainEvent extends PropertyDomainEvent<SomeDomainObject, LocalDate> {
-        private static final long serialVersionUID = 1L;
-        public SomeDatePropertyChangedDomainEvent(
-                SomeDomainObject source,
-                Identifier identifier,
-                LocalDate oldValue,
-                LocalDate newValue) {
-            super(source, identifier, oldValue, newValue);
-        }
     }
 
     @Test
@@ -50,10 +42,10 @@ public class DomainEventHelperTest_newPropertyDomainEvent_forClear {
         
         final PropertyDomainEvent<Object, Object> ev =
                 new DomainEventHelper(null).newPropertyDomainEvent(PropertyDomainEvent.Default.class, identifier, sdo, oldValue, newValue);
-        assertThat(ev.getSource(), is((Object)sdo));
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
-        assertThat(ev.getOldValue(), is((Object)oldValue));
-        assertThat(ev.getNewValue(), is((Object)newValue));
+        assertThat(ev.getOldValue(), is(oldValue));
+        assertThat(ev.getNewValue(), is(newValue));
     }
 
 
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forModify.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forModify.java
index c1d4c6d..24afc78 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forModify.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forModify.java
@@ -29,14 +29,6 @@ public class DomainEventHelperTest_newPropertyDomainEvent_forModify {
     public static class SomeDomainObject {}
     
     public static class SomeDatePropertyChangedDomainEvent extends PropertyDomainEvent<SomeDomainObject, LocalDate> {
-        private static final long serialVersionUID = 1L;
-        public SomeDatePropertyChangedDomainEvent(
-                SomeDomainObject source,
-                Identifier identifier,
-                LocalDate oldValue,
-                LocalDate newValue) {
-            super(source, identifier, oldValue, newValue);
-        }
     }
 
     @Test
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
index 2d487c9..eba0126 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
@@ -31,14 +31,10 @@ import org.junit.Test;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.PostsPropertyChangedEvent;
 import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyInteraction;
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.services.eventbus.PropertyChangedEvent;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
-import org.apache.isis.applib.services.eventbus.PropertyInteractionEvent;
 import org.apache.isis.applib.spec.Specification;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
@@ -166,12 +162,9 @@ public class PropertyAnnotationFacetFactoryTest extends AbstractFacetFactoryJUni
         public void withDeprecatedPostsPropertyChangedEvent_andGetterFacet_andSetterFacet() {
 
             class Customer {
-                class NamedChangedDomainEvent extends PropertyChangedEvent<Customer, String> {
-                    public NamedChangedDomainEvent(final Customer source, final String oldValue, final String newValue) {
-                        super(source, oldValue, newValue);
-                    }
+                class NamedChangedDomainEvent extends PropertyDomainEvent<Customer, String> {
                 }
-                @PostsPropertyChangedEvent(NamedChangedDomainEvent.class)
+                @Property(domainEvent = NamedChangedDomainEvent.class)
                 public String getName() {
                     return null;
                 }
@@ -226,16 +219,9 @@ public class PropertyAnnotationFacetFactoryTest extends AbstractFacetFactoryJUni
         public void withPropertyInteractionEvent() {
 
             class Customer {
-                class NamedChangedDomainEvent extends PropertyInteractionEvent<Customer, String> {
-                    public NamedChangedDomainEvent(
-                            final Customer source,
-                            final Identifier identifier,
-                            final String oldValue,
-                            final String newValue) {
-                        super(source, identifier, oldValue, newValue);
-                    }
-                }
-                @PropertyInteraction(NamedChangedDomainEvent.class)
+                class NamedChangedDomainEvent extends PropertyDomainEvent<Customer, String> {
+                }
+                @Property(domainEvent = NamedChangedDomainEvent.class)
                 public String getName() {
                     return null;
                 }
@@ -285,13 +271,6 @@ public class PropertyAnnotationFacetFactoryTest extends AbstractFacetFactoryJUni
 
             class Customer {
                 class NamedChangedDomainEvent extends PropertyDomainEvent<Customer, String> {
-                    public NamedChangedDomainEvent(
-                            final Customer source,
-                            final Identifier identifier,
-                            final String oldValue,
-                            final String newValue) {
-                        super(source, identifier, oldValue, newValue);
-                    }
                 }
                 @Property(domainEvent= NamedChangedDomainEvent.class)
                 public String getName() {

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 06/10: ISIS-1742: removes @CollectionInteraction, @PostsCollectionAddedToEvent and @PostsCollectionRemovedFromEvent annotations and supporting event classes.

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 7035541abac7da31fd02b22c8e3773c82d6d753d
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 11:55:44 2017 +0200

    ISIS-1742: removes @CollectionInteraction, @PostsCollectionAddedToEvent and @PostsCollectionRemovedFromEvent annotations and supporting event classes.
---
 .../org/apache/isis/applib/IsisApplibModule.java   | 14 -----
 .../applib/annotation/CollectionInteraction.java   | 42 -------------
 .../annotation/PostsCollectionAddedToEvent.java    | 41 -------------
 .../PostsCollectionRemovedFromEvent.java           | 43 -------------
 .../services/eventbus/CollectionAddedToEvent.java  | 45 --------------
 .../services/eventbus/CollectionDomainEvent.java   | 42 ++-----------
 .../eventbus/CollectionInteractionEvent.java       | 70 ----------------------
 .../eventbus/CollectionRemovedFromEvent.java       | 46 --------------
 ...ctionInvocationFacetForDomainEventAbstract.java |  4 +-
 .../CollectionAnnotationFacetFactory.java          | 70 +---------------------
 ...ectionAddToFacetForDomainEventFromAbstract.java |  3 +-
 ...etForPostsCollectionAddedToEventAnnotation.java |  4 +-
 ...nRemoveFromFacetForDomainEventFromAbstract.java |  4 +-
 ...rPostsCollectionRemovedFromEventAnnotation.java |  4 +-
 ...HelperTest_newCollectionDomainEvent_forAdd.java | 20 +++----
 ...perTest_newCollectionDomainEvent_forRemove.java | 22 +++----
 .../CollectionAnnotationFacetFactoryTest.java      | 52 ++--------------
 17 files changed, 34 insertions(+), 492 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java b/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
index 3476842..dd27a03 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
@@ -28,20 +28,6 @@ public final class IsisApplibModule {
 
     public abstract static class CollectionDomainEvent<S,T> extends org.apache.isis.applib.services.eventbus.CollectionDomainEvent<S,T> {
         public CollectionDomainEvent() { }
-        /**
-         * @deprecated - use the {@link #CollectionDomainEvent() no-arg constructor} instead to avoid boilerplate.
-         */
-        @Deprecated
-        public CollectionDomainEvent(final S source, final Identifier identifier, final Of of) {
-            super(source, identifier, of);
-        }
-        /**
-         * @deprecated - use the {@link #CollectionDomainEvent() no-arg constructor} instead to avoid boilerplate.
-         */
-        @Deprecated
-        public CollectionDomainEvent(final S source, final Identifier identifier, final Of of, final T value) {
-            super(source, identifier, of, value);
-        }
     }
 
     public abstract static class PropertyDomainEvent<S,T> extends org.apache.isis.applib.services.eventbus.PropertyDomainEvent<S,T> {
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionInteraction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionInteraction.java
deleted file mode 100644
index 41d62d4..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionInteraction.java
+++ /dev/null
@@ -1,42 +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.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import org.apache.isis.applib.services.eventbus.CollectionInteractionEvent;
-
-/**
- * @deprecated - see {@link Collection#domainEvent()}.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD})
-@Deprecated
-public @interface CollectionInteraction {
-
-    /**
-     * @deprecated - see {@link Collection#domainEvent()}.
-     */
-    @Deprecated
-    Class<? extends CollectionInteractionEvent<?,?>> value() default CollectionInteractionEvent.Default.class;
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsCollectionAddedToEvent.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsCollectionAddedToEvent.java
deleted file mode 100644
index 5196675..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsCollectionAddedToEvent.java
+++ /dev/null
@@ -1,41 +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.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import org.apache.isis.applib.services.eventbus.CollectionAddedToEvent;
-
-/**
- * @deprecated - use instead {@link Collection#domainEvent()}
- */
-@Deprecated
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD})
-public @interface PostsCollectionAddedToEvent {
-
-    /**
-     * @deprecated - use {@link Collection#domainEvent()} instead.
-     */
-    @Deprecated
-    Class<? extends CollectionAddedToEvent<?,?>> value() default CollectionAddedToEvent.Default.class;
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsCollectionRemovedFromEvent.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsCollectionRemovedFromEvent.java
deleted file mode 100644
index 7121a13..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsCollectionRemovedFromEvent.java
+++ /dev/null
@@ -1,43 +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.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.isis.applib.services.eventbus.CollectionRemovedFromEvent;
-
-/**
- * @deprecated - use instead {@link Collection#domainEvent()}
- */
-@Deprecated
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD})
-public @interface PostsCollectionRemovedFromEvent {
-
-    /**
-     * @deprecated - use {@link Collection#domainEvent()} instead.
-     */
-    @Deprecated
-    Class<? extends CollectionRemovedFromEvent<?,?>> value() default CollectionRemovedFromEvent.Default.class;
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionAddedToEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionAddedToEvent.java
deleted file mode 100644
index e767c3c..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionAddedToEvent.java
+++ /dev/null
@@ -1,45 +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.applib.services.eventbus;
-
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - use instead {@link CollectionInteractionEvent}
- */
-@Deprecated
-public abstract class CollectionAddedToEvent<S,T> extends CollectionInteractionEvent<S,T> {
-    
-    private static final long serialVersionUID = 1L;
-
-    @Deprecated
-    public static class Default extends CollectionAddedToEvent<Object, Object> {
-        private static final long serialVersionUID = 1L;
-        public Default(Object source, Identifier identifier, Object value) {
-            super(source, identifier, value);
-        }
-    }
-
-    public CollectionAddedToEvent(
-            final S source, 
-            final Identifier identifier, 
-            final T value) {
-        super(source, identifier, Of.ADD_TO, value);
-    }
-}
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
index 15102f7..77dc9f7 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.applib.services.eventbus;
 
-import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.util.ObjectContracts;
 
 public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S> {
@@ -32,17 +31,8 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
      * raises an event or not depends upon the "isis.reflector.facet.collectionAnnotation.domainEvent.postForDefault"
      * configuration property.
      */
-    public static class Default extends CollectionInteractionEvent<Object, Object> {
+    public static class Default extends CollectionDomainEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
-        public Default(){}
-        @Deprecated
-        public Default(
-                final Object source,
-                final Identifier identifier,
-                final Of of,
-                final Object value) {
-            super(source, identifier, of, value);
-        }
     }
     //endregion
 
@@ -52,7 +42,7 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
      * 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 CollectionInteractionEvent<Object, Object> {
+    public static class Noop extends CollectionDomainEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
@@ -63,13 +53,13 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
      * 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 CollectionInteractionEvent<Object, Object> {
+    public static class Doop extends CollectionDomainEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
 
 
-    //region > constructors
+    //region > constructor
 
     /**
      * If used then the framework will set state via (non-API) setters.
@@ -81,30 +71,6 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S>
     public CollectionDomainEvent() {
     }
 
-    /**
-     * @deprecated - the {@link #CollectionDomainEvent() no-arg constructor} is recommended instead, to reduce boilerplate.
-     */
-    @Deprecated
-    public CollectionDomainEvent(
-            final S source,
-            final Identifier identifier,
-            final Of of) {
-        super(source, identifier);
-        this.of = of;
-    }
-
-    /**
-     * @deprecated - the {@link #CollectionDomainEvent() no-arg constructor} is recommended instead, to reduce boilerplate.
-     */
-    @Deprecated
-    public CollectionDomainEvent(
-            final S source,
-            final Identifier identifier,
-            final Of of,
-            final T value) {
-        this(source, identifier, of);
-        this.value = value;
-    }
     //endregion
 
     //region > value
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java
deleted file mode 100644
index 0663c89..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java
+++ /dev/null
@@ -1,70 +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.applib.services.eventbus;
-
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - use {@link org.apache.isis.applib.services.eventbus.CollectionDomainEvent} instead.
- */
-@Deprecated
-public abstract class CollectionInteractionEvent<S,T> extends CollectionDomainEvent<S,T> {
-
-    //region > Default class
-    /**
-     * @deprecated - use {@link org.apache.isis.applib.services.eventbus.CollectionDomainEvent.Default} instead.
-     */
-    @Deprecated
-    public static class Default extends CollectionDomainEvent.Default {
-        private static final long serialVersionUID = 1L;
-        public Default(){}
-        @Deprecated
-        public Default(
-                final Object source,
-                final Identifier identifier,
-                final Of of,
-                final Object value) {
-            super(source, identifier, of, value);
-        }
-    }
-    //endregion
-
-    //region > constructors
-    public CollectionInteractionEvent() {
-    }
-
-    @Deprecated
-    public CollectionInteractionEvent(
-            final S source,
-            final Identifier identifier,
-            final Of of) {
-        super(source, identifier, of);
-    }
-
-    @Deprecated
-    public CollectionInteractionEvent(
-            final S source,
-            final Identifier identifier,
-            final Of of,
-            final T value) {
-        super(source, identifier, of, value);
-    }
-    //endregion
-
-}
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionRemovedFromEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionRemovedFromEvent.java
deleted file mode 100644
index ccebc41..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionRemovedFromEvent.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.applib.services.eventbus;
-
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - use instead {@link CollectionInteractionEvent}
- */
-@Deprecated
-public abstract class CollectionRemovedFromEvent<S,T> extends CollectionInteractionEvent<S,T> {
-    
-    private static final long serialVersionUID = 1L;
-
-    @Deprecated
-    public static class Default extends CollectionRemovedFromEvent<Object, Object> {
-        private static final long serialVersionUID = 1L;
-        public Default(Object source, Identifier identifier, Object value) {
-            super(source, identifier, value);
-        }
-    }
-
-    public CollectionRemovedFromEvent(
-            final S source,
-            final Identifier identifier,
-            final T value) {
-        super(source, identifier, Of.REMOVE_FROM, value);
-    }
-
-}
\ No newline at end of file
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
index 2092f68..38c7fe0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
@@ -532,8 +532,8 @@ public abstract class ActionInvocationFacetForDomainEventAbstract
 
 
     /**
-     * Optional hook, previously added to allow (now removed) annotations to to discard the event if the domain event
-     * was incompatible.
+     * Optional hook, previously to allow facet implementations of (now removed) annotations to to discard the event if the domain event
+     * was incompatible.  Now a no-op I think.
      */
     protected ActionDomainEvent<?> verify(final ActionDomainEvent<?> event) {
         return event;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
index 55e1fc1..3dac2ba 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
@@ -25,12 +25,9 @@ import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 
 import org.apache.isis.applib.annotation.Collection;
-import org.apache.isis.applib.annotation.CollectionInteraction;
 import org.apache.isis.applib.annotation.Disabled;
 import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.applib.annotation.NotPersisted;
-import org.apache.isis.applib.annotation.PostsCollectionAddedToEvent;
-import org.apache.isis.applib.annotation.PostsCollectionRemovedFromEvent;
 import org.apache.isis.applib.annotation.TypeOf;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
 import org.apache.isis.core.commons.config.IsisConfiguration;
@@ -51,18 +48,13 @@ import org.apache.isis.core.metamodel.facets.collections.collection.hidden.Hidde
 import org.apache.isis.core.metamodel.facets.collections.collection.hidden.HiddenFacetForHiddenAnnotationOnCollection;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromAbstract;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromCollectionAnnotation;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromDefault;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForPostsCollectionAddedToEventAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacetAbstract;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacetDefault;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacetForCollectionAnnotation;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacetForCollectionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForDomainEventFromAbstract;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForDomainEventFromDefault;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.notpersisted.NotPersistedFacetForCollectionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.notpersisted.NotPersistedFacetForNotPersistedAnnotationOnCollection;
 import org.apache.isis.core.metamodel.facets.collections.collection.typeof.TypeOfFacetOnCollectionFromCollectionAnnotation;
@@ -80,9 +72,6 @@ import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner {
 
-    private final MetaModelValidatorForDeprecatedAnnotation postsCollectionAddedToEventValidator = new MetaModelValidatorForDeprecatedAnnotation(PostsCollectionAddedToEvent.class);
-    private final MetaModelValidatorForDeprecatedAnnotation postsCollectionRemovedFromEventValidator = new MetaModelValidatorForDeprecatedAnnotation(PostsCollectionRemovedFromEvent.class);
-    private final MetaModelValidatorForDeprecatedAnnotation collectionInteractionValidator = new MetaModelValidatorForDeprecatedAnnotation(CollectionInteraction.class);
     private final MetaModelValidatorForDeprecatedAnnotation hiddenValidator = new MetaModelValidatorForDeprecatedAnnotation(Hidden.class);
     private final MetaModelValidatorForDeprecatedAnnotation disabledValidator = new MetaModelValidatorForDeprecatedAnnotation(Disabled.class);
     private final MetaModelValidatorForDeprecatedAnnotation notPersistedValidator = new MetaModelValidatorForDeprecatedAnnotation(NotPersisted.class);
@@ -115,43 +104,14 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
         //
         // Set up CollectionDomainEventFacet, which will act as the hiding/disabling/validating advisor
         //
-        final PostsCollectionAddedToEvent postsCollectionAddedToEvent = Annotations.getAnnotation(method, PostsCollectionAddedToEvent.class);
-        final PostsCollectionRemovedFromEvent postsCollectionRemovedFromEvent = Annotations.getAnnotation(method, PostsCollectionRemovedFromEvent.class);
-        final CollectionInteraction collectionInteraction = Annotations.getAnnotation(method, CollectionInteraction.class);
         final Collection collection = Annotations.getAnnotation(method, Collection.class);
         final Class<? extends CollectionDomainEvent<?, ?>> collectionDomainEventType;
 
         final CollectionDomainEventFacetAbstract collectionDomainEventFacet;
 
-        // can't really do this, because would result in the event being fired for the
-        // hidden/disable/validate phases, most likely breaking existing code.
-        //
-        // in any case, which to use... addTo or removeFrom ?
-
-//        // search for @PostsCollectionAddedToEvent(value=...)
-//        if(postsCollectionAddedToEvent != null) {
-//            collectionDomainEventType = postsCollectionAddedToEvent.value();
-//            collectionDomainEventFacet = postsCollectionAddedToEventValidator.flagIfPresent(
-//                    new CollectionDomainEventFacetForPostsCollectionAddedToEventAnnotation(
-//                        collectionDomainEventType, servicesInjector, getSpecificationLoader(), holder));
-//        } else
-//        // search for @PostsCollectionRemovedFromEvent(value=...)
-//        if(postsCollectionRemovedFromEvent != null) {
-//            collectionDomainEventType = postsCollectionRemovedFromEvent.value();
-//            collectionDomainEventFacet = postsCollectionRemovedFromEventValidator.flagIfPresent(
-//                    new CollectionDomainEventFacetForPostsCollectionRemovedFromEventAnnotation(
-//                        collectionDomainEventType, servicesInjector, getSpecificationLoader(), holder));
-//        } else
-
-        // search for @CollectionInteraction(value=...)
-        if(collectionInteraction != null) {
-            collectionDomainEventType = collectionInteraction.value();
-            collectionDomainEventFacet = collectionInteractionValidator.flagIfPresent(
-                    new CollectionDomainEventFacetForCollectionInteractionAnnotation(
-                        collectionDomainEventType, servicesInjector, getSpecificationLoader(), holder), processMethodContext);
-        } else
+
         // search for @Collection(domainEvent=...)
-        if(collection != null && collection.domainEvent() != null) {
+        if(collection != null) {
             collectionDomainEventType = collection.domainEvent();
             collectionDomainEventFacet = new CollectionDomainEventFacetForCollectionAnnotation(
                     collectionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
@@ -187,17 +147,6 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
             // one of these facets to be created.
             final CollectionAddToFacetForDomainEventFromAbstract replacementFacet;
 
-            // deprecated
-            if (postsCollectionAddedToEvent != null) {
-                replacementFacet = new CollectionAddToFacetForPostsCollectionAddedToEventAnnotation(
-                        postsCollectionAddedToEvent.value(), getterFacet, collectionAddToFacet, collectionDomainEventFacet, holder, servicesInjector);
-            } else
-            // deprecated (but more recently)
-            if(collectionInteraction != null) {
-                replacementFacet = new CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation(
-                        collectionDomainEventType, getterFacet, collectionAddToFacet, collectionDomainEventFacet, holder, servicesInjector);
-            } else
-            // current
             if(collection != null) {
                 replacementFacet = new CollectionAddToFacetForDomainEventFromCollectionAnnotation(
                         collectionDomainEventType, getterFacet, collectionAddToFacet, collectionDomainEventFacet, holder, servicesInjector);
@@ -216,15 +165,6 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
 
             final CollectionRemoveFromFacetForDomainEventFromAbstract replacementFacet;
 
-            // deprecated
-            if (postsCollectionRemovedFromEvent != null) {
-                replacementFacet = new CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation(postsCollectionRemovedFromEvent.value(), getterFacet, collectionRemoveFromFacet, collectionDomainEventFacet, servicesInjector, holder);
-            } else
-            // deprecated (but more recently)
-            if(collectionInteraction != null) {
-                replacementFacet = new CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation(collectionDomainEventType, getterFacet, collectionRemoveFromFacet, collectionDomainEventFacet, servicesInjector, holder);
-            } else
-            // current
             if(collection != null) {
                 replacementFacet = new CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation(collectionDomainEventType, getterFacet, collectionRemoveFromFacet, collectionDomainEventFacet, servicesInjector, holder);
             } else
@@ -367,9 +307,6 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
 
     @Override
     public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
-        metaModelValidator.add(postsCollectionAddedToEventValidator);
-        metaModelValidator.add(postsCollectionRemovedFromEventValidator);
-        metaModelValidator.add(collectionInteractionValidator);
         metaModelValidator.add(notPersistedValidator);
         metaModelValidator.add(typeOfValidator);
         metaModelValidator.add(hiddenValidator);
@@ -384,9 +321,6 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
         super.setServicesInjector(servicesInjector);
         final IsisConfiguration configuration = getConfiguration();
 
-        postsCollectionAddedToEventValidator.setConfiguration(configuration);
-        postsCollectionRemovedFromEventValidator.setConfiguration(configuration);
-        collectionInteractionValidator.setConfiguration(configuration);
         typeOfValidator.setConfiguration(configuration);
         notPersistedValidator.setConfiguration(configuration);
         hiddenValidator.setConfiguration(configuration);
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForDomainEventFromAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForDomainEventFromAbstract.java
index fd5c79e..6b97e80 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForDomainEventFromAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForDomainEventFromAbstract.java
@@ -112,8 +112,7 @@ public abstract class CollectionAddToFacetForDomainEventFromAbstract
     }
 
     /**
-     * Optional hook to allow the facet implementation for the deprecated {@link org.apache.isis.applib.annotation.PostsCollectionAddedToEvent} annotation
-     * to discard the event if of a different type.
+     * Optional hook to allow the facet implementation of now-deleted annotations to discard the event if of a different type; now a no-op, I think.
      */
     protected CollectionDomainEvent<?, ?> verify(CollectionDomainEvent<?, ?> event) {
         return event;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForPostsCollectionAddedToEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForPostsCollectionAddedToEventAnnotation.java
index 4602940..78616b9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForPostsCollectionAddedToEventAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForPostsCollectionAddedToEventAnnotation.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.collections.collection.modify;
 
-import org.apache.isis.applib.services.eventbus.CollectionAddedToEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
@@ -34,7 +33,7 @@ public class CollectionAddToFacetForPostsCollectionAddedToEventAnnotation
         extends CollectionAddToFacetForDomainEventFromAbstract {
 
     public CollectionAddToFacetForPostsCollectionAddedToEventAnnotation(
-            final Class<? extends CollectionAddedToEvent<?, ?>> eventType,
+            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
             final PropertyOrCollectionAccessorFacet getterFacet,
             final CollectionAddToFacet collectionAddToFacet,
             final CollectionDomainEventFacetAbstract collectionInteractionFacet,
@@ -44,7 +43,6 @@ public class CollectionAddToFacetForPostsCollectionAddedToEventAnnotation
 
     @Override
     protected CollectionDomainEvent<?, ?> verify(final CollectionDomainEvent<?, ?> event) {
-        // will discard event if different type to that specified in the PostsCollectionAddedToEvent annotation.
         return event != null && value() == event.getClass() ? event : null;
     }
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForDomainEventFromAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForDomainEventFromAbstract.java
index dc9a106..bbc2734 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForDomainEventFromAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForDomainEventFromAbstract.java
@@ -111,8 +111,8 @@ public abstract class CollectionRemoveFromFacetForDomainEventFromAbstract
     }
 
     /**
-     * Optional hook to allow the facet implementation for the deprecated {@link org.apache.isis.applib.annotation.PostsCollectionRemovedFromEvent} annotation
-     * to discard the event if of a different type.
+     * Optional hook to allow the facet implementation for now removed annotations
+     * to discard the event if of a different type.  Now a no-op, I think.
      */
     protected CollectionDomainEvent<?, ?> verify(CollectionDomainEvent<?, ?> event) {
         return event;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation.java
index 9c5b108..07d5a17 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation.java
@@ -20,7 +20,6 @@
 package org.apache.isis.core.metamodel.facets.collections.collection.modify;
 
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.applib.services.eventbus.CollectionRemovedFromEvent;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionRemoveFromFacet;
 import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
@@ -34,7 +33,7 @@ public class CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotati
         CollectionRemoveFromFacetForDomainEventFromAbstract {
 
     public CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation(
-            final Class<? extends CollectionRemovedFromEvent<?, ?>> eventType,
+            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
             final PropertyOrCollectionAccessorFacet getterFacet,
             final CollectionRemoveFromFacet collectionRemoveFromFacet,
             final CollectionDomainEventFacetAbstract collectionInteractionFacet,
@@ -45,7 +44,6 @@ public class CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotati
 
     @Override
     protected CollectionDomainEvent<?, ?> verify(final CollectionDomainEvent<?, ?> event) {
-        // will discard event if different type to that specified in the PostsCollectionRemovedFromEvent annotation.
         return event != null && value() == event.getClass() ? event : 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 9230f11..9fc1030 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
@@ -17,10 +17,11 @@
 package org.apache.isis.core.metamodel.facets;
 
 import java.util.Set;
+
 import org.junit.Test;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.services.eventbus.AbstractDomainEvent;
-import org.apache.isis.applib.services.eventbus.CollectionAddedToEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
 
 import static org.hamcrest.CoreMatchers.is;
@@ -35,13 +36,6 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
     
     public static class SomeDomainObjectCollectionDomainEvent extends CollectionDomainEvent<SomeDomainObject, SomeReferencedObject> {
         private static final long serialVersionUID = 1L;
-        public SomeDomainObjectCollectionDomainEvent(
-                SomeDomainObject source,
-                Identifier identifier,
-                Of of,
-                SomeReferencedObject value) {
-            super(source, identifier, of, value);
-        }
     }
     
     @Test
@@ -52,10 +46,10 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
                 CollectionDomainEvent.Default.class, null, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
-        assertThat(ev.getSource(), is((Object)sdo));
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
-        assertThat(ev.getValue(), is((Object)other));
+        assertThat(ev.getValue(), is(other));
     }
 
     @Test
@@ -65,11 +59,11 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
         final Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "references");
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
-                CollectionAddedToEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
-        assertThat(ev.getSource(), is((Object)sdo));
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
-        assertThat(ev.getValue(), is((Object)other));
+        assertThat(ev.getValue(), is(other));
     }
 
     @Test
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 8d8c634..2a67610 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
@@ -17,11 +17,12 @@
 package org.apache.isis.core.metamodel.facets;
 
 import java.util.Set;
+
 import org.junit.Test;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.services.eventbus.AbstractDomainEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.applib.services.eventbus.CollectionRemovedFromEvent;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -35,13 +36,6 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
     
     public static class SomeDomainObjectCollectionRemovedFromDomainEvent extends CollectionDomainEvent<SomeDomainObject, SomeReferencedObject> {
         private static final long serialVersionUID = 1L;
-        public SomeDomainObjectCollectionRemovedFromDomainEvent(
-                SomeDomainObject source,
-                Identifier identifier,
-                Of of,
-                SomeReferencedObject value) {
-            super(source, identifier, of, value);
-        }
     }
     
     @Test
@@ -51,11 +45,11 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
         Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "references");
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
-                CollectionRemovedFromEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
-        assertThat(ev.getSource(), is((Object)sdo));
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
-        assertThat(ev.getValue(), is((Object)other));
+        assertThat(ev.getValue(), is(other));
     }
 
     @Test
@@ -65,11 +59,11 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
         Identifier identifier = Identifier.propertyOrCollectionIdentifier(SomeDomainObject.class, "references");
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
-                CollectionRemovedFromEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
-        assertThat(ev.getSource(), is((Object)sdo));
+                CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
-        assertThat(ev.getValue(), is((Object)other));
+        assertThat(ev.getValue(), is(other));
     }
 
     @Test
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
index af57772..f79b6f4 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
@@ -28,15 +28,9 @@ import org.junit.Test;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.Collection;
-import org.apache.isis.applib.annotation.CollectionInteraction;
-import org.apache.isis.applib.annotation.PostsCollectionAddedToEvent;
-import org.apache.isis.applib.annotation.PostsCollectionRemovedFromEvent;
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.services.eventbus.CollectionAddedToEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.applib.services.eventbus.CollectionInteractionEvent;
-import org.apache.isis.applib.services.eventbus.CollectionRemovedFromEvent;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -162,26 +156,10 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
             class Order {
             }
             class Customer {
-                class OrdersAddedToDomainEvent extends CollectionAddedToEvent<Customer, Order> {
-                    public OrdersAddedToDomainEvent(
-                            final Customer source,
-                            final Identifier identifier,
-                            final Order value) {
-                        super(source, identifier, value);
-                    }
+                class OrdersAddedToOrRemovedFromDomainEvent extends CollectionDomainEvent<Customer, Order> {
                 }
 
-                class OrdersRemovedFromDomainEvent extends CollectionRemovedFromEvent<Customer, Order> {
-                    public OrdersRemovedFromDomainEvent(
-                            final Customer source,
-                            final Identifier identifier,
-                            final Order value) {
-                        super(source, identifier, value);
-                    }
-                }
-
-                @PostsCollectionAddedToEvent(OrdersAddedToDomainEvent.class)
-                @PostsCollectionRemovedFromEvent(OrdersRemovedFromDomainEvent.class)
+                @Collection(domainEvent = OrdersAddedToOrRemovedFromDomainEvent.class)
                 public List<Order> getOrders() {
                     return null;
                 }
@@ -224,14 +202,14 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
             Assert.assertNotNull(addToFacet);
             Assert.assertTrue(addToFacet instanceof CollectionAddToFacetForPostsCollectionAddedToEventAnnotation);
             final CollectionAddToFacetForPostsCollectionAddedToEventAnnotation addToFacetImpl = (CollectionAddToFacetForPostsCollectionAddedToEventAnnotation) addToFacet;
-            assertThat(addToFacetImpl.value(), classEqualTo(Customer.OrdersAddedToDomainEvent.class));
+            assertThat(addToFacetImpl.value(), classEqualTo(Customer.OrdersAddedToOrRemovedFromDomainEvent.class));
 
             // then
             final Facet removeFromFacet = facetedMethod.getFacet(CollectionRemoveFromFacet.class);
             Assert.assertNotNull(removeFromFacet);
             Assert.assertTrue(removeFromFacet instanceof CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation);
             final CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation removeFromFacetImpl = (CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation) removeFromFacet;
-            assertThat(removeFromFacetImpl.value(), classEqualTo(Customer.OrdersRemovedFromDomainEvent.class));
+            assertThat(removeFromFacetImpl.value(), classEqualTo(Customer.OrdersAddedToOrRemovedFromDomainEvent.class));
         }
 
         // @Test
@@ -240,19 +218,10 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
             class Order {
             }
             class Customer {
-                class OrdersChangedDomainEvent extends CollectionInteractionEvent<Customer, Order> {
-                    public OrdersChangedDomainEvent(final Customer source, final Identifier identifier, final Of of) {
-                        super(source, identifier, of);
-                    }
-
-                    public OrdersChangedDomainEvent(
-                            final Customer source, final Identifier identifier, final Of of,
-                            final Order value) {
-                        super(source, identifier, of, value);
-                    }
+                class OrdersChangedDomainEvent extends CollectionDomainEvent<Customer, Order> {
                 }
 
-                @CollectionInteraction(OrdersChangedDomainEvent.class)
+                @Collection(domainEvent = OrdersChangedDomainEvent.class)
                 public List<Order> getOrders() {
                     return null;
                 }
@@ -306,16 +275,7 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
             }
             class Customer {
                 class OrdersChanged extends CollectionDomainEvent<Customer, Order> {
-                    public OrdersChanged(final Customer source, final Identifier identifier, final Of of) {
-                        super(source, identifier, of);
-                    }
-
-                    public OrdersChanged(final Customer source, final Identifier identifier, final Of of,
-                            final Order value) {
-                        super(source, identifier, of, value);
-                    }
                 }
-
                 @Collection(domainEvent = OrdersChanged.class)
                 public List<Order> getOrders() {
                     return null;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 07/10: ISIS-1742: deletes unused implementations of CollectionXxxFacets for the now-deleted annotations.

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 22f36a6b81272e90d04054f3b36f82dd5d8ec81f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 12:00:04 2017 +0200

    ISIS-1742: deletes unused implementations of CollectionXxxFacets for the now-deleted annotations.
---
 ...inEventFromCollectionInteractionAnnotation.java | 45 -------------------
 ...etForPostsCollectionAddedToEventAnnotation.java | 49 ---------------------
 ...entFacetForCollectionInteractionAnnotation.java | 39 -----------------
 ...etForPostsCollectionAddedToEventAnnotation.java | 39 -----------------
 ...rPostsCollectionRemovedFromEventAnnotation.java | 39 -----------------
 ...inEventFromCollectionInteractionAnnotation.java | 45 -------------------
 ...rPostsCollectionRemovedFromEventAnnotation.java | 50 ----------------------
 .../CollectionAnnotationFacetFactoryTest.java      | 26 +++++------
 8 files changed, 10 insertions(+), 322 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation.java
deleted file mode 100644
index 9be55ef..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation.java
+++ /dev/null
@@ -1,45 +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.collection.modify;
-
-import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation
-        extends CollectionAddToFacetForDomainEventFromAbstract {
-
-    public CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation(
-            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final CollectionAddToFacet collectionAddToFacet,
-            final CollectionDomainEventFacetAbstract collectionInteractionFacet,
-            final FacetHolder holder, final ServicesInjector servicesInjector) {
-        super(eventType, getterFacet, collectionAddToFacet, collectionInteractionFacet, servicesInjector, holder);
-    }
-
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForPostsCollectionAddedToEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForPostsCollectionAddedToEventAnnotation.java
deleted file mode 100644
index 78616b9..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionAddToFacetForPostsCollectionAddedToEventAnnotation.java
+++ /dev/null
@@ -1,49 +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.collection.modify;
-
-import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class CollectionAddToFacetForPostsCollectionAddedToEventAnnotation
-        extends CollectionAddToFacetForDomainEventFromAbstract {
-
-    public CollectionAddToFacetForPostsCollectionAddedToEventAnnotation(
-            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final CollectionAddToFacet collectionAddToFacet,
-            final CollectionDomainEventFacetAbstract collectionInteractionFacet,
-            final FacetHolder holder, final ServicesInjector servicesInjector) {
-        super(eventType, getterFacet, collectionAddToFacet, collectionInteractionFacet, servicesInjector, holder);
-    }
-
-    @Override
-    protected CollectionDomainEvent<?, ?> verify(final CollectionDomainEvent<?, ?> event) {
-        return event != null && value() == event.getClass() ? event : null;
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForCollectionInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForCollectionInteractionAnnotation.java
deleted file mode 100644
index 52f2647..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForCollectionInteractionAnnotation.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.collection.modify;
-
-import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class CollectionDomainEventFacetForCollectionInteractionAnnotation extends CollectionDomainEventFacetAbstract {
-
-    public CollectionDomainEventFacetForCollectionInteractionAnnotation(
-            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
-            final ServicesInjector servicesInjector, final SpecificationLoader specificationLoader, final FacetHolder holder) {
-        super(eventType, holder, servicesInjector, specificationLoader);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForPostsCollectionAddedToEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForPostsCollectionAddedToEventAnnotation.java
deleted file mode 100644
index 4bf7844..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForPostsCollectionAddedToEventAnnotation.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.collection.modify;
-
-import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class CollectionDomainEventFacetForPostsCollectionAddedToEventAnnotation extends CollectionDomainEventFacetAbstract {
-
-    public CollectionDomainEventFacetForPostsCollectionAddedToEventAnnotation(
-            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
-            final ServicesInjector servicesInjector, final SpecificationLoader specificationLoader, final FacetHolder holder) {
-        super(eventType, holder, servicesInjector, specificationLoader);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForPostsCollectionRemovedFromEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForPostsCollectionRemovedFromEventAnnotation.java
deleted file mode 100644
index 7d7f74b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionDomainEventFacetForPostsCollectionRemovedFromEventAnnotation.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.collection.modify;
-
-import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class CollectionDomainEventFacetForPostsCollectionRemovedFromEventAnnotation extends CollectionDomainEventFacetAbstract {
-
-    public CollectionDomainEventFacetForPostsCollectionRemovedFromEventAnnotation(
-            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
-            final ServicesInjector servicesInjector, final SpecificationLoader specificationLoader, final FacetHolder holder) {
-        super(eventType, holder, servicesInjector, specificationLoader);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation.java
deleted file mode 100644
index 102f40d..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation.java
+++ /dev/null
@@ -1,45 +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.collection.modify;
-
-import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionRemoveFromFacet;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation extends
-        CollectionRemoveFromFacetForDomainEventFromAbstract {
-
-    public CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation(
-            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final CollectionRemoveFromFacet collectionRemoveFromFacet,
-            final CollectionDomainEventFacetAbstract collectionInteractionFacet,
-            final ServicesInjector servicesInjector,
-            final FacetHolder holder) {
-       super(eventType, getterFacet, collectionRemoveFromFacet, collectionInteractionFacet, servicesInjector, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation.java
deleted file mode 100644
index 07d5a17..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/modify/CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation.java
+++ /dev/null
@@ -1,50 +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.collection.modify;
-
-import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionRemoveFromFacet;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation extends
-        CollectionRemoveFromFacetForDomainEventFromAbstract {
-
-    public CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation(
-            final Class<? extends CollectionDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final CollectionRemoveFromFacet collectionRemoveFromFacet,
-            final CollectionDomainEventFacetAbstract collectionInteractionFacet,
-            final ServicesInjector servicesInjector,
-            final FacetHolder holder) {
-        super(eventType, getterFacet, collectionRemoveFromFacet, collectionInteractionFacet, servicesInjector, holder);
-    }
-
-    @Override
-    protected CollectionDomainEvent<?, ?> verify(final CollectionDomainEvent<?, ?> event) {
-        return event != null && value() == event.getClass() ? event : null;
-    }
-
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
index f79b6f4..51c827d 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactoryTest.java
@@ -26,7 +26,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.Collection;
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
@@ -45,17 +44,12 @@ import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
 import org.apache.isis.core.metamodel.facets.collections.collection.disabled.DisabledFacetForCollectionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.hidden.HiddenFacetForCollectionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromCollectionAnnotation;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForDomainEventFromDefault;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionAddToFacetForPostsCollectionAddedToEventAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacet;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacetDefault;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacetForCollectionAnnotation;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionDomainEventFacetForCollectionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForDomainEventFromDefault;
-import org.apache.isis.core.metamodel.facets.collections.collection.modify.CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.typeof.TypeOfFacetOnCollectionFromCollectionAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.collection.typeof.TypeOfFacetOnCollectionFromTypeOfAnnotation;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
@@ -200,15 +194,15 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
             // then
             final Facet addToFacet = facetedMethod.getFacet(CollectionAddToFacet.class);
             Assert.assertNotNull(addToFacet);
-            Assert.assertTrue(addToFacet instanceof CollectionAddToFacetForPostsCollectionAddedToEventAnnotation);
-            final CollectionAddToFacetForPostsCollectionAddedToEventAnnotation addToFacetImpl = (CollectionAddToFacetForPostsCollectionAddedToEventAnnotation) addToFacet;
+            Assert.assertTrue(addToFacet instanceof CollectionAddToFacetForDomainEventFromCollectionAnnotation);
+            final CollectionAddToFacetForDomainEventFromCollectionAnnotation addToFacetImpl = (CollectionAddToFacetForDomainEventFromCollectionAnnotation) addToFacet;
             assertThat(addToFacetImpl.value(), classEqualTo(Customer.OrdersAddedToOrRemovedFromDomainEvent.class));
 
             // then
             final Facet removeFromFacet = facetedMethod.getFacet(CollectionRemoveFromFacet.class);
             Assert.assertNotNull(removeFromFacet);
-            Assert.assertTrue(removeFromFacet instanceof CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation);
-            final CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation removeFromFacetImpl = (CollectionRemoveFromFacetForPostsCollectionRemovedFromEventAnnotation) removeFromFacet;
+            Assert.assertTrue(removeFromFacet instanceof CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation);
+            final CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation removeFromFacetImpl = (CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation) removeFromFacet;
             assertThat(removeFromFacetImpl.value(), classEqualTo(Customer.OrdersAddedToOrRemovedFromDomainEvent.class));
         }
 
@@ -249,22 +243,22 @@ public class CollectionAnnotationFacetFactoryTest extends AbstractFacetFactoryJU
             // then
             final Facet domainEventFacet = facetedMethod.getFacet(CollectionDomainEventFacet.class);
             Assert.assertNotNull(domainEventFacet);
-            Assert.assertTrue(domainEventFacet instanceof CollectionDomainEventFacetForCollectionInteractionAnnotation);
-            final CollectionDomainEventFacetForCollectionInteractionAnnotation domainEventFacetImpl = (CollectionDomainEventFacetForCollectionInteractionAnnotation) domainEventFacet;
+            Assert.assertTrue(domainEventFacet instanceof CollectionDomainEventFacetForCollectionAnnotation);
+            final CollectionDomainEventFacetForCollectionAnnotation domainEventFacetImpl = (CollectionDomainEventFacetForCollectionAnnotation) domainEventFacet;
             assertThat(domainEventFacetImpl.value(), classEqualTo(Customer.OrdersChangedDomainEvent.class));
 
             // then
             final Facet addToFacet = facetedMethod.getFacet(CollectionAddToFacet.class);
             Assert.assertNotNull(addToFacet);
-            Assert.assertTrue(addToFacet instanceof CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation);
-            final CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation addToFacetImpl = (CollectionAddToFacetForDomainEventFromCollectionInteractionAnnotation) addToFacet;
+            Assert.assertTrue(addToFacet instanceof CollectionAddToFacetForDomainEventFromCollectionAnnotation);
+            final CollectionAddToFacetForDomainEventFromCollectionAnnotation addToFacetImpl = (CollectionAddToFacetForDomainEventFromCollectionAnnotation) addToFacet;
             assertThat(addToFacetImpl.value(), classEqualTo(Customer.OrdersChangedDomainEvent.class));
 
             // then
             final Facet removeFromFacet = facetedMethod.getFacet(CollectionRemoveFromFacet.class);
             Assert.assertNotNull(removeFromFacet);
-            Assert.assertTrue(removeFromFacet instanceof CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation);
-            final CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation removeFromFacetImpl = (CollectionRemoveFromFacetForDomainEventFromCollectionInteractionAnnotation) removeFromFacet;
+            Assert.assertTrue(removeFromFacet instanceof CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation);
+            final CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation removeFromFacetImpl = (CollectionRemoveFromFacetForDomainEventFromCollectionAnnotation) removeFromFacet;
             assertThat(removeFromFacetImpl.value(), classEqualTo(Customer.OrdersChangedDomainEvent.class));
         }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 03/10: ISIS-1742: removes N-arg constructors from ActionDomainEvent

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 759615085062be7ecfb7d1dc09288feabb52839c
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 11:24:07 2017 +0200

    ISIS-1742: removes N-arg constructors from ActionDomainEvent
---
 .../services/eventbus/ActionDomainEvent.java       | 47 +---------------------
 ...nEventHelperTest_newActionInteractionEvent.java |  6 ---
 .../action/ActionAnnotationFacetFactoryTest.java   | 15 +------
 3 files changed, 2 insertions(+), 66 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
index e127603..1e2f117 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
@@ -18,10 +18,8 @@
  */
 package org.apache.isis.applib.services.eventbus;
 
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
-import org.apache.isis.applib.Identifier;
+
 import org.apache.isis.applib.annotation.ActionSemantics;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.services.command.Command;
@@ -67,8 +65,6 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
     //endregion
 
 
-    //region > constructors
-
     /**
      * If used then the framework will set state via (non-API) setters.
      *
@@ -79,47 +75,6 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
     public ActionDomainEvent() {
     }
 
-    /**
-     * @deprecated - the {@link #ActionDomainEvent() no-arg constructor} is recommended instead, to reduce boilerplate.
-     */
-    @Deprecated
-    public ActionDomainEvent(
-            final S source,
-            final Identifier identifier) {
-        super(source, identifier);
-    }
-
-    /**
-     * @deprecated - the {@link #ActionDomainEvent() no-arg constructor} is recommended instead, to reduce boilerplate.
-     */
-    @Deprecated
-    public ActionDomainEvent(
-            final S source,
-            final Identifier identifier,
-            final Object... arguments) {
-        this(source, identifier,
-                asList(arguments));
-    }
-
-    private static List<Object> asList(final Object[] arguments) {
-        return arguments != null
-                ? Arrays.asList(arguments)
-                : Collections.emptyList();
-    }
-
-    /**
-     * @deprecated - the {@link #ActionDomainEvent() no-arg constructor} is recommended instead, to reduce boilerplate.
-     */
-    @Deprecated
-    public ActionDomainEvent(
-            final S source,
-            final Identifier identifier,
-            final List<Object> arguments) {
-        this(source, identifier);
-        this.arguments = Collections.unmodifiableList(arguments);
-    }
-    //endregion
-
     //region > command
     private Command command;
 
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
index 959a554..7831447 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
@@ -34,12 +34,6 @@ public class DomainEventHelperTest_newActionInteractionEvent {
     
     public static class SomeDomainObjectFooInvokedDomainEvent extends ActionDomainEvent<SomeDomainObject> {
         private static final long serialVersionUID = 1L;
-        public SomeDomainObjectFooInvokedDomainEvent(
-                final SomeDomainObject source,
-                final Identifier identifier,
-                final Object... arguments) {
-            super(source, identifier, arguments);
-        }
     }
     
     @Test
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 4233f26..2479b0c 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -175,14 +175,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
 
             class Customer {
 
-                class SomeActionInvokedDomainEvent extends ActionDomainEvent<Customer> {
-                    public SomeActionInvokedDomainEvent(
-                            final Customer source,
-                            final Identifier identifier,
-                            final Object... arguments) {
-                        super(source, identifier, arguments);
-                    }
-                }
+                class SomeActionInvokedDomainEvent extends ActionDomainEvent<Customer> { }
 
                 @Action(domainEvent = SomeActionInvokedDomainEvent.class)
                 public void someAction() {
@@ -266,12 +259,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             class Customer {
 
                 class SomeActionInvokedDomainEvent extends ActionDomainEvent<Customer> {
-                    public SomeActionInvokedDomainEvent(
-                            final Customer source,
-                            final Identifier identifier,
-                            final Object... arguments) {
-                        super(source, identifier, arguments);
-                    }
                 }
 
                 @Action(domainEvent= SomeActionInvokedDomainEvent.class)

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 01/10: ISIS-1742: removes AbstractInteractionEvent

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 58fc83f5081977385481a2f3844e5f813a2e287d
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 10:59:27 2017 +0200

    ISIS-1742: removes AbstractInteractionEvent
---
 .../_rgsvc_core-domain-api_FactoryService.adoc     |   8 +-
 .../org/apache/isis/applib/IsisApplibModule.java   |  22 ----
 .../services/eventbus/AbstractDomainEvent.java     |   3 +
 .../eventbus/AbstractInteractionEvent.java         | 113 ---------------------
 .../services/eventbus/ActionDomainEvent.java       |   6 +-
 .../services/eventbus/CollectionDomainEvent.java   |  14 +--
 .../services/eventbus/PropertyDomainEvent.java     |   2 +-
 .../core/metamodel/facets/DomainEventHelper.java   |   4 -
 8 files changed, 18 insertions(+), 154 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_FactoryService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_FactoryService.adoc
index b2b5c67..41554c6 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_FactoryService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_FactoryService.adoc
@@ -20,12 +20,12 @@ The API of `FactoryService` is:
 [source,java]
 ----
 public interface FactoryService {
-    <T> T instantiate(final Class<T> ofType);       // <1>
-    <T> T mixin();                                  // <2>
+    <T> T instantiate(Class<T> domainClass);           // <1>
+    <T> T mixin(Class<T> mixinClass, Object mixedIn);  // <2>
 }
 ----
-<1> create a new non-persisted domain entity.  Any services will be automatically injected into the service.
-<2> programmatically instantiate a mixin, as annotated with xref:../rgant/rgant.adoc#_rgant-Mixin[`@Mixin`] or xref:../rgant/rgant.adoc#_rgant-DomainObject_nature[`@DomainObject#nature()`].
+<1> create a new non-persisted domain entity.  Any services will be automatically injected into the service.  The class must have a no-arg constructor.
+<2> programmatically instantiate a mixin, eg as annotated with xref:../rgant/rgant.adoc#_rgant-Mixin[`@Mixin`].  The class must have a 1-arg constructor of the appropriate type.
 
 
 The object is created in memory, but is not persisted.  The benefits of using this method (instead of simply using the Java `new` keyword) are:
diff --git a/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java b/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
index 6209d50..4ab1232 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/IsisApplibModule.java
@@ -26,28 +26,6 @@ public final class IsisApplibModule {
 
     public abstract static class ActionDomainEvent<S> extends org.apache.isis.applib.services.eventbus.ActionDomainEvent<S> {
         public ActionDomainEvent() {}
-
-        /**
-         * @deprecated - use the {@link #ActionDomainEvent() no-arg constructor} instead to avoid boilerplate.
-         */
-        @Deprecated
-        public ActionDomainEvent(final S source, final Identifier identifier) {
-            super(source, identifier);
-        }
-        /**
-         * @deprecated - use the {@link #ActionDomainEvent() no-arg constructor} instead to avoid boilerplate.
-         */
-        @Deprecated
-        public ActionDomainEvent(final S source, final Identifier identifier, final Object... arguments) {
-            super(source, identifier, arguments);
-        }
-        /**
-         * @deprecated - use the {@link #ActionDomainEvent() no-arg constructor} instead to avoid boilerplate.
-         */
-        @Deprecated
-        public ActionDomainEvent(final S source, final Identifier identifier, final List<Object> arguments) {
-            super(source, identifier, arguments);
-        }
     }
 
     public abstract static class CollectionDomainEvent<S,T> extends org.apache.isis.applib.services.eventbus.CollectionDomainEvent<S,T> {
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java
index aa81a4b..5f56f74 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java
@@ -302,4 +302,7 @@ public abstract class AbstractDomainEvent<S> extends java.util.EventObject {
         return ObjectContracts.toString(this, "source","identifier","eventPhase");
     }
     //endregion
+
+
+
 }
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractInteractionEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractInteractionEvent.java
deleted file mode 100644
index 8e14186..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractInteractionEvent.java
+++ /dev/null
@@ -1,113 +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.applib.services.eventbus;
-
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - replaced by {@link org.apache.isis.applib.services.eventbus.AbstractDomainEvent}.
- * @param <S>
- */
-@Deprecated
-public abstract class AbstractInteractionEvent<S> extends AbstractDomainEvent<S> {
-
-    /**
-     * If used then the framework will set state via (non-API) setters.
-     */
-    public AbstractInteractionEvent() {}
-
-    public AbstractInteractionEvent(
-            final S source,
-            final Identifier identifier) {
-        super(source, identifier);
-    }
-
-
-    //region > Phase
-
-    /**
-     * @deprecated - replaced by {@link org.apache.isis.applib.services.eventbus.AbstractDomainEvent.Phase}.
-     */
-    @Deprecated
-    public enum Phase {
-        @Deprecated
-        HIDE,
-        @Deprecated
-        DISABLE,
-        @Deprecated
-        VALIDATE,
-        @Deprecated
-        EXECUTING,
-        @Deprecated
-        EXECUTED;
-
-        @Deprecated
-        public static Phase from(final AbstractDomainEvent.Phase phase) {
-            switch (phase) {
-                case HIDE:
-                    return AbstractInteractionEvent.Phase.HIDE;
-                case DISABLE:
-                    return AbstractInteractionEvent.Phase.DISABLE;
-                case VALIDATE:
-                    return AbstractInteractionEvent.Phase.VALIDATE;
-                case EXECUTING:
-                    return AbstractInteractionEvent.Phase.EXECUTING;
-                case EXECUTED:
-                    return AbstractInteractionEvent.Phase.EXECUTED;
-            }
-            throw new IllegalArgumentException(String.format("Phase '%s' not recognized", phase));
-        }
-
-        @Deprecated
-        public static AbstractDomainEvent.Phase from(final Phase phase) {
-            switch (phase) {
-                case HIDE:
-                    return AbstractDomainEvent.Phase.HIDE;
-                case DISABLE:
-                    return AbstractDomainEvent.Phase.DISABLE;
-                case VALIDATE:
-                    return AbstractDomainEvent.Phase.VALIDATE;
-                case EXECUTING:
-                    return AbstractDomainEvent.Phase.EXECUTING;
-                case EXECUTED:
-                    return AbstractDomainEvent.Phase.EXECUTED;
-            }
-            throw new IllegalArgumentException(String.format("Phase '%s' not recognized", phase));
-        }
-    }
-
-
-    /**
-     * @deprecated - use {@link #getEventPhase()} instead.
-     */
-    @Deprecated
-    public Phase getPhase() {
-        return Phase.from(getEventPhase());
-    }
-
-    /**
-     * Not API, set by the framework.
-     */
-    @Deprecated
-    public void setPhase(Phase phase) {
-        setEventPhase(Phase.from(phase));
-    }
-    //endregion
-
-}
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
index 1ff72cf..1129c4f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
@@ -28,7 +28,7 @@ import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.CommandContext;
 import org.apache.isis.applib.util.ObjectContracts;
 
-public abstract class ActionDomainEvent<S> extends AbstractInteractionEvent<S> {
+public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
 
     private static final long serialVersionUID = 1L;
 
@@ -213,8 +213,8 @@ public abstract class ActionDomainEvent<S> extends AbstractInteractionEvent<S> {
     //region > arguments
     private List<Object> arguments;
     /**
-     * The arguments being used to invoke the action; populated at {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#VALIDATE} and subsequent phases
-     * (but null for {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#HIDE hidden} and {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#DISABLE disable} phases).
+     * The arguments being used to invoke the action; populated at {@link Phase#VALIDATE} and subsequent phases
+     * (but null for {@link Phase#HIDE hidden} and {@link Phase#DISABLE disable} phases).
      */
     public List<Object> getArguments() {
         return arguments;
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
index 3820112..15102f7 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
@@ -21,7 +21,7 @@ package org.apache.isis.applib.services.eventbus;
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.util.ObjectContracts;
 
-public abstract class CollectionDomainEvent<S,T> extends AbstractInteractionEvent<S> {
+public abstract class CollectionDomainEvent<S,T> extends AbstractDomainEvent<S> {
 
     private static final long serialVersionUID = 1L;
 
@@ -129,20 +129,20 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractInteractionEven
     public static enum Of {
         /**
          * The collection is being accessed
-         * ({@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#HIDE hide} and
-         * {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#DISABLE disable}) checks.
+         * ({@link Phase#HIDE hide} and
+         * {@link Phase#DISABLE disable}) checks.
          */
         ACCESS,
         /**
          * The collection is being added to
-         * ({@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#VALIDATE validity} check and
-         * {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#EXECUTED execution}).
+         * ({@link Phase#VALIDATE validity} check and
+         * {@link Phase#EXECUTED execution}).
          */
         ADD_TO,
         /**
          * The collection is being removed from
-         * ({@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#VALIDATE validity} check and
-         * {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#EXECUTED execution}).
+         * ({@link Phase#VALIDATE validity} check and
+         * {@link Phase#EXECUTED execution}).
          */
         REMOVE_FROM
     }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
index a42226f..f12bb56 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
@@ -21,7 +21,7 @@ package org.apache.isis.applib.services.eventbus;
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.util.ObjectContracts;
 
-public abstract class PropertyDomainEvent<S,T> extends AbstractInteractionEvent<S> {
+public abstract class PropertyDomainEvent<S,T> extends AbstractDomainEvent<S> {
 
     private static final long serialVersionUID = 1L;
 
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 772844c..2e2dd3b 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
@@ -34,7 +34,6 @@ import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.Command2;
 import org.apache.isis.applib.services.command.Command3;
 import org.apache.isis.applib.services.eventbus.AbstractDomainEvent;
-import org.apache.isis.applib.services.eventbus.AbstractInteractionEvent;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
 import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
@@ -98,7 +97,6 @@ public class DomainEventHelper {
             }
 
             event.setEventPhase(phase);
-            event.setPhase(AbstractInteractionEvent.Phase.from(phase));
 
             if(phase.isExecuted()) {
                 event.setReturnValue(ObjectAdapter.Util.unwrap(resultAdapter));
@@ -209,7 +207,6 @@ public class DomainEventHelper {
             }
 
             event.setEventPhase(phase);
-            event.setPhase(AbstractInteractionEvent.Phase.from(phase));
 
             // just in case the actual new value held by the object is different from that applied
             setEventNewValue(event, newValue);
@@ -298,7 +295,6 @@ public class DomainEventHelper {
             }
 
             event.setEventPhase(phase);
-            event.setPhase(AbstractInteractionEvent.Phase.from(phase));
 
             getEventBusService().post(event);
             return event;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 08/10: ISIS-1742: deletes implementations of ActionInvocationFacetXxx for the now-deleted @ActionInteraction and @PostsActionInvokedEvent annotations.

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit f01639fdd580f8e1ace736dda93bb24fbd83e6be
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 12:02:24 2017 +0200

    ISIS-1742: deletes implementations of ActionInvocationFacetXxx for the now-deleted @ActionInteraction and @PostsActionInvokedEvent annotations.
---
 ...inEventFacetForActionInteractionAnnotation.java | 37 ---------------
 ...tFacetForPostsActionInvokedEventAnnotation.java | 37 ---------------
 ...DomainEventFromActionInteractionAnnotation.java | 46 ------------------
 ...nFacetForPostsActionInvokedEventAnnotation.java | 55 ----------------------
 .../action/ActionAnnotationFacetFactoryTest.java   | 15 +++---
 5 files changed, 6 insertions(+), 184 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionDomainEventFacetForActionInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionDomainEventFacetForActionInteractionAnnotation.java
deleted file mode 100644
index a3b3f27..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionDomainEventFacetForActionInteractionAnnotation.java
+++ /dev/null
@@ -1,37 +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.actions.action.invocation;
-
-import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-
-@Deprecated
-public class ActionDomainEventFacetForActionInteractionAnnotation extends ActionDomainEventFacetAbstract {
-
-    @Deprecated
-    public ActionDomainEventFacetForActionInteractionAnnotation(
-            final Class<? extends ActionDomainEvent<?>> eventType,
-            final ServicesInjector servicesInjector, final SpecificationLoader specificationLoader, final FacetHolder holder) {
-        super(eventType, holder, servicesInjector, specificationLoader);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionDomainEventFacetForPostsActionInvokedEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionDomainEventFacetForPostsActionInvokedEventAnnotation.java
deleted file mode 100644
index 611e2b7..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionDomainEventFacetForPostsActionInvokedEventAnnotation.java
+++ /dev/null
@@ -1,37 +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.actions.action.invocation;
-
-import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-
-@Deprecated
-public class ActionDomainEventFacetForPostsActionInvokedEventAnnotation extends ActionDomainEventFacetAbstract {
-
-    @Deprecated
-    public ActionDomainEventFacetForPostsActionInvokedEventAnnotation(
-            final Class<? extends ActionDomainEvent<?>> eventType,
-            final ServicesInjector servicesInjector, final SpecificationLoader specificationLoader, final FacetHolder holder) {
-        super(eventType, holder, servicesInjector, specificationLoader);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventFromActionInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventFromActionInteractionAnnotation.java
deleted file mode 100644
index e4875e5..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventFromActionInteractionAnnotation.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.actions.action.invocation;
-
-import java.lang.reflect.Method;
-
-import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class ActionInvocationFacetForDomainEventFromActionInteractionAnnotation
-        extends ActionInvocationFacetForDomainEventAbstract {
-
-    public ActionInvocationFacetForDomainEventFromActionInteractionAnnotation(
-            final Class<? extends ActionDomainEvent<?>> eventType,
-            final Method method,
-            final ObjectSpecification onType,
-            final ObjectSpecification returnType,
-            final FacetHolder holder,
-            final ServicesInjector servicesInjector) {
-        super(eventType, method, onType, returnType, holder, servicesInjector
-        );
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForPostsActionInvokedEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForPostsActionInvokedEventAnnotation.java
deleted file mode 100644
index a2c0741..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForPostsActionInvokedEventAnnotation.java
+++ /dev/null
@@ -1,55 +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.actions.action.invocation;
-
-import java.lang.reflect.Method;
-
-import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class ActionInvocationFacetForPostsActionInvokedEventAnnotation
-        extends ActionInvocationFacetForDomainEventAbstract {
-
-    public ActionInvocationFacetForPostsActionInvokedEventAnnotation(
-            final Class<? extends ActionDomainEvent<?>> eventType,
-            final Method method,
-            final ObjectSpecification onType,
-            final ObjectSpecification returnType,
-            final FacetHolder holder,
-            final ServicesInjector servicesInjector) {
-        super(eventType, method, onType, returnType, holder,
-                servicesInjector
-        );
-    }
-
-    @Override
-    protected ActionDomainEvent<?> verify(final ActionDomainEvent<?> event) {
-        // will discard event if different type to that specified in the PostsActionInvokedEvent annotation
-        // (that is, if the ActionDomainEventFacetDefault was installed by virtue of a no @Action or @ActionInteraction annotation)
-        return event != null && getEventType() == event.getClass() ? event : null;
-    }
-
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 2479b0c..26fb44f 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -65,12 +65,9 @@ import org.apache.isis.core.metamodel.facets.actions.action.hidden.HiddenFacetFo
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacet;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetDefault;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetForActionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacet;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromActionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromDefault;
-import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForPostsActionInvokedEventAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForPublishedActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetFromConfiguration;
@@ -209,8 +206,8 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
 
             final Facet invocationFacet = facetedMethod.getFacet(ActionInvocationFacet.class);
             Assert.assertNotNull(invocationFacet);
-            Assert.assertTrue(invocationFacet instanceof ActionInvocationFacetForPostsActionInvokedEventAnnotation);
-            final ActionInvocationFacetForPostsActionInvokedEventAnnotation invocationFacetImpl = (ActionInvocationFacetForPostsActionInvokedEventAnnotation) invocationFacet;
+            Assert.assertTrue(invocationFacet instanceof ActionInvocationFacetForDomainEventFromActionAnnotation);
+            final ActionInvocationFacetForDomainEventFromActionAnnotation invocationFacetImpl = (ActionInvocationFacetForDomainEventFromActionAnnotation) invocationFacet;
             assertThat(invocationFacetImpl.getEventType(), classEqualTo(Customer.SomeActionInvokedDomainEvent.class));
         }
 
@@ -242,14 +239,14 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             // then
             final Facet domainEventFacet = facetedMethod.getFacet(ActionDomainEventFacet.class);
             Assert.assertNotNull(domainEventFacet);
-            Assert.assertTrue(domainEventFacet instanceof ActionDomainEventFacetForActionInteractionAnnotation);
-            final ActionDomainEventFacetForActionInteractionAnnotation domainEventFacetImpl = (ActionDomainEventFacetForActionInteractionAnnotation) domainEventFacet;
+            Assert.assertTrue(domainEventFacet instanceof ActionDomainEventFacetForActionAnnotation);
+            final ActionDomainEventFacetForActionAnnotation domainEventFacetImpl = (ActionDomainEventFacetForActionAnnotation) domainEventFacet;
             assertThat(domainEventFacetImpl.getEventType(), classEqualTo(Customer.SomeActionInvokedDomainEvent.class));
 
             final Facet invocationFacet = facetedMethod.getFacet(ActionInvocationFacet.class);
             Assert.assertNotNull(invocationFacet);
-            Assert.assertTrue(invocationFacet instanceof ActionInvocationFacetForDomainEventFromActionInteractionAnnotation);
-            final ActionInvocationFacetForDomainEventFromActionInteractionAnnotation invocationFacetImpl = (ActionInvocationFacetForDomainEventFromActionInteractionAnnotation) invocationFacet;
+            Assert.assertTrue(invocationFacet instanceof ActionDomainEventFacetForActionAnnotation);
+            final ActionDomainEventFacetForActionAnnotation invocationFacetImpl = (ActionDomainEventFacetForActionAnnotation) invocationFacet;
             assertThat(invocationFacetImpl.getEventType(), classEqualTo(Customer.SomeActionInvokedDomainEvent.class));
         }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 05/10: ISIS-1742: deletes @PropertyInteaction annotation and other related event classes.

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 24a3d8bedac6f02afaea3422af1a3c9bda6a0631
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 11:41:21 2017 +0200

    ISIS-1742: deletes @PropertyInteaction annotation and other related event classes.
---
 .../annotation/PostsPropertyChangedEvent.java      | 36 ----------------------
 .../applib/annotation/PropertyInteraction.java     | 36 ----------------------
 .../property/PropertyAnnotationFacetFactory.java   |  8 -----
 ...tySetterOrClearFacetForDomainEventAbstract.java |  9 +++---
 4 files changed, 5 insertions(+), 84 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsPropertyChangedEvent.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsPropertyChangedEvent.java
deleted file mode 100644
index afd4585..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsPropertyChangedEvent.java
+++ /dev/null
@@ -1,36 +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.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @deprecated - use instead {@link org.apache.isis.applib.annotation.Property#domainEvent()}.
- */
-@Deprecated
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD})
-public @interface PostsPropertyChangedEvent {
-
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyInteraction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyInteraction.java
deleted file mode 100644
index 38c15df..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyInteraction.java
+++ /dev/null
@@ -1,36 +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.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @deprecated - use {@link Property#domainEvent()} instead.
- */
-@Deprecated
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD})
-public @interface PropertyInteraction {
-
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index 7c590ed..0f3f54c 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@ -30,9 +30,7 @@ import org.apache.isis.applib.annotation.MaxLength;
 import org.apache.isis.applib.annotation.MustSatisfy;
 import org.apache.isis.applib.annotation.NotPersisted;
 import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.PostsPropertyChangedEvent;
 import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyInteraction;
 import org.apache.isis.applib.annotation.RegEx;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
@@ -92,8 +90,6 @@ import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner {
 
-    private final MetaModelValidatorForDeprecatedAnnotation postsPropertyChangedEventValidator = new MetaModelValidatorForDeprecatedAnnotation(PostsPropertyChangedEvent.class);
-    private final MetaModelValidatorForDeprecatedAnnotation propertyInteractionValidator = new MetaModelValidatorForDeprecatedAnnotation(PropertyInteraction.class);
     private final MetaModelValidatorForDeprecatedAnnotation regexValidator = new MetaModelValidatorForDeprecatedAnnotation(RegEx.class);
     private final MetaModelValidatorForDeprecatedAnnotation optionalValidator = new MetaModelValidatorForDeprecatedAnnotation(Optional.class);
     private final MetaModelValidatorForDeprecatedAnnotation mandatoryValidator = new MetaModelValidatorForDeprecatedAnnotation(Mandatory.class);
@@ -425,8 +421,6 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
 
     @Override
     public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
-        metaModelValidator.add(postsPropertyChangedEventValidator);
-        metaModelValidator.add(propertyInteractionValidator);
         metaModelValidator.add(regexValidator);
         metaModelValidator.add(optionalValidator);
         metaModelValidator.add(mandatoryValidator);
@@ -446,8 +440,6 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
     public void setServicesInjector(final ServicesInjector servicesInjector) {
         super.setServicesInjector(servicesInjector);
         IsisConfiguration configuration = servicesInjector.getConfigurationServiceInternal();
-        postsPropertyChangedEventValidator.setConfiguration(configuration);
-        propertyInteractionValidator.setConfiguration(configuration);
         regexValidator.setConfiguration(configuration);
         optionalValidator.setConfiguration(configuration);
         mandatoryValidator.setConfiguration(configuration);
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java
index 789f859..8d73785 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java
@@ -19,7 +19,10 @@
 
 package org.apache.isis.core.metamodel.facets.properties.property.modify;
 
+import java.sql.Timestamp;
+
 import com.google.common.base.Objects;
+
 import org.apache.isis.applib.services.clock.ClockService;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.CommandContext;
@@ -48,8 +51,6 @@ import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.core.runtime.system.transaction.TransactionalClosure;
 import org.apache.isis.schema.ixn.v1.PropertyEditDto;
 
-import java.sql.Timestamp;
-
 public abstract class PropertySetterOrClearFacetForDomainEventAbstract
         extends SingleValueFacetAbstract<Class<? extends PropertyDomainEvent<?,?>>> {
 
@@ -316,8 +317,8 @@ public abstract class PropertySetterOrClearFacetForDomainEventAbstract
     }
 
     /**
-     * Optional hook to allow the facet implementation for the deprecated {@link org.apache.isis.applib.annotation.PostsPropertyChangedEvent} annotation
-     * to discard the event if of a different type.
+     * Optional hook to allow the facet implementation for now-deleted annotations to discard an event if incompatible.
+     * Now in effect redundant.
      */
     protected PropertyDomainEvent<?, ?> verify(PropertyDomainEvent<?, ?> event) {
         return event;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 09/10: ISIS-1742: deletes implementations of Property{Clear|Setter|Xxx}FacetXxx for the now-deleted @PropertyInteraction and @PropertyChanged annoations

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 364eafffca05363438b966eb4b061d9992203d25
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 12:06:27 2017 +0200

    ISIS-1742: deletes implementations of Property{Clear|Setter|Xxx}FacetXxx for the now-deleted @PropertyInteraction and @PropertyChanged annoations
---
 ...mainEventFromPropertyInteractionAnnotation.java | 46 -------------------
 ...acetForPostsPropertyChangedEventAnnotation.java | 53 ----------------------
 ...acetForPostsPropertyChangedEventAnnotation.java | 41 -----------------
 ...EventFacetForPropertyInteractionAnnotation.java | 41 -----------------
 ...mainEventFromPropertyInteractionAnnotation.java | 46 -------------------
 ...acetForPostsPropertyChangedEventAnnotation.java | 53 ----------------------
 .../PropertyAnnotationFacetFactoryTest.java        | 26 ++++-------
 7 files changed, 10 insertions(+), 296 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation.java
deleted file mode 100644
index 4fe6a8d..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation.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.properties.property.modify;
-
-import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation
-        extends PropertySetterOrClearFacetForDomainEventAbstract
-        implements PropertyClearFacet {
-
-
-    public PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation(
-            final Class<? extends PropertyDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final PropertyClearFacet clearFacet,
-            final PropertyDomainEventFacetAbstract propertyInteractionFacet,
-            final FacetHolder holder,
-            final ServicesInjector servicesInjector) {
-        super(PropertyClearFacet.class, eventType, getterFacet, null, clearFacet, propertyInteractionFacet, servicesInjector, holder);
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyClearFacetForPostsPropertyChangedEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyClearFacetForPostsPropertyChangedEventAnnotation.java
deleted file mode 100644
index 38c8f7b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyClearFacetForPostsPropertyChangedEventAnnotation.java
+++ /dev/null
@@ -1,53 +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.properties.property.modify;
-
-import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PropertyClearFacetForPostsPropertyChangedEventAnnotation
-        extends PropertySetterOrClearFacetForDomainEventAbstract
-        implements PropertyClearFacet {
-
-
-    public PropertyClearFacetForPostsPropertyChangedEventAnnotation(
-            final Class<? extends PropertyDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final PropertyClearFacet clearFacet,
-            final PropertyDomainEventFacetAbstract propertyInteractionFacet,
-            final FacetHolder holder,
-            final ServicesInjector servicesInjector) {
-        super(PropertyClearFacet.class, eventType, getterFacet, null, clearFacet, propertyInteractionFacet, servicesInjector, holder);
-    }
-
-    @Override
-    protected PropertyDomainEvent<?, ?> verify(final PropertyDomainEvent<?, ?> event) {
-        // will discard event if different type to that specified in the PostsPropertyChangedEvent annotation.
-        return event != null && value() == event.getClass() ? event : null;
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyDomainEventFacetForPostsPropertyChangedEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyDomainEventFacetForPostsPropertyChangedEventAnnotation.java
deleted file mode 100644
index d848833..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyDomainEventFacetForPostsPropertyChangedEventAnnotation.java
+++ /dev/null
@@ -1,41 +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.properties.property.modify;
-
-import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PropertyDomainEventFacetForPostsPropertyChangedEventAnnotation extends PropertyDomainEventFacetAbstract {
-
-    public PropertyDomainEventFacetForPostsPropertyChangedEventAnnotation(
-            final Class<? extends PropertyDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final ServicesInjector servicesInjector, final SpecificationLoader specificationLoader, final FacetHolder holder) {
-        super(eventType, getterFacet, holder, servicesInjector, specificationLoader);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyDomainEventFacetForPropertyInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyDomainEventFacetForPropertyInteractionAnnotation.java
deleted file mode 100644
index 1e49c31..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertyDomainEventFacetForPropertyInteractionAnnotation.java
+++ /dev/null
@@ -1,41 +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.properties.property.modify;
-
-import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PropertyDomainEventFacetForPropertyInteractionAnnotation extends PropertyDomainEventFacetAbstract {
-
-    public PropertyDomainEventFacetForPropertyInteractionAnnotation(
-            final Class<? extends PropertyDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final ServicesInjector servicesInjector, final SpecificationLoader specificationLoader, final FacetHolder holder) {
-        super(eventType, getterFacet, holder, servicesInjector, specificationLoader);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation.java
deleted file mode 100644
index 0f653bd..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation.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.properties.property.modify;
-
-import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.properties.update.modify.PropertySetterFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation
-        extends PropertySetterOrClearFacetForDomainEventAbstract
-        implements PropertySetterFacet {
-
-
-    public PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation(
-            final Class<? extends PropertyDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final PropertySetterFacet setterFacet,
-            final PropertyDomainEventFacetAbstract propertyInteractionFacet,
-            final FacetHolder holder,
-            final ServicesInjector servicesInjector) {
-        super(PropertySetterFacet.class, eventType, getterFacet, setterFacet, null, propertyInteractionFacet, servicesInjector, holder);
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterFacetForPostsPropertyChangedEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterFacetForPostsPropertyChangedEventAnnotation.java
deleted file mode 100644
index edb19ce..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterFacetForPostsPropertyChangedEventAnnotation.java
+++ /dev/null
@@ -1,53 +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.properties.property.modify;
-
-import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.properties.update.modify.PropertySetterFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PropertySetterFacetForPostsPropertyChangedEventAnnotation
-        extends PropertySetterOrClearFacetForDomainEventAbstract
-        implements PropertySetterFacet {
-
-
-    public PropertySetterFacetForPostsPropertyChangedEventAnnotation(
-            final Class<? extends PropertyDomainEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final PropertySetterFacet setterFacet,
-            final PropertyDomainEventFacetAbstract propertyInteractionFacet,
-            final FacetHolder holder,
-            final ServicesInjector servicesInjector) {
-        super(PropertySetterFacet.class, eventType, getterFacet, setterFacet, null, propertyInteractionFacet, servicesInjector, holder);
-    }
-
-    @Override
-    protected PropertyDomainEvent<?, ?> verify(final PropertyDomainEvent<?, ?> event) {
-        // will discard event if different type to that specified in the PostsPropertyChangedEvent annotation.
-        return event != null && value() == event.getClass() ? event : null;
-    }
-
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
index eba0126..11a670c 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactoryTest.java
@@ -29,7 +29,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.Optionality;
 import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.When;
@@ -57,16 +56,11 @@ import org.apache.isis.core.metamodel.facets.properties.property.mandatory.Manda
 import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForPostsPropertyChangedEventAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacet;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetDefault;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyDomainEventFacetForPropertyInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromDefault;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation;
-import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForPostsPropertyChangedEventAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.mustsatisfy.MustSatisfySpecificationFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.notpersisted.NotPersistedFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.regex.RegExFacetForPropertyAnnotation;
@@ -202,15 +196,15 @@ public class PropertyAnnotationFacetFactoryTest extends AbstractFacetFactoryJUni
             // then
             final Facet setterFacet = facetedMethod.getFacet(PropertySetterFacet.class);
             Assert.assertNotNull(setterFacet);
-            Assert.assertTrue(setterFacet instanceof PropertySetterFacetForPostsPropertyChangedEventAnnotation);
-            final PropertySetterFacetForPostsPropertyChangedEventAnnotation setterFacetImpl = (PropertySetterFacetForPostsPropertyChangedEventAnnotation) setterFacet;
+            Assert.assertTrue(setterFacet instanceof PropertySetterFacetForDomainEventFromPropertyAnnotation);
+            final PropertySetterFacetForDomainEventFromPropertyAnnotation setterFacetImpl = (PropertySetterFacetForDomainEventFromPropertyAnnotation) setterFacet;
             assertThat(setterFacetImpl.value(), classEqualTo(Customer.NamedChangedDomainEvent.class));
 
             // then
             final Facet clearFacet = facetedMethod.getFacet(PropertyClearFacet.class);
             Assert.assertNotNull(clearFacet);
-            Assert.assertTrue(clearFacet instanceof PropertyClearFacetForPostsPropertyChangedEventAnnotation);
-            final PropertyClearFacetForPostsPropertyChangedEventAnnotation clearFacetImpl = (PropertyClearFacetForPostsPropertyChangedEventAnnotation) clearFacet;
+            Assert.assertTrue(clearFacet instanceof PropertyClearFacetForDomainEventFromPropertyAnnotation);
+            final PropertyClearFacetForDomainEventFromPropertyAnnotation clearFacetImpl = (PropertyClearFacetForDomainEventFromPropertyAnnotation) clearFacet;
             assertThat(clearFacetImpl.value(), classEqualTo(Customer.NamedChangedDomainEvent.class));
         }
 
@@ -247,22 +241,22 @@ public class PropertyAnnotationFacetFactoryTest extends AbstractFacetFactoryJUni
             // then
             final Facet domainEventFacet = facetedMethod.getFacet(PropertyDomainEventFacet.class);
             Assert.assertNotNull(domainEventFacet);
-            Assert.assertTrue(domainEventFacet instanceof PropertyDomainEventFacetForPropertyInteractionAnnotation);
-            final PropertyDomainEventFacetForPropertyInteractionAnnotation domainEventFacetImpl = (PropertyDomainEventFacetForPropertyInteractionAnnotation) domainEventFacet;
+            Assert.assertTrue(domainEventFacet instanceof PropertyDomainEventFacetForPropertyAnnotation);
+            final PropertyDomainEventFacetForPropertyAnnotation domainEventFacetImpl = (PropertyDomainEventFacetForPropertyAnnotation) domainEventFacet;
             assertThat(domainEventFacetImpl.value(), classEqualTo(Customer.NamedChangedDomainEvent.class));
 
             // then
             final Facet setterFacet = facetedMethod.getFacet(PropertySetterFacet.class);
             Assert.assertNotNull(setterFacet);
-            Assert.assertTrue(setterFacet instanceof PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation);
-            final PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation setterFacetImpl = (PropertySetterFacetForDomainEventFromPropertyInteractionAnnotation) setterFacet;
+            Assert.assertTrue(setterFacet instanceof PropertySetterFacetForDomainEventFromPropertyAnnotation);
+            final PropertySetterFacetForDomainEventFromPropertyAnnotation setterFacetImpl = (PropertySetterFacetForDomainEventFromPropertyAnnotation) setterFacet;
             assertThat(setterFacetImpl.value(), classEqualTo(Customer.NamedChangedDomainEvent.class));
 
             // then
             final Facet clearFacet = facetedMethod.getFacet(PropertyClearFacet.class);
             Assert.assertNotNull(clearFacet);
-            Assert.assertTrue(clearFacet instanceof PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation);
-            final PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation clearFacetImpl = (PropertyClearFacetForDomainEventFromPropertyInteractionAnnotation) clearFacet;
+            Assert.assertTrue(clearFacet instanceof PropertyClearFacetForDomainEventFromPropertyAnnotation);
+            final PropertyClearFacetForDomainEventFromPropertyAnnotation clearFacetImpl = (PropertyClearFacetForDomainEventFromPropertyAnnotation) clearFacet;
             assertThat(clearFacetImpl.value(), classEqualTo(Customer.NamedChangedDomainEvent.class));
         }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 02/10: ISIS-1742: removes @ActionInteraction + related events. Also Command2 methods removed.

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 607cd2216c639e05d0c64a1a25445ebeb728cf9a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 11:21:27 2017 +0200

    ISIS-1742: removes @ActionInteraction + related events.  Also Command2 methods removed.
    
    Command2 methods replaced by equivalent in Command3 subtype.
    
    related events removed are ActionInteractionEvent, PostsActionInvokedEvent etc.
---
 .../isis/applib/annotation/ActionInteraction.java  | 42 ------------
 .../applib/annotation/PostsActionInvokedEvent.java | 44 -------------
 .../isis/applib/services/command/Command2.java     | 35 ----------
 .../applib/services/command/CommandDefault.java    | 46 +------------
 .../services/eventbus/AbstractDomainEvent.java     |  4 +-
 .../services/eventbus/ActionDomainEvent.java       | 11 +---
 .../services/eventbus/ActionInteractionEvent.java  | 77 ----------------------
 .../services/eventbus/ActionInvokedEvent.java      | 55 ----------------
 .../command/Command2ContractTestAbstract.java      | 64 +++++++++---------
 .../services/command/CommandDefaultTest.java       |  2 +-
 .../core/metamodel/facets/DomainEventHelper.java   |  6 --
 .../action/ActionAnnotationFacetFactory.java       | 49 +-------------
 ...ctionInvocationFacetForDomainEventAbstract.java |  5 +-
 ...nEventHelperTest_newActionInteractionEvent.java | 22 +++----
 .../action/ActionAnnotationFacetFactoryTest.java   | 18 ++---
 .../system/persistence/PersistenceSession.java     |  5 --
 16 files changed, 60 insertions(+), 425 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionInteraction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionInteraction.java
deleted file mode 100644
index c9e1b31..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionInteraction.java
+++ /dev/null
@@ -1,42 +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.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
-
-/**
- * @deprecated - see {@link Action#domainEvent()}.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD})
-@Deprecated
-public @interface ActionInteraction {
-
-    /**
-     * @deprecated - see {@link Action#domainEvent()}.
-     */
-    @Deprecated
-    Class<? extends ActionInteractionEvent<?>> value() default ActionInteractionEvent.Default.class;
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsActionInvokedEvent.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsActionInvokedEvent.java
deleted file mode 100644
index 67daa9a..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PostsActionInvokedEvent.java
+++ /dev/null
@@ -1,44 +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.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import org.apache.isis.applib.services.eventbus.ActionInvokedEvent;
-
-/**
- * @deprecated - use instead {@link org.apache.isis.applib.annotation.Action#domainEvent()}.
- */
-@Deprecated
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD})
-public @interface PostsActionInvokedEvent {
-
-    /**
-     * The subclass of {@link ActionInvokedEvent} to be instantiated and posted.
-     * 
-     * <p>
-     * This subclass must provide a no-arg constructor; the fields are set reflectively.
-     */
-    Class<? extends ActionInvokedEvent<?>> value() default ActionInvokedEvent.Default.class;
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
index 77bdc69..8944e55 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
@@ -16,10 +16,6 @@
  */
 package org.apache.isis.applib.services.command;
 
-import java.util.List;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
-import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.iactn.InteractionContext;
 
 /**
@@ -28,36 +24,5 @@ import org.apache.isis.applib.services.iactn.InteractionContext;
 @Deprecated
 public interface Command2 extends Command {
 
-    /**
-     * @deprecated - use {@link Interaction#getCurrentExecution()}, {@link Interaction#getPriorExecution()}  and {@link Interaction#getExecutions()} instead.  NB: this method will in any case throw an exception if the most recently pushed event was a {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent} but not a {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent}
-     */
-    @Programmatic
-    @Deprecated
-    ActionInteractionEvent<?> peekActionInteractionEvent();
-
-    /**
-     * <b>NOT API</b>: intended to be called only by the framework.
-     *
-     * @deprecated - replaced by equivalent functionality in {@link Interaction}.
-     */
-    @Deprecated
-    @Programmatic
-    void pushActionInteractionEvent(ActionInteractionEvent<?> event);
-
-    /**
-     * <b>NOT API</b>: intended to be called only by the framework.
-     *
-     * @deprecated - replaced by equivalent functionality in {@link Interaction}.  NB: this method will in any case throw an exception if the most recently pushed event was a {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent} but not a {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent}
-     */
-    @Deprecated
-    @Programmatic
-    ActionInteractionEvent<?> popActionInteractionEvent();
-
-    /**
-     * @deprecated - use {@link Interaction#getCurrentExecution()}, {@link Interaction#getPriorExecution()}  and {@link Interaction#getExecutions()} instead.  NB: this method will in any case throw an exception if any of the list are {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent} but not a {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent}
-     */
-    @Deprecated
-    @Programmatic
-    List<ActionInteractionEvent<?>> flushActionInteractionEvents();
 
 }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/CommandDefault.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/CommandDefault.java
index 48cc7cd..b5b2e7b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/CommandDefault.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/CommandDefault.java
@@ -23,14 +23,15 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.atomic.AtomicInteger;
+
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+
 import org.apache.isis.applib.annotation.Command.ExecuteIn;
 import org.apache.isis.applib.annotation.Command.Persistence;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
 import org.apache.isis.applib.util.ObjectContracts;
 
 public class CommandDefault implements Command3 {
@@ -185,49 +186,6 @@ public class CommandDefault implements Command3 {
 
     //endregion
 
-    //region > actionInteractionEvent (peek/pop/flush)
-
-    @Deprecated
-    @Override
-    public ActionInteractionEvent<?> peekActionInteractionEvent() {
-        final ActionDomainEvent<?> actionDomainEvent = peekActionDomainEvent();
-        if (actionDomainEvent != null && !(actionDomainEvent instanceof ActionInteractionEvent)) {
-            throw new IllegalStateException("Most recently pushed event was not an instance of ActionInteractionEvent; use either ActionDomainEvent or the (deprecated) ActionInteractionEvent consistently");
-        }
-        return (ActionInteractionEvent<?>) actionDomainEvent;
-    }
-
-    @Deprecated
-    @Override
-    public void pushActionInteractionEvent(ActionInteractionEvent<?> event) {
-        pushActionDomainEvent(event);
-    }
-
-    @Deprecated
-    @Override
-    public ActionInteractionEvent popActionInteractionEvent() {
-        final ActionDomainEvent<?> actionDomainEvent = popActionDomainEvent();
-        if (actionDomainEvent != null  && !(actionDomainEvent instanceof ActionInteractionEvent)) {
-            throw new IllegalStateException("Most recently pushed event was not an instance of ActionInteractionEvent; use either ActionDomainEvent or the (deprecated) ActionInteractionEvent consistently");
-        }
-        return (ActionInteractionEvent<?>) actionDomainEvent;
-    }
-
-    @Deprecated
-    @Programmatic
-    public List<ActionInteractionEvent<?>> flushActionInteractionEvents() {
-        final List<ActionDomainEvent<?>> actionDomainEvents = flushActionDomainEvents();
-        for (ActionDomainEvent<?> actionDomainEvent : actionDomainEvents) {
-            if (!(actionDomainEvent instanceof ActionInteractionEvent)) {
-                throw new IllegalStateException("List of events includes at least one event that is not an instance of ActionInteractionEvent; use either ActionDomainEvent or the (deprecated) ActionInteractionEvent consistently");
-            }
-        }
-        return (List)actionDomainEvents;
-    }
-
-
-    //endregion
-
     //region > actionDomainEvent (peek/pop/flush)
 
     private final LinkedList<ActionDomainEvent<?>> actionDomainEvents = Lists.newLinkedList();
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java
index 5f56f74..e5728cd 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/AbstractDomainEvent.java
@@ -70,8 +70,8 @@ public abstract class AbstractDomainEvent<S> extends java.util.EventObject {
         }
 
         /**
-         * When the {@link org.apache.isis.applib.services.command.Command} is made available on the {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent}
-         * via {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent#getCommand()}.
+         * When the {@link org.apache.isis.applib.services.command.Command} is made available on the {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent}
+         * via {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent#getCommand()}.
          */
         public boolean isExecutingOrLater() {
             return isExecuting() || isExecuted();
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
index 1129c4f..e127603 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
@@ -39,13 +39,8 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
      * raises an event or not depends upon the "isis.reflector.facet.actionAnnotation.domainEvent.postForDefault"
      * configuration property.
      */
-    public static class Default extends ActionInteractionEvent<Object> {
+    public static class Default extends ActionDomainEvent<Object> {
         private static final long serialVersionUID = 1L;
-        public Default(){}
-        @Deprecated
-        public Default(Object source, Identifier identifier, Object... arguments) {
-            super(source, identifier, arguments);
-        }
     }
     //endregion
 
@@ -55,7 +50,7 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
      * 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 ActionInteractionEvent<Object> {
+    public static class Noop extends ActionDomainEvent<Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
@@ -66,7 +61,7 @@ public abstract class ActionDomainEvent<S> extends AbstractDomainEvent<S> {
      * 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 ActionInteractionEvent<Object> {
+    public static class Doop extends ActionDomainEvent<Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java
deleted file mode 100644
index 05d6621..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java
+++ /dev/null
@@ -1,77 +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.applib.services.eventbus;
-
-import java.util.List;
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - use {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent} instead.
- */
-@Deprecated
-public abstract class ActionInteractionEvent<S> extends ActionDomainEvent<S> {
-
-    private static final long serialVersionUID = 1L;
-
-    //region > Default class
-
-    /**
-     * @deprecated - use {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent.Default} instead.
-     */
-    @Deprecated
-    public static class Default extends ActionDomainEvent.Default {
-        private static final long serialVersionUID = 1L;
-        public Default() {}
-        @Deprecated
-        public Default(Object source, Identifier identifier, Object... arguments) {
-            super(source, identifier, arguments);
-        }
-    }
-    //endregion
-
-    //region > constructors
-
-    public ActionInteractionEvent(){}
-
-    @Deprecated
-    public ActionInteractionEvent(
-            final S source,
-            final Identifier identifier) {
-        super(source, identifier);
-    }
-
-    @Deprecated
-    public ActionInteractionEvent(
-            final S source,
-            final Identifier identifier,
-            final Object... arguments) {
-        super(source, identifier, arguments);
-    }
-
-    @Deprecated
-    public ActionInteractionEvent(
-            final S source,
-            final Identifier identifier,
-            final List<Object> arguments) {
-        super(source, identifier, arguments);
-    }
-    //endregion
-
-
-}
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInvokedEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInvokedEvent.java
deleted file mode 100644
index 9e24593..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInvokedEvent.java
+++ /dev/null
@@ -1,55 +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.applib.services.eventbus;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import org.apache.isis.applib.Identifier;
-
-/**
- * @deprecated - use instead {@link ActionInteractionEvent}
- */
-@Deprecated
-public abstract class ActionInvokedEvent<S> extends ActionInteractionEvent<S> {
-    
-    private static final long serialVersionUID = 1L;
-
-    @Deprecated
-    public static class Default extends ActionInvokedEvent<Object> {
-        private static final long serialVersionUID = 1L;
-        public Default(Object source, Identifier identifier, Object... arguments) {
-            super(source, identifier, arguments);
-        }
-    }
-
-    public ActionInvokedEvent(
-            final S source, 
-            final Identifier identifier, 
-            final Object... arguments) {
-        this(source, identifier, arguments != null? Arrays.asList(arguments): Collections.emptyList());
-    }
-    
-    public ActionInvokedEvent(
-            final S source, 
-            final Identifier identifier, 
-            final List<Object> arguments) {
-        super(source, identifier, arguments);
-    }
-}
\ No newline at end of file
diff --git a/core/applib/src/test/java/org/apache/isis/applib/services/command/Command2ContractTestAbstract.java b/core/applib/src/test/java/org/apache/isis/applib/services/command/Command2ContractTestAbstract.java
index 83948ab..daadc0f 100644
--- a/core/applib/src/test/java/org/apache/isis/applib/services/command/Command2ContractTestAbstract.java
+++ b/core/applib/src/test/java/org/apache/isis/applib/services/command/Command2ContractTestAbstract.java
@@ -19,90 +19,94 @@
 package org.apache.isis.applib.services.command;
 
 import java.util.List;
+
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
+
+import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 
 public abstract class Command2ContractTestAbstract {
 
-    Command2 command;
+    Command3 command;
 
-    ActionInteractionEvent<?> ev1;
-    ActionInteractionEvent<?> ev2;
+    ActionDomainEvent<Object> ev1;
+    ActionDomainEvent<Object> ev2;
 
     @Before
     public void setUp() throws Exception {
 
         final Object source = new Object();
-        ev1 = new ActionInteractionEvent.Default(source, null);
-        ev2 = new ActionInteractionEvent.Default(source, null);
+        ev1 = new ActionDomainEvent.Default();
+        ev1.setSource(source);
+        ev2 = new ActionDomainEvent.Default();
+        ev2.setSource(source);
         command = newCommand();
     }
 
-    protected abstract Command2 newCommand();
+    protected abstract Command3 newCommand();
 
     @Test
     public void givenEmpty() throws Exception {
         // then
-        assertNull(command.peekActionInteractionEvent());
-        assertNull(command.popActionInteractionEvent());
+        assertNull(command.peekActionDomainEvent());
+        assertNull(command.popActionDomainEvent());
     }
 
     @Test
     public void givenOne() throws Exception {
         // given
-        command.pushActionInteractionEvent(ev1);
+        command.pushActionDomainEvent(ev1);
 
         // then
-        assertEquals(ev1, command.peekActionInteractionEvent());
+        assertEquals(ev1, command.peekActionDomainEvent());
 
         // and when
-        assertEquals(ev1, command.popActionInteractionEvent());
+        assertEquals(ev1, command.popActionDomainEvent());
 
         // then
-        assertNull(command.peekActionInteractionEvent());
+        assertNull(command.peekActionDomainEvent());
     }
 
     @Test
     public void givenTwo() throws Exception {
         // given
-        command.pushActionInteractionEvent(ev1);
-        command.pushActionInteractionEvent(ev2);
+        command.pushActionDomainEvent(ev1);
+        command.pushActionDomainEvent(ev2);
 
         // then
-        assertEquals(ev2, command.peekActionInteractionEvent());
+        assertEquals(ev2, command.peekActionDomainEvent());
 
         // and when
-        assertEquals(ev2, command.popActionInteractionEvent());
+        assertEquals(ev2, command.popActionDomainEvent());
 
         // then
-        assertEquals(ev1, command.peekActionInteractionEvent());
+        assertEquals(ev1, command.peekActionDomainEvent());
 
         // and when
-        assertEquals(ev1, command.popActionInteractionEvent());
+        assertEquals(ev1, command.popActionDomainEvent());
 
         // then
-        assertNull(command.peekActionInteractionEvent());
+        assertNull(command.peekActionDomainEvent());
     }
 
     @Test
     public void pushSame() throws Exception {
 
         // given
-        command.pushActionInteractionEvent(ev1);
-        command.pushActionInteractionEvent(ev1);
+        command.pushActionDomainEvent(ev1);
+        command.pushActionDomainEvent(ev1);
 
         // then
-        assertEquals(ev1, command.peekActionInteractionEvent());
+        assertEquals(ev1, command.peekActionDomainEvent());
 
         // and when
-        assertEquals(ev1, command.popActionInteractionEvent());
+        assertEquals(ev1, command.popActionDomainEvent());
 
         // then
-        assertNull(command.peekActionInteractionEvent());
+        assertNull(command.peekActionDomainEvent());
     }
 
 
@@ -110,19 +114,19 @@ public abstract class Command2ContractTestAbstract {
     public void clear() throws Exception {
 
         // given
-        command.pushActionInteractionEvent(ev1);
-        command.pushActionInteractionEvent(ev2);
+        command.pushActionDomainEvent(ev1);
+        command.pushActionDomainEvent(ev2);
 
         // then
-        assertEquals(ev2, command.peekActionInteractionEvent());
+        assertEquals(ev2, command.peekActionDomainEvent());
 
         // and when
-        final List<ActionInteractionEvent<?>> events = command.flushActionInteractionEvents();
+        final List<ActionDomainEvent<?>> events = command.flushActionDomainEvents();
 
         // then
         assertEquals(ev1, events.get(0));
         assertEquals(ev2, events.get(1));
-        assertNull(command.peekActionInteractionEvent());
+        assertNull(command.peekActionDomainEvent());
 
     }
 
diff --git a/core/applib/src/test/java/org/apache/isis/applib/services/command/CommandDefaultTest.java b/core/applib/src/test/java/org/apache/isis/applib/services/command/CommandDefaultTest.java
index f890dae..975a9fb 100644
--- a/core/applib/src/test/java/org/apache/isis/applib/services/command/CommandDefaultTest.java
+++ b/core/applib/src/test/java/org/apache/isis/applib/services/command/CommandDefaultTest.java
@@ -20,7 +20,7 @@ package org.apache.isis.applib.services.command;
 
 public class CommandDefaultTest extends Command2ContractTestAbstract {
 
-    protected Command2 newCommand() {
+    protected Command3 newCommand() {
         return new CommandDefault();
     }
 
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 2e2dd3b..605c827 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
@@ -31,11 +31,9 @@ import com.google.common.collect.Lists;
 import org.apache.isis.applib.FatalException;
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.services.command.Command;
-import org.apache.isis.applib.services.command.Command2;
 import org.apache.isis.applib.services.command.Command3;
 import org.apache.isis.applib.services.eventbus.AbstractDomainEvent;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
 import org.apache.isis.applib.services.eventbus.EventBusService;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
@@ -112,10 +110,6 @@ public class DomainEventHelper {
                     if(command instanceof Command3) {
                         final Command3 command3 = (Command3) command;
                         command3.pushActionDomainEvent(event);
-                    } else if(command instanceof Command2 && event instanceof ActionInteractionEvent) {
-                        final Command2 command2 = (Command3) command;
-                        final ActionInteractionEvent<?> aie = (ActionInteractionEvent<?>) event;
-                        command2.pushActionInteractionEvent(aie);
                     }
                 }
             }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
index b181bee..4153589 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
@@ -22,21 +22,18 @@ package org.apache.isis.core.metamodel.facets.actions.action;
 import java.lang.reflect.Method;
 
 import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionInteraction;
 import org.apache.isis.applib.annotation.ActionSemantics;
 import org.apache.isis.applib.annotation.Bulk;
 import org.apache.isis.applib.annotation.Command;
 import org.apache.isis.applib.annotation.Disabled;
 import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.applib.annotation.Idempotent;
-import org.apache.isis.applib.annotation.PostsActionInvokedEvent;
 import org.apache.isis.applib.annotation.Prototype;
 import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.applib.annotation.QueryOnly;
 import org.apache.isis.applib.annotation.TypeOf;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.applib.services.eventbus.ActionInvokedEvent;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
@@ -57,12 +54,9 @@ import org.apache.isis.core.metamodel.facets.actions.action.hidden.HiddenFacetFo
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetAbstract;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetDefault;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetForActionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromActionInteractionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromDefault;
-import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForPostsActionInvokedEventAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.prototype.PrototypeFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.prototype.PrototypeFacetForPrototypeAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForActionAnnotation;
@@ -92,8 +86,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
             implements MetaModelValidatorRefiner {
 
     private final MetaModelValidatorForDeprecatedAnnotation actionSemanticsValidator = new MetaModelValidatorForDeprecatedAnnotation(ActionSemantics.class);
-    private final MetaModelValidatorForDeprecatedAnnotation actionInteractionValidator = new MetaModelValidatorForDeprecatedAnnotation(ActionInteraction.class);
-    private final MetaModelValidatorForDeprecatedAnnotation postsActionInvokedEventValidator = new MetaModelValidatorForDeprecatedAnnotation(PostsActionInvokedEvent.class);
     private final MetaModelValidatorForDeprecatedAnnotation bulkValidator = new MetaModelValidatorForDeprecatedAnnotation(Bulk.class);
     private final MetaModelValidatorForDeprecatedAnnotation commandValidator = new MetaModelValidatorForDeprecatedAnnotation(Command.class);
     private final MetaModelValidatorForDeprecatedAnnotation queryOnlyValidator = new MetaModelValidatorForDeprecatedAnnotation(QueryOnly.class);
@@ -147,32 +139,15 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
             //
             // Set up ActionDomainEventFacet, which will act as the hiding/disabling/validating advisor
             //
-            final PostsActionInvokedEvent postsActionInvokedEvent = Annotations.getAnnotation(actionMethod, PostsActionInvokedEvent.class);
-            final ActionInteraction actionInteraction =Annotations.getAnnotation(actionMethod, ActionInteraction.class);
             final Action action = Annotations.getAnnotation(actionMethod, Action.class);
             final Class<? extends ActionDomainEvent<?>> actionDomainEventType;
 
             final ActionDomainEventFacetAbstract actionDomainEventFacet;
 
 
-            // can't really do this, because would result in the event being fired for the
-            // hidden/disable/validate phases, most likely breaking existing code.
 
-//            // search for @PostsActionInvoked(value=...)
-//            if(postsActionInvokedEvent != null) {
-//                actionDomainEventType = postsActionInvokedEvent.value();
-//                actionDomainEventFacet = new ActionDomainEventFacetForPostsActionInvokedEventAnnotation(
-//                        actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
-//            } else
-
-            // search for @ActionInteraction(value=...)
-            if(actionInteraction != null) {
-                actionDomainEventType = actionInteraction.value();
-                actionDomainEventFacet = new ActionDomainEventFacetForActionInteractionAnnotation(
-                        actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
-            } else
             // search for @Action(domainEvent=...)
-            if(action != null && action.domainEvent() != null) {
+            if(action != null) {
                 actionDomainEventType = action.domainEvent();
                 actionDomainEventFacet = new ActionDomainEventFacetForActionAnnotation(
                         actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
@@ -195,24 +170,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
             // emit the appropriate domain event and then delegate onto the underlying
 
             final ActionInvocationFacetForDomainEventAbstract actionInvocationFacet;
-            // deprecated
-            if (postsActionInvokedEvent != null) {
-                final Class<? extends ActionInvokedEvent<?>> actionInvokedEventType = postsActionInvokedEvent.value();
-                actionInvocationFacet = actionInteractionValidator.flagIfPresent(
-                        new ActionInvocationFacetForPostsActionInvokedEventAnnotation(
-                                actionInvokedEventType, actionMethod, typeSpec, returnSpec, holder,
-                                servicesInjector
-                        ), processMethodContext);
-            } else
-            // deprecated (but more recently)
-            if (actionInteraction != null) {
-                actionInvocationFacet = actionInteractionValidator.flagIfPresent(
-                        new ActionInvocationFacetForDomainEventFromActionInteractionAnnotation(
-                                actionDomainEventType, actionMethod, typeSpec, returnSpec, holder,
-                                servicesInjector
-                        ), processMethodContext);
-            } else
-            // current
             if (action != null) {
                 actionInvocationFacet = new ActionInvocationFacetForDomainEventFromActionAnnotation(
                         actionDomainEventType, actionMethod, typeSpec, returnSpec, holder,
@@ -457,8 +414,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
     @Override
     public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
         metaModelValidator.add(actionSemanticsValidator);
-        metaModelValidator.add(actionInteractionValidator);
-        metaModelValidator.add(postsActionInvokedEventValidator);
         metaModelValidator.add(bulkValidator);
         metaModelValidator.add(commandValidator);
         metaModelValidator.add(queryOnlyValidator);
@@ -479,8 +434,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
         final IsisConfiguration configuration = getConfiguration();
 
         actionSemanticsValidator.setConfiguration(configuration);
-        actionInteractionValidator.setConfiguration(configuration);
-        postsActionInvokedEventValidator.setConfiguration(configuration);
         bulkValidator.setConfiguration(configuration);
         commandValidator.setConfiguration(configuration);
         queryOnlyValidator.setConfiguration(configuration);
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
index 53f6e34..2092f68 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
@@ -532,9 +532,8 @@ public abstract class ActionInvocationFacetForDomainEventAbstract
 
 
     /**
-     * Optional hook to allow the facet implementation for the deprecated {@link org.apache.isis.applib.annotation.PostsActionInvokedEvent} annotation
-     * to discard the event if the domain event is of a different type (specifically if was installed by virtue of a no
-     * @{@link org.apache.isis.applib.annotation.Action} or @{@link org.apache.isis.applib.annotation.ActionInteraction} annotations.
+     * Optional hook, previously added to allow (now removed) annotations to to discard the event if the domain event
+     * was incompatible.
      */
     protected ActionDomainEvent<?> verify(final ActionDomainEvent<?> event) {
         return event;
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
index 2d69a0c..959a554 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
@@ -17,9 +17,9 @@
 package org.apache.isis.core.metamodel.facets;
 
 import org.junit.Test;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.applib.services.eventbus.ActionInvokedEvent;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
@@ -49,11 +49,11 @@ public class DomainEventHelperTest_newActionInteractionEvent {
 
         final ActionDomainEvent<Object> ev = new DomainEventHelper(null).newActionDomainEvent(
                 ActionDomainEvent.Default.class, identifier, sdo, new Object[]{1, "bar"});
-        assertThat(ev.getSource(), is((Object)sdo));
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getArguments(), is(not(nullValue())));
-        assertThat(ev.getArguments().get(0), is((Object)Integer.valueOf(1)));
-        assertThat(ev.getArguments().get(1), is((Object)"bar"));
+        assertThat(ev.getArguments().get(0), is(Integer.valueOf(1)));
+        assertThat(ev.getArguments().get(1), is("bar"));
     }
 
     @Test
@@ -62,12 +62,12 @@ public class DomainEventHelperTest_newActionInteractionEvent {
         final Identifier identifier = Identifier.actionIdentifier(SomeDomainObject.class, "foo", new Class[]{int.class, String.class});
 
         final ActionDomainEvent<Object> ev = new DomainEventHelper(null).newActionDomainEvent(
-                ActionInvokedEvent.Default.class, identifier, sdo, new Object[]{1, "bar"});
-        assertThat(ev.getSource(), is((Object)sdo));
+                ActionDomainEvent.Default.class, identifier, sdo, new Object[]{1, "bar"});
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getArguments(), is(not(nullValue())));
-        assertThat(ev.getArguments().get(0), is((Object)Integer.valueOf(1)));
-        assertThat(ev.getArguments().get(1), is((Object)"bar"));
+        assertThat(ev.getArguments().get(0), is(Integer.valueOf(1)));
+        assertThat(ev.getArguments().get(1), is("bar"));
     }
 
     @Test
@@ -77,11 +77,11 @@ public class DomainEventHelperTest_newActionInteractionEvent {
         
         final ActionDomainEvent<SomeDomainObject> ev = new DomainEventHelper(null).newActionDomainEvent(
                 SomeDomainObjectFooInvokedDomainEvent.class, identifier, sdo, new Object[]{1, "bar"});
-        assertThat((SomeDomainObject)ev.getSource(), is(sdo));
+        assertThat(ev.getSource(), is(sdo));
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getArguments(), is(not(nullValue())));
-        assertThat(ev.getArguments().get(0), is((Object)Integer.valueOf(1)));
-        assertThat(ev.getArguments().get(1), is((Object)"bar"));
+        assertThat(ev.getArguments().get(0), is(Integer.valueOf(1)));
+        assertThat(ev.getArguments().get(1), is("bar"));
     }
     
 }
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index cac11d7..4233f26 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -33,7 +33,6 @@ import org.junit.Test;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionInteraction;
 import org.apache.isis.applib.annotation.ActionSemantics;
 import org.apache.isis.applib.annotation.ActionSemantics.Of;
 import org.apache.isis.applib.annotation.CommandExecuteIn;
@@ -41,7 +40,6 @@ import org.apache.isis.applib.annotation.CommandPersistence;
 import org.apache.isis.applib.annotation.CommandReification;
 import org.apache.isis.applib.annotation.Idempotent;
 import org.apache.isis.applib.annotation.InvokeOn;
-import org.apache.isis.applib.annotation.PostsActionInvokedEvent;
 import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.applib.annotation.PublishingPayloadFactoryForAction;
 import org.apache.isis.applib.annotation.QueryOnly;
@@ -49,8 +47,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
-import org.apache.isis.applib.services.eventbus.ActionInvokedEvent;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
@@ -179,7 +175,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
 
             class Customer {
 
-                class SomeActionInvokedDomainEvent extends ActionInvokedEvent<Customer> {
+                class SomeActionInvokedDomainEvent extends ActionDomainEvent<Customer> {
                     public SomeActionInvokedDomainEvent(
                             final Customer source,
                             final Identifier identifier,
@@ -188,7 +184,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
                     }
                 }
 
-                @PostsActionInvokedEvent(SomeActionInvokedDomainEvent.class)
+                @Action(domainEvent = SomeActionInvokedDomainEvent.class)
                 public void someAction() {
                 }
             }
@@ -230,16 +226,10 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
 
             class Customer {
 
-                class SomeActionInvokedDomainEvent extends ActionInteractionEvent<Customer> {
-                    public SomeActionInvokedDomainEvent(
-                            final Customer source,
-                            final Identifier identifier,
-                            final Object... arguments) {
-                        super(source, identifier, arguments);
-                    }
+                class SomeActionInvokedDomainEvent extends ActionDomainEvent<Customer> {
                 }
 
-                @ActionInteraction(SomeActionInvokedDomainEvent.class)
+                @Action(domainEvent = SomeActionInvokedDomainEvent.class)
                 public void someAction() {
                 }
             }
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
index 2c090f7..308508b 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
@@ -45,7 +45,6 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.bookmark.BookmarkService2;
 import org.apache.isis.applib.services.clock.ClockService;
 import org.apache.isis.applib.services.command.Command;
-import org.apache.isis.applib.services.command.Command2;
 import org.apache.isis.applib.services.command.Command3;
 import org.apache.isis.applib.services.command.CommandContext;
 import org.apache.isis.applib.services.command.spi.CommandService;
@@ -512,10 +511,6 @@ public class PersistenceSession implements
         if(command instanceof Command3) {
             final Command3 command3 = (Command3) command;
             command3.flushActionDomainEvents();
-        } else
-        if(command instanceof Command2) {
-            final Command2 command2 = (Command2) command;
-            command2.flushActionInteractionEvents();
         }
 
         interaction.clear();

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 10/10: ISIS-1742: deletes Command2 interface.

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit f85d30cdf494dbccbeda9286a22a2128d3c28d14
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Sep 30 12:07:51 2017 +0200

    ISIS-1742: deletes Command2 interface.
---
 .../isis/applib/services/command/Command2.java     | 28 ----------------------
 .../isis/applib/services/command/Command3.java     |  2 +-
 2 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
deleted file mode 100644
index 8944e55..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
+++ /dev/null
@@ -1,28 +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.applib.services.command;
-
-import org.apache.isis.applib.services.iactn.InteractionContext;
-
-/**
- * @deprecated - the extensions to {@link Command} in this interface have been replaced by functionality in {@link InteractionContext}.
- */
-@Deprecated
-public interface Command2 extends Command {
-
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command3.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command3.java
index 4ccaa97..a7eeb79 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command3.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command3.java
@@ -26,7 +26,7 @@ import org.apache.isis.applib.services.iactn.InteractionContext;
  * @deprecated - the extensions to {@link Command} in this interface have been replaced by functionality in {@link InteractionContext}.
  */
 @Deprecated
-public interface Command3 extends Command2 {
+public interface Command3 extends Command {
 
     /**
      * @deprecated - use {@link Interaction#getCurrentExecution()}, {@link Interaction#getPriorExecution()}  and {@link Interaction#getExecutions()} instead.

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.