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 2018/01/24 15:16:36 UTC

[isis] branch ISIS-1569-replay-commands updated (ea6d19a -> 1e36441)

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

danhaywood pushed a change to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git.


 discard ea6d19a  ISIS-1569: updates docs for ContentMappingService, default implementations for Command(s)Dto
 discard 0491a76  ISIS-1569: updates docs for CommandService and cmd schema
 discard 49dd518  ISIS-1569: updates XSDs for docs, and adds in the historical previous versions also.
 discard 3ea05a1  ISIS-1569: removes unused and accidentally committed element in cmd-1.4.xsd
 discard b12a01d  ISIS-1569: updates to XSDs, make sure the version defaultsb are correct.
 discard 652f9fa  ISIS-1569: adds timings to CommandsDto, so less verbose and easier to read XML
 discard 0e87db4  ISIS-1569: undeprecates Command#getStartedAt and Command#getCompletedAt
 discard 552094e  ISIS-1836: removes chance of an NPE in the RO mapper for an exception (which was in turn resulting in a 500 rather than 422 when invoked an action with an incorrect parameter argument).
 discard 448fd54  ISIS-1569: adds in 'REPLAYABLE' as a new Command#ExecuteIn
 discard 7ea6f2b  ISIS-1835: catches any type of exception in order to report a problem (an NPE was being thrown if the file wasn't present, rather than an IOException)
 discard b7392e7  ISIS-1569: adds guard to ensure that BackgroundCommand#startedAt is always populated.
 discard f0da7bf  ISIS-1569: extends cmd and ixn schemas to allow userData to be specified, and moves the new CommandsDto into the new version of cmd.xsd also.
 discard a649b8f  ISIS-1569: defines CommandWithDto as an optional interface for Command SPI implementations to have their Command's implement (translatable into a CommandDto) along with out-of-the-box ContentMapingService to convert these into CommandsDto structure.
 discard 306fa40  ISIS-1569: adds a convenience Util class for ContentMappingService to remove boilerplate in subclass implementations (parsing the acceptable media types).
 discard 75977f6  ISIS-1569: extends cmd-1.3.xsd to introduce a new CommandsDto (note the plural) as a sequence of CommandDto's
 discard 51ab60a  ISIS-1569: removes CommandService2, not required after all.
 discard 47e0e91  ISIS-1831: adds a guard in exception handler of a RuntimeException (REST API) to avoid throwing an NPE there.
 discard 64ef3a2  ISIS-1569: by way of tidy-up, just removes unused injected ClockService from CommandServiceDefault
 discard ea3a2d4  ISIS-1569: adds CommandService2 as an extension
 discard 33bd60d  ISIS-1825: uses thread local to pass rendering context up to the scalar panel so that it, in turn, can correctly report on where it is being rendered.
     add a56f19d  ISIS-1848: ensures that FreeStandingList does not incorrectly return java.lang.Object's specId, and adds new metamodel validator to detect this situation in future.
     add 128e144  ISIS-1837: adds metamodel validator to check "module extent".
     add b6bb1c7  Merge branch 'ISIS-1848' into maint-1.16.1
     new d7d7cde  ISIS-1825: uses thread local to pass rendering context up to the scalar panel so that it, in turn, can correctly report on where it is being rendered.
     new 546aef5  ISIS-1569: adds CommandService2 as an extension
     new 1ade2af  ISIS-1569: by way of tidy-up, just removes unused injected ClockService from CommandServiceDefault
     new 573c7b4  ISIS-1831: adds a guard in exception handler of a RuntimeException (REST API) to avoid throwing an NPE there.
     new 8c8113f  ISIS-1569: removes CommandService2, not required after all.
     new 89e534f  ISIS-1569: extends cmd-1.3.xsd to introduce a new CommandsDto (note the plural) as a sequence of CommandDto's
     new 02f03b0  ISIS-1569: adds a convenience Util class for ContentMappingService to remove boilerplate in subclass implementations (parsing the acceptable media types).
     new b48a171  ISIS-1569: defines CommandWithDto as an optional interface for Command SPI implementations to have their Command's implement (translatable into a CommandDto) along with out-of-the-box ContentMapingService to convert these into CommandsDto structure.
     new 348802c  ISIS-1569: extends cmd and ixn schemas to allow userData to be specified, and moves the new CommandsDto into the new version of cmd.xsd also.
     new 671d3e7  ISIS-1569: adds guard to ensure that BackgroundCommand#startedAt is always populated.
     new 4a5e760  ISIS-1835: catches any type of exception in order to report a problem (an NPE was being thrown if the file wasn't present, rather than an IOException)
     new 95f45b1  ISIS-1569: adds in 'REPLAYABLE' as a new Command#ExecuteIn
     new 8463f4b  ISIS-1836: removes chance of an NPE in the RO mapper for an exception (which was in turn resulting in a 500 rather than 422 when invoked an action with an incorrect parameter argument).
     new a53972e  ISIS-1569: undeprecates Command#getStartedAt and Command#getCompletedAt
     new f559198  ISIS-1569: adds timings to CommandsDto, so less verbose and easier to read XML
     new 329d75b  ISIS-1569: updates to XSDs, make sure the version defaultsb are correct.
     new a37ba57  ISIS-1569: removes unused and accidentally committed element in cmd-1.4.xsd
     new fad907f  ISIS-1569: updates XSDs for docs, and adds in the historical previous versions also.
     new 150894b  ISIS-1569: updates docs for CommandService and cmd schema
     new 1e36441  ISIS-1569: updates docs for ContentMappingService, default implementations for Command(s)Dto

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ea6d19a)
            \
             N -- N -- N   refs/heads/ISIS-1569-replay-commands (1e36441)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 20 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:
 .../guides/rgcfg/_rgcfg_configuring-core.adoc      |  15 ++
 .../objectspecid/ObjectSpecIdFacetAbstract.java    |   9 +-
 ...java => ObjectSpecIdFacetOnStandaloneList.java} |  10 +-
 .../core/metamodel/spec/ObjectSpecification.java   |  61 +++++---
 .../metamodel/specloader/SpecificationLoader.java  |  13 ++
 .../specimpl/ObjectSpecificationAbstract.java      |  18 +--
 .../ObjectSpecificationOnStandaloneList.java       |   4 +
 .../MetaModelValidatorToCheckModuleExtent.java     | 153 +++++++++++++++++++++
 ...taModelValidatorToCheckObjectSpecIdsUnique.java |  95 +++++++++++++
 .../isis/progmodels/dflt/JavaReflectorHelper.java  |   2 +-
 .../SpecificationLoaderTestAbstract.java           |   2 +-
 .../PersistenceSessionFactoryMetamodelRefiner.java |   4 +
 12 files changed, 346 insertions(+), 40 deletions(-)
 copy core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/objectspecid/classname/{ObjectSpecIdFacetDerivedFromClassName.java => ObjectSpecIdFacetOnStandaloneList.java} (73%)
 create mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/validator/MetaModelValidatorToCheckModuleExtent.java
 create mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/validator/MetaModelValidatorToCheckObjectSpecIdsUnique.java

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 04/20: ISIS-1831: adds a guard in exception handler of a RuntimeException (REST API) to avoid throwing an NPE there.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 573c7b4eb01267d9d336106b426903ff2c804829
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 18 09:30:01 2018 +0000

    ISIS-1831: adds a guard in exception handler of a RuntimeException (REST API) to avoid throwing an NPE there.
---
 .../server/mappers/ExceptionMapperForRuntimeException.java  | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/ExceptionMapperForRuntimeException.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/ExceptionMapperForRuntimeException.java
index 2596c65..c83798b 100644
--- a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/ExceptionMapperForRuntimeException.java
+++ b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/ExceptionMapperForRuntimeException.java
@@ -26,6 +26,7 @@ import javax.ws.rs.ext.Provider;
 import com.google.common.base.Throwables;
 
 import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.session.IsisSession;
 import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
 import org.apache.isis.core.runtime.system.transaction.IsisTransaction;
 
@@ -35,15 +36,17 @@ public class ExceptionMapperForRuntimeException extends ExceptionMapperAbstract<
     @Override
     public Response toResponse(final RuntimeException ex) {
 
-        // since already rendered...
-        final IsisTransaction currentTransaction = getIsisSessionFactory().getCurrentSession()
-                .getPersistenceSession().getTransactionManager().getCurrentTransaction();
-
         final Throwable rootCause = Throwables.getRootCause(ex);
         final List<Throwable> causalChain = Throwables.getCausalChain(ex);
         for (Throwable throwable : causalChain) {
             if(throwable == rootCause) {
-                currentTransaction.clearAbortCause();
+                // since already rendered...
+                final IsisSession currentSession = getIsisSessionFactory().getCurrentSession();
+                if(currentSession != null) {
+                    final IsisTransaction currentTransaction = currentSession
+                            .getPersistenceSession().getTransactionManager().getCurrentTransaction();
+                    currentTransaction.clearAbortCause();
+                }
             }
         }
 

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 16/20: ISIS-1569: updates to XSDs, make sure the version defaultsb are correct.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 329d75b624f8486114f96a0c9c2a0b0ba8d55f7b
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 16:31:31 2018 +0000

    ISIS-1569: updates to XSDs, make sure the version defaultsb are correct.
---
 core/schema/src/main/resources/org/apache/isis/schema/chg/chg-1.1.xsd | 2 +-
 core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd | 4 ++--
 core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/schema/src/main/resources/org/apache/isis/schema/chg/chg-1.1.xsd b/core/schema/src/main/resources/org/apache/isis/schema/chg/chg-1.1.xsd
index 4a9bceb..cb55449 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/chg/chg-1.1.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/chg/chg-1.1.xsd
@@ -28,7 +28,7 @@
 
     <xs:element name="changesDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.1 of this schema.  The changes (create/update/delete) to one or more domain objects within a transaction.  (nb: only published objects are included in these lists).
+            <xs:documentation>Represents v1.1 of this schema (as per majorVersion.minorVersion @default attribute, below).  The changes (create/update/delete) to one or more domain objects within a transaction.  (nb: only published objects are included in these lists).
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
index 5349931..f9125cd 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
@@ -38,7 +38,7 @@
 
     <xs:element name="commandDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.4 of this schema, adding in 'commandsDto' and extending 'commandDto' to allow additional implementation-specific fields to be attached in 'userData' (a map).
+            <xs:documentation>Represents v1.4 of this schema (as per majorVersion.minorVersion @default attribute, below).  Adds in 'commandsDto' and extending 'commandDto' to allow additional implementation-specific fields to be attached in 'userData' (a map).
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -49,7 +49,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="3">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="4">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd
index eaec7c1..63380a8 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd
@@ -30,7 +30,7 @@
 
     <xs:element name="interactionDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.3 of this schema, which just updates to use cmd v1.4 schema.
+            <xs:documentation>Represents v1.3 of this schema (as per majorVersion.minorVersion @default attribute, below); just updates to use cmd v1.4 schema.
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -41,7 +41,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="2">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="3">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 19/20: ISIS-1569: updates docs for CommandService and cmd schema

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 150894bff4adafd9915153423e352a849a7e1268
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 24 10:35:24 2018 +0000

    ISIS-1569: updates docs for CommandService and cmd schema
---
 .../asciidoc/guides/rgcms/_rgcms_schema-cmd.adoc   | 53 ++++++++++++++--------
 ...rgsvc_application-layer-spi_CommandService.adoc | 39 ++++++++--------
 2 files changed, 54 insertions(+), 38 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-cmd.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-cmd.adoc
index 33ec4e8..a0597b3 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-cmd.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_schema-cmd.adoc
@@ -5,14 +5,15 @@
 :_imagesdir: images/
 
 
-
 The command ("cmd") schema defines the serialized form of the __intention__ to invoke an action or to
 edit a property.
+It can be supplemented with optional timings capturing the actual invocation of a command (introduced to support the replication of commands in a master/slave arrangement).
+
 
 [NOTE]
 ====
-Mixin actions are represented as regular actions on the mixed-in object.  In other words, the fact that the actual
-implementation of the action is defined by a mixin is an implementation detail only.
+Mixin actions are represented as regular actions on the mixed-in object.
+In other words, the fact that the actual implementation of the action is defined by a mixin is an implementation detail only.
 ====
 
 [[__rgcms_schema-cmd_commandDto]]
@@ -43,35 +44,51 @@ The `commandDto` root element is defined as:
                 <xs:element name="user" type="xs:string"/>                  <!--6-->
                 <xs:element name="targets" type="com:oidsDto"/>             <!--7-->
                 <xs:element name="member" type="memberDto"/>                <!--8-->
+                <xs:element name="timings" type="memberDto" minOccurs="0"/> <!--9-->
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="commandsDto">                                         <!--10-->
+        <xs:annotation>
+            <xs:documentation>Collection of commandDto's</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence minOccurs="1" maxOccurs="unbounded">
+                <xs:element ref="commandDto"/>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
+
     ...
 </xs:schema>
 ----
-<1> the command schema has a namespace URI of "http://isis.apache.org/schema/cmd".  Although URIs are not the same as
-URLs, you will find that the schemas are also downloadable from this location.
+<1> the command schema has a namespace URI of "http://isis.apache.org/schema/cmd".  Although URIs are not the same as URLs, you will find that the schemas are also downloadable from this location.
 <2> uses complex types defined in the xref:../rgcms/rgcms.adoc#_rgcms_schema_common["common" schema].
-<3> definition of the `commandDto` root element.  The corresponding XML will use this as its top-level element.
+<3> definition of the `commandDto` root element.
+The corresponding XML will use this as its top-level element.
 <4> each instance of this schema indicates the version of the schema it is compatible with (following semantic versioning)
-<5> unique identifier for the transaction in which this command is created.  The transaction Id is used to correlate
-to the xref:../rgcms/rgcms.adoc#_rgcms_schema_interaction[interaction] that executes the command, and to any
+<5> unique identifier for the transaction in which this command is created.
+The transaction Id is used to correlate to the xref:../rgcms/rgcms.adoc#_rgcms_schema_interaction[interaction] that executes the command, and to any
 xref:../rgcms/rgcms.adoc#_rgcms_schema_changes[changes] to domain objects occurring as a side-effect of that interaction.
 <6> the name of the user who created the command (whose intention it is to invoke the action/edit the property).
 <7> the target object (or objects) to be invoked.
 A bulk action will create multiple commands, each with only a single target.
 (A future version of the framework may also support a single bulk command against this multiple targets, ie all-or-nothing).
 <8> the `memberDto`, defined below, the captures the action/property and arguments/new value.
+<9> optional timings for the invocation of a command.
+<10> groups multiple commands together.
 
-The `CommandDto` DTO corresponding to the `commandDto` root element can be marshalled to/from XML using the
-`CommandDtoUtils` class.
+The `CommandDto` DTO corresponding to the `commandDto` root element can be marshalled to/from XML using the `CommandDtoUtils` class.
+The `CommandsDto` DTO allows multiple commands to be marshalled together.
+This was introduced to support replication of commands in a master/slave arrangement (eg for regression testing).
 
 
 [[__rgcms_schema-cmd_memberDto]]
 == `memberDto` and subtypes
 
-The `memberDto` complex type is an abstract type representing the intention to either invoke an action or to edit a
-property.  The `actionDto` and `propertyDto` are the concrete subtypes:
+The `memberDto` complex type is an abstract type representing the intention to either invoke an action or to edit a property.
+The `actionDto` and `propertyDto` are the concrete subtypes:
 
 
 [source,xml]
@@ -108,13 +125,13 @@ property.  The `actionDto` and `propertyDto` are the concrete subtypes:
     </xs:complexType>
 </xs:schema>
 ----
-<1> the `memberDto` is an abstract type.   Its primary responsibility is simply to identify the member (action or
-property).
+<1> the `memberDto` is an abstract type.
+Its primary responsibility is simply to identify the member (action or property).
 <2> the formal identifier (fully qualified class name + member name) of the member being interacted with (action or property).
 <3> the "logical" formal identifier (object type, as per `@DomainObject(objectType=)`, + member name) of the member being interacted with (action or property).
 <4> the `interactionType` attribute indicates whether the member is an action or a property.
-<5> the `actionDto` complex type captures the set of parameters (also including the argument values) with which to
-invoke the action.  The `paramsDto` type is defined xref:../rgcms/rgcms.adoc#__rgcms_schema-cmd_ancillary[below].
+<5> the `actionDto` complex type captures the set of parameters (also including the argument values) with which to invoke the action.
+The `paramsDto` type is defined xref:../rgcms/rgcms.adoc#__rgcms_schema-cmd_ancillary[below].
 <6> the `propertyDto` complex type captures the new value (possibly `null`) to set the property to.
 
 In general the `logicalMemberIdentifier` should be used in preference to the `memberIdentifier` because will not (necessarily) have to change if the class is moved during a refactoring.
@@ -149,6 +166,6 @@ The schema also defines a small number of supporting types:
 </xs:schema>
 ----
 <1> the `paramsDto` is simply the list of parameter/arguments.
-<2> the `paramDto` complex type essentially combines a parameter with its corresponding argument: a named value that
-has a type.  It extends the `valueWithTypeDto` complex type taken from the
+<2> the `paramDto` complex type essentially combines a parameter with its corresponding argument: a named value that has a type.
+It extends the `valueWithTypeDto` complex type taken from the
 xref:../rgcms/rgcms.adoc#_rgcms_schema-common["common"] schema.
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc
index 9b541bf..ce1e550 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc
@@ -6,32 +6,29 @@
 
 
 
-The `CommandService` service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_CommandContext[`CommandContext`] service such
-that `Command` objects (that reify the invocation of an action/edit of a property on a domain object) can be persisted.
+The `CommandService` service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_CommandContext[`CommandContext`] service such that `Command` objects (that reify the invocation of an action/edit of a property on a domain object) can be persisted.
 
 The primary use case for persistent ``Command``s is in support of background commands; they act as a parent to any background commands that can be persisted either explicitly using the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_BackgroundService[`BackgroundService`], or implicitly by way of the xref:../rgant/rgant.adoc#_rgant-Action_command[`@Action#command()`] annotation.
 
+Persistent ``Command``s also support the ability to replicate from a master to a slave instance of an application.
+One use case for this is for regression testing, allowing a production usages to be replayed against a new release candidate, eg after upgrading that application to a new version of Apache Isis itself (or some other dependency).
+
 There are a number of related use cases:
 
 * they enable profiling of the running application (which actions are invoked then most often, what is their response time)
 * if xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] or
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] (latter deprecated) is configured, they provide
-better traceability as the `Command` is also correlated with any published events, again through the unique
-`transactionId` GUID
+xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] (latter deprecated) is configured, they provide better traceability as the `Command` is also correlated with any published events, again through the unique `transactionId` GUID
 * if xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuderService[`AuditerService`] or
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditService[`AuditingService`] (latter deprecated) is configured, they provide better audit
-information, since the `Command` (the 'cause' of an action) can be correlated to the audit records (the "effect" of
-the action) through the `transactionId` GUID
+xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditService[`AuditingService`] (latter deprecated) is configured, they provide better audit information, since the `Command` (the 'cause' of an action) can be correlated to the audit records (the "effect" of the action) through the `transactionId` GUID
 
-However, while persistent ``Command``s _can_ be used for these use cases, it is recommended instead to use the
-xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`] service and persistent implementations of the
-``Interaction`` object, eg as provided by the (non-ASF) link:http://platform.incode.org[Incode Platform^]'s publishmq module.
+However, while persistent ``Command``s _can_ be used for these use cases, it is recommended instead to use the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`] service and persistent implementations of the ``Interaction`` object, eg as provided by the (non-ASF) link:http://platform.incode.org[Incode Platform^]'s publishmq module.
 
 
 
 == Screencast
 
-The link:https://www.youtube.com/watch?v=tqXUZkPB3EI[screencast] below provides a run-through of the command (profiling) service, auditing service, publishing service. It also shows how commands can be run in the background either explicitly by scheduling through the background service or implicitly by way of a framework annotation.
+The link:https://www.youtube.com/watch?v=tqXUZkPB3EI[screencast] below provides a run-through of the command (profiling) service, auditing service, publishing service.
+It also shows how commands can be run in the background either explicitly by scheduling through the background service or implicitly by way of a framework annotation.
 
 
 [NOTE]
@@ -56,21 +53,22 @@ public interface CommandService {
 }
 ----
 <1> Instantiate the appropriate instance of the `Command` (as defined by the
-xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_CommandContext[`CommandContext`] service).  Its members will be populated automatically by
-the framework.
+xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_CommandContext[`CommandContext`] service).
+Its members will be populated automatically by the framework.
 <2> Deprecated and *IS NOT CALLED* by the framework.
 The framework automatically populates the ``Command``'s `timestamp`, `user` and `transactionId` fields, so there is no need for the service implementation to initialize any of these.
 In particular, the ``Command`` will already have been initialized with the provided `transactionId` argument.
 <3> Set the hint that the `Command` should be persisted if possible (when completed, see below).
-<4> "Complete" the command, typically meaning that the command should be persisted it if its `Command#getPersistence()`
-flag and persistence hint (`Command#isPersistHint()`) indicate that it should be.  +
+<4> "Complete" the command, typically meaning that the command should be persisted it if its `Command#getPersistence()` flag and persistence hint (`Command#isPersistHint()`) indicate that it should be.  +
 +
 The framework will automatically have set the `completedAt` property of the `Command`.
 
 
+
 == Implementation
 
-The (non-ASF) link:http://platform.incode.org[Incode Platform^]'s command module provides an implementation (`org.isisaddons.module.command.dom.CommandServiceJdo`) that persists ``Command``s using the JDO/DataNucleus object store.  It further provides a number of supporting services:
+The (non-ASF) link:http://platform.incode.org[Incode Platform^]'s command module provides an implementation (`org.isisaddons.module.command.dom.CommandServiceJdo`) that persists ``Command``s using the JDO/DataNucleus object store.
+It further provides a number of supporting services:
 
 * `org.isisaddons.module.command.dom.CommandServiceJdoRepository` is a repository to search for persisted ``Command``s
 
@@ -97,12 +95,13 @@ If contributions are not required in the UI, these can be suppressed either usin
 
 == Related Services
 
-As discussed above, this service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_CommandContext[`CommandContext`], providing the ability for `Command` objects to be
-persisted. This is closely related to the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_BackgroundCommandService[`BackgroundCommandService`]that allows the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_BackgroundService[`BackgroundService`] to schedule commands for background/asynchronous execution.
+As discussed above, this service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_CommandContext[`CommandContext`], providing the ability for `Command` objects to be persisted.
+This is closely related to the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_BackgroundCommandService[`BackgroundCommandService`]that allows the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_BackgroundService[`BackgroundService`] to schedule commands for background/asynchronous execution.
 
 The implementations of `CommandService` and `BackgroundCommandService` are intended to go together, so that persistent parent `Command`s can be associated with their child background `Command`s.
 
-The services provided by this module combines very well with the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_AuditingService[`AuditingService`].  The `CommandService` captures the _cause_ of an interaction (an action was invoked, a property was edited), while the `AuditingService3` captures the _effect_ of that interaction in terms of changed state.
+The services provided by this module combines very well with the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_AuditingService[`AuditingService`].
+The `CommandService` captures the _cause_ of an interaction (an action was invoked, a property was edited), while the `AuditingService3` captures the _effect_ of that interaction in terms of changed state.
 
 You may also want to configure the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
 

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 10/20: ISIS-1569: adds guard to ensure that BackgroundCommand#startedAt is always populated.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 671d3e7195d6d8403d74704c0b6ce612bd9cb74e
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 18 15:23:18 2018 +0000

    ISIS-1569: adds guard to ensure that BackgroundCommand#startedAt is always populated.
---
 .../services/background/BackgroundCommandExecution.java      | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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..a66a194 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
@@ -123,6 +123,17 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
                 try {
                     backgroundCommand.setExecutor(Executor.BACKGROUND);
 
+                    // responsibility for setting the Command#startedAt is in the ActionInvocationFacet or
+                    // PropertySetterFacet, but tthis is run if the domain object was found.  If the domain object is
+                    // thrown then we would have a command with only completedAt, which is inconsistent.
+                    // Therefore instead we copy down from the backgroundInteraction (similar to how we populate the
+                    // completedAt at the end)
+                    final Interaction.Execution currentExecution = backgroundInteraction.getCurrentExecution();
+                    backgroundCommand.setStartedAt(
+                            currentExecution != null
+                                    ? currentExecution.getStartedAt()
+                                    : clockService.nowAsJavaSqlTimestamp());
+
                     final boolean legacy = memento.startsWith("<memento");
                     if(legacy) {
 
@@ -223,6 +234,7 @@ public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemp
                     }
 
                 } catch (RuntimeException e) {
+
                     // hmmm, this doesn't really make sense if >1 action
                     //
                     // in any case, the capturing of the result of the action invocation should be the

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 20/20: ISIS-1569: updates docs for ContentMappingService, default implementations for Command(s)Dto

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 1e364418932800fb331942ab06a5d5633d6c1403
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 24 10:44:57 2018 +0000

    ISIS-1569: updates docs for ContentMappingService, default implementations for Command(s)Dto
    
    also removes unused import.
---
 ...esentation-layer-spi_ContentMappingService.adoc | 44 +++++++++-------------
 .../services/command/CommandServiceDefault.java    |  1 -
 2 files changed, 17 insertions(+), 28 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ContentMappingService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ContentMappingService.adoc
index 791fd9c..f87bf23 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ContentMappingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ContentMappingService.adoc
@@ -43,37 +43,27 @@ public interface ContentMappingService {
 
 == Implementations
 
-No default implementations are provided by Apache Isis framework itself.
+The framework provides two implementations of this service, both in support of the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_CommandService[`CommandService`] SPI.
 
-However, the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp] includes a sample implementation to convert its `ToDoItem` entity into a (JAXB annotated) `ToDoItemDto`.  The source code is:
+By way of background: implementations of the SPI `CommandService` work with custom implementations of the `Command` interface, typically being persisted to a datastore.
+The `CommandWithDto` interface is a subtype of `Command` for implementations that can be reified into xref:../rgcms/rgcms.adoc#_rgcms_schema-cmd[`CommandDto`] XML instances.
+One implementation that does this is the (non-ASF) link:http://platform.incode.org[Incode Platform^]'s command module.
+
+For framework implementations of `ContentMappingService` allow domain service actions that return ``CommandDto``s (either singularly or in a list) to be converted into XML documents:
+
+* `o.a.i.applib.conmap.ContentMappingServiceForCommandDto` will map any single instnce of a `CommandWithDto` into a `CommandDto` XML document
+* `o.a.i.applib.conmap.ContentMappingServiceForCommandsDto` will map list of ``CommandWithDto``s into a `CommandsDto` XML document, and will wrap any single instance of a `CommandWithDto` into a singleton list and thence into a `CommandsDto` XML document.
+
+The framework also provides `ContentMappingService.Util` which includes a couple of convenience utilities for implementations:
 
 [source,java]
 ----
-@DomainService(nature = NatureOfService.DOMAIN)
-public class ContentMappingServiceForToDoItem implements ContentMappingService {
-    @Override
-    public Object map(
-            final Object object,
-            final List<MediaType> acceptableMediaTypes) {
-        if(object instanceof ToDoItem) {
-            for (MediaType acceptableMediaType : acceptableMediaTypes) {
-                final Map<String, String> parameters = acceptableMediaType.getParameters();
-                final String className = parameters.get("x-ro-domain-type");
-                if(className.eqausl(ToDoItemV1_1.class.getName())) {
-                    return newToDoItemV1_1((ToDoItem) object);
-                }
-            }
-        }
-        return null;
-    }
-    private ToDoItemV1_1 newToDoItemV1_1(final ToDoItem toDoItem) {
-        final ToDoItemV1_1 dto = new ToDoItemV1_1();
-        dto.setToDoItem(toDoItem);
-        dto.setDescription(toDoItem.getDescription());
-        ...
-        return dto;
-    }
-    ...
+public static class Util {
+    public static String determineDomainType(
+        final List<MediaType> acceptableMediaTypes) { ... }
+    public static boolean isSupported(
+            final Class<?> clazz,
+            final List<MediaType> acceptableMediaTypes) { ... }
 }
 ----
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java
index ce6ec12..8076f16 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java
@@ -21,7 +21,6 @@ import java.util.UUID;
 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.clock.ClockService;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.CommandDefault;
 import org.apache.isis.applib.services.command.spi.CommandService;

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 07/20: ISIS-1569: adds a convenience Util class for ContentMappingService to remove boilerplate in subclass implementations (parsing the acceptable media types).

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 02f03b001716bfb0457a2ea1a78970c16a6042f7
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 18 10:30:46 2018 +0000

    ISIS-1569: adds a convenience Util class for ContentMappingService to remove boilerplate in subclass implementations (parsing the acceptable media types).
---
 .../isis/applib/conmap/ContentMappingService.java  | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java
index d577dfb..49b0eb5 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java
@@ -19,9 +19,12 @@
 package org.apache.isis.applib.conmap;
 
 import java.util.List;
+import java.util.Map;
 
 import javax.ws.rs.core.MediaType;
 
+import com.google.common.base.Joiner;
+
 import org.apache.isis.applib.annotation.Programmatic;
 
 public interface ContentMappingService {
@@ -32,4 +35,28 @@ public interface ContentMappingService {
     @Programmatic
     Object map(Object object, final List<MediaType> acceptableMediaTypes);
 
+    /**
+     * Convenience utilities for implementations of {@link ContentMappingService}.
+     */
+    public static class Util {
+
+        public static String determineDomainType(final List<MediaType> acceptableMediaTypes) {
+            for (MediaType acceptableMediaType : acceptableMediaTypes) {
+                final Map<String, String> parameters = acceptableMediaType.getParameters();
+                final String domainType = parameters.get("x-ro-domain-type");
+                if(domainType != null) {
+                    return domainType;
+                }
+            }
+            throw new IllegalArgumentException(
+                    "Could not locate x-ro-domain-type parameter in any of the provided media types; got: " + Joiner.on(", ").join(acceptableMediaTypes));
+        }
+
+        public static boolean isSupported(
+                final Class<?> clazz,
+                final List<MediaType> acceptableMediaTypes) {
+            final String domainType = determineDomainType(acceptableMediaTypes);
+            return clazz.getName().equals(domainType);
+        }
+    }
 }

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 02/20: ISIS-1569: adds CommandService2 as an extension

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 546aef5a0cd40c98747ae2eaa99a2eeace311578
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 17 12:45:34 2018 +0000

    ISIS-1569: adds CommandService2 as an extension
---
 .../services/command/spi/CommandService2.java      | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java
new file mode 100644
index 0000000..c745bdd
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java
@@ -0,0 +1,55 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.applib.services.command.spi;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.command.Command;
+
+public interface CommandService2 extends CommandService {
+
+    public static class NotFoundException extends RuntimeException {
+
+        private static final long serialVersionUID = 1L;
+
+        private final String transactionId;
+
+        public NotFoundException(final String transactionId) {
+            this.transactionId = transactionId;
+        }
+
+        public String getTransactionId() {
+            return transactionId;
+        }
+    }
+
+    /**
+     * Finds all {@link Command}s created since the specified command (identified by its transaction Id).
+     *
+     * @param transactionId
+     * @param maxNumber
+     * @return
+     */
+    @Programmatic
+    List<Command> findSince(
+            final UUID transactionId,
+            int maxNumber)
+            throws NotFoundException;
+
+}

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 13/20: ISIS-1836: removes chance of an NPE in the RO mapper for an exception (which was in turn resulting in a 500 rather than 422 when invoked an action with an incorrect parameter argument).

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 8463f4b55c64f847bfd9a1da5a8b5eeb3dc3def1
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 14:22:43 2018 +0000

    ISIS-1836: removes chance of an NPE in the RO mapper for an exception (which was in turn resulting in a 500 rather than 422 when invoked an action with an incorrect parameter argument).
---
 .../viewer/restfulobjects/server/mappers/entity/ExceptionDetail.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/entity/ExceptionDetail.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/entity/ExceptionDetail.java
index d47e2a3..862c2d8 100644
--- a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/entity/ExceptionDetail.java
+++ b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/mappers/entity/ExceptionDetail.java
@@ -77,7 +77,7 @@ public class ExceptionDetail {
         if (ex instanceof JDOException) {
             final JDOException jdoException = (JDOException) ex;
             final Throwable[] nestedExceptions = jdoException.getNestedExceptions();
-            return nestedExceptions.length > 0? nestedExceptions[0]: null;
+            return nestedExceptions != null && nestedExceptions.length > 0? nestedExceptions[0]: null;
         }
         else {
             return ex.getCause();

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 14/20: ISIS-1569: undeprecates Command#getStartedAt and Command#getCompletedAt

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit a53972ea4df54acedfc4b1288a43eb9548088eef
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 14:52:02 2018 +0000

    ISIS-1569: undeprecates Command#getStartedAt and Command#getCompletedAt
---
 .../isis/applib/services/command/Command.java      | 41 +++++++++++++++++-----
 1 file changed, 33 insertions(+), 8 deletions(-)

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 a6f458f..ec91580 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
@@ -284,17 +284,30 @@ public interface Command extends HasTransactionId {
      * For an command that has actually been executed, holds the date/time at which the {@link Interaction} that
      * executed the command started.
      *
-     * @deprecated - see {@link Interaction#getStartedAt()}.
+     * <p>
+     *     Previously this field was deprecated (on the basis that the startedAt is also held in
+     *     {@link Interaction.Execution#getStartedAt()}). However, to support replay/replication feature means that
+     *     we need to query for persisted {@link Command}s and use this field to ensure the correct ordering.
+     * </p>
+     *
+     * See also {@link Interaction#getCurrentExecution()} and
+     * {@link Interaction.Execution#getStartedAt()}.
      */
-    @Deprecated
     Timestamp getStartedAt();
     
     /**
      * <b>NOT API</b>: intended to be called only by the framework.
      *
-     * @deprecated - see {@link Interaction#getCurrentExecution()} and {@link org.apache.isis.applib.services.iactn.Interaction.Execution#setStartedAt(Timestamp)}.
+     *
+     * <p>
+     *     Previously this field was deprecated (on the basis that the completedAt is also held in
+     *     {@link Interaction.Execution#getCompletedAt()}). However, to support replay/replication feature means that
+     *     we need to query for persisted {@link Command}s and use this field to ensure the correct ordering.
+     * </p>
+     *
+     * See also {@link Interaction#getCurrentExecution()} and
+     * {@link Interaction.Execution#setStartedAt(Timestamp)}.
      */
-    @Deprecated
     void setStartedAt(Timestamp startedAt);
 
     //endregion
@@ -305,17 +318,29 @@ public interface Command extends HasTransactionId {
      * For an command that has actually been executed, holds the date/time at which the {@link Interaction} that
      * executed the command completed.
      *
-     * @deprecated - see {@link Interaction#getCurrentExecution()} and  {@link org.apache.isis.applib.services.iactn.Interaction.Execution#getCompletedAt()}.
+     * <p>
+     *     Previously this field was deprecated (on the basis that the completedAt is also held in
+     *     {@link Interaction.Execution#getCompletedAt()}). However, to support replay/replication feature means that
+     *     we need to query for persisted {@link Command}s and use this field to ensure the correct ordering.
+     * </p>
+     *
+     * See also {@link Interaction#getCurrentExecution()} and
+     * {@link Interaction.Execution#getCompletedAt()}.
      */
-    @Deprecated
     Timestamp getCompletedAt();
     
     /**
      * <b>NOT API</b>: intended to be called only by the framework.
      *
-     * @deprecated - see {@link org.apache.isis.applib.services.iactn.Interaction.Execution#setCompletedAt(Timestamp)}.
+     * <p>
+     *     Previously this field was deprecated (on the basis that the completedAt is also held in
+     *     {@link Interaction.Execution#getCompletedAt()}). However, to support replay/replication feature means that
+     *     we need to query for persisted {@link Command}s and use this field to ensure the correct ordering.
+     * </p>
+     *
+     * See also {@link Interaction#getCurrentExecution()} and
+     * {@link Interaction.Execution#setCompletedAt(Timestamp)}.
      */
-    @Deprecated
     void setCompletedAt(Timestamp completedAt);
 
     //endregion

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 09/20: ISIS-1569: extends cmd and ixn schemas to allow userData to be specified, and moves the new CommandsDto into the new version of cmd.xsd also.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 348802cfba46b0cea88731e5413e3a9d0fc26b49
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 18 14:03:57 2018 +0000

    ISIS-1569: extends cmd and ixn schemas to allow userData to be specified, and moves the new CommandsDto into the new version of cmd.xsd also.
---
 core/schema/pom.xml                                       |  4 ++--
 .../main/resources/org/apache/isis/schema/bindings.xml    |  8 ++++----
 .../apache/isis/schema/cmd/{cmd-1.3.xsd => cmd-1.4.xsd}   | 15 ++++++++++++++-
 .../apache/isis/schema/ixn/{ixn-1.2.xsd => ixn-1.3.xsd}   |  4 ++--
 4 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/core/schema/pom.xml b/core/schema/pom.xml
index a984e44..cc2a0b9 100644
--- a/core/schema/pom.xml
+++ b/core/schema/pom.xml
@@ -79,8 +79,8 @@
                                     <schemaDirectory>src/main/resources/org/apache/isis/schema</schemaDirectory>
                                     <schemaIncludes>
                                         <schemaInclude>common/common-1.1.xsd</schemaInclude>
-                                        <schemaInclude>cmd/cmd-1.3.xsd</schemaInclude>
-                                        <schemaInclude>ixn/ixn-1.2.xsd</schemaInclude>
+                                        <schemaInclude>cmd/cmd-1.4.xsd</schemaInclude>
+                                        <schemaInclude>ixn/ixn-1.3.xsd</schemaInclude>
                                         <schemaInclude>chg/chg-1.1.xsd</schemaInclude>
                                     </schemaIncludes>
                                     <bindingDirectory>src/main/resources/org/apache/isis/schema</bindingDirectory>
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/bindings.xml b/core/schema/src/main/resources/org/apache/isis/schema/bindings.xml
index 5898075..50d69cc 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/bindings.xml
+++ b/core/schema/src/main/resources/org/apache/isis/schema/bindings.xml
@@ -38,7 +38,7 @@
         </jaxb:bindings>
     </jaxb:bindings>
 
-    <jaxb:bindings schemaLocation="ixn/ixn-1.2.xsd">
+    <jaxb:bindings schemaLocation="ixn/ixn-1.3.xsd">
         <jaxb:schemaBindings>
             <!--
             we don't include the minor version, because the
@@ -50,7 +50,7 @@
             <namespace:prefix name="ixn" />
         </jaxb:bindings>
     </jaxb:bindings>
-    <!-- since ixn-1.2.xsd does an xs:import of common-1.1.xsd, we need to specify common's package bindings -->
+    <!-- since ixn-1.3.xsd does an xs:import of common-1.1.xsd, we need to specify common's package bindings -->
     <jaxb:bindings schemaLocation="common/common-1.1.xsd">
         <jaxb:schemaBindings>
             <!--
@@ -63,8 +63,8 @@
             <namespace:prefix name="com" />
         </jaxb:bindings>
     </jaxb:bindings>
-    <!-- since ixn-1.2.xsd does an xs:import of cmd-1.3.xsd, we need to specify common's package bindings -->
-    <jaxb:bindings schemaLocation="cmd/cmd-1.3.xsd">
+    <!-- since ixn-1.3.xsd does an xs:import of cmd-1.4.xsd, we need to specify common's package bindings -->
+    <jaxb:bindings schemaLocation="cmd/cmd-1.4.xsd">
         <jaxb:schemaBindings>
             <!--
             we don't include the minor version, because the
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
similarity index 91%
rename from core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd
rename to core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
index 630dbe2..08cedef 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
@@ -38,7 +38,7 @@
 
     <xs:element name="commandDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.3 of this schema, adding in 'logicalMemberIdentifier'
+            <xs:documentation>Represents v1.4 of this schema, adding in 'commandsDto' and extending 'commandDto' to allow additional implementation-specific fields to be attached in 'userData' (a map).
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -78,6 +78,7 @@
                         <xs:documentation>The action or property (identifier and parameter arguments) to be invoked on the target object(s).</xs:documentation>
                     </xs:annotation>
                 </xs:element>
+                <xs:element name="userData" type="mapDto" minOccurs="0"/>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
@@ -164,5 +165,17 @@
         </xs:complexContent>
     </xs:complexType>
 
+    <xs:complexType name="mapDto">
+        <xs:sequence>
+            <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="key" type="xs:string"/>
+                        <xs:element name="value" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
 
 </xs:schema>
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.2.xsd b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd
similarity index 98%
rename from core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.2.xsd
rename to core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd
index 21c16f3..eaec7c1 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.2.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.3.xsd
@@ -26,11 +26,11 @@
 >
 
     <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.1.xsd"/>
-    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.3.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.4.xsd"/>
 
     <xs:element name="interactionDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.2 of this schema, adding in 'logicalMemberIdentifier'.
+            <xs:documentation>Represents v1.3 of this schema, which just updates to use cmd v1.4 schema.
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 03/20: ISIS-1569: by way of tidy-up, just removes unused injected ClockService from CommandServiceDefault

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 1ade2af426c70d6e0feefc51e630fe02ade67175
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 17 12:46:05 2018 +0000

    ISIS-1569: by way of tidy-up, just removes unused injected ClockService from CommandServiceDefault
---
 .../isis/core/runtime/services/command/CommandServiceDefault.java      | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java
index 7d2986a..ce6ec12 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandServiceDefault.java
@@ -58,7 +58,4 @@ public class CommandServiceDefault implements CommandService {
         return false;
     }
 
-    @javax.inject.Inject
-    ClockService clockService;
-
 }

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 17/20: ISIS-1569: removes unused and accidentally committed element in cmd-1.4.xsd

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit a37ba576eaf36ee8552e67533b1b46e627a30773
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 16:49:48 2018 +0000

    ISIS-1569: removes unused and accidentally committed element in cmd-1.4.xsd
---
 .../main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd   | 13 -------------
 .../resources/org/apache/isis/schema/common/common-1.1.xsd  |  2 +-
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
index f9125cd..3ff2e90 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
@@ -176,19 +176,6 @@
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:complexType name="timingsDto">
-        <xs:sequence>
-            <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element name="key" type="xs:string"/>
-                        <xs:element name="value" type="xs:string"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-        </xs:sequence>
-    </xs:complexType>
-
     <xs:complexType name="mapDto">
         <xs:sequence>
             <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.1.xsd b/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.1.xsd
index 1121962..ab26815 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.1.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.1.xsd
@@ -201,4 +201,4 @@
         </xs:restriction>
     </xs:simpleType>
 
-</xs:schema>
+</xs:schema>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 18/20: ISIS-1569: updates XSDs for docs, and adds in the historical previous versions also.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit fad907f97a2e1ae9925feef2bb959deebafb0473
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 16:50:19 2018 +0000

    ISIS-1569: updates XSDs for docs, and adds in the historical previous versions also.
---
 .../asciidoc/schema/chg/{chg.xsd => chg-1.1.xsd}   |  6 +--
 .../src/main/asciidoc/schema/chg/chg.xsd           |  6 +--
 .../asciidoc/schema/cmd/{cmd.xsd => cmd-1.2.xsd}   | 10 ++---
 .../asciidoc/schema/cmd/{cmd.xsd => cmd-1.3.xsd}   | 18 +++++---
 .../asciidoc/schema/cmd/{cmd.xsd => cmd-1.4.xsd}   | 51 +++++++++++++++++++---
 .../src/main/asciidoc/schema/cmd/cmd.xsd           | 51 +++++++++++++++++++---
 .../schema/common/{common.xsd => common-1.1.xsd}   | 19 ++++++--
 .../src/main/asciidoc/schema/common/common.xsd     | 19 ++++++--
 .../asciidoc/schema/ixn/{ixn.xsd => ixn-1.1.xsd}   | 10 ++---
 .../asciidoc/schema/ixn/{ixn.xsd => ixn-1.2.xsd}   | 16 ++++---
 .../asciidoc/schema/ixn/{ixn.xsd => ixn-1.3.xsd}   | 14 ++++--
 .../src/main/asciidoc/schema/ixn/ixn.xsd           | 14 ++++--
 12 files changed, 183 insertions(+), 51 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd b/adocs/documentation/src/main/asciidoc/schema/chg/chg-1.1.xsd
similarity index 93%
copy from adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
copy to adocs/documentation/src/main/asciidoc/schema/chg/chg-1.1.xsd
index 41501de..cb55449 100644
--- a/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/chg/chg-1.1.xsd
@@ -24,11 +24,11 @@
            xmlns:com="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/common" schemaLocation="../common/common-1.1.xsd"/>
 
     <xs:element name="changesDto">
         <xs:annotation>
-            <xs:documentation>The changes (create/update/delete) to one or more domain objects within a transaction.  (nb: only published objects are included in these lists).
+            <xs:documentation>Represents v1.1 of this schema (as per majorVersion.minorVersion @default attribute, below).  The changes (create/update/delete) to one or more domain objects within a transaction.  (nb: only published objects are included in these lists).
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -39,7 +39,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="1">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
diff --git a/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd b/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
index 41501de..cb55449 100644
--- a/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
@@ -24,11 +24,11 @@
            xmlns:com="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/common" schemaLocation="../common/common-1.1.xsd"/>
 
     <xs:element name="changesDto">
         <xs:annotation>
-            <xs:documentation>The changes (create/update/delete) to one or more domain objects within a transaction.  (nb: only published objects are included in these lists).
+            <xs:documentation>Represents v1.1 of this schema (as per majorVersion.minorVersion @default attribute, below).  The changes (create/update/delete) to one or more domain objects within a transaction.  (nb: only published objects are included in these lists).
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -39,7 +39,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="1">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
diff --git a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.2.xsd
similarity index 95%
copy from adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
copy to adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.2.xsd
index e3aa0b9..8073266 100644
--- a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.2.xsd
@@ -23,11 +23,11 @@
            xmlns="http://isis.apache.org/schema/cmd"
            xmlns:com="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/common" schemaLocation="../common/common-1.1.xsd"/>
 
     <xs:element name="commandDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema.
+            <xs:documentation>Represents v1.2 of this schema.
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -38,9 +38,9 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="1">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="2">
                     <xs:annotation>
-                        <xs:documentation>Introduced in v1.1. The minor version of the schema that an XML instance was created using.
+                        <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
@@ -148,4 +148,4 @@
     </xs:complexType>
 
 
-</xs:schema>
+</xs:schema>
\ No newline at end of file
diff --git a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.3.xsd
similarity index 88%
copy from adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
copy to adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.3.xsd
index e3aa0b9..6f14ad1 100644
--- a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.3.xsd
@@ -23,11 +23,11 @@
            xmlns="http://isis.apache.org/schema/cmd"
            xmlns:com="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/common" schemaLocation="../common/common-1.1.xsd"/>
 
     <xs:element name="commandDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema.
+            <xs:documentation>Represents v1.3 of this schema, adding in 'logicalMemberIdentifier'
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -38,9 +38,9 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="1">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="3">
                     <xs:annotation>
-                        <xs:documentation>Introduced in v1.1. The minor version of the schema that an XML instance was created using.
+                        <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
@@ -77,9 +77,15 @@
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
+            <xs:element name="logicalMemberIdentifier" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Logical formal identifier (object type, as per @DomainObject(objectType=), and member name) of the member being interacted with (action or property).
+                    </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>Formal identifier (class name and member name) of the member being interacted with (action or property).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
@@ -148,4 +154,4 @@
     </xs:complexType>
 
 
-</xs:schema>
+</xs:schema>
\ No newline at end of file
diff --git a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.4.xsd
similarity index 73%
copy from adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
copy to adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.4.xsd
index e3aa0b9..3ff2e90 100644
--- a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.4.xsd
@@ -23,11 +23,22 @@
            xmlns="http://isis.apache.org/schema/cmd"
            xmlns:com="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/common" schemaLocation="../common/common-1.1.xsd"/>
+
+    <xs:element name="commandsDto">
+        <xs:annotation>
+            <xs:documentation>Collection of commandDto's</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence minOccurs="1" maxOccurs="unbounded">
+                <xs:element ref="commandDto"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
 
     <xs:element name="commandDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema.
+            <xs:documentation>Represents v1.4 of this schema (as per majorVersion.minorVersion @default attribute, below).  Adds in 'commandsDto' and extending 'commandDto' to allow additional implementation-specific fields to be attached in 'userData' (a map).
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -38,9 +49,9 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="1">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="4">
                     <xs:annotation>
-                        <xs:documentation>Introduced in v1.1. The minor version of the schema that an XML instance was created using.
+                        <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
@@ -67,6 +78,18 @@
                         <xs:documentation>The action or property (identifier and parameter arguments) to be invoked on the target object(s).</xs:documentation>
                     </xs:annotation>
                 </xs:element>
+                <xs:element name="timings" type="com:periodDto" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>The time taken to perform the command.  Used for replaying the command on a replica slave.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="userData" type="mapDto" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>Custom user data.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
@@ -77,9 +100,15 @@
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
+            <xs:element name="logicalMemberIdentifier" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Logical formal identifier (object type, as per @DomainObject(objectType=), and member name) of the member being interacted with (action or property).
+                    </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>Formal identifier (class name and member name) of the member being interacted with (action or property).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
@@ -147,5 +176,17 @@
         </xs:complexContent>
     </xs:complexType>
 
+    <xs:complexType name="mapDto">
+        <xs:sequence>
+            <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="key" type="xs:string"/>
+                        <xs:element name="value" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
 
 </xs:schema>
diff --git a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
index e3aa0b9..3ff2e90 100644
--- a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd.xsd
@@ -23,11 +23,22 @@
            xmlns="http://isis.apache.org/schema/cmd"
            xmlns:com="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/common" schemaLocation="../common/common-1.1.xsd"/>
+
+    <xs:element name="commandsDto">
+        <xs:annotation>
+            <xs:documentation>Collection of commandDto's</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence minOccurs="1" maxOccurs="unbounded">
+                <xs:element ref="commandDto"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
 
     <xs:element name="commandDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema.
+            <xs:documentation>Represents v1.4 of this schema (as per majorVersion.minorVersion @default attribute, below).  Adds in 'commandsDto' and extending 'commandDto' to allow additional implementation-specific fields to be attached in 'userData' (a map).
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -38,9 +49,9 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="1">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="1" maxOccurs="1" default="4">
                     <xs:annotation>
-                        <xs:documentation>Introduced in v1.1. The minor version of the schema that an XML instance was created using.
+                        <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
@@ -67,6 +78,18 @@
                         <xs:documentation>The action or property (identifier and parameter arguments) to be invoked on the target object(s).</xs:documentation>
                     </xs:annotation>
                 </xs:element>
+                <xs:element name="timings" type="com:periodDto" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>The time taken to perform the command.  Used for replaying the command on a replica slave.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="userData" type="mapDto" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>Custom user data.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
@@ -77,9 +100,15 @@
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
+            <xs:element name="logicalMemberIdentifier" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Logical formal identifier (object type, as per @DomainObject(objectType=), and member name) of the member being interacted with (action or property).
+                    </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>Formal identifier (class name and member name) of the member being interacted with (action or property).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
@@ -147,5 +176,17 @@
         </xs:complexContent>
     </xs:complexType>
 
+    <xs:complexType name="mapDto">
+        <xs:sequence>
+            <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="key" type="xs:string"/>
+                        <xs:element name="value" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
 
 </xs:schema>
diff --git a/adocs/documentation/src/main/asciidoc/schema/common/common.xsd b/adocs/documentation/src/main/asciidoc/schema/common/common-1.1.xsd
similarity index 91%
copy from adocs/documentation/src/main/asciidoc/schema/common/common.xsd
copy to adocs/documentation/src/main/asciidoc/schema/common/common-1.1.xsd
index 041208c..ab26815 100644
--- a/adocs/documentation/src/main/asciidoc/schema/common/common.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/common/common-1.1.xsd
@@ -42,6 +42,7 @@
             <xs:element name="timestamp" type="xs:dateTime"/>
             <xs:element name="enum" type="enumDto"/>
             <xs:element name="reference" type="oidDto"/>
+            <xs:element name="collection" type="collectionDto"/>
         </xs:choice>
     </xs:complexType>
 
@@ -67,6 +68,18 @@
         <xs:attribute name="id" type="xs:string"/>
     </xs:complexType>
 
+    <xs:complexType name="collectionDto">
+        <xs:annotation>
+            <xs:documentation>A collection of (argument) values
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="value" type="valueDto" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="type" use="required" type="valueType"/>
+        <xs:attribute name="null" use="optional" type="xs:boolean"/>
+    </xs:complexType>
+
     <xs:complexType name="oidsDto">
         <xs:annotation>
             <xs:documentation>A list of OIDs
@@ -112,10 +125,10 @@
             <xs:enumeration value="jodaLocalDateTime"/>
             <xs:enumeration value="enum"/>
             <xs:enumeration value="reference"/>
+            <xs:enumeration value="collection"/>
             <xs:enumeration value="void">
                 <xs:annotation>
-                    <xs:documentation>
-                        Not valid to be used as the parameter type of an action; can be used as its return type.
+                    <xs:documentation>Not valid to be used as the parameter type of an action; can be used as its return type.
                     </xs:documentation>
                 </xs:annotation>
             </xs:enumeration>
@@ -188,4 +201,4 @@
         </xs:restriction>
     </xs:simpleType>
 
-</xs:schema>
+</xs:schema>
\ No newline at end of file
diff --git a/adocs/documentation/src/main/asciidoc/schema/common/common.xsd b/adocs/documentation/src/main/asciidoc/schema/common/common.xsd
index 041208c..ab26815 100644
--- a/adocs/documentation/src/main/asciidoc/schema/common/common.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/common/common.xsd
@@ -42,6 +42,7 @@
             <xs:element name="timestamp" type="xs:dateTime"/>
             <xs:element name="enum" type="enumDto"/>
             <xs:element name="reference" type="oidDto"/>
+            <xs:element name="collection" type="collectionDto"/>
         </xs:choice>
     </xs:complexType>
 
@@ -67,6 +68,18 @@
         <xs:attribute name="id" type="xs:string"/>
     </xs:complexType>
 
+    <xs:complexType name="collectionDto">
+        <xs:annotation>
+            <xs:documentation>A collection of (argument) values
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="value" type="valueDto" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="type" use="required" type="valueType"/>
+        <xs:attribute name="null" use="optional" type="xs:boolean"/>
+    </xs:complexType>
+
     <xs:complexType name="oidsDto">
         <xs:annotation>
             <xs:documentation>A list of OIDs
@@ -112,10 +125,10 @@
             <xs:enumeration value="jodaLocalDateTime"/>
             <xs:enumeration value="enum"/>
             <xs:enumeration value="reference"/>
+            <xs:enumeration value="collection"/>
             <xs:enumeration value="void">
                 <xs:annotation>
-                    <xs:documentation>
-                        Not valid to be used as the parameter type of an action; can be used as its return type.
+                    <xs:documentation>Not valid to be used as the parameter type of an action; can be used as its return type.
                     </xs:documentation>
                 </xs:annotation>
             </xs:enumeration>
@@ -188,4 +201,4 @@
         </xs:restriction>
     </xs:simpleType>
 
-</xs:schema>
+</xs:schema>
\ No newline at end of file
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.1.xsd
similarity index 97%
copy from adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
copy to adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.1.xsd
index dc7908f..e8ccfe5 100644
--- a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.1.xsd
@@ -25,12 +25,12 @@
            xmlns:com="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:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.1.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.2.xsd"/>
 
     <xs:element name="interactionDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema, replacing and generalizing the earlier 'actionInvocationMemento'.
+            <xs:documentation>Represents v1.1 of this schema.  This schema replaces and generalizes the earlier 'actionInvocationMemento'.
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -41,7 +41,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="1">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
@@ -212,4 +212,4 @@
         </xs:sequence>
     </xs:complexType>
 
-</xs:schema>
+</xs:schema>
\ No newline at end of file
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.2.xsd
similarity index 94%
copy from adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
copy to adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.2.xsd
index dc7908f..21d375b 100644
--- a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.2.xsd
@@ -25,12 +25,12 @@
            xmlns:com="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:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.1.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.3.xsd"/>
 
     <xs:element name="interactionDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema, replacing and generalizing the earlier 'actionInvocationMemento'.
+            <xs:documentation>Represents v1.2 of this schema, adding in 'logicalMemberIdentifier'.
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -41,7 +41,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="2">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
@@ -77,6 +77,12 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
+            <xs:element name="logicalMemberIdentifier" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Logical formal identifier (object type, as per @DomainObject(objectType=), and member name) of the member being interacted with (action or property).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
             <xs:element name="memberIdentifier" type="xs:string">
                 <xs:annotation>
                     <xs:documentation>Formal identifier (class name and member name) of the member being interacted with (action or property).
@@ -212,4 +218,4 @@
         </xs:sequence>
     </xs:complexType>
 
-</xs:schema>
+</xs:schema>
\ No newline at end of file
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.3.xsd
similarity index 94%
copy from adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
copy to adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.3.xsd
index dc7908f..63380a8 100644
--- a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.3.xsd
@@ -25,12 +25,12 @@
            xmlns:com="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:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.1.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.4.xsd"/>
 
     <xs:element name="interactionDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema, replacing and generalizing the earlier 'actionInvocationMemento'.
+            <xs:documentation>Represents v1.3 of this schema (as per majorVersion.minorVersion @default attribute, below); just updates to use cmd v1.4 schema.
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -41,7 +41,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="3">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
@@ -77,6 +77,12 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
+            <xs:element name="logicalMemberIdentifier" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Logical formal identifier (object type, as per @DomainObject(objectType=), and member name) of the member being interacted with (action or property).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
             <xs:element name="memberIdentifier" type="xs:string">
                 <xs:annotation>
                     <xs:documentation>Formal identifier (class name and member name) of the member being interacted with (action or property).
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
index dc7908f..63380a8 100644
--- a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
@@ -25,12 +25,12 @@
            xmlns:com="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:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.1.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.4.xsd"/>
 
     <xs:element name="interactionDto">
         <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema, replacing and generalizing the earlier 'actionInvocationMemento'.
+            <xs:documentation>Represents v1.3 of this schema (as per majorVersion.minorVersion @default attribute, below); just updates to use cmd v1.4 schema.
             </xs:documentation>
         </xs:annotation>
         <xs:complexType>
@@ -41,7 +41,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="3">
                     <xs:annotation>
                         <xs:documentation>The minor version of the schema that an XML instance was created using.
                         </xs:documentation>
@@ -77,6 +77,12 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
+            <xs:element name="logicalMemberIdentifier" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Logical formal identifier (object type, as per @DomainObject(objectType=), and member name) of the member being interacted with (action or property).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
             <xs:element name="memberIdentifier" type="xs:string">
                 <xs:annotation>
                     <xs:documentation>Formal identifier (class name and member name) of the member being interacted with (action or property).

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 01/20: ISIS-1825: uses thread local to pass rendering context up to the scalar panel so that it, in turn, can correctly report on where it is being rendered.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit d7d7cde2d44249b7a92cd14bbdc4ec7ddd2b79a1
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 17 12:42:39 2018 +0000

    ISIS-1825: uses thread local to pass rendering context up to the scalar panel so that it, in turn, can correctly report on where it is being rendered.
---
 .../ajaxtable/IsisAjaxFallbackDataTable.java       | 15 +++++++++++++-
 .../components/scalars/ScalarPanelAbstract2.java   | 24 ++++++++++++++++------
 2 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/IsisAjaxFallbackDataTable.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/IsisAjaxFallbackDataTable.java
index 39de90f..9838d8b 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/IsisAjaxFallbackDataTable.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/IsisAjaxFallbackDataTable.java
@@ -39,6 +39,7 @@ import org.apache.wicket.util.lang.Generics;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.hints.UiHintContainer;
+import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.columns.ObjectAdapterToggleboxColumn;
 import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
@@ -86,6 +87,13 @@ public class IsisAjaxFallbackDataTable<T, S> extends DataTable<T, S> {
         addBottomToolbar(new NoRecordsToolbar(this));
     }
 
+    private final static ThreadLocal<EntityCollectionModel> entityCollectionModel = new ThreadLocal<>();
+
+    public static Boolean isParented() {
+        EntityCollectionModel entityCollectionModel = IsisAjaxFallbackDataTable.entityCollectionModel.get();
+        return entityCollectionModel != null ? entityCollectionModel.isParented() : null;
+    }
+
     @Override
     protected void onConfigure() {
         super.onConfigure();
@@ -93,7 +101,12 @@ public class IsisAjaxFallbackDataTable<T, S> extends DataTable<T, S> {
 
     @Override
     protected void onBeforeRender() {
-        super.onBeforeRender();
+        try {
+            entityCollectionModel.set(dataProvider.getEntityCollectionModel());
+            super.onBeforeRender();
+        } finally {
+            entityCollectionModel.set(null);
+        }
     }
 
     @Override
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java
index 3f16905..695f971 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java
@@ -59,6 +59,7 @@ import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.components.actionmenu.entityactions.AdditionalLinksPanel;
 import org.apache.isis.viewer.wicket.ui.components.actionmenu.entityactions.LinkAndLabelUtil;
+import org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.IsisAjaxFallbackDataTable;
 import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditFormPanel;
 import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditPanel;
 import org.apache.isis.viewer.wicket.ui.components.propertyheader.PropertyEditPromptHeaderPanel;
@@ -536,17 +537,28 @@ public abstract class ScalarPanelAbstract2 extends PanelAbstract<ScalarModel> im
 		case STANDALONE_TITLE_COLUMN:
 			return Where.STANDALONE_TABLES;
 		case PROPERTY_COLUMN:
-			final ObjectAdapter parentAdapter =
-			 	scalarModel.getParentEntityModel().load(AdapterManager.ConcurrencyChecking.NO_CHECK);
-			final boolean parented = parentAdapter.isParentedCollection();
-			return parented ? Where.PARENTED_TABLES : Where.STANDALONE_TABLES;
-		case REGULAR:
+            // this is pretty hacky, but can't (for the moment) think of another way to
+            // pass through the context other than a thread-local
+            Boolean parented = IsisAjaxFallbackDataTable.isParented();
+            if(parented == null) {
+                // this code is wrong (but kept in because it's what we had before) ...
+                // the parentEntityModel *isn't* the "parented" collection (eg Parent#child, a java.util.List),
+                // rather it is the parent of this field (the Child object itself).
+                EntityModel parentEntityModel = scalarModel.getParentEntityModel();
+                final ObjectAdapter parentAdapter =
+                     parentEntityModel.load(AdapterManager.ConcurrencyChecking.NO_CHECK);
+                parented = parentAdapter.isParentedCollection();
+            }
+            // this bit is correct, I think; earlier in the stack trace is the IsisAjaxFallbackDataTable which
+            // tells us whether it's being used to render a parented collection or a standalone collection.
+            return parented ? Where.PARENTED_TABLES : Where.STANDALONE_TABLES;
+
+        case REGULAR:
 			return Where.OBJECT_FORMS;
 		default:
 			throw new RuntimeException("unmatched case "+scalarModel.getRenderingHint());
 		}
     }
-    
 
     // ///////////////////////////////////////////////////////////////////
 

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 06/20: ISIS-1569: extends cmd-1.3.xsd to introduce a new CommandsDto (note the plural) as a sequence of CommandDto's

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 89e534f4d6fafb5b37c2410657f0b60c9f79acc7
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 18 10:30:03 2018 +0000

    ISIS-1569: extends cmd-1.3.xsd to introduce a new CommandsDto (note the plural) as a sequence of CommandDto's
---
 .../src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd
index 8cb1830..630dbe2 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.3.xsd
@@ -25,6 +25,17 @@
 
     <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.1.xsd"/>
 
+    <xs:element name="commandsDto">
+        <xs:annotation>
+            <xs:documentation>Collection of commandDto's</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence minOccurs="1" maxOccurs="unbounded">
+                <xs:element ref="commandDto"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+
     <xs:element name="commandDto">
         <xs:annotation>
             <xs:documentation>Represents v1.3 of this schema, adding in 'logicalMemberIdentifier'

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 05/20: ISIS-1569: removes CommandService2, not required after all.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 8c8113f5c401e48e3f710ec3b8abbb237428a0c2
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 18 10:29:32 2018 +0000

    ISIS-1569: removes CommandService2, not required after all.
---
 .../services/command/spi/CommandService2.java      | 55 ----------------------
 1 file changed, 55 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java
deleted file mode 100644
index c745bdd..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.isis.applib.services.command.spi;
-
-import java.util.List;
-import java.util.UUID;
-
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.command.Command;
-
-public interface CommandService2 extends CommandService {
-
-    public static class NotFoundException extends RuntimeException {
-
-        private static final long serialVersionUID = 1L;
-
-        private final String transactionId;
-
-        public NotFoundException(final String transactionId) {
-            this.transactionId = transactionId;
-        }
-
-        public String getTransactionId() {
-            return transactionId;
-        }
-    }
-
-    /**
-     * Finds all {@link Command}s created since the specified command (identified by its transaction Id).
-     *
-     * @param transactionId
-     * @param maxNumber
-     * @return
-     */
-    @Programmatic
-    List<Command> findSince(
-            final UUID transactionId,
-            int maxNumber)
-            throws NotFoundException;
-
-}

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 12/20: ISIS-1569: adds in 'REPLAYABLE' as a new Command#ExecuteIn

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 95f45b19345c321a7ec68d545aa4c800e325fdd1
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 14:20:33 2018 +0000

    ISIS-1569: adds in 'REPLAYABLE' as a new Command#ExecuteIn
---
 .../java/org/apache/isis/applib/annotation/Command.java     | 11 ++++++++---
 .../org/apache/isis/applib/annotation/CommandExecuteIn.java | 13 ++++++++++++-
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
index a8e208c..58bafbb 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
@@ -80,9 +80,14 @@ public @interface Command {
          * @deprecated - use {@link CommandExecuteIn#BACKGROUND}
          */
         @Deprecated
-        BACKGROUND;
-
-
+        BACKGROUND,
+        /**
+         * For framework use, not intended to be used in application code.
+         *
+         * @deprecated - use {@link CommandExecuteIn#REPLAYABLE}
+         */
+        @Deprecated
+        REPLAYABLE
 
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
index ddd557d..4be71af 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
@@ -38,13 +38,23 @@ public enum CommandExecuteIn {
      * persisted {@link org.apache.isis.applib.services.command.Command command} object as a placeholder to the
      * result.
      */
-    BACKGROUND;
+    BACKGROUND,
+    /**
+     * For commands that are replicated from a master onto a slave and are to be replayed (typically using the same
+     * mechanism as "regular" background commands, eg a background job).
+     *
+     * <p>
+     *     For framework use, not intended to be used in application code.
+     * </p>
+     */
+    REPLAYABLE;
 
     @Deprecated
     public static CommandExecuteIn from(final Command.ExecuteIn executeIn) {
         if(executeIn == null) return null;
         if(executeIn == Command.ExecuteIn.FOREGROUND) return FOREGROUND;
         if(executeIn == Command.ExecuteIn.BACKGROUND) return BACKGROUND;
+        if(executeIn == Command.ExecuteIn.REPLAYABLE) return REPLAYABLE;
         // shouldn't happen
         throw new IllegalArgumentException("Unrecognized : executeIn" + executeIn);
     }
@@ -54,6 +64,7 @@ public enum CommandExecuteIn {
         if(commandExecuteIn == null) return null;
         if(commandExecuteIn == FOREGROUND) return Command.ExecuteIn.FOREGROUND;
         if(commandExecuteIn == BACKGROUND) return Command.ExecuteIn.BACKGROUND;
+        if(commandExecuteIn == REPLAYABLE) return Command.ExecuteIn.REPLAYABLE;
         // shouldn't happen
         throw new IllegalArgumentException("Unrecognized : executeIn" + commandExecuteIn);
     }

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 08/20: ISIS-1569: defines CommandWithDto as an optional interface for Command SPI implementations to have their Command's implement (translatable into a CommandDto) along with out-of-the-box ContentMapingService to convert these into CommandsDto structure.

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit b48a171b68073ea20ef0011111bf060338ee5c0f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 18 10:33:07 2018 +0000

    ISIS-1569: defines CommandWithDto as an optional interface for Command SPI implementations to have their Command's implement (translatable into a CommandDto) along with out-of-the-box ContentMapingService to convert these into CommandsDto structure.
---
 .../conmap/ContentMappingServiceForCommandDto.java | 60 +++++++++++++++++
 .../ContentMappingServiceForCommandsDto.java       | 78 ++++++++++++++++++++++
 .../applib/services/command/CommandWithDto.java    | 26 ++++++++
 3 files changed, 164 insertions(+)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingServiceForCommandDto.java b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingServiceForCommandDto.java
new file mode 100644
index 0000000..0eb1235
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingServiceForCommandDto.java
@@ -0,0 +1,60 @@
+/*
+ *  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.conmap;
+
+import java.util.List;
+
+import javax.ws.rs.core.MediaType;
+
+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.command.CommandWithDto;
+import org.apache.isis.schema.cmd.v1.CommandDto;
+
+@DomainService(
+        nature = NatureOfService.DOMAIN,
+        menuOrder = "" + Integer.MAX_VALUE
+)
+public class ContentMappingServiceForCommandDto implements ContentMappingService {
+
+    @Programmatic
+    public Object map(Object object, final List<MediaType> acceptableMediaTypes) {
+        final boolean supported = Util.isSupported(CommandDto.class, acceptableMediaTypes);
+        if(!supported) {
+            return null;
+        }
+
+        return asDto(object);
+    }
+
+
+    static CommandDto asDto(final Object object) {
+        CommandDto commandDto = null;
+        if(object instanceof CommandWithDto) {
+            final CommandWithDto commandWithDto = (CommandWithDto) object;
+            commandDto = commandWithDto.asDto();
+        }
+        if(object instanceof CommandDto) {
+            commandDto = (CommandDto) object;
+        }
+        return commandDto;
+    }
+
+}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingServiceForCommandsDto.java b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingServiceForCommandsDto.java
new file mode 100644
index 0000000..4f886a9
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingServiceForCommandsDto.java
@@ -0,0 +1,78 @@
+/*
+ *  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.conmap;
+
+import java.util.List;
+
+import javax.ws.rs.core.MediaType;
+
+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.schema.cmd.v1.CommandDto;
+import org.apache.isis.schema.cmd.v1.CommandsDto;
+
+@DomainService(
+        nature = NatureOfService.DOMAIN,
+        menuOrder = "" + Integer.MAX_VALUE
+)
+public class ContentMappingServiceForCommandsDto implements ContentMappingService {
+
+    @Programmatic
+    public Object map(Object object, final List<MediaType> acceptableMediaTypes) {
+        final boolean supported = Util.isSupported(CommandsDto.class, acceptableMediaTypes);
+        if(!supported) {
+            return null;
+        }
+
+        if(object instanceof CommandsDto) {
+            return object;
+        }
+
+        CommandDto commandDto = asDto(object);
+        if(commandDto != null) {
+            final CommandsDto commandsDto = new CommandsDto();
+            commandsDto.getCommandDto().add(commandDto);
+            return commandsDto;
+        }
+
+        if (object instanceof List) {
+            final List list = (List) object;
+            final CommandsDto commandsDto = new CommandsDto();
+            for (final Object o : list) {
+                final CommandDto objAsCommandDto = asDto(o);
+                if(objAsCommandDto != null) {
+                    commandsDto.getCommandDto().add(objAsCommandDto);
+                } else {
+                    // ignore entire list because found something that is not convertible.
+                    return null;
+                }
+            }
+            return commandsDto;
+        }
+
+        // else
+        return null;
+    }
+
+    private static CommandDto asDto(final Object object) {
+        return ContentMappingServiceForCommandDto.asDto(object);
+    }
+
+}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/CommandWithDto.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/CommandWithDto.java
new file mode 100644
index 0000000..e0e1b60
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/CommandWithDto.java
@@ -0,0 +1,26 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.applib.services.command;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.schema.cmd.v1.CommandDto;
+
+public interface CommandWithDto extends Command {
+
+    @Programmatic
+    CommandDto asDto();
+}

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 11/20: ISIS-1835: catches any type of exception in order to report a problem (an NPE was being thrown if the file wasn't present, rather than an IOException)

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 4a5e7603ee0d01e26a464ea16a144a19356a02e0
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 14:18:31 2018 +0000

    ISIS-1835: catches any type of exception in order to report a problem (an NPE was being thrown if the file wasn't present, rather than an IOException)
---
 .../src/main/java/org/apache/isis/applib/PropertyResource.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java b/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java
index 4f1c687..f701c03 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.applib;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.util.Map;
 import java.util.Properties;
@@ -53,9 +52,9 @@ public class PropertyResource {
                     }
                 }
             }
-        } catch (IOException e) {
+        } catch (Exception e) {
             throw new RuntimeException(
-                    String.format("Failed to load '%s' file ", this), e);
+                    String.format("Failed to load '%s' file relative to %s", getPropertiesFile(), getPropertiesFileContext().getName()), e);
         }
     }
 }

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.

[isis] 15/20: ISIS-1569: adds timings to CommandsDto, so less verbose and easier to read XML

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

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit f559198c2b5de070ced033941c6c8cee430370ea
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 16:06:54 2018 +0000

    ISIS-1569: adds timings to CommandsDto, so less verbose and easier to read XML
---
 .../org/apache/isis/schema/cmd/cmd-1.4.xsd         | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
index 08cedef..5349931 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/cmd/cmd-1.4.xsd
@@ -78,7 +78,18 @@
                         <xs:documentation>The action or property (identifier and parameter arguments) to be invoked on the target object(s).</xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="userData" type="mapDto" minOccurs="0"/>
+                <xs:element name="timings" type="com:periodDto" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>The time taken to perform the command.  Used for replaying the command on a replica slave.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="userData" type="mapDto" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>Custom user data.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
@@ -165,6 +176,19 @@
         </xs:complexContent>
     </xs:complexType>
 
+    <xs:complexType name="timingsDto">
+        <xs:sequence>
+            <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="key" type="xs:string"/>
+                        <xs:element name="value" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
     <xs:complexType name="mapDto">
         <xs:sequence>
             <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.