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 2016/05/13 18:14:00 UTC

[18/50] [abbrv] isis git commit: ISIS-1397: renaming CommandMementoDto to CommandDto (similarly). Also ...

ISIS-1397: renaming CommandMementoDto to CommandDto (similarly).  Also ...

also:
- adding an enum to distinguish cmd for actions vs props
- renaming CommandMementoService to CommandDtoService
  - completing its implementation for props
- refactored BackgroundCommandExecution so still handles actions (props still to do).


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/a9d706be
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/a9d706be
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/a9d706be

Branch: refs/heads/master
Commit: a9d706be1a086b732a4b462832784cbbeb5a4cea
Parents: 2c72a96
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon May 2 15:55:40 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon May 2 15:55:40 2016 +0100

----------------------------------------------------------------------
 .../src/main/asciidoc/schema/aim/aim-2.0.xsd    | 157 -----------
 .../src/main/asciidoc/schema/aim/aim.xsd        | 157 -----------
 .../src/main/asciidoc/schema/cmd/cmd-1.0.xsd    |  47 +++-
 .../src/main/asciidoc/schema/ixn/ixn-1.0.xsd    | 197 ++++++++++++++
 .../background/ActionInvocationMemento.java     |   6 +-
 .../background/BackgroundCommandService2.java   |   6 +-
 .../isis/applib/services/command/Command.java   |   6 +-
 .../isis/schema/utils/CommandDtoUtils.java      | 257 ++++++++++++++++++
 .../schema/utils/CommandMementoDtoUtils.java    | 272 -------------------
 .../isis/schema/utils/InteractionDtoUtils.java  |   6 +-
 .../actions/action/invocation/CommandUtil.java  |   4 +-
 .../services/command/CommandDtoService.java     |  79 ++++++
 .../services/command/CommandMementoService.java |  72 -----
 .../specimpl/ObjectActionDefault.java           |  10 +-
 .../specimpl/ObjectMemberAbstract.java          |  18 +-
 .../specimpl/OneToOneAssociationDefault.java    |  12 +-
 .../background/BackgroundCommandExecution.java  |  78 +++---
 .../background/BackgroundServiceDefault.java    |  14 +-
 .../command/CommandDtoServiceDefault.java       | 255 +++++++++++++++++
 .../command/CommandMementoServiceDefault.java   | 219 ---------------
 .../PublishingServiceInternalDefault.java       |  10 +-
 .../org/apache/isis/schema/cmd/cmd-1.0.xsd      |  20 +-
 22 files changed, 932 insertions(+), 970 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/adocs/documentation/src/main/asciidoc/schema/aim/aim-2.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/aim/aim-2.0.xsd b/adocs/documentation/src/main/asciidoc/schema/aim/aim-2.0.xsd
deleted file mode 100644
index 811dff1..0000000
--- a/adocs/documentation/src/main/asciidoc/schema/aim/aim-2.0.xsd
+++ /dev/null
@@ -1,157 +0,0 @@
-\ufeff<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<xs:schema targetNamespace="http://isis.apache.org/schema/aim"
-           elementFormDefault="qualified"
-           xmlns:xs="http://www.w3.org/2001/XMLSchema"
-           xmlns="http://isis.apache.org/schema/aim"
-           xmlns:cmd="http://isis.apache.org/schema/cmd"
-           xmlns:common="http://isis.apache.org/schema/common"
-        >
-
-    <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
-    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.0.xsd"/>
-
-    <xs:element name="actionInvocationMementoDto">
-        <xs:annotation>
-            <xs:documentation>Represents v2.0 of this schema.  Changes since v1.0 are the addition of the 'majorVersion' and 'minorVersion', the 'mixinFqClassName' element, the 'threw' element, the 'timestampComplete' element and the 'subActions' element.  The 'timestamp' element has been replaced by 'timestampStart'.  The 'returned' element has been redefined.  The 'metadata' and 'payload' containers have been removed.  The supporting 'paramDto' types have been moved to common (so can be shared with cmd.xsd).
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="majorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="2">
-                    <xs:annotation>
-                        <xs:documentation>The major version of the schema that an XML instance was created using.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
-                    <xs:annotation>
-                        <xs:documentation>The minor version of the schema that an XML instance was created using.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="transactionId" type="xs:string">
-                    <xs:annotation>
-                        <xs:documentation>Transaction id within which this action was invoked; can be used to locate the corresponding Command object (which may have been persisted).  However, there could be many such actions (eg by virtue of WrapperFactory); the 'sequence' is used to provide a unique id for each action invocation.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="invocation" type="actionInvocationDto"/>
-                <xs:element name="subInvocations" type="actionInvocationDto" minOccurs="0" maxOccurs="unbounded">
-                    <xs:annotation>
-                        <xs:documentation>Capture invocations of any other actions invoked from this action, using the WrapperFactory service.  These therefore define a graph/call-stack of actions.  Note that the subactions will redundantly also specify their majorVersion and minorVersion (the alternative would have required restructuring in such a way as to break backward compatibility).
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-
-    </xs:element>
-
-    <xs:complexType name="actionInvocationDto">
-        <xs:sequence>
-            <xs:element name="id" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>Unique identifier for this action invocation in the format &quot;transactionId.sequence&quot;.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="sequence" type="xs:int">
-                <xs:annotation>
-                    <xs:documentation>Action invocation within this transaction/command.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="target" type="common:oidDto" minOccurs="1" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>For regular actions, represents the entity or view model upon which the action is to be invoked.  For mixin actions, is the object being mixed-into (the constructor arg to the mixin).  For contributed actions, is the domain service (the contributee object will be one of the action arguments within the payload).  Mixin actions can be determined by the presence of the 'mixinFqClassName' element.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="action" type="cmd:actionDto">
-                <xs:annotation>
-                    <xs:documentation>The action and arguments to be invoked on the target object.</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="user" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>The name of the user that invoked this action.  Note that this isn't necessarily the user that initiated the original command; the SudoService may be being used to temporarily switch the effective user.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="title" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>User-friendly title of the 'target' object.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="timings" type="common:periodDto">
-                <xs:annotation>
-                    <xs:documentation>Captures the time taken to invoke the action.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:choice>
-                <xs:element name="returned" type="returnDto" minOccurs="0" maxOccurs="1">
-                    <xs:annotation>
-                        <xs:documentation>The value returned by this action (including the type of that returned value).  Either the 'returned' or the 'threw' element will be populated.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="threw" type="exceptionDto" minOccurs="0" maxOccurs="1">
-                    <xs:annotation>
-                        <xs:documentation>Captures any exception thrown by an action.  Either the 'returned' or the 'threw' element will be populated.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-            </xs:choice>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="returnDto">
-        <xs:annotation>
-            <xs:documentation>Captures both the value returned of an action, and also the type of that returned value.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:sequence>
-            <xs:element name="value" type="common:valueDto"/>
-        </xs:sequence>
-        <xs:attribute name="returnType" use="required" type="common:valueType"/>
-        <xs:attribute name="null" use="optional" type="xs:boolean"/>
-    </xs:complexType>
-
-    <xs:complexType name="exceptionDto">
-        <xs:annotation>
-            <xs:documentation>Captures any exception thrown by an action invocation.  Use as the xsd:type of the 'threw' element.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:sequence>
-            <xs:element name="message" type="xs:string"/>
-            <xs:element name="stackTrace" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>A formatted stack trace.  (A future version of the 'exceptionDto' element might refine this to more easily parseable stack trace elements).
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="causedBy" type="exceptionDto" minOccurs="0" maxOccurs="1"/>
-        </xs:sequence>
-    </xs:complexType>
-
-</xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/adocs/documentation/src/main/asciidoc/schema/aim/aim.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/aim/aim.xsd b/adocs/documentation/src/main/asciidoc/schema/aim/aim.xsd
deleted file mode 100644
index 811dff1..0000000
--- a/adocs/documentation/src/main/asciidoc/schema/aim/aim.xsd
+++ /dev/null
@@ -1,157 +0,0 @@
-\ufeff<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<xs:schema targetNamespace="http://isis.apache.org/schema/aim"
-           elementFormDefault="qualified"
-           xmlns:xs="http://www.w3.org/2001/XMLSchema"
-           xmlns="http://isis.apache.org/schema/aim"
-           xmlns:cmd="http://isis.apache.org/schema/cmd"
-           xmlns:common="http://isis.apache.org/schema/common"
-        >
-
-    <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
-    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.0.xsd"/>
-
-    <xs:element name="actionInvocationMementoDto">
-        <xs:annotation>
-            <xs:documentation>Represents v2.0 of this schema.  Changes since v1.0 are the addition of the 'majorVersion' and 'minorVersion', the 'mixinFqClassName' element, the 'threw' element, the 'timestampComplete' element and the 'subActions' element.  The 'timestamp' element has been replaced by 'timestampStart'.  The 'returned' element has been redefined.  The 'metadata' and 'payload' containers have been removed.  The supporting 'paramDto' types have been moved to common (so can be shared with cmd.xsd).
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="majorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="2">
-                    <xs:annotation>
-                        <xs:documentation>The major version of the schema that an XML instance was created using.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
-                    <xs:annotation>
-                        <xs:documentation>The minor version of the schema that an XML instance was created using.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="transactionId" type="xs:string">
-                    <xs:annotation>
-                        <xs:documentation>Transaction id within which this action was invoked; can be used to locate the corresponding Command object (which may have been persisted).  However, there could be many such actions (eg by virtue of WrapperFactory); the 'sequence' is used to provide a unique id for each action invocation.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="invocation" type="actionInvocationDto"/>
-                <xs:element name="subInvocations" type="actionInvocationDto" minOccurs="0" maxOccurs="unbounded">
-                    <xs:annotation>
-                        <xs:documentation>Capture invocations of any other actions invoked from this action, using the WrapperFactory service.  These therefore define a graph/call-stack of actions.  Note that the subactions will redundantly also specify their majorVersion and minorVersion (the alternative would have required restructuring in such a way as to break backward compatibility).
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-
-    </xs:element>
-
-    <xs:complexType name="actionInvocationDto">
-        <xs:sequence>
-            <xs:element name="id" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>Unique identifier for this action invocation in the format &quot;transactionId.sequence&quot;.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="sequence" type="xs:int">
-                <xs:annotation>
-                    <xs:documentation>Action invocation within this transaction/command.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="target" type="common:oidDto" minOccurs="1" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>For regular actions, represents the entity or view model upon which the action is to be invoked.  For mixin actions, is the object being mixed-into (the constructor arg to the mixin).  For contributed actions, is the domain service (the contributee object will be one of the action arguments within the payload).  Mixin actions can be determined by the presence of the 'mixinFqClassName' element.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="action" type="cmd:actionDto">
-                <xs:annotation>
-                    <xs:documentation>The action and arguments to be invoked on the target object.</xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="user" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>The name of the user that invoked this action.  Note that this isn't necessarily the user that initiated the original command; the SudoService may be being used to temporarily switch the effective user.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="title" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>User-friendly title of the 'target' object.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="timings" type="common:periodDto">
-                <xs:annotation>
-                    <xs:documentation>Captures the time taken to invoke the action.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:choice>
-                <xs:element name="returned" type="returnDto" minOccurs="0" maxOccurs="1">
-                    <xs:annotation>
-                        <xs:documentation>The value returned by this action (including the type of that returned value).  Either the 'returned' or the 'threw' element will be populated.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="threw" type="exceptionDto" minOccurs="0" maxOccurs="1">
-                    <xs:annotation>
-                        <xs:documentation>Captures any exception thrown by an action.  Either the 'returned' or the 'threw' element will be populated.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-            </xs:choice>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="returnDto">
-        <xs:annotation>
-            <xs:documentation>Captures both the value returned of an action, and also the type of that returned value.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:sequence>
-            <xs:element name="value" type="common:valueDto"/>
-        </xs:sequence>
-        <xs:attribute name="returnType" use="required" type="common:valueType"/>
-        <xs:attribute name="null" use="optional" type="xs:boolean"/>
-    </xs:complexType>
-
-    <xs:complexType name="exceptionDto">
-        <xs:annotation>
-            <xs:documentation>Captures any exception thrown by an action invocation.  Use as the xsd:type of the 'threw' element.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:sequence>
-            <xs:element name="message" type="xs:string"/>
-            <xs:element name="stackTrace" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>A formatted stack trace.  (A future version of the 'exceptionDto' element might refine this to more easily parseable stack trace elements).
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="causedBy" type="exceptionDto" minOccurs="0" maxOccurs="1"/>
-        </xs:sequence>
-    </xs:complexType>
-
-</xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
index 408c31d..de71b26 100644
--- a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
@@ -25,7 +25,7 @@
 
     <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
 
-    <xs:element name="commandMementoDto">
+    <xs:element name="commandDto">
         <xs:annotation>
             <xs:documentation>Represents v1.0 of this schema.
             </xs:documentation>
@@ -56,7 +56,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="action" type="actionDto">
+                <xs:element name="member" type="memberDto">
                     <xs:annotation>
                         <xs:documentation>The action and arguments to be invoked on the target object(s).</xs:documentation>
                     </xs:annotation>
@@ -72,27 +72,54 @@
 
     </xs:element>
 
-    <xs:complexType name="actionDto">
+    <xs:complexType name="memberDto" abstract="true">
         <xs:annotation>
-            <xs:documentation>Captures the information required to be able to invoke an action on the target(s).  In particular, identifies the action to be invoked, and also the arguments for the parameters of said action.  Note that the targets are not part of this structure so that it can be reused between cmd and aim schemas (the former of which can relate to multiple targets, the latter always to a single target).  It also _isn't_ necessary to capture whether the action is actually a mixin; this detail is encapsulated within the Apache Isis metamodel.
+            <xs:documentation>Represents the information required to be able to invoke an action or modify a property on the target(s).  Specifically, is the identifier of the action/property, along with the parameter arguments.  Is subclassed by 'actionDto' and 'propertyDto'.
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
-            <xs:element name="actionIdentifier" type="xs:string">
+            <xs:element name="memberIdentifier" type="xs:string">
                 <xs:annotation>
-                    <xs:documentation>Formal identifier of the action being invoked.
+                    <xs:documentation>Formal identifier of the member being interacted with (action or property).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:sequence minOccurs="0" maxOccurs="unbounded">
-                <xs:element name="parameters" type="paramDto"/>
-            </xs:sequence>
         </xs:sequence>
     </xs:complexType>
 
+    <xs:complexType name="actionDto">
+        <xs:annotation>
+            <xs:documentation>Captures the information required to be able to invoke an action on the target(s).
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="memberDto">
+                <xs:sequence>
+                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
+                        <xs:element name="parameters" type="paramDto"/>
+                    </xs:sequence>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="propertyDto">
+        <xs:annotation>
+            <xs:documentation>Captures the information required to be able to modify a property on the target(s).
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="memberDto">
+                <xs:sequence>
+                    <xs:element name="newValue" type="paramDto"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
     <xs:complexType name="paramDto">
         <xs:annotation>
-            <xs:documentation>The parameter types and values (ie arguments) of action parameters.
+            <xs:documentation>The parameter types and values (ie arguments) of action parameters or the new value for a property.
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
new file mode 100644
index 0000000..6706734
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
@@ -0,0 +1,197 @@
+\ufeff<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<xs:schema targetNamespace="http://isis.apache.org/schema/ixn"
+           elementFormDefault="qualified"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns="http://isis.apache.org/schema/ixn"
+           xmlns:cmd="http://isis.apache.org/schema/cmd"
+           xmlns:common="http://isis.apache.org/schema/common"
+        >
+
+    <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.0.xsd"/>
+
+    <xs:element name="interactionDto">
+        <xs:annotation>
+            <xs:documentation>Represents v1.0 of this schema, replacing and generalizing the earlier 'actionInvocationMemento'.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="majorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="2">
+                    <xs:annotation>
+                        <xs:documentation>The major version of the schema that an XML instance was created using.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                    <xs:annotation>
+                        <xs:documentation>The minor version of the schema that an XML instance was created using.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="transactionId" type="xs:string">
+                    <xs:annotation>
+                        <xs:documentation>Transaction id within which this member was interacted with (action invoked/property modified); can be used to locate the corresponding Command object (which may have been persisted).
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="execution" type="interactionExecutionDto"/>
+            </xs:sequence>
+        </xs:complexType>
+
+    </xs:element>
+
+    <xs:complexType name="interactionExecutionDto" abstract="true">
+        <xs:annotation>
+            <xs:documentation>Represents either an action invocation or a property modification.  Is subclassed by both.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="id" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Unique identifier for this individual member interaction, in the format &quot;transactionId.sequence&quot; (where 'transactionId' is part of the owning 'memberInteractionMementoDto' and 'sequence' is defined below).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="sequence" type="xs:int">
+                <xs:annotation>
+                    <xs:documentation>Unique sequence number of an individual member interaction within a transaction.  There could be many such member interactions (within a single transaction ) for two reasons: either a single top-level interaction could call sub-interactions (by virtue of WrapperFactory), or there may be a bulk action interaction against many targets.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="target" type="common:oidDto" minOccurs="1" maxOccurs="1">
+                <xs:annotation>
+                    <xs:documentation>For target domain object being interacted with.  For regular actions/properties, represents the entity or view model upon which the action is to be invoked/property modified.  For mixin actions/properties, is the object being mixed-into (the constructor arg to the mixin).  For contributed actions/properties, is the domain service (the contributee object will be one of the action arguments within the payload).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="memberIdentifier" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Formal identifier of the member being interacted with (action or property).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="user" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>The name of the user that invoked this action.  Note that this isn't necessarily the user that initiated the original command; the SudoService may be being used to temporarily switch the effective user.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="title" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>User-friendly title of the 'target' object.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="timings" type="common:periodDto">
+                <xs:annotation>
+                    <xs:documentation>Captures the time taken to perform the member interaction (invoke the action, or modify the property).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="threw" type="exceptionDto" minOccurs="0" maxOccurs="1">
+                <xs:annotation>
+                    <xs:documentation>Captures any exception thrown by an action.  Either the 'returned' or the 'threw' element will be populated.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="childExecutions" minOccurs="1" maxOccurs="1">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="execution" type="interactionExecutionDto" minOccurs="0" maxOccurs="unbounded">
+                            <xs:annotation>
+                                <xs:documentation>Capture interactions with other members from this interaction, using the WrapperFactory service.  Typically this will be actions invoking other actions, but it is also possible for an action to perform a property modification, and - much rarer - for a property modification to invoke an action.  Whatever; these interactions nest together into a call/stack, more generally into a graph.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="actionInvocationDto">
+        <xs:complexContent>
+            <xs:extension base="interactionExecutionDto">
+                <xs:sequence>
+                    <xs:element name="parameters" minOccurs="1" maxOccurs="1">
+                        <xs:annotation>
+                            <xs:documentation>
+                                The set of parameter/argument values for this action invocation.
+                            </xs:documentation>
+                        </xs:annotation>
+                        <xs:complexType>
+                            <xs:sequence minOccurs="0" maxOccurs="unbounded">
+                                <xs:element name="parameter" type="cmd:paramDto"/>
+                            </xs:sequence>
+                        </xs:complexType>
+                    </xs:element>
+                    <xs:element name="returned" type="returnDto" minOccurs="0" maxOccurs="1">
+                        <xs:annotation>
+                            <xs:documentation>The value returned by this action (including the type of that returned value).  Either the 'returned' or the 'threw' element (from 'memberInteractionDto') will be populated.
+                            </xs:documentation>
+                        </xs:annotation>
+                    </xs:element>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="propertyModificationDto">
+        <xs:complexContent>
+            <xs:extension base="interactionExecutionDto">
+                <xs:sequence>
+                    <xs:element name="newValue" type="cmd:paramDto"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="returnDto">
+        <xs:annotation>
+            <xs:documentation>Captures both the value returned of an action, and also the type of that returned value.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="value" type="common:valueDto"/>
+        </xs:sequence>
+        <xs:attribute name="returnType" use="required" type="common:valueType"/>
+        <xs:attribute name="null" use="optional" type="xs:boolean"/>
+    </xs:complexType>
+
+    <xs:complexType name="exceptionDto">
+        <xs:annotation>
+            <xs:documentation>Captures any exception thrown by an action invocation.  Use as the xsd:type of the 'threw' element.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="message" type="xs:string"/>
+            <xs:element name="stackTrace" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>A formatted stack trace.  (A future version of the 'exceptionDto' element might refine this to more easily parseable stack trace elements).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="causedBy" type="exceptionDto" minOccurs="0" maxOccurs="1"/>
+        </xs:sequence>
+    </xs:complexType>
+
+</xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/applib/src/main/java/org/apache/isis/applib/services/background/ActionInvocationMemento.java
----------------------------------------------------------------------
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
index ca476b4..08286da 100644
--- 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
@@ -21,7 +21,7 @@ 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.CommandMementoDto;
+import org.apache.isis.schema.cmd.v1.CommandDto;
 
 /**
  * A memento for an action invocation, to allow the details of an action invocation
@@ -40,10 +40,10 @@ import org.apache.isis.schema.cmd.v1.CommandMementoDto;
  * </p>
  *
  * <p>
- * Note that this class - unlike {@link CommandMementoDto} does <i>not</i> support mixins.
+ * Note that this class - unlike {@link CommandDto} does <i>not</i> support mixins.
  * </p>
  *
- * @deprecated - use {@link CommandMementoDto} instead.
+ * @deprecated - use {@link CommandDto} instead.
  */
 @Deprecated
 public class ActionInvocationMemento {

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/applib/src/main/java/org/apache/isis/applib/services/background/BackgroundCommandService2.java
----------------------------------------------------------------------
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 fd3a298..477e0a9 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
@@ -17,10 +17,10 @@
 package org.apache.isis.applib.services.background;
 
 import org.apache.isis.applib.services.command.Command;
-import org.apache.isis.schema.cmd.v1.CommandMementoDto;
+import org.apache.isis.schema.cmd.v1.CommandDto;
 
 /**
- * Persists a {@link org.apache.isis.schema.cmd.v1.CommandMementoDto memento-ized} command such that it can be executed asynchronously,
+ * 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>
@@ -39,7 +39,7 @@ public interface BackgroundCommandService2 extends BackgroundCommandService {
      * @param targetArgs
      */
     void schedule(
-            final CommandMementoDto dto,
+            final CommandDto dto,
             final Command command,
             final String targetClassName, final String targetActionName, final String targetArgs);
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
index d4d8821..48a45da 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
@@ -31,16 +31,16 @@ import org.apache.isis.applib.services.background.BackgroundService;
 import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.bookmark.BookmarkService;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
+import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.publish.EventMetadata;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.wrapper.WrapperFactory;
-import org.apache.isis.applib.services.iactn.Interaction;
-import org.apache.isis.schema.cmd.v1.CommandMementoDto;
+import org.apache.isis.schema.cmd.v1.CommandDto;
 
 /**
  * Represents the <i>intention to</i> invoke either an action or modify a property.  This intention is reified as a
  * {@link Command#getMemento() memento} by way of the (internal) <tt>CommandMementoService</tt>; typically corresponding
- * to the XML equivalent of a {@link CommandMementoDto}.
+ * to the XML equivalent of a {@link CommandDto}.
  *
  * <p>
  *     The {@link Command} interface also captures details of the corresponding action invocation (or property edit),

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/applib/src/main/java/org/apache/isis/schema/utils/CommandDtoUtils.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/schema/utils/CommandDtoUtils.java b/core/applib/src/main/java/org/apache/isis/schema/utils/CommandDtoUtils.java
new file mode 100644
index 0000000..f4c108d
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/schema/utils/CommandDtoUtils.java
@@ -0,0 +1,257 @@
+/*
+ *  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.schema.utils;
+
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.Writer;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.List;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+import com.google.common.io.Resources;
+
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.joda.time.LocalTime;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.bookmark.BookmarkService;
+import org.apache.isis.schema.cmd.v1.CommandDto;
+import org.apache.isis.schema.cmd.v1.ParamDto;
+import org.apache.isis.schema.common.v1.OidDto;
+import org.apache.isis.schema.common.v1.ValueDto;
+import org.apache.isis.schema.common.v1.ValueType;
+
+public final class CommandDtoUtils {
+
+    //region > marshalling
+    static JAXBContext jaxbContext;
+    static JAXBContext getJaxbContext() {
+        if(jaxbContext == null) {
+            try {
+                jaxbContext = JAXBContext.newInstance(CommandDto.class);
+            } catch (JAXBException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return jaxbContext;
+    }
+
+    public static CommandDto fromXml(final Reader reader) {
+        try {
+            final Unmarshaller un = getJaxbContext().createUnmarshaller();
+            return (CommandDto) un.unmarshal(reader);
+        } catch (JAXBException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static CommandDto fromXml(final String xml) {
+        return fromXml(new StringReader(xml));
+    }
+
+    public static CommandDto fromXml(
+            final Class<?> contextClass,
+            final String resourceName,
+            final Charset charset) throws IOException {
+        final URL url = Resources.getResource(contextClass, resourceName);
+        final String s = Resources.toString(url, charset);
+        return fromXml(new StringReader(s));
+    }
+
+    public static String toXml(final CommandDto aimDto) {
+        final CharArrayWriter caw = new CharArrayWriter();
+        toXml(aimDto, caw);
+        return caw.toString();
+    }
+
+    public static void toXml(final CommandDto aimDto, final Writer writer) {
+        try {
+            final Marshaller m = getJaxbContext().createMarshaller();
+            m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+            m.marshal(aimDto, writer);
+        } catch (JAXBException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    //endregion
+
+
+    static ValueDto argumentFor(final ParamDto paramDto) {
+        ValueDto valueDto = paramDto.getArgument();
+        if(valueDto == null) {
+            valueDto = new ValueDto();
+            paramDto.setArgument(valueDto);
+        }
+        return valueDto;
+    }
+
+    /**
+     *
+     * @param params
+     * @param parameterName
+     * @param parameterType - to determine the value type (if any)
+     * @param arg - either a value type (possibly boxed primitive), or a reference type
+     * @param bookmarkService - used if not a value type
+     */
+    public static void addParamArg(
+            final List<ParamDto> params,
+            final String parameterName,
+            final Class<?> parameterType,
+            final Object arg,
+            final BookmarkService bookmarkService) {
+        boolean isValueType = addParamArgValue(params, parameterName, parameterType, arg);
+        if(!isValueType) {
+            addParamArgReference(
+                    params, parameterName,
+                    arg instanceof Bookmark
+                            ? (Bookmark)arg
+                            : bookmarkService.bookmarkFor(arg));
+        }
+    }
+
+    private static boolean addParamArgValue(
+            final List<ParamDto> params,
+            final String parameterName,
+            final Class<?> parameterType,
+            final Object arg) {
+        ParamDto paramDto = null;
+        if(parameterType == String.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.STRING, arg);
+        } else
+        if(parameterType == byte.class || parameterType == Byte.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.BYTE, arg);
+        } else
+        if(parameterType == short.class || parameterType == Short.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.SHORT, arg);
+        }else
+        if(parameterType == int.class || parameterType == Integer.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.INT, arg);
+        }else
+        if(parameterType == long.class || parameterType == Long.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.LONG, arg);
+        }else
+        if(parameterType == char.class || parameterType == Character.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.CHAR, arg);
+        }else
+        if(parameterType == boolean.class || parameterType == Boolean.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.BOOLEAN, arg);
+        }else
+        if(parameterType == float.class || parameterType == Float.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.FLOAT, arg);
+        }else
+        if(parameterType == double.class || parameterType == Double.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.DOUBLE, arg);
+        }else
+        if(parameterType == BigInteger.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.BIG_INTEGER, arg);
+        }else
+        if(parameterType == BigDecimal.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.BIG_DECIMAL, arg);
+        }else
+        if(parameterType == DateTime.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.JODA_DATE_TIME, arg);
+        }else
+        if(parameterType == LocalDateTime.class) {
+            paramDto =
+                    newParamDto(params, parameterName, ValueType.JODA_LOCAL_DATE_TIME, arg);
+        }else
+        if(parameterType == LocalDate.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.JODA_LOCAL_DATE, arg);
+        }else
+        if(parameterType == LocalTime.class) {
+            paramDto = newParamDto(params, parameterName, ValueType.JODA_LOCAL_TIME, arg);
+        }else
+        if(parameterType.isEnum()) {
+            paramDto = newParamDto(params, parameterName, ValueType.ENUM, arg);
+        }
+
+        if(paramDto != null) {
+            if (arg != null) {
+                final ValueDto valueDto = argumentFor(paramDto);
+                CommonDtoUtils.setValue(valueDto, parameterType, arg);
+            }
+            return true;
+        }
+
+        // none of the supported value types
+        return false;
+    }
+
+    private static void addParamArgReference(
+            final List<ParamDto> params,
+            final String parameterName,
+            final Bookmark bookmark) {
+        final ParamDto paramDto =
+                newParamDto(params, parameterName, ValueType.REFERENCE, bookmark);
+
+        if (bookmark != null) {
+            final ValueDto valueDto = argumentFor(paramDto);
+
+            OidDto argValue = CommonDtoUtils.asOidDto(bookmark);
+            valueDto.setReference(argValue);
+        }
+    }
+
+    private static ParamDto newParamDto(
+            final List<ParamDto> params,
+            final String parameterName,
+            final ValueType parameterType,
+            final Object value) {
+        final ParamDto paramDto = newParamDto(parameterName, parameterType, value);
+        params.add(paramDto);
+        return paramDto;
+    }
+
+    private static ParamDto newParamDto(final String parameterName, final ValueType parameterType, final Object value) {
+        final ParamDto paramDto = newParamDto(parameterName, parameterType);
+        paramDto.setNull(value == null);
+        return paramDto;
+    }
+
+    private static ParamDto newParamDto(
+            final String parameterName,
+            final ValueType parameterType) {
+        final ParamDto argDto = new ParamDto();
+        argDto.setParameterName(parameterName);
+        argDto.setParameterType(parameterType);
+        return argDto;
+    }
+
+    public static Object paramArgOf(final ParamDto paramDto) {
+        if(paramDto.isNull()) {
+            return null;
+        }
+        final ValueType parameterType = paramDto.getParameterType();
+        final ValueDto argument = paramDto.getArgument();
+        return CommonDtoUtils.getValue(argument, parameterType);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/applib/src/main/java/org/apache/isis/schema/utils/CommandMementoDtoUtils.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/schema/utils/CommandMementoDtoUtils.java b/core/applib/src/main/java/org/apache/isis/schema/utils/CommandMementoDtoUtils.java
deleted file mode 100644
index 99cecbf..0000000
--- a/core/applib/src/main/java/org/apache/isis/schema/utils/CommandMementoDtoUtils.java
+++ /dev/null
@@ -1,272 +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.schema.utils;
-
-import java.io.CharArrayWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.Writer;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.util.List;
-import java.util.UUID;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import com.google.common.io.Resources;
-
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
-import org.joda.time.LocalTime;
-
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.bookmark.BookmarkService;
-import org.apache.isis.schema.cmd.v1.ActionDto;
-import org.apache.isis.schema.cmd.v1.CommandMementoDto;
-import org.apache.isis.schema.cmd.v1.ParamDto;
-import org.apache.isis.schema.common.v1.OidDto;
-import org.apache.isis.schema.common.v1.ValueDto;
-import org.apache.isis.schema.common.v1.ValueType;
-
-public final class CommandMementoDtoUtils {
-
-    //region > marshalling
-    static JAXBContext jaxbContext;
-    static JAXBContext getJaxbContext() {
-        if(jaxbContext == null) {
-            try {
-                jaxbContext = JAXBContext.newInstance(CommandMementoDto.class);
-            } catch (JAXBException e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return jaxbContext;
-    }
-
-    public static CommandMementoDto fromXml(final Reader reader) {
-        try {
-            final Unmarshaller un = getJaxbContext().createUnmarshaller();
-            return (CommandMementoDto) un.unmarshal(reader);
-        } catch (JAXBException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public static CommandMementoDto fromXml(final String xml) {
-        return fromXml(new StringReader(xml));
-    }
-
-    public static CommandMementoDto fromXml(
-            final Class<?> contextClass,
-            final String resourceName,
-            final Charset charset) throws IOException {
-        final URL url = Resources.getResource(contextClass, resourceName);
-        final String s = Resources.toString(url, charset);
-        return fromXml(new StringReader(s));
-    }
-
-    public static String toXml(final CommandMementoDto aimDto) {
-        final CharArrayWriter caw = new CharArrayWriter();
-        toXml(aimDto, caw);
-        return caw.toString();
-    }
-
-    public static void toXml(final CommandMementoDto aimDto, final Writer writer) {
-        try {
-            final Marshaller m = getJaxbContext().createMarshaller();
-            m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-            m.marshal(aimDto, writer);
-        } catch (JAXBException e) {
-            throw new RuntimeException(e);
-        }
-    }
-    //endregion
-
-    public static CommandMementoDto newDto(
-            final UUID transactionId, final String user) {
-        CommandMementoDto dto = new CommandMementoDto();
-
-        dto.setMajorVersion("1");
-        dto.setMinorVersion("0");
-
-        dto.setTransactionId(transactionId.toString());
-
-        ActionDto actionDto = new ActionDto();
-        dto.setAction(actionDto);
-
-
-        dto.setUser(user);
-
-        return dto;
-    }
-
-
-    static ValueDto argumentFor(final ParamDto paramDto) {
-        ValueDto valueDto = paramDto.getArgument();
-        if(valueDto == null) {
-            valueDto = new ValueDto();
-            paramDto.setArgument(valueDto);
-        }
-        return valueDto;
-    }
-
-    /**
-     *
-     * @param params
-     * @param parameterName
-     * @param parameterType - to determine the value type (if any)
-     * @param arg - either a value type (possibly boxed primitive), or a reference type
-     * @param bookmarkService - used if not a value type
-     */
-    public static void addParamArg(
-            final List<ParamDto> params,
-            final String parameterName,
-            final Class<?> parameterType,
-            final Object arg,
-            final BookmarkService bookmarkService) {
-        boolean isValueType = addParamArgValue(params, parameterName, parameterType, arg);
-        if(!isValueType) {
-            addParamArgReference(
-                    params, parameterName,
-                    arg instanceof Bookmark
-                            ? (Bookmark)arg
-                            : bookmarkService.bookmarkFor(arg));
-        }
-    }
-
-    private static boolean addParamArgValue(
-            final List<ParamDto> params,
-            final String parameterName,
-            final Class<?> parameterType,
-            final Object arg) {
-        ParamDto paramDto = null;
-        if(parameterType == String.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.STRING, arg);
-        } else
-        if(parameterType == byte.class || parameterType == Byte.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.BYTE, arg);
-        } else
-        if(parameterType == short.class || parameterType == Short.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.SHORT, arg);
-        }else
-        if(parameterType == int.class || parameterType == Integer.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.INT, arg);
-        }else
-        if(parameterType == long.class || parameterType == Long.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.LONG, arg);
-        }else
-        if(parameterType == char.class || parameterType == Character.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.CHAR, arg);
-        }else
-        if(parameterType == boolean.class || parameterType == Boolean.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.BOOLEAN, arg);
-        }else
-        if(parameterType == float.class || parameterType == Float.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.FLOAT, arg);
-        }else
-        if(parameterType == double.class || parameterType == Double.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.DOUBLE, arg);
-        }else
-        if(parameterType == BigInteger.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.BIG_INTEGER, arg);
-        }else
-        if(parameterType == BigDecimal.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.BIG_DECIMAL, arg);
-        }else
-        if(parameterType == DateTime.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.JODA_DATE_TIME, arg);
-        }else
-        if(parameterType == LocalDateTime.class) {
-            paramDto =
-                    newParamDto(params, parameterName, ValueType.JODA_LOCAL_DATE_TIME, arg);
-        }else
-        if(parameterType == LocalDate.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.JODA_LOCAL_DATE, arg);
-        }else
-        if(parameterType == LocalTime.class) {
-            paramDto = newParamDto(params, parameterName, ValueType.JODA_LOCAL_TIME, arg);
-        }else
-        if(parameterType.isEnum()) {
-            paramDto = newParamDto(params, parameterName, ValueType.ENUM, arg);
-        }
-
-        if(paramDto != null) {
-            if (arg != null) {
-                final ValueDto valueDto = argumentFor(paramDto);
-                CommonDtoUtils.setValue(valueDto, parameterType, arg);
-            }
-            return true;
-        }
-
-        // none of the supported value types
-        return false;
-    }
-
-    private static void addParamArgReference(
-            final List<ParamDto> params,
-            final String parameterName,
-            final Bookmark bookmark) {
-        final ParamDto paramDto =
-                newParamDto(params, parameterName, ValueType.REFERENCE, bookmark);
-
-        if (bookmark != null) {
-            final ValueDto valueDto = argumentFor(paramDto);
-
-            OidDto argValue = CommonDtoUtils.asOidDto(bookmark);
-            valueDto.setReference(argValue);
-        }
-    }
-
-    private static ParamDto newParamDto(
-            final List<ParamDto> params,
-            final String parameterName,
-            final ValueType parameterType,
-            final Object value) {
-        final ParamDto paramDto = newParamDto(parameterName, parameterType);
-        paramDto.setNull(value == null);
-        params.add(paramDto);
-        return paramDto;
-    }
-
-    private static ParamDto newParamDto(
-            final String parameterName,
-            final ValueType parameterType) {
-        final ParamDto argDto = new ParamDto();
-        argDto.setParameterName(parameterName);
-        argDto.setParameterType(parameterType);
-        return argDto;
-    }
-
-    public static Object paramArgOf(final ParamDto paramDto) {
-        if(paramDto.isNull()) {
-            return null;
-        }
-        final ValueType parameterType = paramDto.getParameterType();
-        final ValueDto argument = paramDto.getArgument();
-        return CommonDtoUtils.getValue(argument, parameterType);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java b/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
index 6459b4a..f5d3f87 100644
--- a/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
+++ b/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
@@ -270,7 +270,7 @@ public final class InteractionDtoUtils {
             final BookmarkService bookmarkService) {
 
         final List<ParamDto> params = parametersFor(ixn);
-        CommandMementoDtoUtils.addParamArg(params, parameterName, parameterType, arg, bookmarkService);
+        CommandDtoUtils.addParamArg(params, parameterName, parameterType, arg, bookmarkService);
     }
 
     //region > addReturn
@@ -361,7 +361,7 @@ public final class InteractionDtoUtils {
 
     public static ValueDto getParameterArg(final ActionInvocationDto ai, final int paramNum) {
         final ParamDto paramDto = getParameter(ai, paramNum);
-        return CommandMementoDtoUtils.argumentFor(paramDto);
+        return CommandDtoUtils.argumentFor(paramDto);
     }
 
 
@@ -383,7 +383,7 @@ public final class InteractionDtoUtils {
         if(paramDto.isNull()) {
             return null;
         }
-        final ValueDto valueDto = CommandMementoDtoUtils.argumentFor(paramDto);
+        final ValueDto valueDto = CommandDtoUtils.argumentFor(paramDto);
         final ValueType parameterType = paramDto.getParameterType();
         return CommonDtoUtils.getValue(valueDto, parameterType);
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/CommandUtil.java
----------------------------------------------------------------------
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 45db776..65ad7f4 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
@@ -45,7 +45,7 @@ public class CommandUtil {
 
     private CommandUtil(){}
 
-    public static String targetActionNameFor(final ObjectMember objectMember) {
+    public static String targetMemberNameFor(final ObjectMember objectMember) {
         return objectMember.getName();
     }
 
@@ -53,7 +53,7 @@ public class CommandUtil {
         return StringExtensions.asNaturalName2(targetAdapter.getSpecification().getSingularName());
     }
 
-    public static String actionIdentifierFor(final ObjectMember objectMember) {
+    public static String memberIdentifierFor(final ObjectMember objectMember) {
         return objectMember.getIdentifier().toClassAndNameIdentityString();
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoService.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoService.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoService.java
new file mode 100644
index 0000000..f6f8fbb
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoService.java
@@ -0,0 +1,79 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.core.metamodel.services.command;
+
+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;
+import org.apache.isis.schema.cmd.v1.ActionDto;
+import org.apache.isis.schema.cmd.v1.CommandDto;
+import org.apache.isis.schema.cmd.v1.PropertyDto;
+
+/**
+ * Used to create mementos of a command, such that it can be persisted and then executed either immediately (ie invoke
+ * in the foreground) or deferred (ie invoke in the background at some later time).
+ */
+public interface CommandDtoService {
+
+    /**
+     * 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
+     * target object (or possibly many targets, for bulk actions).  The action can be a mixin action or a
+     * contributed action.
+     */
+    @Programmatic
+    CommandDto asCommandDto(
+            final List<ObjectAdapter> targetAdapters,
+            final ObjectAction objectAction,
+            final ObjectAdapter[] argAdapters);
+
+    /**
+     * Returns a JAXB DTO (hence convertible to XML) that represents the intention to edit (set or clear) a property on
+     * a target (or possibly many targets, for symmetry with actions).  The property can be a mixin or contributed.
+     */
+    @Programmatic
+    CommandDto asCommandDto(
+            final List<ObjectAdapter> targetAdapters,
+            final OneToOneAssociation association,
+            final ObjectAdapter valueAdapterOrNull);
+
+    @Programmatic
+    void addActionArgs(
+            final ObjectAction objectAction,
+            final ActionDto actionDto,
+            final ObjectAdapter[] argAdapters);
+
+    @Programmatic
+    void addPropertyValue(
+            final OneToOneAssociation property,
+            final PropertyDto propertyDto,
+            final ObjectAdapter valueAdapter);
+
+    }

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandMementoService.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandMementoService.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandMementoService.java
deleted file mode 100644
index faacb02..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandMementoService.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.isis.core.metamodel.services.command;
-
-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;
-import org.apache.isis.schema.cmd.v1.ActionDto;
-import org.apache.isis.schema.cmd.v1.CommandMementoDto;
-
-/**
- * Used to create mementos of a command, such that it can be persisted and then executed either immediately (ie invoke
- * in the foreground) or deferred (ie invoke in the background at some later time).
- */
-public interface CommandMementoService {
-
-    /**
-     * Note that this method (more precisely, {@link ActionInvocationMemento}) does <i>not</i> support mixins.
-     *
-     * @deprecated - use {@link #asCommandMemento(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
-     * target object (or possible many targets, for bulk actions).  The action can be a mixin action or a
-     * contributed action.
-     */
-    @Programmatic
-    CommandMementoDto asCommandMemento(
-            final List<ObjectAdapter> targetAdapters,
-            final ObjectAction objectAction,
-            final ObjectAdapter[] argAdapters);
-
-    /**
-     * Returns a JAXB DTO (hence convertible to XML) that represents the intention to edit (set or clear) a property on
-     * a target.  The property can be a mixin or contributed.
-     */
-    @Programmatic
-    CommandMementoDto asCommandMemento(
-            final ObjectAdapter targetAdapter,
-            final OneToOneAssociation association,
-            final ObjectAdapter valueAdapterOrNull);
-
-    @Programmatic
-    void addActionArgs(
-            final ObjectAction objectAction,
-            final ActionDto actionDto,
-            final ObjectAdapter[] argAdapters);
-
-    }

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java
index 56cc26d..7ff5bca 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java
@@ -66,14 +66,14 @@ import org.apache.isis.core.metamodel.interactions.InteractionUtils;
 import org.apache.isis.core.metamodel.interactions.UsabilityContext;
 import org.apache.isis.core.metamodel.interactions.ValidityContext;
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
-import org.apache.isis.core.metamodel.services.command.CommandMementoService;
+import org.apache.isis.core.metamodel.services.command.CommandDtoService;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.DomainModelException;
 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.ObjectMemberDependencies;
-import org.apache.isis.schema.cmd.v1.CommandMementoDto;
+import org.apache.isis.schema.cmd.v1.CommandDto;
 
 public class ObjectActionDefault extends ObjectMemberAbstract implements ObjectAction {
 
@@ -589,16 +589,16 @@ public class ObjectActionDefault extends ObjectMemberAbstract implements ObjectA
             final ObjectAdapter targetAdapter,
             final ObjectAdapter[] argumentAdapters) {
 
-        final CommandMementoService commandMementoService = getCommandMementoService();
+        final CommandDtoService commandDtoService = getCommandDtoService();
         final List<ObjectAdapter> commandTargetAdapters =
                 commandTargetAdaptersHolder.get() != null
                         ? commandTargetAdaptersHolder.get()
                         : Collections.singletonList(targetAdapter);
 
-        final CommandMementoDto dto = commandMementoService.asCommandMemento(
+        final CommandDto dto = commandDtoService.asCommandDto(
                 commandTargetAdapters, this, argumentAdapters);
 
-        setupCommandMementoAndExecutionContext(dto);
+        setupCommandDtoAndExecutionContext(dto);
 
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
index 5fc4333..2de0fe7 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
@@ -56,14 +56,14 @@ import org.apache.isis.core.metamodel.interactions.UsabilityContext;
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
 import org.apache.isis.core.metamodel.runtimecontext.PersistenceSessionService;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
-import org.apache.isis.core.metamodel.services.command.CommandMementoService;
+import org.apache.isis.core.metamodel.services.command.CommandDtoService;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMemberDependencies;
 import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
-import org.apache.isis.schema.cmd.v1.CommandMementoDto;
-import org.apache.isis.schema.utils.CommandMementoDtoUtils;
+import org.apache.isis.schema.cmd.v1.CommandDto;
+import org.apache.isis.schema.utils.CommandDtoUtils;
 
 public abstract class ObjectMemberAbstract implements ObjectMember {
 
@@ -404,8 +404,8 @@ public abstract class ObjectMemberAbstract implements ObjectMember {
         return commandContext;
     }
 
-    protected CommandMementoService getCommandMementoService() {
-        return lookupService(CommandMementoService.class);
+    protected CommandDtoService getCommandDtoService() {
+        return lookupService(CommandDtoService.class);
     }
 
     //endregion
@@ -427,7 +427,7 @@ public abstract class ObjectMemberAbstract implements ObjectMember {
         }
 
         command.setTargetClass(CommandUtil.targetClassNameFor(targetAdapter));
-        command.setTargetAction(CommandUtil.targetActionNameFor(this));
+        command.setTargetAction(CommandUtil.targetMemberNameFor(this));
         command.setArguments(arguments);
 
         final Bookmark targetBookmark = CommandUtil.bookmarkFor(targetAdapter);
@@ -449,10 +449,10 @@ public abstract class ObjectMemberAbstract implements ObjectMember {
             return;
         }
 
-        command.setMemberIdentifier(CommandUtil.actionIdentifierFor(this));
+        command.setMemberIdentifier(CommandUtil.memberIdentifierFor(this));
     }
 
-    protected void setupCommandMementoAndExecutionContext(final CommandMementoDto dto) {
+    protected void setupCommandDtoAndExecutionContext(final CommandDto dto) {
         final CommandContext commandContext = getCommandContext();
         final Command command = commandContext.getCommand();
 
@@ -473,7 +473,7 @@ public abstract class ObjectMemberAbstract implements ObjectMember {
 
         // memento
 
-        final String mementoXml = CommandMementoDtoUtils.toXml(dto);
+        final String mementoXml = CommandDtoUtils.toXml(dto);
         command.setMemento(mementoXml);
 
         // copy over the command execution 'context' (if available)

http://git-wip-us.apache.org/repos/asf/isis/blob/a9d706be/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationDefault.java
index 5c17de6..773adc9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationDefault.java
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.metamodel.specloader.specimpl;
 
+import java.util.Collections;
 import java.util.List;
 
 import com.google.common.collect.Lists;
@@ -51,12 +52,12 @@ import org.apache.isis.core.metamodel.interactions.PropertyVisibilityContext;
 import org.apache.isis.core.metamodel.interactions.UsabilityContext;
 import org.apache.isis.core.metamodel.interactions.ValidityContext;
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
-import org.apache.isis.core.metamodel.services.command.CommandMementoService;
+import org.apache.isis.core.metamodel.services.command.CommandDtoService;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.MutableCurrentHolder;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMemberDependencies;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.isis.schema.cmd.v1.CommandMementoDto;
+import org.apache.isis.schema.cmd.v1.CommandDto;
 
 public class OneToOneAssociationDefault extends ObjectAssociationAbstract implements OneToOneAssociation {
 
@@ -350,10 +351,11 @@ public class OneToOneAssociationDefault extends ObjectAssociationAbstract implem
             final ObjectAdapter targetAdapter,
             final ObjectAdapter valueAdapterOrNull) {
 
-        final CommandMementoService commandMementoService = getCommandMementoService();
-        final CommandMementoDto dto = commandMementoService.asCommandMemento(targetAdapter, this, valueAdapterOrNull);
+        final CommandDtoService commandDtoService = getCommandDtoService();
+        final CommandDto dto = commandDtoService.asCommandDto(
+                Collections.singletonList(targetAdapter), this, valueAdapterOrNull);
 
-        setupCommandMementoAndExecutionContext(dto);
+        setupCommandDtoAndExecutionContext(dto);
 
     }