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/16 14:42:57 UTC
[isis] 03/08: ISIS-1742: deletes WrapperObject, use WrappingObject
instead (wrapper factory service); also (unused) Snapshot marker interface
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 8159f114a40b85cbc4a1236ae9ce105ccee88954
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 15:16:30 2017 +0100
ISIS-1742: deletes WrapperObject, use WrappingObject instead (wrapper factory service); also (unused) Snapshot marker interface
---
.../applib/services/wrapper/WrapperObject.java | 61 ----------------------
.../apache/isis/applib/snapshot/Snapshottable.java | 35 -------------
.../snapshot/SnapshottableWithInclusions.java | 2 +-
.../handlers/DomainObjectInvocationHandler.java | 31 +++--------
.../isis/core/wrapper/proxy/ProxyCreator.java | 3 +-
todo-deprecation-list.txt | 13 ++---
6 files changed, 17 insertions(+), 128 deletions(-)
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperObject.java b/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperObject.java
deleted file mode 100644
index 693842a..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperObject.java
+++ /dev/null
@@ -1,61 +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.wrapper;
-
-/**
- * Replaced by {@link org.apache.isis.applib.services.wrapper.WrappingObject}.
- *
- * <p>
- * The methods in this (sub-)interface are all deprecated because of the risk
- * of collision with a method on the underlying domain object.
- * </p>
- *
- * @deprecated
- */
-@Deprecated
-public interface WrapperObject extends WrappingObject {
-
- /**
- * Same as {@link #__isis_save()}.
- *
- * <p>
- * NOTE: domain classes may not have a method with this name. This method has been deprecated because
- * the risk of a collision is high.
- * </p>
- *
- * @deprecated - use <tt>__isis_save()</tt> instead.
- */
- @Deprecated
- void save();
-
- /**
- * Same as {@link #__isis_wrapped()}.
- *
- * <p>
- * NOTE: domain classes may not have a method with this name. This method has been deprecated because
- * the risk of a collision is reasonably high.
- * </p>
- *
- * @deprecated - use <tt>__isis_save()</tt> instead.
- */
- @Deprecated
- Object wrapped();
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/snapshot/Snapshottable.java b/core/applib/src/main/java/org/apache/isis/applib/snapshot/Snapshottable.java
deleted file mode 100644
index 06c7eb0..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/snapshot/Snapshottable.java
+++ /dev/null
@@ -1,35 +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.snapshot;
-
-/**
- * Unused.
- *
- * <p>
- * Previously it was necessary for domain objects to implement this marker interface
- * in order to be used with <tt>XmlSnapshot</tt>. The new {@link XmlSnapshotService} lifts
- * this restriction.
- *
- * @deprecated
- */
-@Deprecated
-public interface Snapshottable {
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/snapshot/SnapshottableWithInclusions.java b/core/applib/src/main/java/org/apache/isis/applib/snapshot/SnapshottableWithInclusions.java
index c64727e..2a3802e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/snapshot/SnapshottableWithInclusions.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/snapshot/SnapshottableWithInclusions.java
@@ -28,7 +28,7 @@ import org.apache.isis.applib.services.xmlsnapshot.XmlSnapshotService;
* snapshot is to be created using the {@link XmlSnapshotService}, indicating
* paths to be {@link XmlSnapshotService.Snapshot#} automatically include additional paths within the snapshot.
*/
-public interface SnapshottableWithInclusions extends Snapshottable {
+public interface SnapshottableWithInclusions {
/**
* Paths to include in the snapshot.
diff --git a/core/wrapper/src/main/java/org/apache/isis/core/wrapper/handlers/DomainObjectInvocationHandler.java b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/handlers/DomainObjectInvocationHandler.java
index c3624e9..c022ab0 100644
--- a/core/wrapper/src/main/java/org/apache/isis/core/wrapper/handlers/DomainObjectInvocationHandler.java
+++ b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/handlers/DomainObjectInvocationHandler.java
@@ -47,7 +47,6 @@ import org.apache.isis.applib.services.wrapper.HiddenException;
import org.apache.isis.applib.services.wrapper.InteractionException;
import org.apache.isis.applib.services.wrapper.InvalidException;
import org.apache.isis.applib.services.wrapper.WrapperFactory.ExecutionMode;
-import org.apache.isis.applib.services.wrapper.WrapperObject;
import org.apache.isis.applib.services.wrapper.WrappingObject;
import org.apache.isis.core.commons.authentication.AuthenticationSession;
import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
@@ -91,29 +90,17 @@ public class DomainObjectInvocationHandler<T> extends DelegatingInvocationHandle
protected Method titleMethod;
/**
- * The <tt>__isis_save()</tt> method from {@link WrapperObject#__isis_save()}.
+ * The <tt>__isis_save()</tt> method from {@link WrappingObject#__isis_save()}.
*/
protected Method __isis_saveMethod;
/**
- * The <tt>save()</tt> method from {@link WrapperObject#save()}.
- */
- @Deprecated
- protected Method saveMethod;
-
- /**
- * The <tt>__isis_wrapped()</tt> method from {@link WrapperObject#__isis_wrapped()}.
+ * The <tt>__isis_wrapped()</tt> method from {@link WrappingObject#__isis_wrapped()}.
*/
protected Method __isis_wrappedMethod;
/**
- * The <tt>wrapped()</tt> method from {@link WrapperObject#wrapped()}.
- */
- @Deprecated
- protected Method wrappedMethod;
-
- /**
- * The <tt>__isis_executionMode()</tt> method from {@link WrapperObject#__isis_executionMode()}.
+ * The <tt>__isis_executionMode()</tt> method from {@link WrappingObject#__isis_executionMode()}.
*/
protected Method __isis_executionMode;
@@ -143,11 +130,9 @@ public class DomainObjectInvocationHandler<T> extends DelegatingInvocationHandle
// ignore
}
try {
- __isis_saveMethod = WrapperObject.class.getMethod("__isis_save", new Class[]{});
- __isis_wrappedMethod = WrapperObject.class.getMethod("__isis_wrapped", new Class[]{});
- __isis_executionMode = WrapperObject.class.getMethod("__isis_executionMode", new Class[]{});
- saveMethod = WrapperObject.class.getMethod("save", new Class[] {});
- wrappedMethod = WrapperObject.class.getMethod("wrapped", new Class[] {});
+ __isis_saveMethod = WrappingObject.class.getMethod("__isis_save", new Class[]{});
+ __isis_wrappedMethod = WrappingObject.class.getMethod("__isis_wrapped", new Class[]{});
+ __isis_executionMode = WrappingObject.class.getMethod("__isis_executionMode", new Class[]{});
dnPersistableMethods.addAll(
Lists.newArrayList(
@@ -791,11 +776,11 @@ public class DomainObjectInvocationHandler<T> extends DelegatingInvocationHandle
}
protected boolean isSaveMethod(final Method method) {
- return method.equals(saveMethod) || method.equals(__isis_saveMethod);
+ return method.equals(__isis_saveMethod);
}
protected boolean isWrappedMethod(final Method method) {
- return method.equals(wrappedMethod) || method.equals(__isis_wrappedMethod);
+ return method.equals(__isis_wrappedMethod);
}
protected boolean isExecutionModeMethod(final Method method) {
diff --git a/core/wrapper/src/main/java/org/apache/isis/core/wrapper/proxy/ProxyCreator.java b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/proxy/ProxyCreator.java
index 7365fdb..b9c320c 100644
--- a/core/wrapper/src/main/java/org/apache/isis/core/wrapper/proxy/ProxyCreator.java
+++ b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/proxy/ProxyCreator.java
@@ -24,7 +24,6 @@ import java.util.Map;
import com.google.common.collect.MapMaker;
-import org.apache.isis.applib.services.wrapper.WrapperObject;
import org.apache.isis.applib.services.wrapper.WrappingObject;
import org.apache.isis.core.commons.lang.ArrayExtensions;
import org.apache.isis.core.metamodel.specloader.classsubstitutor.JavassistEnhanced;
@@ -59,7 +58,7 @@ public class ProxyCreator {
final Class<T> clazz = (Class<T>) toProxy.getClass();
if (clazz.isInterface()) {
- return Util.createInstance(clazz, handler, WrapperObject.class);
+ return Util.createInstance(clazz, handler, WrappingObject.class);
} else {
final ProxyFactory proxyFactory = proxyFactoryFor(clazz);
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index 61c1c94..03a80a3 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -34,12 +34,6 @@ org.apache.isis.applib.services.metamodel
MetaModelService2.java - push down to subtype, retain overloads for now
-org.apache.isis.applib.services.wrapper
- WrapperObject.java
- save() and wrapped() - remove to avoid name clashes, use __isis_Xxx() methods instead
-
-org.apache.isis.applib.snapshot
- Snapshottable.java - remove ? [suggest we retain the Snapshot service for now]
org.apache.isis.applib.value
@@ -450,3 +444,10 @@ org.apache.isis.applib.services.publish - remove classes pertaining to original
org.apache.isis.applib.services.settings
SettingTypes.java - remove, used only by 3rd party code (incode platform settings module)
+org.apache.isis.applib.services.wrapper
+ WrapperObject.java
+ save() and wrapped() - remove to avoid name clashes, use __isis_Xxx() methods instead
+
+
+org.apache.isis.applib.snapshot
+ Snapshottable.java - remove, since unused
--
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.