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 13:37:06 UTC

[isis] branch dev/2.0.0/ISIS-1742-remove-deprecations updated (6bc8bb6 -> 1e4dbc9)

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.


    from 6bc8bb6  ISIS-1742: removes FixtureScript.ExecutionContext#add methods (use #addResult instead) and removes asKeyValueMap(...) utility method completely
     new 662effc  ISIS-1742: simplifies FixtureScript and FixtureScripts
     new 00ff36d  ISIS-1742: deletes unused constructors within FixtureScripts
     new 63f6dee  ISIS-1742: removes ActionInvocationMemento, and simplifies BackgroundCommandService.  Now use CommandDto.  Remove support for legacy persisted commands (beginning "<memento>...")
     new 1c51dff  ISIS-1742: deletes commented out code in BackgroundCommandExecution
     new 1a3a507  ISIS-1742: deletes unused methods and injected services, inlines usage of targetAdapterFor
     new 0824e2d  ISIS-1742: removes empty legacy branch from BackgroundCommandExecution; removes unused mementoService
     new f159092  ISIS-1742: deletes unused constructors of ActionInvocationContext (domain service)
     new 1e4dbc9  ISIS-1742: deletes unused methods in CommandUtil (while looking for usages of MementoService).

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


Summary of changes:
 .../asciidoc/guides/rgcms/_rgcms_schema-aim.adoc   | 107 -----------
 .../guides/rgcms/_rgcms_schema-common.adoc         |   5 +-
 .../main/asciidoc/guides/rgcms/_rgcms_schema.adoc  |   4 -
 ...pplication-layer_CommandDtoServiceInternal.adoc |  21 +--
 ...ication-layer-spi_BackgroundCommandService.adoc |  32 +---
 ...amming-model_view-models_dto_dto-consumers.adoc |   2 +-
 .../isis/applib/fixturescripts/FixtureScript.java  |  74 +-------
 .../isis/applib/fixturescripts/FixtureScripts.java |  93 +---------
 .../services/actinvoc/ActionInvocationContext.java |  30 +---
 .../background/ActionInvocationMemento.java        | 145 ---------------
 .../background/BackgroundCommandService.java       |  18 +-
 .../background/BackgroundCommandService2.java      |  13 +-
 .../services/background/BackgroundService.java     |  10 --
 .../fixturespec/FixtureScriptsDefault.java         |   6 +-
 .../fixturespec/FixtureScriptsSpecification.java   |   2 +-
 .../actions/action/invocation/CommandUtil.java     |  38 +---
 .../command/CommandDtoServiceInternal.java         |   9 -
 .../background/BackgroundCommandExecution.java     | 195 +++++----------------
 .../background/BackgroundServiceDefault.java       |  26 +--
 .../command/CommandDtoServiceInternalDefault.java  |  38 ----
 todo-deprecation-list.txt                          |  44 ++---
 21 files changed, 118 insertions(+), 794 deletions(-)
 delete mode 100644 adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-aim.adoc
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/background/ActionInvocationMemento.java

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

[isis] 07/08: ISIS-1742: deletes unused constructors of ActionInvocationContext (domain service)

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 f159092d894469a2565f4f535488d919485d97bb
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 14:36:05 2017 +0100

    ISIS-1742: deletes unused constructors of ActionInvocationContext (domain service)
---
 .../services/actinvoc/ActionInvocationContext.java | 30 ++++++----------------
 1 file changed, 8 insertions(+), 22 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java b/core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java
index a75edb5..0ba521d 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java
@@ -47,7 +47,10 @@ public class ActionInvocationContext {
      * Intended only to support unit testing.
      */
     public static ActionInvocationContext onObject(final Object domainObject) {
-        return new ActionInvocationContext(InvokedOn.OBJECT, Collections.singletonList(domainObject));
+        ActionInvocationContext aic = new ActionInvocationContext();
+        aic.setInvokedOn(InvokedOn.OBJECT);
+        aic.setDomainObjects(Collections.singletonList(domainObject));
+        return aic;
     }
 
     /**
@@ -61,7 +64,10 @@ public class ActionInvocationContext {
      * Intended only to support unit testing.
      */
     public static ActionInvocationContext onCollection(final List<Object> domainObjects) {
-        return new ActionInvocationContext(InvokedOn.COLLECTION, domainObjects);
+        ActionInvocationContext aic = new ActionInvocationContext();
+        aic.setInvokedOn(InvokedOn.COLLECTION);
+        aic.setDomainObjects(domainObjects);
+        return aic;
     }
 
     // //////////////////////////////////////
@@ -72,27 +78,7 @@ public class ActionInvocationContext {
 
     private int index;
 
-    // //////////////////////////////////////
-
-    public ActionInvocationContext() {
-    }
-
-    /**
-     * @deprecated - now a {@link javax.enterprise.context.RequestScoped} service
-     */
-    @Deprecated
-    public ActionInvocationContext(final InvokedOn invokedOn, final Object... domainObjects) {
-        this(invokedOn, Arrays.asList(domainObjects));
-    }
 
-    /**
-     * @deprecated - now a {@link javax.enterprise.context.RequestScoped} service
-     */
-    @Deprecated
-    public ActionInvocationContext(final InvokedOn invokedOn, final List<Object> domainObjects) {
-        this.invokedOn = invokedOn;
-        this.domainObjects = domainObjects;
-    }
 
     // //////////////////////////////////////
 

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

[isis] 01/08: ISIS-1742: simplifies FixtureScript and FixtureScripts

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 662effce1b68a76f7e4d2c1521d63f6a2252eeb6
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 13:57:03 2017 +0100

    ISIS-1742: simplifies FixtureScript and FixtureScripts
    
    org.apache.isis.applib.fixturescripts
        FixtureScript.ExecutionContext - various methods to simplify API
            add(...) - use addResult(...) instead
            asKeyValueMap(String) - removed; this shouldn't have had public visibility.
    
        FixtureScript - various methods to simplify API
            execute(...) and executeChild(...) - use ExecutionContext#executeChild(FixtureScript, String, FixtureScript)} instead
            executeIfNotAlready(FixtureScript) - removed; this shouldn't have had public visibility.
            lookup(String, Class<T>) - use ExecutionContext#lookup(...) instead
            run(String) - no longer publically available (internal API for FixtureScripts to call).
    
        FixtureScripts.MultipleExecutionStrategy#IGNORE removed, replaced by EXECUTE_ONCE_BY_CLASS
---
 .../isis/applib/fixturescripts/FixtureScript.java  | 74 +---------------------
 .../isis/applib/fixturescripts/FixtureScripts.java | 24 ++-----
 .../fixturespec/FixtureScriptsDefault.java         |  3 +-
 .../fixturespec/FixtureScriptsSpecification.java   |  2 +-
 todo-deprecation-list.txt                          | 13 ++--
 5 files changed, 22 insertions(+), 94 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScript.java b/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScript.java
index 98b0109..4bbcf68 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScript.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScript.java
@@ -552,16 +552,6 @@ public abstract class FixtureScript
 
         static enum As { EXEC, SKIP }
 
-        /**
-         * DO <i>NOT</i> CALL DIRECTLY; instead use {@link org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext#executeChild(org.apache.isis.applib.fixturescripts.FixtureScript, String, org.apache.isis.applib.fixturescripts.FixtureScript)} or {@link org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext#executeChild(FixtureScript, FixtureScript)}.
-         *
-         * @deprecated - should not be called directly, but has <code>public</code> visibility so there is scope for confusion.  Replaced by method with private visibility.
-         */
-        @Deprecated
-        @Programmatic
-        public void executeIfNotAlready(final FixtureScript fixtureScript) {
-            executeChildIfNotAlready(fixtureScript);
-        }
 
         private void executeChildIfNotAlready(final FixtureScript fixtureScript) {
             if(shouldExecute(fixtureScript)) {
@@ -610,7 +600,6 @@ public abstract class FixtureScript
 
             switch (executionStrategy) {
 
-                case IGNORE:
                 case EXECUTE_ONCE_BY_CLASS:
                     return shouldExecuteForExecuteOnceByClassStrategy(fixtureScript);
 
@@ -790,27 +779,15 @@ public abstract class FixtureScript
      * Entry point for {@link org.apache.isis.applib.fixturescripts.FixtureScripts} service to call.
      *
      * <p>
-     *     DO <i>NOT</i> CALL DIRECTLY.
+     *     Package-visibility only, not public API.
      * </p>
      */
-    @Programmatic
-    public final List<FixtureResult> run(final String parameters) {
+    final List<FixtureResult> run(final String parameters) {
         executionContext = fixtureScripts.newExecutionContext(parameters).withTracing(this.tracePrintStream);
         executionContext.executeChildIfNotAlready(this);
         return executionContext.getResults();
     }
 
-    /**
-     * Use instead {@link org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext#lookup(String, Class)} directly.
-     */
-    @Programmatic
-    @Deprecated
-    public <T> T lookup(final String key, final Class<T> cls) {
-        if(executionContext == null) {
-            throw new IllegalStateException("This fixture has not yet been run.");
-        }
-        return executionContext.lookup(key, cls);
-    }
 
 
     /**
@@ -823,51 +800,6 @@ public abstract class FixtureScript
 
     //endregion
 
-    //region > executeChild (API for subclasses to call); deprecated execute(FixtureScript, ExecutionContext)
-
-    /**
-     * @deprecated - use instead {@link org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext#executeChild(FixtureScript, String, FixtureScript)}.
-     */
-    @Deprecated
-    protected void execute(
-            final String localNameOverride,
-            final FixtureScript childFixtureScript,
-            final ExecutionContext executionContext) {
-        executionContext.executeChild(this, localNameOverride, childFixtureScript);
-    }
-
-    /**
-     * @deprecated - use instead {@link org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext#executeChild(FixtureScript, String, FixtureScript)}.
-     */
-    @Deprecated
-    protected void executeChild(
-            final String localNameOverride,
-            final FixtureScript childFixtureScript,
-            final ExecutionContext executionContext) {
-        executionContext.executeChild(this, localNameOverride, childFixtureScript);
-    }
-
-    /**
-     * @deprecated - use instead {@link org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext#executeChild(org.apache.isis.applib.fixturescripts.FixtureScript, org.apache.isis.applib.fixturescripts.FixtureScript)}
-     */
-    @Deprecated
-    protected void execute(
-            final FixtureScript childFixtureScript,
-            final ExecutionContext executionContext) {
-        executionContext.executeChild(this, childFixtureScript);
-    }
-
-    /**
-     * @deprecated - use instead {@link org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext#executeChild(org.apache.isis.applib.fixturescripts.FixtureScript, org.apache.isis.applib.fixturescripts.FixtureScript)}
-     */
-    @Deprecated
-    protected void executeChild(
-            final FixtureScript childFixtureScript,
-            final ExecutionContext executionContext) {
-        executionContext.executeChild(this, childFixtureScript);
-    }
-
-    //endregion
 
     //region > execute (API for subclasses to implement)
 
@@ -901,7 +833,7 @@ public abstract class FixtureScript
     //region > helpers (for subclasses)
 
     /**
-     * Returns the first non-null vaulue; for convenience of subclass implementations
+     * Returns the first non-null value; for convenience of subclass implementations
      */
     protected static <T> T coalesce(final T... ts) {
         for (final T t : ts) {
diff --git a/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java b/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java
index 5c49ace..31d0da1 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java
@@ -84,11 +84,6 @@ public abstract class FixtureScripts extends AbstractService {
      */
     public enum MultipleExecutionStrategy {
         /**
-         * @deprecated - renamed to {@link #EXECUTE_ONCE_BY_CLASS}.
-         */
-        @Deprecated
-        IGNORE,
-        /**
          * Any given fixture script (or more precisely, any fixture script instance for a particular fixture script
          * class) can only be run once.
          *
@@ -127,8 +122,6 @@ public abstract class FixtureScripts extends AbstractService {
          *     loaded more than once (so the {@link #EXECUTE} strategy doesn't apply either).  The solution is for
          *     <tt>ExcelFixture</tt> to have value semantics (a digest of the spreadsheet argument).
          * </p>
-         *
-         * @see #IGNORE
          */
         EXECUTE_ONCE_BY_VALUE,
         /**
@@ -148,14 +141,6 @@ public abstract class FixtureScripts extends AbstractService {
          */
         EXECUTE;
 
-        /**
-         * @deprecated - use {@link #isExecuteOnceByClass()}.
-         * @return
-         */
-        @Deprecated
-        public boolean isIgnore() {
-            return this == IGNORE;
-        }
         public boolean isExecuteOnceByClass() {
             return this == EXECUTE_ONCE_BY_CLASS;
         }
@@ -175,7 +160,7 @@ public abstract class FixtureScripts extends AbstractService {
     /**
      * Defaults to {@link FixtureScripts.NonPersistedObjectsStrategy#PERSIST persist}
      * strategy (if non-persisted objects are {@link FixtureScripts#newFixtureResult(FixtureScript, String, Object, boolean) added} to a {@link FixtureResultList}),
-     * defaults {@link #getMultipleExecutionStrategy()} to {@link FixtureScripts.MultipleExecutionStrategy#IGNORE ignore}
+     * defaults {@link #getMultipleExecutionStrategy()} to {@link FixtureScripts.MultipleExecutionStrategy#EXECUTE_ONCE_BY_CLASS}
      * if multiple instances of the same fixture script class are encountered.
      *
      * @param packagePrefix - to search for fixture script implementations, eg "com.mycompany".  Note that this is ignored if an {@link org.apache.isis.applib.AppManifest} is in use.
@@ -391,7 +376,7 @@ public abstract class FixtureScripts extends AbstractService {
         // domain services are injected into the fixture script.
         container.injectServicesInto(fixtureScript);
 
-        return fixtureScript.run(parameters);
+        return runScript(fixtureScript, parameters);
     }
     public FixtureScript default0RunFixtureScript() {
         return getFixtureScriptList().isEmpty() ? null: getFixtureScriptList().get(0);
@@ -419,6 +404,11 @@ public abstract class FixtureScripts extends AbstractService {
         return fixtureScript.validateRun(parameters);
     }
 
+    protected List<FixtureResult> runScript(final FixtureScript fixtureScript, final String parameters) {
+        return fixtureScript.run(parameters);
+    }
+
+
     //endregion
 
     //region > programmatic API
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java b/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java
index 007bdc9..b2cb8b3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java
@@ -203,12 +203,13 @@ public class FixtureScriptsDefault extends FixtureScripts {
         if(recreateScript == null) {
             return null;
         }
-        final List<FixtureResult> results = recreateScript.run(null);
+        final List<FixtureResult> results = runScript(recreateScript, null);
         if(results.isEmpty()) {
             return null;
         }
         return results.get(0).getObject();
     }
+
     public boolean hideRecreateObjectsAndReturnFirst() {
         return getSpecification().getRecreateScriptClass() == null;
     }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsSpecification.java b/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsSpecification.java
index 81965bc..41aa15b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsSpecification.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsSpecification.java
@@ -111,7 +111,7 @@ public class FixtureScriptsSpecification {
     public static class Builder {
         private final String packagePrefix;
         private FixtureScripts.NonPersistedObjectsStrategy nonPersistedObjectsStrategy = FixtureScripts.NonPersistedObjectsStrategy.PERSIST;
-        private FixtureScripts.MultipleExecutionStrategy multipleExecutionStrategy = FixtureScripts.MultipleExecutionStrategy.IGNORE;
+        private FixtureScripts.MultipleExecutionStrategy multipleExecutionStrategy = FixtureScripts.MultipleExecutionStrategy.EXECUTE_ONCE_BY_CLASS;
         private Class<? extends FixtureScript> recreateScriptClass = null;
         private Class<? extends FixtureScript> defaultScriptClass = null;
         private DropDownPolicy dropDownPolicy = DropDownPolicy.CHOICES;
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index e199e24..17544ca 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -21,10 +21,7 @@ org.apache.isis.applib.clock
 
 
 org.apache.isis.applib.fixturescripts
-    FixtureScript - various methods to simplify API
-        execute(...) and executeChild(...) - use ExecutionContext#executeChild(FixtureScript, String, FixtureScript)} instead
-        executeIfNotAlready(FixtureScript) - removed; this shouldn't have had public visibility.
-        lookup(String, Class<T>) - use ExecutionContext#lookup(...) instead
+
     FixtureScripts.java - remove deprecated methods;
                           framework provides an implementation of this service, and use FixtureScriptsSpecificatoinProvider to configure instead.
 
@@ -429,6 +426,14 @@ org.apache.isis.applib.fixturescripts
         add(...) - use addResult(...) instead
         asKeyValueMap(String) - removed; this shouldn't have had public visibility.
 
+    FixtureScript - various methods to simplify API
+        execute(...) and executeChild(...) - use ExecutionContext#executeChild(FixtureScript, String, FixtureScript)} instead
+        executeIfNotAlready(FixtureScript) - removed; this shouldn't have had public visibility.
+        lookup(String, Class<T>) - use ExecutionContext#lookup(...) instead
+        run(String) - no longer publically available (internal API for FixtureScripts to call).
+
+
+    FixtureScripts.MultipleExecutionStrategy#IGNORE removed, replaced by EXECUTE_ONCE_BY_CLASS
 
 org.apache.isis.viewer.restfulobjects.rendering.service.conmap.ContentMappingService
     - replaced by non-applib

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

[isis] 08/08: ISIS-1742: deletes unused methods in CommandUtil (while looking for usages of MementoService).

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 1e4dbc908acbe3feabb343dfc17437785ed7509f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 14:36:54 2017 +0100

    ISIS-1742: deletes unused methods in CommandUtil (while looking for usages of MementoService).
---
 .../actions/action/invocation/CommandUtil.java     | 38 +---------------------
 1 file changed, 1 insertion(+), 37 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/CommandUtil.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/CommandUtil.java
index 2134409..fcebbc4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/CommandUtil.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/CommandUtil.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.actions.action.invocation;
 
-import java.lang.reflect.Method;
 import java.util.Arrays;
 import java.util.List;
 
@@ -27,22 +26,14 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.bookmark.BookmarkService;
-import org.apache.isis.applib.services.memento.MementoService;
 import org.apache.isis.core.commons.lang.StringExtensions;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
-import org.apache.isis.core.metamodel.facets.all.named.NamedFacetInferred;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
-import org.apache.isis.core.metamodel.specloader.specimpl.MixedInMember2;
-import org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault;
 
 /**
  * Factoring out the commonality between <tt>ActionInvocationFacetViaMethod</tt> and <tt>BackgroundServiceDefault</tt>.
@@ -112,25 +103,7 @@ public class CommandUtil {
         buf.append(name).append(": ").append(titleOf).append("\n");
     }
 
-    public static void buildMementoArgLists(
-            final MementoService mementoService,
-            final BookmarkService bookmarkService,
-            final Method method,
-            final Object[] args, final List<Class<?>> argTypes, final List<Object> argObjs) {
-        for (int i = 0; i < args.length; i++) {
-            Object input = args[i];
-            if (mementoService.canSet(input)) {
-                argTypes.add(method.getParameterTypes()[i]);
-                argObjs.add(input);
-            } else {
-                Bookmark argBookmark = bookmarkService.bookmarkFor(input);
-                argTypes.add(Bookmark.class);
-                argObjs.add(argBookmark);
-            }
-        }
-    }
-    
-    
+
     public static ObjectAdapter[] adaptersFor(final Object[] args, final AdapterManager adapterManager) {
         List<Object> argList = Arrays.asList(args);
         Iterable<ObjectAdapter> adapterList = 
@@ -139,13 +112,4 @@ public class CommandUtil {
         return Lists.newArrayList(adapterList).toArray(new ObjectAdapter[]{});
     }
 
-    public static Object[] objectsFor(ObjectAdapter[] arguments) {
-        List<ObjectAdapter> argList = Arrays.asList(arguments);
-        Iterable<Object> adapterList = 
-                Iterables.transform(
-                        argList, ObjectAdapter.Functions.getObject());
-        return Lists.newArrayList(adapterList).toArray(new Object[]{});
-    }
-
-    
 }

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

[isis] 05/08: ISIS-1742: deletes unused methods and injected services, inlines usage of targetAdapterFor

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 1a3a50728ea03ca01ce741c156f89e10faf2226f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 14:29:44 2017 +0100

    ISIS-1742: deletes unused methods and injected services, inlines usage of targetAdapterFor
---
 .../background/BackgroundCommandExecution.java     | 44 +++-------------------
 1 file changed, 6 insertions(+), 38 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
index 7ab5003..4503199 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
@@ -26,11 +26,10 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.bookmark.BookmarkService2;
+import org.apache.isis.applib.services.bookmark.BookmarkService;
 import org.apache.isis.applib.services.clock.ClockService;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.Command.Executor;
-import org.apache.isis.applib.services.command.CommandContext;
 import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.iactn.InteractionContext;
 import org.apache.isis.applib.services.jaxb.JaxbService;
@@ -143,7 +142,7 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
 
                             for (OidDto targetOidDto : targetOidDtos) {
 
-                                final ObjectAdapter targetAdapter = targetAdapterFor(targetOidDto);
+                                final ObjectAdapter targetAdapter = adapterFor(targetOidDto);
                                 final ObjectAction objectAction = findObjectAction(targetAdapter, memberId);
 
                                 // we pass 'null' for the mixedInAdapter; if this action _is_ a mixin then
@@ -274,35 +273,6 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
         return null;
     }
 
-
-    protected ObjectAdapter targetAdapterFor(final OidDto targetOidDto) {
-
-//        // this is the original code, but it can be simplified ...
-//        // (moved out to separate method so that, if proven wrong, can override as a patch)
-
-//      final Bookmark bookmark = Bookmark.from(targetOidDto);
-//      final Object targetObject = bookmarkService.lookup(bookmark);
-//      final ObjectAdapter targetAdapter = adapterFor(targetObject);
-
-        return adapterFor(targetOidDto);
-    }
-
-    protected ObjectAdapter argAdapterFor(final Class<?> argType, final Object arg) {
-
-//        // this is the original code, but it can be simplified ...
-//        // (moved out to separate method so that, if proven wrong, can override as a patch)
-
-//        if(Bookmark.class != argType) {
-//            return adapterFor(arg);
-//        } else {
-//            final Bookmark argBookmark = (Bookmark)arg;
-//            final RootOid rootOid = RootOid.create(argBookmark);
-//            return adapterFor(rootOid);
-//        }
-
-        return adapterFor(arg);
-    }
-
     private ObjectAdapter[] argAdaptersFor(final ActionDto actionDto) {
         final List<ParamDto> params = paramDtosFrom(actionDto);
         final List<ObjectAdapter> args = Lists.newArrayList(
@@ -330,20 +300,18 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
 
     // //////////////////////////////////////
 
-    @javax.inject.Inject
-    private BookmarkService2 bookmarkService;
 
     @javax.inject.Inject
-    private JaxbService jaxbService;
+    BookmarkService bookmarkService;
 
     @javax.inject.Inject
-    private CommandContext commandContext;
+    JaxbService jaxbService;
 
     @javax.inject.Inject
-    private InteractionContext interactionContext;
+    InteractionContext interactionContext;
 
     @javax.inject.Inject
-    private ClockService clockService;
+    ClockService clockService;
 
 
 }

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

[isis] 02/08: ISIS-1742: deletes unused constructors within FixtureScripts

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 00ff36d3eef694ec83dae54863cc627c153123de
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 14:02:48 2017 +0100

    ISIS-1742: deletes unused constructors within FixtureScripts
---
 .../isis/applib/fixturescripts/FixtureScripts.java | 71 ----------------------
 .../fixturespec/FixtureScriptsDefault.java         |  3 +-
 todo-deprecation-list.txt                          |  9 +--
 3 files changed, 3 insertions(+), 80 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java b/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java
index 31d0da1..3a5abd0 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/fixturescripts/FixtureScripts.java
@@ -154,79 +154,9 @@ public abstract class FixtureScripts extends AbstractService {
 
     //endregion
 
-
     //region > constructors
 
     /**
-     * Defaults to {@link FixtureScripts.NonPersistedObjectsStrategy#PERSIST persist}
-     * strategy (if non-persisted objects are {@link FixtureScripts#newFixtureResult(FixtureScript, String, Object, boolean) added} to a {@link FixtureResultList}),
-     * defaults {@link #getMultipleExecutionStrategy()} to {@link FixtureScripts.MultipleExecutionStrategy#EXECUTE_ONCE_BY_CLASS}
-     * if multiple instances of the same fixture script class are encountered.
-     *
-     * @param packagePrefix - to search for fixture script implementations, eg "com.mycompany".  Note that this is ignored if an {@link org.apache.isis.applib.AppManifest} is in use.
-     *
-     * @deprecated - use {@link #FixtureScripts(FixtureScriptsSpecification)} instead.
-     */
-    @Deprecated
-    public FixtureScripts(final String packagePrefix) {
-        this(FixtureScriptsSpecification.builder(packagePrefix)
-                                        .build());
-    }
-
-    /**
-     * Defaults to {@link FixtureScripts.NonPersistedObjectsStrategy#PERSIST persist}
-     * strategy (if non-persisted objects are {@link FixtureScripts#newFixtureResult(FixtureScript, String, Object, boolean) added} to a {@link FixtureResultList}).
-     *
-     * @param packagePrefix - to search for fixture script implementations, eg "com.mycompany".    Note that this is ignored if an {@link org.apache.isis.applib.AppManifest} is in use.
-     * @param multipleExecutionStrategy - whether more than one instance of the same fixture script class can be run multiple times.  See {@link MultipleExecutionStrategy} for more details.
-     *
-     * @deprecated - use {@link #FixtureScripts(FixtureScriptsSpecification)} instead.
-     */
-    @Deprecated
-    public FixtureScripts(
-            final String packagePrefix,
-            final MultipleExecutionStrategy multipleExecutionStrategy) {
-        this(FixtureScriptsSpecification.builder(packagePrefix)
-                                        .with(multipleExecutionStrategy)
-                .build());
-    }
-
-    /**
-     * Defaults {@link #getMultipleExecutionStrategy()} to {@link FixtureScripts.MultipleExecutionStrategy#IGNORE ignore}
-     * if multiple instances of the same fixture script class are encountered.
-     *
-     * @param packagePrefix  - to search for fixture script implementations, eg "com.mycompany".    Note that this is ignored if an {@link org.apache.isis.applib.AppManifest} is in use.
-     * @param nonPersistedObjectsStrategy - how to handle any non-persisted objects that are {@link #newFixtureResult(FixtureScript, String, Object, boolean) added} to a {@link org.apache.isis.applib.fixturescripts.FixtureResultList}.
-     *
-     * @deprecated - use {@link #FixtureScripts(FixtureScriptsSpecification)} instead.
-     */
-    @Deprecated
-    public FixtureScripts(
-            final String packagePrefix, final NonPersistedObjectsStrategy nonPersistedObjectsStrategy) {
-        this(FixtureScriptsSpecification.builder(packagePrefix)
-                                        .with(nonPersistedObjectsStrategy)
-                                        .build());
-    }
-
-    /**
-     * @param packagePrefix  - to search for fixture script implementations, eg "com.mycompany".    Note that this is ignored if an {@link org.apache.isis.applib.AppManifest} is in use.
-     * @param nonPersistedObjectsStrategy - how to handle any non-persisted objects that are {@link #newFixtureResult(FixtureScript, String, Object, boolean) added} to a {@link org.apache.isis.applib.fixturescripts.FixtureResultList}.
-     * @param multipleExecutionStrategy - whether more than one instance of the same fixture script class can be run multiple times
-     *
-     * @deprecated - use {@link #FixtureScripts(FixtureScriptsSpecification)} instead.
-     */
-    @Deprecated
-    public FixtureScripts(
-            final String packagePrefix,
-            final NonPersistedObjectsStrategy nonPersistedObjectsStrategy,
-            final MultipleExecutionStrategy multipleExecutionStrategy) {
-        this(FixtureScriptsSpecification.builder(packagePrefix)
-                                        .with(nonPersistedObjectsStrategy)
-                                        .with(multipleExecutionStrategy)
-                                        .build());
-    }
-
-    /**
      * @param specification - specifies how the service will find instances and execute them.
      */
     public FixtureScripts(final FixtureScriptsSpecification specification) {
@@ -235,7 +165,6 @@ public abstract class FixtureScripts extends AbstractService {
 
     //endregion
 
-
     //region > packagePrefix, nonPersistedObjectsStrategy, multipleExecutionStrategy
 
     private FixtureScriptsSpecification specification;
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java b/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java
index b2cb8b3..4d37ebc 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/fixturespec/FixtureScriptsDefault.java
@@ -74,7 +74,8 @@ public class FixtureScriptsDefault extends FixtureScripts {
     public static final String PACKAGE_PREFIX = FixtureScriptsDefault.class.getPackage().getName();
 
     public FixtureScriptsDefault() {
-        super(PACKAGE_PREFIX);
+        super(FixtureScriptsSpecification.builder(PACKAGE_PREFIX)
+                .build());
     }
 
 
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index 17544ca..66a7764 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -19,14 +19,6 @@ org.apache.isis.applib.clock
 
 
 
-
-org.apache.isis.applib.fixturescripts
-
-    FixtureScripts.java - remove deprecated methods;
-                          framework provides an implementation of this service, and use FixtureScriptsSpecificatoinProvider to configure instead.
-
-
-
 org.apache.isis.applib.services.actinvoc
     ActionInvocationContext.java -remove unused constructors
 
@@ -432,6 +424,7 @@ org.apache.isis.applib.fixturescripts
         lookup(String, Class<T>) - use ExecutionContext#lookup(...) instead
         run(String) - no longer publically available (internal API for FixtureScripts to call).
 
+    FixtureScripts.java - remove deprecated constructors;
 
     FixtureScripts.MultipleExecutionStrategy#IGNORE removed, replaced by EXECUTE_ONCE_BY_CLASS
 

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

[isis] 06/08: ISIS-1742: removes empty legacy branch from BackgroundCommandExecution; removes unused mementoService

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 0824e2df9f1bdcd2f30801f97602766100c28e3c
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 14:32:40 2017 +0100

    ISIS-1742: removes empty legacy branch from BackgroundCommandExecution; removes unused mementoService
---
 .../background/BackgroundCommandExecution.java     | 97 +++++++++-------------
 1 file changed, 40 insertions(+), 57 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
index 4503199..6e5ee19 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
@@ -41,7 +41,6 @@ import org.apache.isis.core.metamodel.spec.feature.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.isis.core.runtime.services.memento.MementoServiceDefault;
 import org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate;
 import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
@@ -68,16 +67,8 @@ import org.apache.isis.schema.utils.CommonDtoUtils;
  */
 public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemplate {
 
-    private final MementoServiceDefault mementoService;
 
-    public BackgroundCommandExecution() {
-        // same as configured by BackgroundServiceDefault
-        mementoService = new MementoServiceDefault().withNoEncoding();
-    }
-    
-    // //////////////////////////////////////
 
-    
     protected void doExecute(Object context) {
 
         final PersistenceSession persistenceSession = getPersistenceSession();
@@ -121,72 +112,64 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
                 try {
                     backgroundCommand.setExecutor(Executor.BACKGROUND);
 
-                    final boolean legacy = false; // memento.startsWith("<memento");
-                    if(legacy) {
-
-
-                    } else {
-
-                        final CommandDto dto = jaxbService.fromXml(CommandDto.class, memento);
+                    final CommandDto dto = jaxbService.fromXml(CommandDto.class, memento);
 
-                        final MemberDto memberDto = dto.getMember();
-                        final String memberId = memberDto.getMemberIdentifier();
+                    final MemberDto memberDto = dto.getMember();
+                    final String memberId = memberDto.getMemberIdentifier();
 
-                        final OidsDto oidsDto = CommandDtoUtils.targetsFor(dto);
-                        final List<OidDto> targetOidDtos = oidsDto.getOid();
+                    final OidsDto oidsDto = CommandDtoUtils.targetsFor(dto);
+                    final List<OidDto> targetOidDtos = oidsDto.getOid();
 
-                        final InteractionType interactionType = memberDto.getInteractionType();
-                        if(interactionType == InteractionType.ACTION_INVOCATION) {
+                    final InteractionType interactionType = memberDto.getInteractionType();
+                    if(interactionType == InteractionType.ACTION_INVOCATION) {
 
-                            final ActionDto actionDto = (ActionDto) memberDto;
+                        final ActionDto actionDto = (ActionDto) memberDto;
 
-                            for (OidDto targetOidDto : targetOidDtos) {
+                        for (OidDto targetOidDto : targetOidDtos) {
 
-                                final ObjectAdapter targetAdapter = adapterFor(targetOidDto);
-                                final ObjectAction objectAction = findObjectAction(targetAdapter, memberId);
+                            final ObjectAdapter targetAdapter = adapterFor(targetOidDto);
+                            final ObjectAction objectAction = findObjectAction(targetAdapter, memberId);
 
-                                // we pass 'null' for the mixedInAdapter; if this action _is_ a mixin then
-                                // it will switch the targetAdapter to be the mixedInAdapter transparently
-                                final ObjectAdapter[] argAdapters = argAdaptersFor(actionDto);
-                                final ObjectAdapter resultAdapter = objectAction.execute(
-                                        targetAdapter, null, argAdapters, InteractionInitiatedBy.FRAMEWORK);
+                            // we pass 'null' for the mixedInAdapter; if this action _is_ a mixin then
+                            // it will switch the targetAdapter to be the mixedInAdapter transparently
+                            final ObjectAdapter[] argAdapters = argAdaptersFor(actionDto);
+                            final ObjectAdapter resultAdapter = objectAction.execute(
+                                    targetAdapter, null, argAdapters, InteractionInitiatedBy.FRAMEWORK);
 
-                                //
-                                // for the result adapter, we could alternatively have used...
-                                // (priorExecution populated by the push/pop within the interaction object)
-                                //
-                                // final Interaction.Execution priorExecution = backgroundInteraction.getPriorExecution();
-                                // Object unused = priorExecution.getReturned();
-                                //
+                            //
+                            // for the result adapter, we could alternatively have used...
+                            // (priorExecution populated by the push/pop within the interaction object)
+                            //
+                            // final Interaction.Execution priorExecution = backgroundInteraction.getPriorExecution();
+                            // Object unused = priorExecution.getReturned();
+                            //
 
-                                // REVIEW: this doesn't really make sense if >1 action
-                                // in any case, the capturing of the action interaction should be the
-                                // responsibility of auditing/profiling
-                                if(resultAdapter != null) {
-                                    Bookmark resultBookmark = CommandUtil.bookmarkFor(resultAdapter);
-                                    backgroundCommand.setResult(resultBookmark);
-                                }
+                            // REVIEW: this doesn't really make sense if >1 action
+                            // in any case, the capturing of the action interaction should be the
+                            // responsibility of auditing/profiling
+                            if(resultAdapter != null) {
+                                Bookmark resultBookmark = CommandUtil.bookmarkFor(resultAdapter);
+                                backgroundCommand.setResult(resultBookmark);
                             }
-                        } else {
+                        }
+                    } else {
 
-                            final PropertyDto propertyDto = (PropertyDto) memberDto;
+                        final PropertyDto propertyDto = (PropertyDto) memberDto;
 
-                            for (OidDto targetOidDto : targetOidDtos) {
+                        for (OidDto targetOidDto : targetOidDtos) {
 
-                                final Bookmark bookmark = Bookmark.from(targetOidDto);
-                                final Object targetObject = bookmarkService.lookup(bookmark);
+                            final Bookmark bookmark = Bookmark.from(targetOidDto);
+                            final Object targetObject = bookmarkService.lookup(bookmark);
 
-                                final ObjectAdapter targetAdapter = adapterFor(targetObject);
+                            final ObjectAdapter targetAdapter = adapterFor(targetObject);
 
-                                final OneToOneAssociation property = findOneToOneAssociation(targetAdapter, memberId);
+                            final OneToOneAssociation property = findOneToOneAssociation(targetAdapter, memberId);
 
-                                final ObjectAdapter newValueAdapter = newValueAdapterFor(propertyDto);
+                            final ObjectAdapter newValueAdapter = newValueAdapterFor(propertyDto);
 
-                                property.set(targetAdapter, newValueAdapter, InteractionInitiatedBy.FRAMEWORK);
-                                // there is no return value for property modifications.
-                            }
+                            property.set(targetAdapter, newValueAdapter, InteractionInitiatedBy.FRAMEWORK);
+                            // there is no return value for property modifications.
                         }
-
                     }
 
                 } catch (RuntimeException e) {

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

[isis] 03/08: ISIS-1742: removes ActionInvocationMemento, and simplifies BackgroundCommandService. Now use CommandDto. Remove support for legacy persisted commands (beginning "...")

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 63f6dee44fda743d16583e7bb89369ab0411dad5
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 14:26:47 2017 +0100

    ISIS-1742: removes ActionInvocationMemento, and simplifies BackgroundCommandService.  Now use CommandDto.  Remove support for legacy persisted commands (beginning "<memento>...")
---
 .../asciidoc/guides/rgcms/_rgcms_schema-aim.adoc   | 107 ---------------
 .../guides/rgcms/_rgcms_schema-common.adoc         |   5 +-
 .../main/asciidoc/guides/rgcms/_rgcms_schema.adoc  |   4 -
 ...pplication-layer_CommandDtoServiceInternal.adoc |  21 ++-
 ...ication-layer-spi_BackgroundCommandService.adoc |  32 +----
 ...amming-model_view-models_dto_dto-consumers.adoc |   2 +-
 .../background/ActionInvocationMemento.java        | 145 ---------------------
 .../background/BackgroundCommandService.java       |  18 +--
 .../background/BackgroundCommandService2.java      |  13 +-
 .../services/background/BackgroundService.java     |  10 --
 .../command/CommandDtoServiceInternal.java         |   9 --
 .../background/BackgroundCommandExecution.java     | 113 ++++++++--------
 .../background/BackgroundServiceDefault.java       |  26 +---
 .../command/CommandDtoServiceInternalDefault.java  |  38 ------
 todo-deprecation-list.txt                          |  24 ++--
 15 files changed, 97 insertions(+), 470 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-aim.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-aim.adoc
deleted file mode 100644
index 8964c63..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-aim.adoc
+++ /dev/null
@@ -1,107 +0,0 @@
-[[_rgcms_schema-aim]]
-= Action Invocation Memento
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:_basedir: ../../
-:_imagesdir: images/
-
-
-
-The "aim" schema defines the serialized form (or memento) of an action invocation.
-
-[WARNING]
-====
-This schema has been removed in `1.13.0`, replaced with xref:../rgcms/rgcms.adoc#_rgcms_schema-ixn[ixn.xsd] (for action
-invocations/property edits) and with xref:../rgcms/rgcms.adoc#_rgcms_schema-cmd[cmd.xsd] (commands, ie the __intention__ to
-invoke an action/edit a property).
-
-The remaining content on this page describes how `CommandContext` works up to v1.12.x.  However, as of `1.13.0` the `CommandContext` uses its own `cmd.xsd` schema).
-====
-
-Action invocations are captured (in memory rather than in serialized form) when the end-user invokes the action
-"through" the UI, by way of the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_CommandContext[CommandContext] service. Using the
-`ActionInvocationMementoDtoUtils` utility class, a service can instantiate `ActionInvocationMementoDto` which can then
-be serialized to/from using the same `ActionInvocationMementoDtoUtils` class.
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema targetNamespace="http://isis.apache.org/schema/aim"                              <!--1-->
-           elementFormDefault="qualified"
-           xmlns:xs="http://www.w3.org/2001/XMLSchema"
-           xmlns="http://isis.apache.org/schema/aim"
-           xmlns:common="http://isis.apache.org/schema/common">
-
-    <xs:import namespace="http://isis.apache.org/schema/common"                             <!--2-->
-               schemaLocation="http://isis.apache.org/schema/common/common-1.0.xsd"/>
-
-    <xs:element name="actionInvocationMementoDto">                                          <!--3-->
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="metadata">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="transactionId" type="xs:string"/>             <!--4-->
-                            <xs:element name="sequence" type="xs:int"/>                     <!--5-->
-                            <xs:element name="timestamp" type="xs:dateTime"/>               <!--6-->
-                            <xs:element name="target" type="common:oidDto"/>                <!--7-->
-                            <xs:element name="targetClass" type="xs:string"/>               <!--8-->
-                            <xs:element name="targetAction" type="xs:string"/>              <!--9-->
-                            <xs:element name="actionIdentifier" type="xs:string"/>          <!--10-->
-                            <xs:element name="user" type="xs:string"/>                      <!--11-->
-                            <xs:element name="title" type="xs:string"/>                     <!--12-->
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-                <xs:element name="payload">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="parameters">                                  <!--13-->
-                                <xs:complexType>
-                                    <xs:sequence maxOccurs="unbounded">
-                                        <xs:element name="param" type="paramDto"/>
-                                    </xs:sequence>
-                                    <xs:attribute name="num" use="required" type="xs:int"/>
-                                </xs:complexType>
-                            </xs:element>
-                            <xs:element name="return" type="common:valueDto"                <!--14-->
-                                        minOccurs="0" maxOccurs="1"/>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:complexType name="paramDto">                                                        <!--15-->
-        <xs:sequence>
-            <xs:element name="value" type="common:valueDto"/>                               <!--16-->
-        </xs:sequence>
-        <xs:attribute name="parameterName" use="required" type="xs:string"/>                <!--17-->
-        <xs:attribute name="parameterType" use="required" type="common:valueType"/>
-        <xs:attribute name="null" use="optional" type="xs:boolean"/>
-    </xs:complexType>
-</xs:schema>
-----
-<1> the aim schema has a namespace URI of "http://isis.apache.org/schema/aim".  Although URIs are not the same as URLs, you will find that the schemas are also downloadable from this location.
-<2> reuses the xref:../rgcms/rgcms.adoc#_rgcms_schema-common[common] schema
-<3> definition of the `actionInvocationMementoDto` complex type. This consists of metadata (the transaction identifier, the target object, the initiating user) and the payload (the action parameter/arguments, the return value if known).
-<4> the unique transaction Id (a guid) allocated by the framework for each and every transaction
-<5> a sequence number within the transaction.  It is possible for there to be more than one action invocation to be
-<6> when the action was invoked
-<7> target object, as an OID (using `oidDto` from the xref:../rgcms/rgcms.adoc#_rgcms_schema-common[common] schema)
-<8> fully qualified class name of the target object, for information only
-<9> name of the action, for information only
-<10> Javadoc style unique identifier for the action.
-<11> User that invoked the action
-<12> title of the target object, for information only
-<13> Collection of parameter/arguments, defined in terms of the `paramDto` complex type (discussed just below)
-<14> The return value of the action, if known (and not void)
-<15> The `paramDto` defines both an action parameter and its corresponding argument values
-<16> The value of the parameter, in other words an argument value
-<17> Metadata about the parameter itself: its name, type, optionality.
-
-[NOTE]
-====
-As of `1.11.0` through `1.12.2` this schema is not used directly by the framework; in particular
-`Command#setMemento(...)` sets a similar but less formal XML structure.  This may change in the future.
-====
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-common.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-common.adoc
index 9e2a9dc..35acf2b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-common.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-common.adoc
@@ -130,9 +130,8 @@ The common schema also defines two types representing values: the `valueDto` com
 Used for the return value of action invocations, and for the new value in property edits.
 
 
-These type definitions are just building blocks, also used within the xref:../rgcms/rgcms.adoc#_rgcms_schema-aim[action iInvocation memento] schema.
-The first, `valueDto` is The second, `valueType`, enumerates the different types of vales, eg of a
-formal parameter to an action.
+These type definitions are just building blocks.
+The first, `valueDto` is The second, `valueType`, enumerates the different types of vales, eg of a formal parameter to an action.
 
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema.adoc
index 359ce8f..a49eb22 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema.adoc
@@ -17,9 +17,6 @@ to invoke an action or edit a property
 * the xref:../rgcms/rgcms.adoc#_rgcms_schema-chg[changes] schema, which captures which objects have been
 created, updated or deleted as the result of an execution of an action invocation/property edit
 
-* the xref:../rgcms/rgcms.adoc#_rgcms_schema-aim[action memento invocation] schema (deprecated in `1.13.0`, replaced by
-either "cmd" or "ixn"), which allows action invocations to be captured and reified.
-
 These each use XSD types defined by the xref:../rgcms/rgcms.adoc#_rgcms_schema-common[common schema] (most notably the `oidDto`
 complex type which identifies a domain object).
 
@@ -31,5 +28,4 @@ The sections below discuss these schemas in more detail.
 include::_rgcms_schema-cmd.adoc[leveloffset=+1]
 include::_rgcms_schema-ixn.adoc[leveloffset=+1]
 include::_rgcms_schema-chg.adoc[leveloffset=+1]
-include::_rgcms_schema-aim.adoc[leveloffset=+1]
 include::_rgcms_schema-common.adoc[leveloffset=+1]
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer_CommandDtoServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer_CommandDtoServiceInternal.adoc
index 1f00cc3..729ea18 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer_CommandDtoServiceInternal.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer_CommandDtoServiceInternal.adoc
@@ -20,36 +20,31 @@ The SPI of the service is:
 [source,java]
 ----
 public interface CommandDtoServiceInternal {
-    @Deprecated
-    ActionInvocationMemento asActionInvocationMemento(      // <1>
-            Method m,
-            Object domainObject, Object[] args);
-    CommandDto asCommandDto(                                // <2>
+    CommandDto asCommandDto(                                // <1>
             List<ObjectAdapter> targetAdapters,
             ObjectAction objectAction,
             ObjectAdapter[] argAdapters);
-    CommandDto asCommandDto(                                // <3>
+    CommandDto asCommandDto(                                // <2>
             final List<ObjectAdapter> targetAdapters,
             final OneToOneAssociation association,
             final ObjectAdapter valueAdapterOrNull);
-    void addActionArgs(                                     // <4>
+    void addActionArgs(                                     // <3>
             final ObjectAction objectAction,
             final ActionDto actionDto,
             final ObjectAdapter[] argAdapters);
-    void addPropertyValue(                                  // <5>
+    void addPropertyValue(                                  // <4>
             final OneToOneAssociation property,
             final PropertyDto propertyDto,
             final ObjectAdapter valueAdapter);
 }
 ----
-<1> Note that this method (more precisely, `ActionInvocationMemento`) does __not__ support mixins.
-<2> Returns a JAXB DTO being an instance of the xref:../rgcms/rgcms.adoc#_rgcms_schema-cmd["cmd" schema] (hence convertible to
+<1> Returns a JAXB DTO being an instance of the xref:../rgcms/rgcms.adoc#_rgcms_schema-cmd["cmd" schema] (hence convertible to
 XML) that represents the __intention__ to invoke an action on a target object (or possibly many targets, for
 bulk actions).  If an action, it can also be either mixin action or a contributed action.
-<3> Returns a JAXB DTO that represents the intention to edit (set or clear) a property on a target (or possibly many
+<2> Returns a JAXB DTO that represents the intention to edit (set or clear) a property on a target (or possibly many
 targets, for symmetry with actions).
-<4> add the arguments of an action to an `ActionDto`.  This is used when the command is actually executed (per xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`]) to populate the parameters of the equivalent `ActionInvocationDto`.
-<5> add the new value argument of a property to a `PropertyDto`.  This is used when the command is actually executed (per xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`]) to set the the new value of the equivalent `PropertyEditDto`.
+<3> add the arguments of an action to an `ActionDto`.  This is used when the command is actually executed (per xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`]) to populate the parameters of the equivalent `ActionInvocationDto`.
+<4> add the new value argument of a property to a `PropertyDto`.  This is used when the command is actually executed (per xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`]) to set the the new value of the equivalent `PropertyEditDto`.
 
 
 The SPI is implemented by `o.a.i.c.r.s.command.CommandDtoServiceInternalServiceDefault`.
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_BackgroundCommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_BackgroundCommandService.adoc
index 83678b7..d4eb268 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_BackgroundCommandService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_BackgroundCommandService.adoc
@@ -1,12 +1,12 @@
 [[_rgsvc_application-layer-spi_BackgroundCommandService]]
-= `BackgroundCommandService`
+= `BackgroundCommandService2`
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
 :_basedir: ../../
 :_imagesdir: images/
 
 
 
-The `BackgroundCommandService` (SPI) service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_BackgroundService[`BackgroundService`] (API) service, persisting action invocations as commands such that they can subsequently be invoked in the background.
+The `BackgroundCommandService2` (SPI) service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_BackgroundService[`BackgroundService`] (API) service, persisting action invocations as commands such that they can subsequently be invoked in the background.
 
 The `BackgroundService` is responsible for capturing a memento representing the action invocation, and then hands off to the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_BackgroundCommandService[`BackgroundCommandService`] `BackgroundCommandService` to actually persist it.
 
@@ -17,41 +17,23 @@ The persisting of commands is only half the story; there needs to be a separate
 
 == SPI
 
-The SPI of the `BackgroundCommandService` is:
+The SPI of the `BackgroundCommandService2` is:
 
 [source,java]
 ----
-public interface BackgroundCommandService {
+public interface BackgroundCommandService2 {
     void schedule(
-            ActionInvocationMemento aim,        // <1>
-            Command parentCommand,              // <2>
+            CommandDto dto,             // <1>
+            Command parentCommand,      // <2>
             String targetClassName,
             String targetActionName,
             String targetArgs);
 
 }
 ----
-<1> is a wrapper around a xref:../rgsvc/rgsvc.adoc#_rgsvc_integration-api_MementoService[`MementoService`]'s `Memento`, capturing the details of the action invocation to be retained (eg persisted to a database) so that it can be executed at a later time
+<1> an instance of a xref:../rgcms/rgcms.adoc#_rgcms_schema-cmd[`CommandDto`] capturing the details of the action invocation or property edit to be retained (eg persisted to a database) so that it can be executed at a later time
 <2> reference to the parent `Command` requesting the action be performed as a background command.  This allows information such as the initiating user to be obtained.
 
-The API of `ActionInvocationMemento` in turn is:
-
-[source,java]
-----
-public class ActionInvocationMemento {
-    public String getActionId() { ... }
-    public String getTargetClassName() { ... }
-    public String getTargetActionName() { ... }
-    public Bookmark getTarget() { ... }
-    public int getNumArgs() { ... }
-    public Class<?> getArgType(int num) throws ClassNotFoundException { ... }
-    public <T> T getArg(int num, Class<T> type) { ... }
-
-    public String asMementoString() { ... }     // <1>
-}
-----
-<1> lets the `BackgroundCommandService` implementation convert the action invocation into a simple string.
-
 
 
 == "Internal" SPI
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc
index e1767ff..7843f31 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc
@@ -23,7 +23,7 @@ In our case we focus on the validation (to determine the nature of the inbound m
 ====
 
 The (non-ASF) link:http://platform.incode.org[Incode Platform^]'s publishmq module provides an out-of-the-box solution of this design.
-It provides an implementation of the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`], but which simply publishes instances of xref:../rgcms/rgcms.adoc#_rgcms_schema-aim[`ActionInvocationMemento`] to an ActiveMQ queue.
+It provides an implementation of the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`], but which simply publishes instances of xref:../rgcms/rgcms.adoc#_rgcms_schema-ixn[`InteractionDto`] to an ActiveMQ queue.
 Camel (or similar) can then be hooked up to consume these events from this queue, and use a processor to parse the action memento to determine what has changed on the source system.
 Thereafter, a subsequent Camel processor can then call back to the source - via the xref:../ugvro/ugvro.adoc#[Restful Objects viewer] - to enrich the message with additional details using a DTO.
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/background/ActionInvocationMemento.java b/core/applib/src/main/java/org/apache/isis/applib/services/background/ActionInvocationMemento.java
deleted file mode 100644
index 08286da..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/background/ActionInvocationMemento.java
+++ /dev/null
@@ -1,145 +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.background;
-
-import java.util.Iterator;
-import java.util.List;
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.memento.MementoService;
-import org.apache.isis.applib.services.memento.MementoService.Memento;
-import org.apache.isis.schema.cmd.v1.CommandDto;
-
-/**
- * A memento for an action invocation, to allow the details of an action invocation
- * to be captured and stored, then executed later.
- * 
- * <p>
- * Provided as a mechanism by which implementations of {@link BackgroundService} can 
- * hand-off work to the {@link BackgroundCommandService}.  This is used by the
- * default implementation of <tt>BackgroundServiceDefault</tt> in the <tt>isis-module-background</tt> module.
- * </p>
- *
- * <p>
- * Implementation-wise this is a wrapper around {@link MementoService.Memento},
- * and abstracts away the details of the keys used to store the various pieces of
- * information stored in the underlying memento.
- * </p>
- *
- * <p>
- * Note that this class - unlike {@link CommandDto} does <i>not</i> support mixins.
- * </p>
- *
- * @deprecated - use {@link CommandDto} instead.
- */
-@Deprecated
-public class ActionInvocationMemento {
-
-    private final Memento memento;
-
-    public ActionInvocationMemento(
-            final MementoService mementoService, 
-            final String actionId, 
-            final Bookmark target,
-            final List<Class<?>> argTypes,
-            final List<Object> args) {
-        
-        if(argTypes.size() != args.size()) {
-            throw new IllegalArgumentException("argTypes and args must be same size");
-        }
-        
-        this.memento = mementoService.create();
-        memento.set("actionId", actionId);
-        memento.set("target", target);
-        memento.set("numArgs", args.size());
-        
-        final Iterator<Class<?>> iterArgTypes = argTypes.iterator();
-        final Iterator<Object> iterArgs = args.iterator();
-        int i=0;
-        while(iterArgTypes.hasNext() && iterArgs.hasNext()) {
-            memento.set("arg" + i + "Type", iterArgTypes.next().getName());
-            memento.set("arg" + i         , iterArgs.next());
-            i++;
-        }
-    }
-    
-    public ActionInvocationMemento(final MementoService mementoService, final String mementoStr) {
-        this.memento = mementoService.parse(mementoStr);
-    }
-    
-    // //////////////////////////////////////
-
-    
-    public String getActionId() {
-        return memento.get("actionId", String.class);
-    }
-
-    /**
-     * @deprecated - always returns <tt>null</tt>; use {@link #getActionId()} instead.
-     */
-    @Deprecated
-    public String getTargetClassName() {
-        return memento.get("targetClassName", String.class);
-    }
-
-    /**
-     * @deprecated - always returns <tt>null</tt>; use {@link #getActionId()} instead.
-     */
-    @Deprecated
-    public String getTargetActionName() {
-        return memento.get("targetActionName", String.class);
-    }
-    
-    public Bookmark getTarget() {
-        return memento.get("target", Bookmark.class);
-    }
-    
-    public int getNumArgs() {
-        return memento.get("numArgs", Integer.class);
-    }
-
-    public Class<?> getArgType(final int num) throws ClassNotFoundException {
-        String className = memento.get("arg" + num + "Type", String.class);
-        if(className.equals("byte")) return byte.class;
-        if(className.equals("short")) return short.class;
-        if(className.equals("int")) return int.class;
-        if(className.equals("long")) return long.class;
-        if(className.equals("float")) return float.class;
-        if(className.equals("double")) return double.class;
-        if(className.equals("char")) return char.class;
-        if(className.equals("boolean")) return boolean.class;
-        return className != null? Thread.currentThread().getContextClassLoader().loadClass(className): null;
-    }
-    
-    public <T> T getArg(final int num, final Class<T> type) {
-        return memento.get("arg" + num, type);
-    }
-    
-    // //////////////////////////////////////
-
-    public String asMementoString() {
-        return memento.asString();
-    }
-
-    // //////////////////////////////////////
-    
-    @Override
-    public String toString() {
-        return asMementoString();
-    }
-
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService.java b/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService.java
index 919a700..11621d8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService.java
@@ -16,11 +16,8 @@
  */
 package org.apache.isis.applib.services.background;
 
-import org.apache.isis.applib.services.command.Command;
-
-
 /**
- * Persists a {@link ActionInvocationMemento memento-ized} action such that it can be executed asynchronously,
+ * Persists a {@link org.apache.isis.schema.cmd.v1.CommandDto command-reified} action such that it can be executed asynchronously,
  * for example through a Quartz scheduler.
  *
  * <p>
@@ -35,20 +32,7 @@ import org.apache.isis.applib.services.command.Command;
  * annotated with {@link org.apache.isis.applib.annotation.DomainService} so that it is automatically registered as
  * a service.
  *
- * <p>
- *     If an implementation also implements {@link BackgroundCommandService2}, then
- *     {@link BackgroundCommandService2#schedule(ActionInvocationMemento, Command, String, String, String)} will be
- *     called rather than {@link BackgroundCommandService#schedule(ActionInvocationMemento, Command, String, String, String)}.
- * </p>
  */
 public interface BackgroundCommandService {
 
-    /**
-     * @deprecated - replaced by {@link BackgroundCommandService2#schedule(ActionInvocationMemento, Command, String, String, String)}
-     */
-    @Deprecated
-    void schedule(
-            final ActionInvocationMemento aim, 
-            final Command command, 
-            final String targetClassName, final String targetActionName, final String targetArgs);
 }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService2.java b/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService2.java
index c79a1fa..e693592 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService2.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService2.java
@@ -20,21 +20,12 @@ import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.schema.cmd.v1.CommandDto;
 
 /**
- * Persists a {@link org.apache.isis.schema.cmd.v1.CommandDto memento-ized} command such that it can be executed asynchronously,
- * for example through a Quartz scheduler.
- *
- * <p>
- *     If an implementation of {@link BackgroundCommandService} also implements this interface, then its version of {@link #schedule(ActionInvocationMemento, Command, String, String, String)}  will be used instead.
- * </p>
+ * Persists a {@link org.apache.isis.schema.cmd.v1.CommandDto memento-ized} command such that it can be
+ * executed asynchronously, for example through a Quartz scheduler.
  *
  */
 public interface BackgroundCommandService2 extends BackgroundCommandService {
 
-    /**
-     * Will be called instead of
-     * {@link BackgroundCommandService#schedule(ActionInvocationMemento, Command, String, String, String)}
-     * (ie if the implementation implements this interface rather than simply {@link BackgroundCommandService}).
-     */
     void schedule(
             final CommandDto dto,
             final Command parentCommand,
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundService.java b/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundService.java
index 9a5a486..158a86a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundService.java
@@ -16,8 +16,6 @@
  */
 package org.apache.isis.applib.services.background;
 
-import java.lang.reflect.Method;
-
 import org.apache.isis.applib.annotation.Programmatic;
 
 /**
@@ -49,13 +47,5 @@ public interface BackgroundService {
     @Programmatic
     <T> T execute(final T object);
 
-    /**
-     * Not API: for framework use only.
-     *
-     * @deprecated - no longer called by the framework (moved to <tt>InteractionDtoServiceInternal</tt>, an internal SPI service).
-     */
-    @Deprecated
-    @Programmatic
-    ActionInvocationMemento asActionInvocationMemento(Method m, Object domainObject, Object[] args);
 
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java
index 40321ab..c1bb4a3 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java
@@ -20,7 +20,6 @@ import java.lang.reflect.Method;
 import java.util.List;
 
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.background.ActionInvocationMemento;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
@@ -34,14 +33,6 @@ import org.apache.isis.schema.cmd.v1.PropertyDto;
  */
 public interface CommandDtoServiceInternal {
 
-    /**
-     * Note that this method (more precisely, {@link ActionInvocationMemento}) does <i>not</i> support mixins.
-     *
-     * @deprecated - use {@link #asCommandDto(List, ObjectAction, ObjectAdapter[])} instead.
-     */
-    @Deprecated
-    @Programmatic
-    ActionInvocationMemento asActionInvocationMemento(Method m, Object domainObject, Object[] args);
 
     /**
      * Returns a JAXB DTO (hence convertible to XML) that represents the intention to invoke an action on a
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
index 6787c25..2b9303d 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
@@ -25,7 +25,6 @@ import com.google.common.base.Throwables;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
-import org.apache.isis.applib.services.background.ActionInvocationMemento;
 import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.bookmark.BookmarkService2;
 import org.apache.isis.applib.services.clock.ClockService;
@@ -123,40 +122,40 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
                 try {
                     backgroundCommand.setExecutor(Executor.BACKGROUND);
 
-                    final boolean legacy = memento.startsWith("<memento");
+                    final boolean legacy = false; // memento.startsWith("<memento");
                     if(legacy) {
 
-                        final ActionInvocationMemento aim = new ActionInvocationMemento(mementoService, memento);
-
-                        final String actionId = aim.getActionId();
-
-                        final Bookmark targetBookmark = aim.getTarget();
-                        final Object targetObject = bookmarkService.lookup(
-                                                        targetBookmark, BookmarkService2.FieldResetPolicy.RESET);
-
-                        final ObjectAdapter targetAdapter = adapterFor(targetObject);
-                        final ObjectSpecification specification = targetAdapter.getSpecification();
-
-                        final ObjectAction objectAction = findActionElseNull(specification, actionId);
-                        if(objectAction == null) {
-                            throw new RuntimeException(String.format("Unknown action '%s'", actionId));
-                        }
-
-                        // TODO: background commands won't work for mixin actions...
-                        // ... we obtain the target from the bookmark service (above), which will
-                        // simply fail for a mixin.  Instead we would need to serialize out the mixedInAdapter
-                        // and also capture the mixinType within the aim memento.
-                        final ObjectAdapter mixedInAdapter = null;
-
-                        final ObjectAdapter[] argAdapters = argAdaptersFor(aim);
-                        final ObjectAdapter resultAdapter = objectAction.execute(
-                                targetAdapter, mixedInAdapter, argAdapters, InteractionInitiatedBy.FRAMEWORK);
-
-                        if(resultAdapter != null) {
-                            Bookmark resultBookmark = CommandUtil.bookmarkFor(resultAdapter);
-                            backgroundCommand.setResult(resultBookmark);
-                            backgroundInteraction.getCurrentExecution().setReturned(resultAdapter.getObject());
-                        }
+//                        final ActionInvocationMemento aim = new ActionInvocationMemento(mementoService, memento);
+//
+//                        final String actionId = aim.getActionId();
+//
+//                        final Bookmark targetBookmark = aim.getTarget();
+//                        final Object targetObject = bookmarkService.lookup(
+//                                                        targetBookmark, BookmarkService2.FieldResetPolicy.RESET);
+//
+//                        final ObjectAdapter targetAdapter = adapterFor(targetObject);
+//                        final ObjectSpecification specification = targetAdapter.getSpecification();
+//
+//                        final ObjectAction objectAction = findActionElseNull(specification, actionId);
+//                        if(objectAction == null) {
+//                            throw new RuntimeException(String.format("Unknown action '%s'", actionId));
+//                        }
+//
+//                        // TODO: background commands won't work for mixin actions...
+//                        // ... we obtain the target from the bookmark service (above), which will
+//                        // simply fail for a mixin.  Instead we would need to serialize out the mixedInAdapter
+//                        // and also capture the mixinType within the aim memento.
+//                        final ObjectAdapter mixedInAdapter = null;
+//
+//                        final ObjectAdapter[] argAdapters = argAdaptersFor(aim);
+//                        final ObjectAdapter resultAdapter = objectAction.execute(
+//                                targetAdapter, mixedInAdapter, argAdapters, InteractionInitiatedBy.FRAMEWORK);
+//
+//                        if(resultAdapter != null) {
+//                            Bookmark resultBookmark = CommandUtil.bookmarkFor(resultAdapter);
+//                            backgroundCommand.setResult(resultBookmark);
+//                            backgroundInteraction.getCurrentExecution().setReturned(resultAdapter.getObject());
+//                        }
 
                     } else {
 
@@ -306,30 +305,30 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
         return null;
     }
 
-    private ObjectAdapter[] argAdaptersFor(final ActionInvocationMemento aim)  {
-        final int numArgs = aim.getNumArgs();
-        final List<ObjectAdapter> argumentAdapters = Lists.newArrayList();
-        for(int i=0; i<numArgs; i++) {
-            final ObjectAdapter argAdapter = argAdapterFor(aim, i);
-            argumentAdapters.add(argAdapter);
-        }
-        return argumentAdapters.toArray(new ObjectAdapter[]{});
-    }
-
-    private ObjectAdapter argAdapterFor(final ActionInvocationMemento aim, int num) {
-        final Class<?> argType;
-        try {
-            argType = aim.getArgType(num);
-            final Object arg = aim.getArg(num, argType);
-            if(arg == null) {
-                return null;
-            }
-            return argAdapterFor(argType, arg);
-
-        } catch (ClassNotFoundException e) {
-            throw new RuntimeException(e);
-        }
-    }
+//    private ObjectAdapter[] argAdaptersFor(final ActionInvocationMemento aim)  {
+//        final int numArgs = aim.getNumArgs();
+//        final List<ObjectAdapter> argumentAdapters = Lists.newArrayList();
+//        for(int i=0; i<numArgs; i++) {
+//            final ObjectAdapter argAdapter = argAdapterFor(aim, i);
+//            argumentAdapters.add(argAdapter);
+//        }
+//        return argumentAdapters.toArray(new ObjectAdapter[]{});
+//    }
+//
+//    private ObjectAdapter argAdapterFor(final ActionInvocationMemento aim, int num) {
+//        final Class<?> argType;
+//        try {
+//            argType = aim.getArgType(num);
+//            final Object arg = aim.getArg(num, argType);
+//            if(arg == null) {
+//                return null;
+//            }
+//            return argAdapterFor(argType, arg);
+//
+//        } catch (ClassNotFoundException e) {
+//            throw new RuntimeException(e);
+//        }
+//    }
 
     protected ObjectAdapter targetAdapterFor(final OidDto targetOidDto) {
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
index 8282ae8..8b279d6 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
@@ -29,7 +29,6 @@ import javax.annotation.PreDestroy;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.background.ActionInvocationMemento;
 import org.apache.isis.applib.services.background.BackgroundCommandService;
 import org.apache.isis.applib.services.background.BackgroundCommandService2;
 import org.apache.isis.applib.services.background.BackgroundService2;
@@ -224,21 +223,14 @@ public class BackgroundServiceDefault implements BackgroundService2 {
 
                 final Command command = commandContext.getCommand();
 
-                if(backgroundCommandService instanceof BackgroundCommandService2) {
-                    final BackgroundCommandService2 bcs2 = (BackgroundCommandService2) backgroundCommandService;
+                final BackgroundCommandService2 bcs2 = (BackgroundCommandService2) backgroundCommandService;
 
-                    final List<ObjectAdapter> targetList = Collections.singletonList(domainObjectAdapter);
-                    final CommandDto dto =
-                            commandDtoServiceInternal.asCommandDto(targetList, action, argAdapters);
+                final List<ObjectAdapter> targetList = Collections.singletonList(domainObjectAdapter);
+                final CommandDto dto =
+                        commandDtoServiceInternal.asCommandDto(targetList, action, argAdapters);
 
-                    bcs2.schedule(dto, command, domainObjectClassName, targetActionName, targetArgs);
-                } else {
-                    // fallback
-                    final ActionInvocationMemento aim =
-                            commandDtoServiceInternal.asActionInvocationMemento(proxyMethod, target, args);
+                bcs2.schedule(dto, command, domainObjectClassName, targetActionName, targetArgs);
 
-                    backgroundCommandService.schedule(aim, command, domainObjectClassName, targetActionName, targetArgs);
-                }
 
                 return null;
             }
@@ -268,14 +260,6 @@ public class BackgroundServiceDefault implements BackgroundService2 {
         };
     }
 
-    // //////////////////////////////////////
-
-    @Programmatic
-    @Override
-    public ActionInvocationMemento asActionInvocationMemento(Method method, Object domainObject, Object[] args) {
-        throw new RuntimeException("Replaced by InteractionDtoServiceInternal");
-    }
-
 
     // //////////////////////////////////////
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java
index cafbf2f..781b67a 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java
@@ -28,7 +28,6 @@ import com.google.common.collect.Lists;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.background.ActionInvocationMemento;
 import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.bookmark.BookmarkService;
 import org.apache.isis.applib.services.command.Command;
@@ -106,43 +105,6 @@ public class CommandDtoServiceInternalDefault implements CommandDtoServiceIntern
 
     // //////////////////////////////////////
 
-    @Deprecated
-    @Programmatic
-    @Override
-    public ActionInvocationMemento asActionInvocationMemento(
-            final Method method,
-            final Object domainObject,
-            final Object[] args) {
-        
-        final ObjectSpecificationDefault targetObjSpec = getJavaSpecificationOfOwningClass(method);
-        final ObjectMember member = targetObjSpec.getMember(method);
-        if(member == null) {
-            return null;
-        }
-
-        if(!(member instanceof ObjectAction)) {
-            throw new UnsupportedOperationException(String.format(
-                    "Method %s does not correspond to an action.", method.getName()));
-        }
-
-        final ObjectAction action = (ObjectAction) member;
-        final String actionIdentifier = CommandUtil.memberIdentifierFor(action);
-        
-        final Bookmark domainObjectBookmark = bookmarkService.bookmarkFor(domainObject);
-
-        final List<Class<?>> argTypes = Lists.newArrayList();
-        final List<Object> argObjs = Lists.newArrayList();
-        CommandUtil.buildMementoArgLists(mementoService, bookmarkService, method, args, argTypes, argObjs);
-
-        final ActionInvocationMemento aim = 
-                new ActionInvocationMemento(mementoService, 
-                        actionIdentifier, 
-                        domainObjectBookmark,
-                        argTypes,
-                        argObjs);
-       
-        return aim;
-    }
 
     @Override
     public CommandDto asCommandDto(
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index 66a7764..3d71494 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -18,17 +18,8 @@ org.apache.isis.applib.clock
     Clock
 
 
-
-org.apache.isis.applib.services.actinvoc
-    ActionInvocationContext.java -remove unused constructors
-
 org.apache.isis.applib.services.audit  (2 usages found)
     AuditingService3.java - remove entire service, use AuditerService instead
-org.apache.isis.applib.services.background  (10 usages found)
-    ActionInvocationMemento.java - remove entire class, use InteractionDto and CommandDto are used internally instead
-    BackgroundCommandService.java - remove methods using AIM, instead keep those using CommandDto (in BackgroundCommandService2)
-    BackgroundService.java
-        asActionInvocationMemento(Method, Object, Object[]) - remove this internal API, no longer called by framework
 
 org.apache.isis.applib.services.bookmark  (8 usages found)
     BookmarkService.java - deprecated methods, have overloads in BookmarkService2 subtype [suggest we retain these for now]
@@ -428,6 +419,21 @@ org.apache.isis.applib.fixturescripts
 
     FixtureScripts.MultipleExecutionStrategy#IGNORE removed, replaced by EXECUTE_ONCE_BY_CLASS
 
+
+org.apache.isis.applib.services.actinvoc
+    ActionInvocationContext.java -remove unused constructors
+
+
+org.apache.isis.applib.services.background  (10 usages found)
+    ActionInvocationMemento.java - remove entire class, use InteractionDto and CommandDto are used internally instead
+    BackgroundCommandService.java - remove methods using AIM, instead keep those using CommandDto (in BackgroundCommandService2)
+    BackgroundService.java
+        asActionInvocationMemento(Method, Object, Object[]) - remove this internal API, no longer called by framework
+
+    Remove support for legacy persisted commands (beginning "<memento>...")
+
+
+
 org.apache.isis.viewer.restfulobjects.rendering.service.conmap.ContentMappingService
     - replaced by non-applib
 

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

[isis] 04/08: ISIS-1742: deletes commented out code in BackgroundCommandExecution

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 1c51dff958c56e3a982b238569a55e007a77767e
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Oct 16 14:28:10 2017 +0100

    ISIS-1742: deletes commented out code in BackgroundCommandExecution
---
 .../background/BackgroundCommandExecution.java     | 55 ----------------------
 1 file changed, 55 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
index 2b9303d..7ab5003 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
@@ -125,37 +125,6 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
                     final boolean legacy = false; // memento.startsWith("<memento");
                     if(legacy) {
 
-//                        final ActionInvocationMemento aim = new ActionInvocationMemento(mementoService, memento);
-//
-//                        final String actionId = aim.getActionId();
-//
-//                        final Bookmark targetBookmark = aim.getTarget();
-//                        final Object targetObject = bookmarkService.lookup(
-//                                                        targetBookmark, BookmarkService2.FieldResetPolicy.RESET);
-//
-//                        final ObjectAdapter targetAdapter = adapterFor(targetObject);
-//                        final ObjectSpecification specification = targetAdapter.getSpecification();
-//
-//                        final ObjectAction objectAction = findActionElseNull(specification, actionId);
-//                        if(objectAction == null) {
-//                            throw new RuntimeException(String.format("Unknown action '%s'", actionId));
-//                        }
-//
-//                        // TODO: background commands won't work for mixin actions...
-//                        // ... we obtain the target from the bookmark service (above), which will
-//                        // simply fail for a mixin.  Instead we would need to serialize out the mixedInAdapter
-//                        // and also capture the mixinType within the aim memento.
-//                        final ObjectAdapter mixedInAdapter = null;
-//
-//                        final ObjectAdapter[] argAdapters = argAdaptersFor(aim);
-//                        final ObjectAdapter resultAdapter = objectAction.execute(
-//                                targetAdapter, mixedInAdapter, argAdapters, InteractionInitiatedBy.FRAMEWORK);
-//
-//                        if(resultAdapter != null) {
-//                            Bookmark resultBookmark = CommandUtil.bookmarkFor(resultAdapter);
-//                            backgroundCommand.setResult(resultBookmark);
-//                            backgroundInteraction.getCurrentExecution().setReturned(resultAdapter.getObject());
-//                        }
 
                     } else {
 
@@ -305,30 +274,6 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
         return null;
     }
 
-//    private ObjectAdapter[] argAdaptersFor(final ActionInvocationMemento aim)  {
-//        final int numArgs = aim.getNumArgs();
-//        final List<ObjectAdapter> argumentAdapters = Lists.newArrayList();
-//        for(int i=0; i<numArgs; i++) {
-//            final ObjectAdapter argAdapter = argAdapterFor(aim, i);
-//            argumentAdapters.add(argAdapter);
-//        }
-//        return argumentAdapters.toArray(new ObjectAdapter[]{});
-//    }
-//
-//    private ObjectAdapter argAdapterFor(final ActionInvocationMemento aim, int num) {
-//        final Class<?> argType;
-//        try {
-//            argType = aim.getArgType(num);
-//            final Object arg = aim.getArg(num, argType);
-//            if(arg == null) {
-//                return null;
-//            }
-//            return argAdapterFor(argType, arg);
-//
-//        } catch (ClassNotFoundException e) {
-//            throw new RuntimeException(e);
-//        }
-//    }
 
     protected ObjectAdapter targetAdapterFor(final OidDto targetOidDto) {
 

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