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:11 UTC
[isis] 04/10: ISIS-1742: deletes @PropertyInteraction and
@PostsPropertyChangedEvent annotaitons + supporting event classes
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>.