You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2016/05/13 18:08:02 UTC

[2/2] isis git commit: ISIS-1291: further documentation. Slight extension to the PublishedObjects API

ISIS-1291: further documentation.  Slight extension to the PublishedObjects API


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

Branch: refs/heads/ISIS-1291
Commit: 55d3029a6265524ec3dbf65b2365d8569a42f61d
Parents: 7ebbb70
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri May 13 19:07:54 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri May 13 19:07:54 2016 +0100

----------------------------------------------------------------------
 adocs/documentation/Gemfile.lock                |   3 +
 .../guides/_rgsvc_api_BackgroundService.adoc    |   4 +-
 .../guides/_rgsvc_api_CommandContext.adoc       |   6 +-
 .../guides/_rgsvc_api_InteractionContext.adoc   |   9 ++
 .../guides/_rgsvc_api_MementoService.adoc       |  43 ++++--
 .../guides/_rgsvc_api_MetricsService.adoc       |   9 ++
 .../guides/_rgsvc_application-layer-api.adoc    |  18 ++-
 .../_rgsvc_application-layer-internal-spi.adoc  |  60 ++++++++
 .../guides/_rgsvc_application-layer-spi.adoc    |  12 --
 .../asciidoc/guides/_rgsvc_core-domain-api.adoc |   2 +-
 .../guides/_rgsvc_persistence-layer-api.adoc    |  13 +-
 .../_rgsvc_persistence-layer-internal-spi.adoc  |  81 ++++++++++
 .../guides/_rgsvc_persistence-layer-spi.adoc    |  41 ++---
 .../_rgsvc_presentation-layer-internal-spi.adoc |  10 +-
 .../_rgsvc_spi_AuditingServiceInternal.adoc     |   9 ++
 .../_rgsvc_spi_BackgroundCommandService.adoc    |   1 +
 ...rgsvc_spi_ChangedObjectsServiceInternal.adoc |   9 ++
 .../_rgsvc_spi_CommandDtoServiceInternal.adoc   |  55 +++++++
 .../_rgsvc_spi_CommandMementoService.adoc       |  53 -------
 .../guides/_rgsvc_spi_CommandService.adoc       |  46 ++++--
 .../guides/_rgsvc_spi_EventSerializer.adoc      |   7 +
 ...rgsvc_spi_InteractionDtoServiceInternal.adoc |   9 ++
 .../guides/_rgsvc_spi_PublisherService.adoc     | 149 +++++++++++++++++++
 .../guides/_rgsvc_spi_PublishingService.adoc    |   2 +-
 .../_rgsvc_spi_PublishingServiceInternal.adoc   |   8 +
 .../src/main/asciidoc/guides/rgsvc.adoc         |   2 +
 .../src/main/asciidoc/schema/chg/chg-1.0.xsd    |  14 +-
 .../src/main/asciidoc/schema/chg/chg.xsd        |  14 +-
 .../apache/isis/applib/annotation/Action.java   |   7 +-
 .../isis/applib/annotation/DomainObject.java    |   4 +
 .../services/command/spi/CommandService.java    |  20 +--
 .../applib/services/memento/MementoService.java |  37 ++++-
 .../services/publish/PublishedObjects.java      |  14 +-
 .../command/CommandDtoServiceInternal.java      |   8 +-
 .../publish/PublishedObjectsDefault.java        |  36 +++--
 .../PublishingServiceInternalDefault.java       |  16 +-
 .../org/apache/isis/schema/chg/chg-1.0.xsd      |  12 ++
 37 files changed, 677 insertions(+), 166 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/Gemfile.lock
----------------------------------------------------------------------
diff --git a/adocs/documentation/Gemfile.lock b/adocs/documentation/Gemfile.lock
index 0d4f467..9b483db 100644
--- a/adocs/documentation/Gemfile.lock
+++ b/adocs/documentation/Gemfile.lock
@@ -45,3 +45,6 @@ DEPENDENCIES
   tilt
   wdm (>= 0.1.0)
   webrick
+
+BUNDLED WITH
+   1.10.6

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_BackgroundService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_BackgroundService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_BackgroundService.adoc
index 1c074f6..ad79859 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_BackgroundService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_BackgroundService.adoc
@@ -14,7 +14,7 @@ The `BackgroundService2` is responsible for capturing a memento representing the
 and persisting it rather than executing it directly.
 
 The default `BackgroundServiceDefault` implementation works by using a proxy wrapper around the target so that it can
-capture the action to invoke and its arguments.  (As of `1.13.0-SNAPSHOT`), this is done using xref:rgsvc.adoc#_rgsvc_spi_CommandMementoService[`CommandMementoService`] (in previous releases it used (a private copy of) xref:rgsvc.adoc#_rgsvc_api_MementoService[`MementoService`]).
+capture the action to invoke and its arguments.  (As of `1.13.0-SNAPSHOT`), this is done using xref:rgsvc.adoc#_rgsvc_spi_CommandDtoServiceInternal[`CommandDtoServiceInternal`] (in previous releases it used (a private copy of) xref:rgsvc.adoc#_rgsvc_api_MementoService[`MementoService`]).
 
 The persistence delegates the persistence of the memento to an appropriate implementation of the companion
 `BackgroundCommandService2`.  One such implementation of `BackgroundCommandService` is provided by (non-ASF)
@@ -126,7 +126,7 @@ The `CommandContext` service is responsible for providing a parent `Command` wit
 
 The implementations of `CommandService` and `BackgroundCommandService` go together; typically both parent `Command`s and child background `Command`s will be persisted in the same way. The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module provides implementations of both (see xref:rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] and xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommandService`]).
 
-The xref:rgsvc.adoc#_rgsvc_spi_CommandMementoService[`CommandMementoService`] (`1.13.0-SNAPSHOT`) is used to obtain
+The xref:rgsvc.adoc#_rgsvc_spi_CommandDtoServiceInternal[`CommandDtoServiceInternal`] (`1.13.0-SNAPSHOT`) is used to obtain
 a memento of the command such that it can be persisted.  (In earlier versions, xref:rgsvc.adoc#_rgsvc_api_MementoService[`MementoService`] was used for this purpose).
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_CommandContext.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_CommandContext.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_CommandContext.adoc
index 23a5a41..1f9c5c2 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_CommandContext.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_CommandContext.adoc
@@ -79,6 +79,9 @@ public interface Command extends HasTransactionId {
 
     public Bookmark getResult();                    // <16>
     public String getException();                   // <17>
+
+    @Deprecated
+    int next(final String sequenceAbbr);            // <18>
 }
 ----
 <1> `getUser()` - is the user that initiated the action.
@@ -98,7 +101,8 @@ public interface Command extends HasTransactionId {
 <15> `getParent()` - for actions created through the `BackgroundService`, captures the parent action
 <16> `getResult()` - bookmark to object returned by action, if any
 <17> `getException()` - exception stack trace if action threw exception
-
+<18> (as of `1.13.0-SNAPSHOT`) no longer used by the framework; see instead
+xref:rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] and `Interaction#next()`.
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_InteractionContext.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_InteractionContext.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_InteractionContext.adoc
new file mode 100644
index 0000000..293b664
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_InteractionContext.adoc
@@ -0,0 +1,9 @@
+[[_rgsvc_api_InteractionContext]]
+= `InteractionContext` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MementoService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MementoService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MementoService.adoc
index 34f7f92..4a2de0c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MementoService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MementoService.adoc
@@ -6,9 +6,18 @@
 
 
 
-The `MementoService` was originally introduced to simplify the implementation of xref:ugbtb.adoc#_ugbtb_view-models[ViewModel]s which are required by the framework to return string representation of all of their backing state, moreover which is safe for use within a URL.
+The `MementoService` was originally introduced to simplify the implementation of
+xref:ugbtb.adoc#_ugbtb_view-models[ViewModel]s which are required by the framework to return string representation of
+all of their backing state, moreover which is safe for use within a URL.
 
-However, it can also be used to create a memento of arbitrary objects. Indeed, it is used internally by the core implementation of xref:rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`] to capture the state of action invocations so that they can be executed by a background process.
+However, it can also be used to create a memento of arbitrary objects.  (Prior to `1.13.0-SNAPSHOT) it is used
+internally by the core implementation of xref:rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`] to capture
+the state of action invocations so that they can be executed by a background process.
+
+[NOTE]
+====
+As of `1.13.0-SNAPSHOT` this service is deprecated.
+====
 
 
 
@@ -19,35 +28,34 @@ The API defined by `MementoService` is:
 
 [source,java]
 ----
+@Deprecated
 public interface MementoService {
+    @Deprecated
     public static interface Memento {
-        @Programmatic
         public Memento set(String name, Object value);
-        @Programmatic
         public <T> T get(String name, Class<T> cls);
-        @Programmatic
         public String asString();
         public Set<String> keySet();
     }
-    @Programmatic
     public Memento create();
-    @Programmatic
     public Memento parse(final String str);
-    @Programmatic
     public boolean canSet(Object input);
 }
 ----
 
-The core framework provides a default implementation of this API, namely `o.a.i.core.runtime.services.memento.MementoServiceDefault`.  The string returned (from `Memento#asString()`) is a base-64 URL encoded representation of the underlying format (an XML string).
+The core framework provides a default implementation of this API, namely
+`o.a.i.c.r.services.memento.MementoServiceDefault`.  The string returned (from `Memento#asString()`) is a base-64 URL
+encoded representation of the underlying format (an XML string).
 
 [NOTE]
 ====
-In fact, the `MementoServiceDefault` implementation does provide a mechanism to disable the URL encoding, but this is not part of the `MementoService` public API. Note also that the encoding method is not pluggable.
-
-However, you are of course free to write some other implementation of `MementoService`, perhaps based on `MementoServiceDefault` code if you wish.
+In fact, the `MementoServiceDefault` implementation does provide a mechanism to disable the URL encoding, but this is
+not part of the `MementoService` public API. Note also that the encoding method is not pluggable.
 ====
 
-The types of objects that are supported by the `MementoService` are implementation-specific, but would typically include all the usual value types as well as Apache Isis' `Bookmark` class (to represent references to arbitrary entities). Nulls can also be set.
+The types of objects that are supported by the `MementoService` are implementation-specific, but would typically
+include all the usual value types as well as Apache Isis' `Bookmark` class (to represent references to arbitrary
+entities). Nulls can also be set.
 
 In the case of the default implementation provided by the core framework, the types supported are:
 
@@ -88,14 +96,14 @@ public class ExternalEntity implements ViewModel {
     private String hostname;
     private int port;
     private String id;
-    public String viewModelMemento() {              // <1>
+    public String viewModelMemento() {                      // <1>
         return mementoService.create()
                 .set("hostname", hostname)
                 .set("port", port)
                 .set("id", id)
                 .asString();
     }
-    public void viewModelInit(String mementoStr) {  // <2>
+    public void viewModelInit(String mementoStr) {          // <2>
         Memento memento = mementoService.parse(mementoStr);
         hostname = memento.get("hostname", String.class);
         port = memento.get("port", int.class);
@@ -114,7 +122,10 @@ public class ExternalEntity implements ViewModel {
 
 == Related Services
 
-The memento service is used by the xref:rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] service and also xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommandService`]. These both use a memento to capture a representation of an action invocation.
+(Prior to `1.13.0-SNAPSHOT`), the memento service is used by the
+xref:rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] service and also
+xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommandService`]. These both use a memento to capture a
+representation of an action invocation.
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MetricsService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MetricsService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MetricsService.adoc
new file mode 100644
index 0000000..7d8b50a
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_MetricsService.adoc
@@ -0,0 +1,9 @@
+[[_rgsvc_api_MetricsService]]
+= `MetricsService` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-api.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-api.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-api.adoc
index 88d1884..cfce965 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-api.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-api.adoc
@@ -56,13 +56,26 @@ xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommand-Service`]
 |xref:rgsvc.adoc#_rgsvc_api_CommandContext[`o.a.i.applib.` +
 `services.command` +
 `CommandContext`]
-|Request-scoped access the current action that is being invoked, represented as a command object
+|Request-scoped access to capture the users's __intention__ to invoke an action or to edit a property.
 |`CommandContext` +
 ``o.a.i.core`` +
 ``isis-core-applib``
 |API is also a concrete class. +
 depends on: +
-xref:rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] for persistent `Command`, else in-memory impl. used
+xref:rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] for persistent `Command`, else in-memory impl. used.
+
+The xref:rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] manages the actual execution of the command.
+
+
+|xref:rgsvc.adoc#_rgsvc_api_InteractionContext[`o.a.i.applib.` +
+`services.iactn` +
+`InteractionContext`]
+|(`1.13.0-SNAPSHOT`) Request-scoped access to the current member execution (action invocation or property edit),
+represented as the `Interaction` context.
+|`InteractionContext` +
+``o.a.i.core`` +
+``isis-core-applib``
+|API is also a concrete class.
 
 
 
@@ -137,6 +150,7 @@ include::_rgsvc_api_AcceptHeaderService.adoc[leveloffset=+1]
 include::_rgsvc_api_ActionInvocationContext.adoc[leveloffset=+1]
 include::_rgsvc_api_BackgroundService.adoc[leveloffset=+1]
 include::_rgsvc_api_CommandContext.adoc[leveloffset=+1]
+include::_rgsvc_api_InteractionContext.adoc[leveloffset=+1]
 include::_rgsvc_api_MessageService.adoc[leveloffset=+1]
 include::_rgsvc_api_SessionManagementService.adoc[leveloffset=+1]
 include::_rgsvc_api_TitleService.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-internal-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-internal-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-internal-spi.adoc
new file mode 100644
index 0000000..4c5f352
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-internal-spi.adoc
@@ -0,0 +1,60 @@
+[[_rgsvc_application-layer-internal-spi]]
+= Application Layer internal SPI
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+These domain services are internal to the framework, controlling various aspects of the application layer.
+
+[WARNING]
+====
+We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these SPIs.
+====
+
+
+The table below summarizes the application layer internal SPIs defined by Apache Isis.  It also lists their
+corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the
+(non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
+
+
+
+."Internal" SPI Services
+[cols="3,3,2,2a", options="header"]
+|===
+
+|SPI
+|Maven Module +
+Impl'n (g: a:)
+|Implementation
+|Notes
+
+
+
+|xref:rgsvc.adoc#_rgsvc_api_CommandDtoServiceInternal[`o.a.i.c.` +
+`m.s.command` +
+`CommandDtoServiceInternal`]
+|(`1.13.0-SNAPSHOT`) Creates memento of current action invocation, for use either as a reified command or for implementations of the xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
+|`CommandDtoService-` +
+`InternalServiceDefault` +
+``o.a.i.c.r.s.command`` +
+``isis-core-runtime``
+|
+
+
+
+
+|===
+
+Key:
+
+* `o.a.i.c.m.s` is an abbreviation for `org.apache.isis.core.metamodel.services`
+* `o.a.i.c.r.s` is an abbreviation for `org.apache.isis.core.runtime.services`
+
+
+
+
+include::_rgsvc_spi_CommandDtoServiceInternal.adoc[leveloffset=+1]
+
+include::_rgsvc_spi_InteractionDtoServiceInternal.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-spi.adoc
index 3fc6e30..3e4928c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_application-layer-spi.adoc
@@ -34,16 +34,6 @@ The table below summarizes the application layer SPIs defined by Apache Isis.  I
 `JdoRepository`
 
 
-|xref:rgsvc.adoc#_rgsvc_api_CommandContext[`o.a.i.applib.` +
-`services.command` +
-`CommandMementoService`]
-|(`1.13.0-SNAPSHOT`) Creates memento of current action invocation, for use either as a reified command or for implementatins of the xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
-|`CommandMemento-` +
-`ServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtim``
-|
-
 
 |xref:rgsvc.adoc#_rgsvc_spi_CommandService[`o.a.i.applib.` +
 `services.command.spi` +
@@ -82,8 +72,6 @@ Key:
 
 
 
-
 include::_rgsvc_spi_BackgroundCommandService.adoc[leveloffset=+1]
-include::_rgsvc_api_CommandMementoService.adoc[leveloffset=+1]
 include::_rgsvc_spi_CommandService.adoc[leveloffset=+1]
 include::_rgsvc_api_HomePageProviderService.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_core-domain-api.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_core-domain-api.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_core-domain-api.adoc
index 51380f1..c827cf7 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_core-domain-api.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_core-domain-api.adoc
@@ -66,7 +66,7 @@ Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainOb
 * xref:rgant.adoc#_rgant-Collection_domainEvent[`Collection#domainEvent()`]
 |`EventBusServiceJdo` +
 ``o.a.i.core`` +
-``isis-core-objectstore-jdo-datanucleus``
+``isis-core-runtime``
 |
 
 |xref:rgsvc.adoc#_rgsvc_api_FactoryService[`o.a.i.applib.` +

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-api.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-api.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-api.adoc
index defb5f4..f9c35cf 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-api.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-api.adoc
@@ -28,7 +28,17 @@ The table below summarizes the persistence layer APIs defined by Apache Isis.  I
 |Lower level access to the JDO Persistence API.
 |`IsisJdoSupportImpl` +
 ``o.a.i.core`` +
-``isis-core-objectstore-jdo-datanucleus``
+``isis-core-runtime``
+|
+
+
+|xref:rgsvc.adoc#_rgsvc_api_MetricsService[`o.a.i.applib.` +
+`services.metrics` +
+`MetricsService`]
+|Gathers and provides metrics on the numbers of objects used within a transaction.
+|`MetricsServiceDefault` +
+``o.a.i.core`` +
+``isis-core-runtime``
 |
 
 
@@ -70,5 +80,6 @@ Key:
 
 
 include::_rgsvc_api_IsisJdoSupport.adoc[leveloffset=+1]
+include::_rgsvc_api_MetricsService.adoc[leveloffset=+1]
 include::_rgsvc_api_QueryResultsCache.adoc[leveloffset=+1]
 include::_rgsvc_api_RepositoryService.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-internal-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-internal-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-internal-spi.adoc
new file mode 100644
index 0000000..b0afbcf
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-internal-spi.adoc
@@ -0,0 +1,81 @@
+[[_rgsvc_persistence-layer-internal-spi]]
+= Persistence Layer internal SPI
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+These domain services are internal to the framework, controlling various aspects of the persistence layer.
+
+[WARNING]
+====
+We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these SPIs.
+====
+
+
+The table below summarizes the persistence layer internal SPIs defined by Apache Isis.  It also lists their
+corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the
+(non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
+
+
+
+."Internal" SPI Services
+[cols="3,3,2,2a", options="header"]
+|===
+
+|SPI
+|Maven Module +
+Impl'n (g: a:)
+|Implementation
+|Notes
+
+
+
+|xref:rgsvc.adoc#_rgsvc_spi_AuditingServiceInternal[`o.a.i.c.` +
+`r.auditing.` +
+`AuditingServiceInternal`]
+|(`1.13.0-SNAPSHOT`) Co-ordinates between
+xref:rgsvc.adoc#_rgsvc_spi_ChangedObjectsServiceInternal[`ChangedObjectsServiceInternal`] and
+xref:rgsvc.adoc#_rgsvc_spi_AuditingService[`AuditingService`].
+|concrete class.
+|
+
+
+|xref:rgsvc.adoc#_rgsvc_spi_ChangedObjectsServiceInternal[`o.a.i.c.` +
+`r.changes.` +
+`ChangedObjectsServiceInternal`]
+|(`1.13.0-SNAPSHOT`) Request-scoped service holding objects enlisted into current transaction.
+|concrete class.
+|
+
+
+|xref:rgsvc.adoc#_rgsvc_spi_PublishingServiceInternal[`o.a.i.c.` +
+`m.s.publishing.` +
+`PublishingServiceInternal`]
+|(`1.13.0-SNAPSHOT`) Co-ordinates between
+xref:rgsvc.adoc#_rgsvc_spi_ChangedObjectsServiceInternal[`ChangedObjectsServiceInternal`] and
+xref:rgsvc.adoc#_rgsvc_api_MetricsService[`MetricsService`] and the SPI services,
+xref:rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`] and (deprecated)
+xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
+|`PublishingService-` +
+`InternalDefault` +
+`o.a.i.c.r.publishing` +
+`isis-core-runtime`
+|
+
+
+
+|===
+
+Key:
+
+* `o.a.i.c.m.s` is an abbreviation for `org.apache.isis.core.metamodel.services`
+* `o.a.i.c.r.s` is an abbreviation for `org.apache.isis.core.runtime.services`
+
+
+
+
+include::_rgsvc_spi_AuditingServiceInternal.adoc[leveloffset=+1]
+include::_rgsvc_spi_ChangedObjectsServiceInternal.adoc[leveloffset=+1]
+include::_rgsvc_spi_PublishingServiceInternal.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-spi.adoc
index 7582ae4..0cfc5da 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_persistence-layer-spi.adoc
@@ -30,17 +30,13 @@ The table below summarizes the persistence layer SPIs defined by Apache Isis.  I
 |`AuditingService` +
 ``o.ia.m.audit`` +
 ``isis-module-audit``
-|related services:
-`AuditingService-` +
-`Contributions`,
-`AuditingService-` +
-`Repository`
+|
 
 
 |xref:rgsvc.adoc#_rgsvc_spi_EventSerializer[`o.a.i.applib.` +
 `services.publish` +
 `EventSerializer`]
-|Creates a representation of either an action invocation or a changed object being published through the xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
+|(deprecated in `1.13.0-SNAPSHOT`) Creates a representation of either an action invocation or a changed object being published through the xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
 |`RestfulObjects-` +
 `SpecEventSerializer` +
 ``o.ia.m.publishing`` +
@@ -49,25 +45,29 @@ The table below summarizes the persistence layer SPIs defined by Apache Isis.  I
 
 
 
+|xref:rgsvc.adoc#_rgsvc_spi_PublisherService[`o.a.i.applib.` +
+`services.publish` +
+`PublisherService`]
+|(`1.13.0-SNAPSHOT`) Publish any action invocations/property edits and changed objects, typically for interchange with an external system in a different bounded context.
+|`PublisherServiceLogging` +
+also +
+``PublisherService-`` +
+``UsingActiveMq`` +
+``o.ia.m.publishmq`` +
+``isis-module-publishmq``
+
+|
+
+
 |xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`o.a.i.applib.` +
 `services.publish` +
 `PublishingService`]
-|Publish any action invocations and changed objects, typically for interchange with an external system in a different bounded context.
-|`PublishingServiceMq` +
-``o.ia.m.publishmq`` +
-``isis-module-publishmq``, +
-also +
-`PublishingService` +
+|(deprecated in `1.13.0-SNAPSHOT`) Publish any action invocations and changed objects, typically for interchange with an external system in a different bounded context.
+|`PublishingService` +
 ``o.ia.m.publishing`` +
 ``isis-module-publishing``
 
-|related services:
-`PublishingService-` ++
-``Contributions``,
-`PublishingService-` ++
-``Repository``.  +
-depends on: +
-`EventSerializer`
+|
 
 
 
@@ -92,11 +92,12 @@ Key:
 * `o.ia.m` is an abbreviation for `org.isisaddons.module`
 
 
-Where an implementation is available (on the classpath) then it is always registered automatically (that is, they are all (with one exception) annotated with xref:rgant.adoc#_rgant-DomainService[`@DomainService`].  The one exception is xref:rgsvc.adoc#_rgsvc_spi_ExceptionRecognizer[`ExceptionRecognizer`], which must be registered explicitly in `isis.properties`; this makes the service extensible (for new exceptions to be recognized).
+Where an implementation is available (on the classpath) then it is always registered automatically (that is, they are all (with one exception) annotated with xref:rgant.adoc#_rgant-DomainService[`@DomainService`].
 
 
 
 include::_rgsvc_spi_AuditingService.adoc[leveloffset=+1]
 include::_rgsvc_spi_EventSerializer.adoc[leveloffset=+1]
+include::_rgsvc_spi_PublisherService.adoc[leveloffset=+1]
 include::_rgsvc_spi_PublishingService.adoc[leveloffset=+1]
 include::_rgsvc_spi_UserRegistrationService.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc
index 153c61a..daa49e1 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc
@@ -6,15 +6,17 @@
 
 
 
-Domain service SPIs for the presentation layer influence how the Apache Isis viewers behave.  In addition to those defined in the applib, the framework also defines a small number of services that use classes that are internal to the framework.
+These domain services are internal to the framework, controlling various aspects of the presentation layer.
 
 [WARNING]
 ====
-We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these ASPIs.
+We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these SPIs.
 ====
 
 
-The table below summarizes the presentation layer non-public SPIs defined by Apache Isis.  It also lists their corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the in (non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
+The table below summarizes the presentation layer internal SPIs defined by Apache Isis.  It also lists their
+corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the
+(non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
 
 
 
@@ -29,8 +31,6 @@ Impl'n (g: a:)
 |Notes
 
 
-
-
 |xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`o.a.i.v.ro.` +
 `rendering.service.conneg.` +
 `ContentNegotiationService`]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_AuditingServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_AuditingServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_AuditingServiceInternal.adoc
new file mode 100644
index 0000000..e82f506
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_AuditingServiceInternal.adoc
@@ -0,0 +1,9 @@
+[[_rgsvc_spi_AuditingServiceInternal]]
+= `AuditingServiceInternal` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_BackgroundCommandService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_BackgroundCommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_BackgroundCommandService.adoc
index abe24e9..9a03b23 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_BackgroundCommandService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_BackgroundCommandService.adoc
@@ -14,6 +14,7 @@ The persisting of commands is only half the story; there needs to be a separate
 
 
 
+
 == SPI
 
 The SPI of the `BackgroundCommandService` is:

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ChangedObjectsServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ChangedObjectsServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ChangedObjectsServiceInternal.adoc
new file mode 100644
index 0000000..f6bedac
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ChangedObjectsServiceInternal.adoc
@@ -0,0 +1,9 @@
+[[_rgsvc_spi_ChangedObjectsServiceInternal]]
+= `ChangedObjectsServiceInternal` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandDtoServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandDtoServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandDtoServiceInternal.adoc
new file mode 100644
index 0000000..65e47a4
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandDtoServiceInternal.adoc
@@ -0,0 +1,55 @@
+[[_rgsvc_spi_CommandDtoServiceInternal]]
+= `CommandDtoServiceInternal` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+The `CommandDtoServiceInternal` (`1.13.0-SNAPSHOT`) is responsible for creating an memento of the current action
+invocation or property edit, to store in the `Command` object (from
+xref:rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`]).  This memento is a JAXB DTO being an instance of the
+xref:rgcms.adoc#_rgcms_schema-cmd["cmd" schema], so can be reified so that its execution can be deferred until later,
+as a xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[background command].
+
+
+
+== SPI & Implementation
+
+The SPI of the service is:
+
+[source,java]
+----
+public interface CommandMementoService {
+    @Deprecated
+    ActionInvocationMemento asActionInvocationMemento(      // <1>
+            Method m,
+            Object domainObject, Object[] args);
+    CommandDto asCommandDto(                                // <2>
+            List<ObjectAdapter> targetAdapters,
+            ObjectAction objectAction,
+            ObjectAdapter[] argAdapters);
+    CommandDto asCommandDto(                                // <3>
+            final List<ObjectAdapter> targetAdapters,
+            final OneToOneAssociation association,
+            final ObjectAdapter valueAdapterOrNull);
+    void addActionArgs(                                     // <4>
+            final ObjectAction objectAction,
+            final ActionDto actionDto,
+            final ObjectAdapter[] argAdapters);
+    void addPropertyValue(                                  // <5>
+            final OneToOneAssociation property,
+            final PropertyDto propertyDto,
+            final ObjectAdapter valueAdapter);
+}
+----
+<1> Note that this method (more precisely, `ActionInvocationMemento`) does __not__ support mixins.
+<2> Returns a JAXB DTO being an instance of the xref:rgcms.adoc#_rgcms_schema-cmd["cmd" schema] (hence convertible to
+XML) that represents the __intention__ to invoke an action on a target object (or possibly many targets, for
+bulk actions).  If an action, it can also be either mixin action or a contributed action.
+<3> Returns a JAXB DTO that represents the intention to edit (set or clear) a property on a target (or possibly many
+targets, for symmetry with actions).
+<4> add the arguments of an action to an `ActionDto`.
+<5> add the new value argument of a property to a `PropertyDto`.
+
+
+The SPI is implemented by `o.a.i.c.r.s.command.CommandDtoServiceInternalServiceDefault`.

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandMementoService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandMementoService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandMementoService.adoc
index 17c3d47..bfaf381 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandMementoService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandMementoService.adoc
@@ -5,56 +5,3 @@
 :_imagesdir: images/
 
 
-The `CommandMementoService` (`1.13.0-SNAPSHOT`) is responsible for creating a memento of a current action invocation,
-to store in the `Command` object (from xref:rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`]).
-This memento can be reified for use either in xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[background command]s, or to be published using xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
-
-
-
-
-== SPI & Implementation
-
-The SPI of the service is:
-
-[source,java]
-----
-public interface CommandMementoService {
-    @Programmatic
-    ActionInvocationMemento asActionInvocationMemento(
-                        Method m, Object domainObject, Object[] args);
-}
-----
-
-The default implementation is provided by core (`o.a.i.core.runtime.services.command.CommandMementoServiceDefault`).
-
-
-
-
-== Registering the Services
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
-implementation of `CommandMementoService` is automatically registered (it is annotated with `@DomainService`) so no
-further configuration is required.
-
-To use an alternative implementation, use
-xref:rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:rgsvc.adoc#_rgsvc_intro_overriding-the-services[introduction] to this guide).
-
-
-
-== Related Services
-
-This service is used when invoking an action, the memento being copied onto the `Command`.
-If the action turns out to be published, then the memento is copied down from the `Command`
- and may be used by the xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`] implementation.
-
-In addition, the service is also called by xref:rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`] in order to create a memento
-for a command that can then be run in the background at some time in the future.
-
-
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandService.adoc
index 1777d4d..ee3885b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_CommandService.adoc
@@ -6,19 +6,30 @@
 
 
 
-The `CommandService` service supports the xref:rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] service such that `Command` objects (that reify the invocation of an action on a domain object into an object) can be persisted.
+The `CommandService` service supports the xref:rgsvc.adoc#_rgsvc_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.
 
-Persistent `Command`s support several use cases:
+Persistent ``Command``s support several use cases:
+
+* they enable profiling of the running application (which actions are invoked then most often, what is their response
+time) ++
++
+However, note that (as of `1.13.0-SNAPSHOT`) much more powerful profiling capabilities are provided by
+xref:rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`]; these can be logged using the
+xref:rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`].
 
-* they enable profiling of the running application (which actions are invoked then most often, what is their response time)
 * they act as a parent to any background commands that might be invoked through the xref:rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`]
+
 * if xref:rgsvc.adoc#_rgsvc_spi_AuditingService[auditing] 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) by way of the xref:rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[`transactionId`]
+
 * if xref:rgsvc.adoc#_rgsvc_spi_PublishingService[publishing] is configured, they provide better traceability as the `Command` is also correlated with any published events, again through the unique  xref:rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[`transactionId`]
+
 * the associated xref:rgant.adoc#_rgant-Action_command[`@Action#command()`] annotation attribute also allows action invocations to be performed in the background. In this case the act of invoking the action on an object instead returns the `Command` to the user.
 
 
+== Screencast
 
-This 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]
@@ -27,6 +38,7 @@ Note that this screencast shows an earlier version of the xref:ugvw.adoc#[Wicket
 ====
 
 
+
 == SPI
 
 The `CommandService` service defines the following very simple API:
@@ -34,18 +46,24 @@ The `CommandService` service defines the following very simple API:
 [source,java]
 ----
 public interface CommandService {
-    @Programmatic
-    Command create();
-    @Programmatic
-    void startTransaction(Command command, final UUID transactionId);
-    @Programmatic
-    void complete(Command command);
-    @Programmatic
-    boolean persistIfPossible(Command command);
+    Command create();                                               // <1>
+    @Deprecated
+    void startTransaction(Command command, UUID transactionId);     // <2>
+    boolean persistIfPossible(Command command);                     // <3>
+    void complete(Command command);                                 // <4>
 }
 ----
-
-where `Command` is defined as defined by the xref:rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] service.
+<1> Instantiate the appropriate instance of the `Command` (as defined by the
+xref:rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] service).  Its members will be populated automatically by
+the framework.
+<2> (as of `1.13.0-SNAPSHOT`) is deprecated: 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.  +
++
+The framework will automatically have set the `completedAt` property of the `Command`.
 
 
 == Implementation

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_EventSerializer.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_EventSerializer.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_EventSerializer.adoc
index 5bf54c0..0bd7f6b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_EventSerializer.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_EventSerializer.adoc
@@ -7,6 +7,12 @@
 
 The `EmailSerializer` service is a supporting service intended for use by (any implementation of) xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].  Its responsibility is to combine the `EventMetadata` and the `EventPayload` into some serialized form (such as JSON, XML or a string) that can then be published.
 
+[WARNING]
+====
+This service is deprecated, replaced with xref:rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`]
+(`1.13.0-SNAPSHOT`).
+====
+
 See xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`] for further discussion.
 
 
@@ -18,6 +24,7 @@ The SPI defined by this service is:
 
 [source,java]
 ----
+@Deprecated
 public interface EventSerializer {
     Object serialize(                   // <1>
             EventMetadata metadata,     // <2>

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_InteractionDtoServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_InteractionDtoServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_InteractionDtoServiceInternal.adoc
new file mode 100644
index 0000000..4667671
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_InteractionDtoServiceInternal.adoc
@@ -0,0 +1,9 @@
+[[_rgsvc_spi_InteractionDtoServiceInternal]]
+= `InteractionDtoServiceInternal` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublisherService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublisherService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublisherService.adoc
new file mode 100644
index 0000000..6facd35
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublisherService.adoc
@@ -0,0 +1,149 @@
+[[_rgsvc_spi_PublisherService]]
+= `PublisherService` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+The `PublisherService` API (`1.13.0-SNAPSHOT`) is intended for coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system.  Events that can be published are action invocations/property
+edits, and changed objects. A typical use case is to publish onto a pub/sub bus such as
+link:http://activemq.apache.org/[ActiveMQ] with link:http://camel.apache.org[Camel] to keep other systems up to date.
+
+An alternative use is for profiling: for each execution (action invocation/property edit) the framework captures
+metrics of the number of objects loaded or dirtied as the result of that execution.  If the
+xref:rgsvc.adoc#_rgsvc_api_WrapperFactory[`WrapperFactory`] is used to call other objects then the metrics are captured
+for each sub-execution.  The framework provides a default implementation, `PublisherServiceLogging`, that will log
+these execution graphs (in XML form, per the xref:rgcms.adoc#_rgcms_schema-ixn["ixn" schema]) to an SLF4J logger.
+
+Only actions/properties/domain objects annotated for publishing (using
+xref:rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`],
+xref:rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`] or
+xref:rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`]) are published.
+
+
+== SPI
+
+The SPI defined by the service is:
+
+[source,java]
+----
+public interface PublisherService {
+    void publish(final Interaction.Execution<?, ?> execution);  // <1>
+    void publish(final PublishedObjects publishedObjects);      // <2>
+}
+----
+<1> to publish an individual action invocation or property edit, as captured within an `Interaction.Execution`.
+<2> to publish a set of changed objects.
+
+Each `Interaction.Execution` has an owning `Interaction`; this is the same object obtainable from
+xref:rgsvc.adoc#_rgsvc_spi_InteractionContext[`InteractionContext`].  Implementations that publish member executions
+can use `Interaction.Execution#getDto()` method to return a DTO (as per the
+xref:rgcms.adoc#_rgcms_schema-ixn["ixn" schema]) which can be converted into a serializable XML representation using
+the `InteractionDtoUtils` utility class.  The XML can either serialize a single execution, or can be a "deep"
+ serialization of an execution and all sub-executions.
+
+The full API of `PublishedObjects` itself is:
+
+[source,java]
+----
+public interface PublishedObjects extends HasTransactionId, HasUsername {
+    UUID getTransactionId();        // <1>
+    String getUsername();           // <2>
+    Timestamp getCompletedAt();     // <3>
+    ChangesDto getDto();            // <4>
+    int getNumberLoaded();          // <5>
+    int getNumberCreated();
+    int getNumberUpdated();
+    int getNumberDeleted();
+    int getNumberPropertiesModified();
+}
+----
+<1> inherited from `HasTransactionId`, correlates back to the unique identifier of the transaction in which these
+objects were changed.
+<2> inherited from `HasUsername`, is the user that initiated the transaction causing these objects to change
+<3> the time that this set of objects was collated (just before the completion of the transaction completes)..
+<4> returns a DTO (as per the xref:rgcms.adoc#_rgcms_schema-chg["chg" schema]) which can be converted into a
+serializable XML representation can be obtained using the `ChangesDtoUtils` utility class.
+<5> metrics as to the number of objects loaded, created, updated or deleted and the number of object properties modified (in other words the "size" or "weight" of the transaction).
+
+
+== Implementation
+
+The framework allows multiple implementations of this service to be registered; all will be called.  The framework
+provides one implementation of its own, `PublisherServiceLogging` (in `o.a.i.applib.services.publish` package); this
+logs "deep" serializations to an SLF4J logger.
+
+The (non-ASF) http://github.com/isisaddons/isis-module-publishmq[Isis addons' publishmq] module also provides an
+implementation (`o.ia.m.publishmq.dom.servicespi.PublishingServiceUsingActiveMq`).  This implementation publishes each
+member execution as an event on an link:http://activemq.apache.org[ActiveMQ] message queue.  It also persists each
+execution as a `PublishedEvent` entity, allowing the event to be republished if necessary.  The implementation also
+provides the ability to log additional `StatusMessage` entities, correlated on the transactionId, useful for diagnosing
+and monitoring the activity of subscribers of said message queues.
+
+
+== Usage
+
+To indicate that an action invocation should be published, annotate it with the
+xref:rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`] annotation.
+
+To indicate that an property edit should be published, annotate it with the
+xref:rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`] annotation.
+
+To indicate that a changed object should be published is to annotate it with the
+xref:rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`] annotation.
+
+
+
+== Registering the Services
+
+The (non-ASF) Isis addons' http://github.com/isisaddons/isis-module-publishmq[publishmq] module provides an
+implementation of this service. Assuming that an `AppManifest` is being used to
+xref:rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then this can be activated by updating
+the `pom.xml` and updating the `AppManifest#getModules()` method.
+
+The module also provide services that contribute to the UI.  If contributions are not required in the UI, these can be
+suppressed either using security or by implementing a
+xref:ugbtb.adoc#_ugbtb_decoupling_vetoing-visibility[vetoing subscriber].
+
+
+
+
+== Related Services
+
+This service supports two main use cases:
+
+* coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system. +
++
+[NOTE]
+====
+The xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`] also supports this use case, but
+is deprecated: the `PublisherService` is intended as a replacement for `PublishingService`.
+====
+
+* profiling of interactions/transactions, eg to diagnose response/throughput issues.
+
+
+To support these use cases several other services are involved:
+
+* the xref:rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] is used to obtain the `Interaction` from which
+the member executions are published.
+
+* the (internal) xref:rgsvc.adoc#_rgsvc_spi_ChangedObjectsServiceInternal[`ChangedObjectsServiceInternal`] domain
+service is used to obtain the set of objects modified throughout the transaction
+
+* the (internal) xref:rgsvc.adoc#_rgsvc_spi_PublisherServiceInternal[`PublisherServiceInternal`] domain service filters
+these down to those changed objects that are also published (as per
+xref:rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`]) and delegates to the `PublisherService`.
+
+* the xref:rgsvc.adoc#_rgsvc_api_MetricsService[`MetricsService`] is used to obtain the objects that are loaded
+throughout the transaction; this info is used in order to instantiate the `PublishedObjects` object passed through to
+the `PublisherService`.
+
+The xref:rgsvc.adoc#_rgsvc_api_EventBusService[`EventBusService`] differs from the `PublisherService` in that it is
+intended for fine-grained publish/subscribe for object-to-object interactions within an Apache Isis domain object
+model. The event propagation is strictly in-memory, and there are no restrictions on the object acting as the event;
+it need not be serializable, for example.  That said, it is possible to obtain a serialization of the action
+invocation/property edit causing the current event to be raised using
+xref:rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] domain service.
+

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingService.adoc
index d5b1ad8..21abd8f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingService.adoc
@@ -158,7 +158,7 @@ implementation of this service. Assuming that an `AppManifest` is being used to
 xref:rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then this can be activated by updating
 the `pom.xml` and updating the `AppManifest#getModules()` method.
 
-The modules also provide services that contribute to the UI.  If contributions are not required in the UI, these can be
+The module also provides services that contribute to the UI.  If contributions are not required in the UI, these can be
 suppressed either using security or by implementing a
 xref:ugbtb.adoc#_ugbtb_decoupling_vetoing-visibility[vetoing subscriber].
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingServiceInternal.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingServiceInternal.adoc
new file mode 100644
index 0000000..58eabcd
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_PublishingServiceInternal.adoc
@@ -0,0 +1,8 @@
+[[_rgsvc_spi_PublishingServiceInternal]]
+= `PublishingServiceInternal` (`1.13.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
index 6e78a9c..53583f4 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
@@ -50,10 +50,12 @@ include::_rgsvc_presentation-layer-spi.adoc[leveloffset=+1]
 include::_rgsvc_presentation-layer-internal-spi.adoc[leveloffset=+1]
 include::_rgsvc_application-layer-api.adoc[leveloffset=+1]
 include::_rgsvc_application-layer-spi.adoc[leveloffset=+1]
+include::_rgsvc_application-layer-internal-spi.adoc[leveloffset=+1]
 include::_rgsvc_core-domain-api.adoc[leveloffset=+1]
 include::_rgsvc_integration-api.adoc[leveloffset=+1]
 include::_rgsvc_metadata-api.adoc[leveloffset=+1]
 include::_rgsvc_testing.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-api.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi.adoc[leveloffset=+1]
+include::_rgsvc_persistence-layer-internal-spi.adoc[leveloffset=+1]
 include::_rgsvc_bootstrapping-spi.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/schema/chg/chg-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/chg/chg-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/chg/chg-1.0.xsd
index e793d71..078da44 100644
--- a/adocs/documentation/src/main/asciidoc/schema/chg/chg-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/chg/chg-1.0.xsd
@@ -22,7 +22,7 @@
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns="http://isis.apache.org/schema/chg"
            xmlns:com="http://isis.apache.org/schema/common"
-        >
+>
 
     <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
 
@@ -73,6 +73,12 @@
             <xs:documentation>A set of changes to domain objects.</xs:documentation>
         </xs:annotation>
         <xs:sequence>
+            <xs:element name="loaded" type="xs:int">
+                <xs:annotation>
+                    <xs:documentation>The number of objects loaded within the transaction.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
             <xs:element name="created" type="com:oidsDto">
                 <xs:annotation>
                     <xs:documentation>The list of objects created within the transaction.
@@ -91,6 +97,12 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
+            <xs:element name="propertiesModified" type="xs:int">
+                <xs:annotation>
+                    <xs:documentation>The number of object properties modified within the transaction.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
         </xs:sequence>
     </xs:complexType>
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd b/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
index e793d71..078da44 100644
--- a/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/chg/chg.xsd
@@ -22,7 +22,7 @@
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns="http://isis.apache.org/schema/chg"
            xmlns:com="http://isis.apache.org/schema/common"
-        >
+>
 
     <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
 
@@ -73,6 +73,12 @@
             <xs:documentation>A set of changes to domain objects.</xs:documentation>
         </xs:annotation>
         <xs:sequence>
+            <xs:element name="loaded" type="xs:int">
+                <xs:annotation>
+                    <xs:documentation>The number of objects loaded within the transaction.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
             <xs:element name="created" type="com:oidsDto">
                 <xs:annotation>
                     <xs:documentation>The list of objects created within the transaction.
@@ -91,6 +97,12 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
+            <xs:element name="propertiesModified" type="xs:int">
+                <xs:annotation>
+                    <xs:documentation>The number of object properties modified within the transaction.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
         </xs:sequence>
     </xs:complexType>
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
index 10347bc..a546ddd 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
@@ -25,6 +25,7 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
+import org.apache.isis.applib.services.publish.PublisherService;
 
 /**
  * Domain semantics for domain object collection.
@@ -156,8 +157,10 @@ public @interface Action {
      */
     Publishing publishing() default Publishing.AS_CONFIGURED;
 
-
-    // TODO: factor out PayloadFactory.Default so similar to interaction
+    /**
+     * @deprecated - not supported by {@link PublisherService}.
+     */
+    @Deprecated
     Class<? extends PublishingPayloadFactoryForAction> publishingPayloadFactory() default PublishingPayloadFactoryForAction.class;
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
index 0621def..136e4cf 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
@@ -31,10 +31,14 @@ import org.apache.isis.applib.services.eventbus.ObjectPersistingEvent;
 import org.apache.isis.applib.services.eventbus.ObjectRemovingEvent;
 import org.apache.isis.applib.services.eventbus.ObjectUpdatedEvent;
 import org.apache.isis.applib.services.eventbus.ObjectUpdatingEvent;
+import org.apache.isis.applib.services.publish.PublisherService;
 
 /**
  * Domain semantics for domain objects (entities and view models; for services see {@link org.apache.isis.applib.annotation.DomainService}).
+ *
+ * @deprecated - not supported by {@link PublisherService}.
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.TYPE })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService.java
index 62cf56f..da7434e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService.java
@@ -41,10 +41,17 @@ public interface CommandService {
     void startTransaction(final Command command, final UUID transactionId);
     
     /**
-     * &quot;Complete&quot; the command, typically meaning to indicate that the command is completed, and to 
-     * persist it if its {@link Command#getPersistence()} and {@link Command#isPersistHint() persistence hint} 
+     * Hint for this implementation to eagerly persist the {@link Command}s if possible; influences the behaviour 
+     * of actions annotated to execute in the {@link org.apache.isis.applib.annotation.Command.ExecuteIn#BACKGROUND}.
+     */
+    @Programmatic
+    boolean persistIfPossible(Command command);
+
+    /**
+     * &quot;Complete&quot; the command, typically meaning to indicate that the command is completed, and to
+     * persist it if its {@link Command#getPersistence()} and {@link Command#isPersistHint() persistence hint}
      * indicate that it should be.
-     * 
+     *
      * <p>
      * However, not every implementation necessarily {@link #persistIfPossible(Command) supports persistence}.
      *
@@ -55,11 +62,4 @@ public interface CommandService {
     @Programmatic
     void complete(final Command command);
 
-    /**
-     * Hint for this implementation to eagerly persist the {@link Command}s if possible; influences the behaviour 
-     * of actions annotated to execute in the {@link org.apache.isis.applib.annotation.Command.ExecuteIn#BACKGROUND}.
-     */
-    @Programmatic
-    boolean persistIfPossible(Command command);
-    
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/applib/src/main/java/org/apache/isis/applib/services/memento/MementoService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/memento/MementoService.java b/core/applib/src/main/java/org/apache/isis/applib/services/memento/MementoService.java
index 353b19d..aa604cf 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/memento/MementoService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/memento/MementoService.java
@@ -19,6 +19,9 @@ package org.apache.isis.applib.services.memento;
 import java.util.Set;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.command.CommandContext;
+import org.apache.isis.applib.services.iactn.InteractionContext;
+import org.apache.isis.applib.services.jaxb.JaxbService;
 
 /**
  * This service provides a mechanism by which a serializable memento of arbitrary state can be created.  Most
@@ -29,20 +32,43 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
  * {@link org.apache.isis.applib.annotation.DomainService} and is implemented in the core runtime, it is automatically
  * registered and available for use; no configuration is required.
  * </p>
+ *
+ * @deprecated - for view models, use JAXB annotations and the {@link JaxbService}; for action invocations and such like, use {@link InteractionContext} and {@link CommandContext}.
  */
+@Deprecated
 public interface MementoService {
 
+    /**
+     * @deprecated - because {@link MementoService} is deprecated.
+     */
+    @Deprecated
     public static interface Memento {
 
+        /**
+         * @deprecated - because {@link MementoService} is deprecated.
+         */
+        @Deprecated
         @Programmatic
         public Memento set(String name, Object value);
 
+        /**
+         * @deprecated - because {@link MementoService} is deprecated.
+         */
+        @Deprecated
         @Programmatic
         public <T> T get(String name, Class<T> cls);
-        
+
+        /**
+         * @deprecated - because {@link MementoService} is deprecated.
+         */
+        @Deprecated
         @Programmatic
         public String asString();
 
+        /**
+         * @deprecated - because {@link MementoService} is deprecated.
+         */
+        @Deprecated
         public Set<String> keySet();
     }
     
@@ -52,7 +78,10 @@ public interface MementoService {
      * <p>
      * Typically followed by {@link Memento#set(String, Object)} for each of the data values to
      * add to the {@link Memento}, then {@link Memento#asString()} to convert to a string format.
+     *
+     * @deprecated - because {@link MementoService} is deprecated.
      */
+    @Deprecated
     @Programmatic
     public Memento create();
 
@@ -62,7 +91,10 @@ public interface MementoService {
      * <p>
      * Typically followed by {@link Memento#get(String, Class)} for each of the data values held
      * in the {@link Memento}. 
+     *
+     * @deprecated - because {@link MementoService} is deprecated.
      */
+    @Deprecated
     @Programmatic
     public Memento parse(final String str);
 
@@ -74,7 +106,10 @@ public interface MementoService {
      * The intention here is that a {@link Memento} implementation should be able to accept most/all common value types
      * (int, String, Date, BigDecimal etc), but will require entities to be converted into a serializable format,
      * specifically, as a {@link Bookmark}.
+     *
+     * @deprecated - because {@link MementoService} is deprecated.
      */
+    @Deprecated
     @Programmatic
     public boolean canSet(Object input);
 

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedObjects.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedObjects.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedObjects.java
index 35a1f6f..3c91a23 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedObjects.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedObjects.java
@@ -31,17 +31,21 @@ public interface PublishedObjects extends HasTransactionId, HasUsername {
     Timestamp getCompletedAt();
 
     @Programmatic
-    String getUser();
+    ChangesDto getDto();
 
     @Programmatic
-    ChangesDto getDto();
+    int getNumberLoaded();
 
     @Programmatic
-    int numberCreated();
+    int getNumberCreated();
 
     @Programmatic
-    int numberUpdated();
+    int getNumberUpdated();
 
     @Programmatic
-    int numberDeleted();
+    int getNumberDeleted();
+
+    @Programmatic
+    int getNumberPropertiesModified();
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java
index 25bb228..40321ab 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/command/CommandDtoServiceInternal.java
@@ -45,8 +45,8 @@ public interface CommandDtoServiceInternal {
 
     /**
      * Returns a JAXB DTO (hence convertible to XML) that represents the intention to invoke an action on a
-     * target object (or possibly many targets, for bulk actions).  The action can be a mixin action or a
-     * contributed action.
+     * target object (or possibly many targets, for bulk actions), or to edit a property.  If an action, it can also
+     * be either mixin action or a contributed action.
      */
     @Programmatic
     CommandDto asCommandDto(
@@ -56,7 +56,7 @@ public interface CommandDtoServiceInternal {
 
     /**
      * Returns a JAXB DTO (hence convertible to XML) that represents the intention to edit (set or clear) a property on
-     * a target (or possibly many targets, for symmetry with actions).  The property can be a mixin or contributed.
+     * a target (or possibly many targets, for symmetry with actions).
      */
     @Programmatic
     CommandDto asCommandDto(
@@ -76,4 +76,4 @@ public interface CommandDtoServiceInternal {
             final PropertyDto propertyDto,
             final ObjectAdapter valueAdapter);
 
-    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
index da24a80..3aaaa5e 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
@@ -51,16 +51,22 @@ public class PublishedObjectsDefault implements PublishedObjects {
     private UUID transactionUuid;
     private final String userName;
     private final Timestamp completedAt;
+    private final int numberLoaded;
+    private final int numberObjectPropertiesModified;
     private final Map<ObjectAdapter, PublishedObject.ChangeKind> changesByAdapter;
 
     public PublishedObjectsDefault(
             final UUID transactionUuid,
             final String userName,
             final Timestamp completedAt,
+            final int numberLoaded,
+            final int numberObjectPropertiesModified,
             final Map<ObjectAdapter, PublishedObject.ChangeKind> changesByAdapter) {
         this.transactionUuid = transactionUuid;
         this.userName = userName;
         this.completedAt = completedAt;
+        this.numberLoaded = numberLoaded;
+        this.numberObjectPropertiesModified = numberObjectPropertiesModified;
         this.changesByAdapter = changesByAdapter;
     }
     //endregion
@@ -90,14 +96,8 @@ public class PublishedObjectsDefault implements PublishedObjects {
     }
 
     @Override
-    public String getUser() {
-        return userName;
-    }
-
-    @Programmatic
-    @Override
     public String getUsername() {
-        return getUser();
+        return userName;
     }
     //endregion
 
@@ -113,23 +113,33 @@ public class PublishedObjectsDefault implements PublishedObjects {
     }
     //endregion
 
-    //region > numberCreated, numberUpdated, numberDeleted
+    //region > numberLoaded, numberCreated, numberUpdated, numberDeleted, numberObjectPropertiesModified
+
+    @Override
+    public int getNumberLoaded() {
+        return numberLoaded;
+    }
 
     @Override
-    public int numberCreated() {
+    public int getNumberCreated() {
         return numAdaptersOfKind(PublishedObject.ChangeKind.CREATE);
     }
 
     @Override
-    public int numberUpdated() {
+    public int getNumberUpdated() {
         return numAdaptersOfKind(PublishedObject.ChangeKind.UPDATE);
     }
 
     @Override
-    public int numberDeleted() {
+    public int getNumberDeleted() {
         return numAdaptersOfKind(PublishedObject.ChangeKind.DELETE);
     }
 
+    @Override
+    public int getNumberPropertiesModified() {
+        return numberObjectPropertiesModified;
+    }
+
     private int numAdaptersOfKind(final PublishedObject.ChangeKind kind) {
         final Collection<ObjectAdapter> objectAdapters = adaptersByChange().get(kind);
         return objectAdapters != null ? objectAdapters.size() : 0;
@@ -172,6 +182,9 @@ public class PublishedObjectsDefault implements PublishedObjects {
         objectsDto.setUpdated(oidsDtoFor(PublishedObject.ChangeKind.UPDATE));
         objectsDto.setDeleted(oidsDtoFor(PublishedObject.ChangeKind.DELETE));
 
+        objectsDto.setLoaded(getNumberLoaded());
+        objectsDto.setPropertiesModified(getNumberPropertiesModified());
+
         return objectsDto;
     }
 
@@ -206,6 +219,7 @@ public class PublishedObjectsDefault implements PublishedObjects {
         changesDto.setTransactionId(transactionId);
         changesDto.setUser(userName);
         changesDto.setCompletedAt(JavaSqlTimestampXmlGregorianCalendarAdapter.print(completedAt));
+
         changesDto.setObjects(objectsDto);
         return changesDto;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/55d3029a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
index 7e8a3d8..dea1dc3 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
@@ -46,6 +46,7 @@ import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.CommandContext;
 import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.iactn.InteractionContext;
+import org.apache.isis.applib.services.metrics.MetricsService;
 import org.apache.isis.applib.services.publish.EventMetadata;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.publish.EventType;
@@ -182,14 +183,20 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
             return;
         }
 
-        final PublishedObjects publishedObjects = newPublishedObjects(changeKindByPublishedAdapter);
+        final int numberLoaded = metricsService.numberObjectsLoaded();
+        final int numberObjectPropertiesModified = metricsService.numberObjectPropertiesModified();
+        final PublishedObjects publishedObjects = newPublishedObjects(numberLoaded, numberObjectPropertiesModified,
+                changeKindByPublishedAdapter);
 
         for (PublisherService publisherService : publisherServices) {
             publisherService.publish(publishedObjects);
         }
     }
 
-    private PublishedObjects newPublishedObjects(final Map<ObjectAdapter, ChangeKind> changeKindByPublishedAdapter) {
+    private PublishedObjects newPublishedObjects(
+            final int numberLoaded,
+            final int numberObjectPropertiesModified,
+            final Map<ObjectAdapter, ChangeKind> changeKindByPublishedAdapter) {
 
         final Command command = commandContext.getCommand();
         final UUID transactionUuid = command.getTransactionId();
@@ -197,7 +204,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
         final String userName = userService.getUser().getName();
         final Timestamp timestamp = clockService.nowAsJavaSqlTimestamp();
 
-        return new PublishedObjectsDefault(transactionUuid, userName, timestamp, changeKindByPublishedAdapter);
+        return new PublishedObjectsDefault(transactionUuid, userName, timestamp, numberLoaded, numberObjectPropertiesModified, changeKindByPublishedAdapter);
     }
 
     //endregion
@@ -433,6 +440,9 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
     @Inject
     private UserService userService;
 
+    @Inject
+    private MetricsService metricsService;
+
     protected OidMarshaller getOidMarshaller() {
         return IsisContext.getOidMarshaller();
     }