You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/05/12 10:25:55 UTC
[06/18] isis git commit: ISIS-1594: updates domain service .adoc
names and ids,
so that the edit buttons are added correctly to subdocuments. Also some
further minor improvements on scrolling.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridService.adoc
new file mode 100644
index 0000000..f5ceff8
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridService.adoc
@@ -0,0 +1,72 @@
+[[_rgsvc_presentation-layer-spi_GridService]]
+= `GridService`
+: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 `GridService` provides the ability to load the XML layout (grid) for a domain class. To do this it delegates:
+
+* to xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridLoaderService[`GridLoaderService`] to load a pre-existing layout for the domain class, if possible
+
+* to xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridSystemService[`GridSystemService`] to normalize the grid with respect to Apache
+Isis' internal metamodel, in other words to ensure that all of the domain objects' properties, collections and actions are associated with regions of the grid.
+
+Once a grid has been loaded for a domain class, this is cached internally by Apache Isis' internal meta model (in the
+`GridFacet` facet). If running in prototype mode, any subsequent changes to the XML will be detected and the grid rebuilt. This allows for dynamic reloading of layouts, providing a far faster feedback (eg if tweaking the UI while working with end-users). Dynamic reloading is disabled in production mode.
+
+== SPI
+
+The SPI defined by this service is:
+
+[source,java]
+----
+public interface GridService {
+ boolean supportsReloading(); // <1>
+ void remove(Class<?> domainClass); // <2>
+ boolean existsFor(Class<?> domainClass); // <3>
+ Grid load(final Class<?> domainClass); // <4>
+ Grid defaultGridFor(Class<?> domainClass); // <5>
+ Grid normalize(final Grid grid); // <6>
+ Grid complete(Grid grid); // <7>
+ Grid minimal(Grid grid); // <8>
+}
+----
+<1> whether dynamic reloading of layouts is enabled. The default implementation enables reloading for prototyping, disables in production
+<2> support metamodel invalidation/rebuilding of spec, eg as called by this xref:../rgcms/rgcms.adoc#__rgcms_classes_mixins_Object_rebuildMetamodel[Object mixin] action.
+<3> whether any persisted layout metadata (eg a `.layout.xml` file) exists for this domain class. Just delegates to corresponding method in xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridLoaderService[`GridLoaderService`].
+<4> returns a new instance of a xref:../rgcms/rgcms.adoc#__rgcms_classes_layout_component[`Grid`] for the specified domain class, eg as loaded from a `layout.xml` file. If none exists, will return null (and the calling xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridService[`GridService`] will use xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridSystemService[`GridSystemService`] to obtain a default grid for the domain class).
+<5> returns a default grid, eg two columns in ratio 4:8. Used when no existing grid layout exists for a domain class.
+<6> validates and normalizes a grid, modifying the grid so that all of the domain object's members (properties, collections, actions) are bound to regions of the grid. This is done using existing metadata, most notably that of the xref:../rgant/rgant.adoc#_rgant-MemberOrder[`@MemberOrder`] annotation. Such a grid, if persisted as the layout XML file for the domain class, allows the `@MemberOrder` annotation to be removed from the source code of the domain class (but other annotations must be retained).
+<7> Takes a normalized grid and enriches it with additional metadata (taken from Apache Isis' internal metadata) that can be represented in the layout XML. Such a grid, if persisted as the layout XML file for the domain class, allows all layout annotations (xref:../rgant/rgant.adoc#_rgant-ActionLayout[`@ActionLayout`], xref:../rgant/rgant.adoc#_rgant-PropertyLayout[`@PropertyLayout`] and xref:../rgant/rgant.adoc#_rgant-CollectionLayout[`@CollectionLayout`]) to be removed from the source code of the domain class.
+<8> Takes a normalized grid and strips out removes all members, leaving only the grid structure. Such a grid, if persisted as the layout XML file for the domain class, requires that the xref:../rgant/rgant.adoc#_rgant-MemberOrder[`@MemberOrder`] annotation is retained in the source code of said class in order to bind members to the regions of the grid.
+
+The first four methods just delegate to the corresponding methods in xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridSystemService[`GridSystemService`], while the last four delegate to the corresponding method in xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridSystemService[`GridSystemService`]. The service inspects the ``Grid``'s concrete class to determine which actual `GridSystemService` instance to delegate to.
+
+
+== Implementation
+
+The framework provides a default implementation of this service, namely `GridServiceDefault`.
+
+
+== Registering the Services
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]), then the
+ default implementation of `GridLoaderService` is automatically registered and injected, and no further
+ configuration is required.
+
+To use an alternative implementation, use
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+That said, there should be little reason to use a different implementation; if behaviour does need to be changed, it would also be possible to replace the implementation of either the `GridLoaderService` or the `GridSystemService`.
+
+
+
+== Related Services
+
+This service calls xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridLoaderService[`GridLoaderService`] and xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridSystemService[`GridSystemService`].
+
+This service is called by xref:../rgsvc/rgsvc.adoc#_rgsvc_metadata-api_LayoutService[`LayoutService`], exposed in the UI through `LayoutServiceMenu` (to download the layout XML as a zip file for all domain objects) and the xref:../rgcms/rgcms.adoc#_rgcms_classes_mixins_Object[`downloadLayoutXml()`] mixin (to download the layout XML for a single domain
+object).
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridSystemService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridSystemService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridSystemService.adoc
new file mode 100644
index 0000000..df0da06
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridSystemService.adoc
@@ -0,0 +1,75 @@
+[[_rgsvc_presentation-layer-spi_GridSystemService]]
+= `GridSystemService`
+: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 `GridSystemService` encapsulates a single layout grid system which can be used to customize the layout
+of domain objects. In particular this means being able to return a "normalized" form (validating and associating
+domain object members into the various regions of the grid) and in providing a default grid if there is no other
+metadata available.
+
+The framework provides a single such grid implementation, namely for Bootstrap3.
+
+[NOTE]
+====
+Unlike most other domain services, the framework will check _all_ available implementations of `GridSystemService` to
+obtain available grid systems, rather than merely the first implementation found; in other words it uses the
+chain-of-responsibility pattern. Services are called in the order defined by
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`]).
+
+Note though that each concrete implementation must also provide corresponding Wicket viewer components capable of
+interpreting the grid layout.
+====
+
+
+== SPI
+
+The SPI defined by this service is:
+
+[source,java]
+----
+public interface GridSystemService<G extends Grid> {
+ Class<? extends Grid> gridImplementation(); // <1>
+ String tns(); // <2>
+ String schemaLocation(); // <3>
+ Grid defaultGrid(Class<?> domainClass); // <4>
+ void normalize(G grid, Class<?> domainClass); // <5>
+ void complete(G grid, Class<?> domainClass); // <6>
+ void minimal(G grid, Class<?> domainClass); // <7>
+}
+----
+<1> The concrete subclass of `Grid` supported by this implementation. As noted in the introduction, there can be multiple implementations of this service, but there can only be one implementation per concrete subclass. As is normal practice,
+the service with the lowest xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] takes precedence.
+<2> the target namespace for this grid system. This is used when generating the XML. The Bootstrap3 grid system provided by the framework returns the value `http://isis.apache.org/applib/layout/grid/bootstrap3`.
+<3> the schema location for the XSD. The Bootstrap3 grid system provided by the framework returns the value `http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd`.
+<4> a default grid, eg two columns in ratio 4:8. Used when no existing grid layout exists for a domain class.
+<5> Validates and normalizes a grid, modifying the grid so that all of the domain object's members (properties, collections, actions) are bound to regions of the grid. This is done using existing metadata, most notably that of the xref:../rgant/rgant.adoc#_rgant-MemberOrder[`@MemberOrder`] annotation. Such a grid, if persisted as the layout XML file for the domain class, allows the
+ `@MemberOrder` annotation to be removed from the source code of the domain class (but other annotations must be retained).
+<6> Takes a normalized grid and enriches it with additional metadata (taken from Apache Isis' internal metadata) that can be represented in the layout XML. Such a grid, if persisted as the layout XML file for the domain class, allows all layout annotations (xref:../rgant/rgant.adoc#_rgant-ActionLayout[`@ActionLayout`], xref:../rgant/rgant.adoc#_rgant-PropertyLayout[`@PropertyLayout`] and xref:../rgant/rgant.adoc#_rgant-CollectionLayout[`@CollectionLayout`]) to be removed from the source code of the domain class.
+<7> Takes a normalized grid and strips out removes all members, leaving only the grid structure. Such a grid, if persisted as the layout XML file for the domain class, requires that the xref:../rgant/rgant.adoc#_rgant-MemberOrder[`@MemberOrder`] annotation is retained in the source code of said class in order to bind members to the regions of the grid.
+
+
+== Implementation
+
+The framework provides `GridSystemServiceBS3`, an implementation that encodes the bootstrap3 grid system.
+(The framework also provides xref:../ugvw/ugvw.adoc#[Wicket viewer] components that are capable of interpreting and rendering this metadata).
+
+
+== Registering the Services
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]), then the
+ Bootstrap3 default implementation of `GridSystemService` is automatically registered and injected, and no further
+ configuration is required.
+
+To use an alternative implementation, use
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+
+
+== Related Services
+
+This service is used by xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridService[`GridService`].
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_HintStore.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_HintStore.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_HintStore.adoc
new file mode 100644
index 0000000..898868b
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_HintStore.adoc
@@ -0,0 +1,110 @@
+[[_rgsvc_presentation-layer-spi_HintStore]]
+= `HintStore`
+: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 `HintStore` service defines an SPI for the xref:../ugvw/ugvw.adoc#[Wicket viewer] to store UI hints on a per-object basis.
+For example, the viewer remembers which tabs are selected, and for collections which view is selected (eg table or hidden),
+which page of a table to render, or whether "show all" (rows) is toggled.
+
+The default implementation of this service uses the HTTP session. The service is an SPI because the amount of data
+stored could potentially be quite large (for large numbers of users who use the app all day). An SPI makes it easy to
+plug in an alternative implementation that is more sophisticated than the default (eg implementing MRU/LRU queue, or
+using a NoSQL database, or simply to disabling the functionality altogether).
+
+
+== SPI
+
+The SPI of `HintStore` is:
+
+[source,java]
+----
+public interface HintStore {
+ String get(final Bookmark bookmark, String hintKey); // <1>
+ void set(final Bookmark bookmark, String hintKey, String value); // <2>
+ void remove(final Bookmark bookmark, String hintKey); // <3>
+ void removeAll(Bookmark bookmark); // <4>
+ Set<String> findHintKeys(Bookmark bookmark); // <5>
+}
+----
+<1> obtain a hint (eg which tab to open) for a particular object. Object identity is represented by `Bookmark`, as
+per the xref:../rgsvc/rgsvc.adoc#_rgsvc_integration-api_BookmarkService[`BookmarkService`], so that alternative implementations can easily serialize this state to a string.
+<2> set the state of a hint. (The value of) all hints are represented as strings.
+<3> remove a single hint for an object;
+<4> remove all hints
+<5> obtain all known hints for an object
+
+
+
+== Implementation
+
+The core framework provides a default implementation of this service (`org.apache.isis.viewer.wicket.viewer.services.HintStoreUsingWicketSession`).
+
+
+
+== View models (`1.15.0-SNAPSHOT`)
+
+Hints are stored against the `Bookmark` of a domain object, essentially the identifier of the domain object.
+For a domain entity this identifier is fixed and unchanging but for a view models the identifier changes each time the view model's state changes (the identifier is basically a digest of the object's state).
+This means that any hints stored against the view model's bookmark are in effect lost as soon as the view model is modified.
+
+To address this issue the `HintStore` (as of `1.15.0-SNAPSHOT`) provides an optional interface that the view model can implement, the intent of which is to expose the "logical" identity of the view model.
+This interface is:
+
+
+[source,java]
+----
+public interface HintStore {
+ interface HintIdProvider {
+ String hintId();
+ }
+}
+----
+
+For example, suppose that there's a view model that wraps a `Customer` and its ``Order``s
+For this the `Customer` represents the logical identity.
+This view model might therefore be implemented as follows:
+
+[source,java]
+----
+@XmlRootElement("customerAndOrders")
+@XmlAccessType(FIELD)
+public class CustomerAndOrders implements HintStore.HintIdProvider {
+
+ @Getter @Setter
+ private Customer customer;
+
+ ...
+
+ @Programmatic
+ public String hintId() {
+ bookmarkService.bookmarkFor(getCustomer()).toString();
+ }
+
+ @XmlTransient
+ @Inject BookmarkService bookmarkService;
+}
+----
+
+
+
+
+== Registering the Service
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `HintStore` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
+
+To use an alternative implementation, use
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+
+
+== Related Services
+
+The xref:../ugvw/ugvw.adoc#[Wicket viewer] exposes the xref:../rgcms/rgcms.adoc#__rgcms_classes_mixins_Object_clearHints["clear hints"]
+mixin action that is for use by end-users of the application to clear any UI hints that have accumulated for a
+domain object.
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_LocaleProvider.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_LocaleProvider.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_LocaleProvider.adoc
new file mode 100644
index 0000000..8646112
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_LocaleProvider.adoc
@@ -0,0 +1,70 @@
+[[_rgsvc_presentation-layer-spi_LocaleProvider]]
+= `LocaleProvider`
+: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 `LocaleProvider` service is one of the services that work together to implement Apache Isis' support for i18n, being used by Isis' default implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_TranslationService[`TranslationService`].
+
+The role of the service itself is simply to return the `Locale` of the current user.
+
+
+[NOTE]
+====
+For the "big picture" and further details on Apache Isis' i18n support, see xref:../ugbtb/ugbtb.adoc#_ugbtb_i18n[here].
+====
+
+
+
+== SPI
+
+The SPI defined by this service is:
+
+[source,java]
+----
+public interface LocaleProvider {
+ @Programmatic
+ Locale getLocale();
+}
+----
+
+This is notionally request-scoped, returning the `Locale` of the current user; _not_ that of the server. (Note that the implementation is not required to actually be xref:../rgant/rgant.adoc#_rgant-RequestScoped[`@RequestScoped`], however).
+
+
+
+
+== Implementation
+
+Isis' xref:../ugvw/ugvw.adoc#[Wicket viewer] provides an implementation of this service (`LocaleProviderWicket`) which leverages Apache Wicket APIs.
+
+[NOTE]
+====
+Currently there is no equivalent implementation for the xref:../ugvro/ugvro.adoc#[RestfulObjects viewer].
+====
+
+
+
+
+== Registering the Services
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]), __and__ that the
+xref:../ugvw/ugvw.adoc#[Wicket viewer] is being used, then an implementation of `LocaleProvider` is
+automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+
+To use an alternative implementation, use
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+
+
+
+
+== Related Services
+
+This service works in conjunction with xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_TranslationService[`TranslationService`] and xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_TranslationsResolver[`TranslationsResolver`] in order to provide i18n support.
+
+
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_RoutingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_RoutingService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_RoutingService.adoc
new file mode 100644
index 0000000..bea08e9
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_RoutingService.adoc
@@ -0,0 +1,79 @@
+[[_rgsvc_presentation-layer-spi_RoutingService]]
+= `RoutingService`
+: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 `RoutingService` provides the ability to return (and therefore render) an alternative object from an action invocation.
+
+There are two primary use cases:
+
+* if an action returns an aggregate leaf (that is, a child object which has an owning parent), then the parent object can be
+returned instead. +
++
+For example, an action returning `OrderItem` might instead render the owning `Order` object. It is the responsibility
+of the implementation to figure out what the "owning" object might be.
+
+* if an action returns `null` or is `void`, then return some other "useful" object. +
++
+For example, return the home page (eg as defined by the xref:../rgant/rgant.adoc#_rgant-HomePage[`@HomePage`] annotation).
+
+Currently the routing service is used only by the xref:../ugvw/ugvw.adoc#[Wicket viewer]; it is ignored by the xref:../ugvro/ugvro.adoc#[Restful Objects] viewer.
+
+
+[NOTE]
+====
+Unlike most other domain services, the framework will check _all_ available implementations of
+`RoutingService` to return a route, rather than the first implementation found; in other words it uses the
+chain-of-responsibility pattern. Services are called in the order defined by
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`]). The route used will be the
+result of the first implementation checked that declares that it can provide a route.
+====
+
+
+== SPI
+
+The SPI defined by this service is:
+
+[source,java]
+----
+public interface RoutingService {
+ @Programmatic
+ boolean canRoute(Object original); // <1>
+ @Programmatic
+ Object route(Object original); // <2>
+}
+----
+<1> whether this implementation recognizes and can "route" the object. The `route(...)` method is only called if this method returns `true`.
+<2> the object to use; this may be the same as the original object, some other object, or (indeed) `null`.
+
+
+
+
+== Implementation
+
+The framework provides a default implementation - `RoutingServiceDefault` - which will always return the original object provided, or the home page
+if a `null` or `void` was provided. It uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_HomePageProviderService[`HomePageProviderService`].
+
+There can be multiple implementations of `RoutingService` registered. These are checked in turn (chain of responsibility
+pattern), ordered according to xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`]
+(as explained in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+The route from the first service that returns `true` from its `canRoute(...)` method will be used.
+
+
+
+== Registering the Services
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis'
+default implementation of `RoutingService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
+
+
+
+== Related Services
+
+The default implementation of this service uses the
+xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_HomePageProviderService[`HomePageProviderService`].
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TableColumnOrderService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TableColumnOrderService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TableColumnOrderService.adoc
new file mode 100644
index 0000000..a4efd77
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TableColumnOrderService.adoc
@@ -0,0 +1,49 @@
+[[_rgsvc_presentation-layer-spi_TableColumnOrderService]]
+= `TableColumnOrderService`
+: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 `TableColumnOrderService` provides the ability to reorder (or suppress) columns in both parented- and standalone tables.
+
+
+== SPI
+
+The SPI defined by this service is:
+
+[source,java]
+----
+public interface TableColumnOrderService {
+ List<String> orderParented( // <1>
+ Object parent,
+ String collectionId,
+ Class<?> collectionType,
+ List<String> propertyIds);
+ List<String> orderStandalone( // <2>
+ Class<?> collectionType,
+ List<String> propertyIds);
+}
+----
+<1> for the parent collection owned by the specified parent and collection Id, return the set of property ids in the same or other order.
+<2> for the standalone collection of the specified type, return the set of property ids in the same or other order, else return `null` if provides no reordering.
+
+There can be multiple implementations of `TableColumnOrderService` registered, ordered as per xref:../rgant/rgant.adoc#_rgant_DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`].
+The ordering provided by the first such service that returns a non-`null` value will be used.
+If all provided implementations return `null`, then the framework will fallback to a default implementation.
+
+
+
+== Implementation
+
+The framework provides a fallback implementation of this service, namely `TableColumnOrderService.Default`.
+
+
+== Registering the Services
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]), then the
+ default implementation of `TableColumnOrderService` is automatically registered and injected, and no further
+ configuration is required.
+
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc
new file mode 100644
index 0000000..168e037
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc
@@ -0,0 +1,87 @@
+[[_rgsvc_presentation-layer-spi_TranslationService]]
+= `TranslationService`
+: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 `TranslationService` is the cornerstone of Apache Isis' i18n support. Its role is to be able to provide translated versions of the various elements within the Apache Isis metamodel (service and object classes, properties, collections, actions, action parameters) and also to translate business rule (disable/valid) messages, and exceptions. These translations provide for both singular and plural forms.
+
+
+[NOTE]
+====
+For the "big picture" and further details on Apache Isis' i18n support, see xref:../ugbtb/ugbtb.adoc#_ugbtb_i18n[here].
+====
+
+
+
+== SPI
+
+The SPI defined by this service is:
+
+[source,java]
+----
+public interface TranslationService {
+ @Programmatic
+ String translate(String context, String text); // <1>
+ @Programmatic
+ String translate(String context, // <2>
+ String singularText,
+ String pluralText, int num);
+
+ enum Mode { READ, WRITE;}
+ @Programmatic
+ Mode getMode(); // <3>
+}
+
+----
+<1> translate the text, in the locale of the "current user".
+<2> return a translation of either the singular or the plural text, dependent on the `num` parameter, in the locale of the "current user"
+<3> whether this implementation is operating in read or in write mode.
+
+If in read mode, then the translations are expected to be present.
+
+If in write mode, then the implementation is saving translation keys, and will always return the untranslated translation.
+
+
+
+
+== Implementation
+
+The Apache Isis framework provides a default implementation (`TranslationServicePo`) that uses the GNU `.pot` and `.po` files for translations. It relies on the `LocaleProvider` service (to return the `Locale` of the current user) and also the `TranslationsResolver` service (to read existing translations).
+
+The framework also provides a supporting `TranslationServicePoMenu` provides menu items under the "Prototyping" secondary menu for controlling this service and downloading `.pot` files for translation.
+
+For more details on the implementation, see xref:../ugbtb/ugbtb.adoc#_ugbtb_i18n[i18n support].
+
+
+
+
+== Registering the Services
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `TranslationService` service (along with the supporting menu service) are automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+
+If the menu items are not required then these can be suppressed either using security or by implementing a xref:../ugbtb/ugbtb.adoc#_ugbtb_hints-and-tips_vetoing-visibility[vetoing subscriber].
+
+To use an alternative implementation, use
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+
+
+
+
+[[__rgsvc_metadata-api_LayoutService_related-mixins-and-menus]]
+== Related Menus
+
+The `TranslationServicePoMenu` menu exposes the `TranslationServicePo` service's `toPot()` method so that all
+translations can be downloaded as a single file.
+
+
+
+== Related Services
+
+This service works in conjunction with xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_LocaleProvider[`LocaleProvider`] and xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_TranslationsResolver[`TranslationsResolver`] in order to provide i18n support.
+
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationsResolver.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationsResolver.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationsResolver.adoc
new file mode 100644
index 0000000..f3c8438
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationsResolver.adoc
@@ -0,0 +1,67 @@
+[[_rgsvc_presentation-layer-spi_TranslationsResolver]]
+= `TranslationsResolver`
+: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 `TranslationsResolver` service is one of the services that work together to implement Apache Isis' support for i18n, being used by Isis' default implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_TranslationService[`TranslationService`].
+
+The role of the service itself is locate and return translations.
+
+
+[NOTE]
+====
+For the "big picture" and further details on Apache Isis' i18n support, see xref:../ugbtb/ugbtb.adoc#_ugbtb_i18n[here].
+====
+
+
+
+== SPI
+
+The SPI defined by this service is:
+
+[source,java]
+----
+public interface TranslationsResolver {
+ @Programmatic
+ List<String> readLines(final String file);
+}
+----
+
+
+== Implementation
+
+Isis' xref:../ugvw/ugvw.adoc#[Wicket viewer] provides an implementation of this service (`TranslationsResolverWicket`) which leverages Apache Wicket APIs. This searches for translation files in the standard `WEB-INF/` directory.
+
+[NOTE]
+====
+Currently there is no equivalent implementation for the xref:../ugvro/ugvro.adoc#[RestfulObjects viewer].
+====
+
+
+
+
+
+== Registering the Service
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]), _and_ that the xref:../ugvw/ugvw.adoc#[Wicket viewer] is being used, then an implementation of `TranslationsResolver` is
+automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+
+To use an alternative implementation, use
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+
+
+
+
+
+
+== Related Services
+
+
+This service works in conjunction with xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_LocaleProvider[`LocaleProvider`] and xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_TranslationService[`TranslationService`] in order to provide i18n support.
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UrlEncodingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UrlEncodingService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UrlEncodingService.adoc
new file mode 100644
index 0000000..5e77af5
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UrlEncodingService.adoc
@@ -0,0 +1,59 @@
+[[_rgsvc_presentation-layer-spi_UrlEncodingService]]
+= `UrlEncodingService`
+: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 `UrlEncodingService` defines a consistent way to convert strings to/from a form safe for use
+within a URL. The service is used by the framework to map xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_view-models[view model]
+mementos (derived from the state of the view model itself) into a form that can be used as a view model. When the
+framework needs to recreate the view model (for example to invoke an action on it), this URL is converted back into a
+view model memento, from which the view model can then be hydrated.
+
+Defining this functionality as an SPI has two use cases:
+
+* first, (though some browsers support longer strings), there is a limit of 2083 characters for URLs. For view model
+mementos that correspond to large strings (as might occur when serializing a JAXB
+xref:../rgant/rgant.adoc#_rgant-XmlRootElement[`@XmlRootElement`]-annotated view model), the service provides a
+hook. +
++
+For example, each memento string could be mapped to a GUID held in some cluster-aware cache.
+
+* the service provides the ability, to encrypt the string in order to avoid leakage of potentially sensitive
+state within the URL.
+
+The framework provides a default implementation of this service, `UrlEncodingServiceUsingBaseEncoding` (also in the
+applib) that uses `base-64` encoding to `UTF-8` charset.
+
+
+== SPI
+
+The SPI defined by the service is:
+
+[source,java]
+----
+public interface UrlEncodingService {
+ @Programmatic
+ public String encode(final String str); // <1>
+ @Programmatic
+ public String decode(String str); // <2>
+}
+----
+<1> convert the string (eg view model memento) into a string safe for use within an URL
+<2> unconvert the string from its URL form into its original form URL
+
+
+
+== Implementation
+
+The framework provides a default implementation (`UrlEncodingServiceUsingBaseEncoding`) that simply converts the string
+using base-64 encoding and UTF-8 character set. As already noted, be aware that the maximum length of a URL should not
+exceed 2083 characters. For large view models, there's the possibility that this limit could be exceeded; in such
+cases register an alternative implementation of this service.
+
+To use an alternative implementation, use
+xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
+
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UserProfileService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UserProfileService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UserProfileService.adoc
new file mode 100644
index 0000000..0c22838
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UserProfileService.adoc
@@ -0,0 +1,47 @@
+[[_rgsvc_presentation-layer-spi_UserProfileService]]
+= `UserProfileService`
+: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 `UserProfileService` provides the ability for the domain application to return supplementary metadata about the current user. This information is used (by the xref:../ugvw/ugvw.adoc#[Wicket viewer]) to customize the appearance of the tertiary "Me" menu bar (top right). For example, rather than display the username, instead the user's first and last name could be displayed.
+
+Another use case is to allow the user to switch context in some fashion or other. This might be to emulate a sort of "sudo"-like function, or perhaps to focus on some particular set of data.
+
+
+
+== SPI
+
+The SPI defined by the service is:
+
+[source,java]
+----
+public interface UserProfileService {
+ @Programmatic
+ String userProfileName(); // <1>
+}
+----
+<1> is used (in the Wicket viewer) as the menu name of the tertiary "Me" menu bar.
+
+If the method returns `null` or throws an exception then the framework will default to using the current user name.
+
+In the future this API may be expanded; one obvious possibility is to return a profile photo or avatar URL.
+
+
+
+== Implementation
+
+There is no default implementation of this service provided by the core Apache Isis framework.
+
+An example implementation can be found in the (non-ASF)
+http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp]:
+
+image::{_imagesdir}reference-services-spi/UserProfileService/todoapp.png[width="800px",link="{_imagesdir}reference-services-spi/UserProfileService/todoapp.png"]
+
+
+[NOTE]
+====
+Currently this feature is not integrated with Apache Isis' authentication mechanisms; the information provided is purely metadata provided for presentation purposes only.
+====
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditerService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditerService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditerService.adoc
deleted file mode 100644
index 16ec117..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditerService.adoc
+++ /dev/null
@@ -1,134 +0,0 @@
-[[_rgsvc_spi_AuditerService]]
-= `AuditerService`
-: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 `AuditerService` auditing service provides a simple mechanism to capture changes to data. It is called for each property that has changed on any domain object, as a set of pre- and post-values.
-
-[NOTE]
-====
-This service is intended to replace the now-deprecated xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditingService[`AuditingService3`].
-The difference between the two is that this service recognises that the `transactionId` is now (as of `1.13.0`)
-actually a request/interaction Id, and that an additional `sequence
-====
-
-
-== SPI
-
-The SPI for the service is:
-
-[source,java]
-----
-public interface AuditerService {
- boolean isEnabled(); // <1>
- public void audit(
- UUID transactionId, int sequence, // <2>
- String targetClassName,
- Bookmark target, // <3>
- String memberIdentifier,
- String propertyName, // <4>
- String preValue, String postValue, // <5>
- String user, java.sql.Timestamp timestamp); // <6>
- }
-----
-<1> whether this implementation is enabled. If all configured implementations are disabled, then auditing is
-suppressed (a minor performance optimization).
-<2> together the `transactionId` (misnamed; really is the request/interaction Id) and the `sequence` uniquely identify
-the transaction in which the object was changed.
-<3> identifies the object that has changed
-<4> the property of the object that has changed. The combination of the `transactionId`, `sequence`, `target` and
-`propertyName` is unique.
-<5> the before and after values of the property (in string format). If the object was created then "[NEW]" is used
-as the pre-value; if the object was deleted then "[DELETED]" is used as the post-value.
-<6> the user that changed the object, and the date/time that this occurred.
-
-The framework will call this for each and every domain object property that is modified within a transaction.
-
-
-
-== Implementations
-
-The framework allows multiple implementations of this service to be registered; all will be called. The framework
-provides one implementation of its own, `AuditerServiceLogging` (in `o.a.i.applib.services.audit` package); this
-logs simple messages to an SLF4J logger.
-
-
-For example, this can be configured to write to a separate log file by adding the following to `logging.properties`:
-
-[source,ini]
-----
-log4j.appender.AuditerServiceLogging=org.apache.log4j.FileAppender
-log4j.appender.AuditerServiceLogging.File=./logs/AuditerServiceLogging.log
-log4j.appender.AuditerServiceLogging.Append=false
-log4j.appender.AuditerServiceLogging.layout=org.apache.log4j.PatternLayout
-log4j.appender.AuditerServiceLogging.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
-
-log4j.logger.org.apache.isis.applib.services.audit.AuditerServiceLogging=DEBUG,AuditerServiceLogging
-log4j.additivity.org.apache.isis.applib.services.audit.AuditerServiceLogging=false
-----
-
-
-The (non-ASF) http://github.com/isisaddons/isis-module-audit[Isis addons' Audit module] also provides an
-implementation, `org.isisaddons.module.audit.dom.AuditerServiceUsingJdo`. This creates an audit record for each
-changed property (ie every time that `AuditerService#audit(...)` is called.
-
-The module also provides:
-
-* `AuditingServiceMenu` service which provides actions to search for ``AuditEntry``s, underneath an 'Activity' menu on
-the secondary menu bar.
-
-* `AuditingServiceRepository` service to to search for persisted `AuditEntry``s. None of its actions are visible in
-the user interface (they are all `@Programmatic`).
-
-* `AuditingServiceContributions` which contrbutes collections to the
-xref:../rgcms/rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[ `HasTransactionId`] interface. This will therefore display all
-audit entries that occurred in a given request/transaction, in other words whenever a command, a published event or
-another audit entry is displayed.
-
-
-
-
-== Usage
-
-The typical way to indicate that an object should be audited is to annotate it with the xref:../rgant/rgant.adoc#_rgant-DomainObject_auditing[`@DomainObject#auditing()`] annotation.
-
-
-
-
-== Registering the Services
-
-The (non-ASF) http://github.com/isisaddons/isis-module-audit[Isis addons' audit] module provides an implementation of
-this service (`AuditerService`), and also provides a number of related domain services (`AuditingServiceMenu`,
-`AuditingServiceRepository` and `AuditingServiceContributions`).
-
-Assuming that an `AppManifest` is being used to xref:../rgcms/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.
-
-If menu items or contributions are not required in the UI, these can be suppressed either using security or by
-implementing a xref:../ugbtb/ugbtb.adoc#_ugbtb_hints-and-tips_vetoing-visibility[vetoing subscriber].
-
-
-
-== Related Services
-
-The auditing service works very well with implementations of
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`] that persist the ``Interaction.Execution`` objects
-obtained from the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] service. The interaction
-execution captures the _cause_ of an interaction (an action was invoked, a property was edited), while the
-`AuditerService` audit entries capture the _effect_ of that interaction in terms of changed state.
-
-[NOTE]
-====
-Prior to `1.13.0` the xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] performed a similar role,
-of capturing the cause. As of `1.13.0`, ``Command``s are now primarily to capture the _intent_ of an action,
-not the actual action invocation itself.
-====
-
-The `AuditerService` is intended to replace the (now-deprecated)
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditingService3[`AuditingService3`], as the latter does not support the concept of multiple
-transactions within a single interaction.
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditingService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditingService.adoc
deleted file mode 100644
index a80990d..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_AuditingService.adoc
+++ /dev/null
@@ -1,83 +0,0 @@
-[[_rgsvc_spi_AuditingService]]
-= `AuditingService3` (deprecated)
-: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 `AuditingService3` auditing service provides a simple mechanism to capture changes to data. It is called for each property that has changed on any domain object, as a set of pre- and post-values.
-
-[NOTE]
-====
-This service is deprecated, replaced by xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditerService[`AuditerService`].
-====
-
-
-== SPI
-
-The SPI for the service is:
-
-[source,java]
-----
-public interface AuditingService3 {
-
- @Programmatic
- public void audit(
- final UUID transactionId, String targetClassName, final Bookmark target,
- String memberIdentifier, final String propertyName,
- final String preValue, final String postValue,
- final String user, final java.sql.Timestamp timestamp);
- }
-----
-
-The framework will call this for each and every domain object property that is modified within a transaction.
-
-
-
-== Implementation
-
-The most full-featured available implementation is the (non-ASF) http://github.com/isisaddons/isis-module-audit[Isis addons' Audit module]. This creates an audit records for each changed property (ie every time that `AuditingService3#audit(...)` is called. The implementation is `org.isisaddons.module.audit.dom.AuditingService`.
-
-The module also provides:
-
-* `AuditingServiceMenu` service which provides actions to search for ``AuditEntry``s, underneath an 'Activity' menu on the secondary menu bar.
-
-* `AuditingServiceRepository` service to to search for persisted `AuditEntry``s. None of its actions are visible in the user interface (they are all `@Programmatic`).
-
-* `AuditingServiceContributions` which contrbutes collections to the xref:../rgcms/rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[ `HasTransactionId`] interface. This will therefore display all audit entries that occurred in a given transaction, in other words whenever a command, a published event or another audit entry is displayed.
-
-
-
-If you just want to debug (writing to stderr), you can instead configure `o.a.i.applib.services.audit.AuditingService3$Stderr`
-
-
-
-== Usage
-
-The typical way to indicate that an object should be audited is to annotate it with the xref:../rgant/rgant.adoc#_rgant-DomainObject_auditing[`@DomainObject#auditing()`] annotation.
-
-
-
-
-== Registering the Services
-
-The (non-ASF) http://github.com/isisaddons/isis-module-audit[Isis addons' audit] module provides an implementation of
-this service (`AuditingService`), and also provides a number of related domain services (`AuditingServiceMenu`,
-`AuditingServiceRepository` and `AuditingServiceContributions`).
-
-Assuming that an `AppManifest` is being used to xref:../rgcms/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.
-
-If menu items or contributions are not required in the UI, these can be suppressed either using security or by
-implementing a xref:../ugbtb/ugbtb.adoc#_ugbtb_hints-and-tips_vetoing-visibility[vetoing subscriber].
-
-
-
-== Related Services
-
-This service has been deprecated and replaced by the equivalent
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditerService[`AuditerService`].
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_BackgroundCommandService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_BackgroundCommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_BackgroundCommandService.adoc
deleted file mode 100644
index 410673a..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_BackgroundCommandService.adoc
+++ /dev/null
@@ -1,132 +0,0 @@
-[[_rgsvc_spi_BackgroundCommandService]]
-= `BackgroundCommandService`
-: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 `BackgroundCommandService` (SPI) service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`] (API) service, persisting action invocations as commands such that they can subsequently be invoked in the background.
-
-The `BackgroundService` is responsible for capturing a memento representing the action invocation, and then hands off to the xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommandService`] `BackgroundCommandService` to actually persist it.
-
-The persisting of commands is only half the story; there needs to be a separate process to read the commands and execute them. The abstract xref:../rgsvc/rgsvc.adoc#_rgsvc_api_BackgroundService_BackgroundCommandExecution[`BackgroundCommandExecution`] provides a mechanism to execute such commands. This can be considered an API, albeit "internal" because the implementation relies on internals of the framework.
-
-
-
-
-== SPI
-
-The SPI of the `BackgroundCommandService` is:
-
-[source,java]
-----
-public interface BackgroundCommandService {
- void schedule(
- ActionInvocationMemento aim, // <1>
- Command parentCommand, // <2>
- String targetClassName,
- String targetActionName,
- String targetArgs);
-
-}
-----
-<1> is a wrapper around a xref:../rgsvc/rgsvc.adoc#_rgsvc_api_MementoService[`MementoService`]'s `Memento`, capturing the details of the action invocation to be retained (eg persisted to a database) so that it can be executed at a later time
-<2> reference to the parent `Command` requesting the action be performed as a background command. This allows information such as the initiating user to be obtained.
-
-The API of `ActionInvocationMemento` in turn is:
-
-[source,java]
-----
-public class ActionInvocationMemento {
- public String getActionId() { ... }
- public String getTargetClassName() { ... }
- public String getTargetActionName() { ... }
- public Bookmark getTarget() { ... }
- public int getNumArgs() { ... }
- public Class<?> getArgType(int num) throws ClassNotFoundException { ... }
- public <T> T getArg(int num, Class<T> type) { ... }
-
- public String asMementoString() { ... } // <1>
-}
-----
-<1> lets the `BackgroundCommandService` implementation convert the action invocation into a simple string.
-
-
-
-== "Internal" SPI
-
-The `BackgroundCommandExecution` (in isis-core) is an abstract template class for xref:../ugbtb/ugbtb.adoc#_ugbtb_headless-access_AbstractIsisSessionTemplate[headless access], that defines an abstract hook method to obtain background `Command`s to be executed:
-
-[source,java]
-----
-public abstract class BackgroundCommandExecution
- extends AbstractIsisSessionTemplate {
- ...
- protected abstract List<? extends Command> findBackgroundCommandsToExecute();
- ...
-}
-----
-
-The developer is required to implement this hook method in a subclass.
-
-
-
-
-== Implementation
-
-The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module provides an implementation (`org.isisaddons.module.command.dom.BackgroundCommandServiceJdo`) that persists ``Command``s using the JDO/DataNucleus object store. It further provides a number of supporting services:
-
-* `org.isisaddons.module.command.dom.BackgroundCommandServiceJdoRepository` is a repository to search for persisted background ``Command``s
-
-* `org.isisaddons.module.command.dom.BackgroundCommandServiceJdoContributions` contributes actions for searching for persisted child and sibling ``Command``s.
-
-The module also provides a concrete subclass of `BackgroundCommandExecution` that knows how to query for persisted (background) `Command`s such that they can be executed by a scheduler.
-
-[TIP]
-====
-Details of setting up the Quartz scheduler to actually execute these persisted commands can be found on the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`] page.
-====
-
-
-
-
-== Usage
-
-Background commands can be created either declaratively or imperatively.
-
-The declarative approach involves annotating an action using xref:../rgant/rgant.adoc#_rgant-Action_command[`@Action#command()`] with `@Action#commandExecuteIn=CommandExecuteIn.BACKGROUND`.
-
-The imperative approach involves explicitly calling the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`] from within domain object's action.
-
-
-
-
-== Registering the Services
-
-The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module provides an implementation
-of this service (`BackgroundCommandService`), and also provides a number of related domain services
-(`BackgroundCommandServiceJdo`, `BackgroundCommandJdoRepository` and `BackgroundCommandServiceJdoContributions`). This
-module also provides service implementations of the
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`].
-
-Assuming that an `AppManifest` is being used to xref:../rgcms/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.
-
-If contributions are not required in the UI, these can be suppressed either using security or by implementing a
-xref:../ugbtb/ugbtb.adoc#_ugbtb_hints-and-tips_vetoing-visibility[vetoing subscriber].
-
-
-
-
-
-== Related Services
-
-As discussed above, this service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_BackgroundService[`BackgroundService`] , persisting `Command`s such that they can be executed in the background.
-
-There is also a tie-up with the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] and its supporting xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] domain service. The `CommandContext` service is responsible for providing a parent `Command` with which the background `Command`s can then be associated as children, while the `CommandService` is responsible for persisting those parent `Command`s (analogous to the way in which the `BackgroundCommandService` persists the child background `Command`s). The `BackgroundCommandService` ensures that these background `Command`s are associated with the parent "foreground" `Command`.
-
-What that means is that the implementations of `CommandService` and `BackgroundCommandService` go together, hence both implemented in the (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module.).
-
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ClassDiscoveryService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ClassDiscoveryService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ClassDiscoveryService.adoc
deleted file mode 100644
index 8308765..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ClassDiscoveryService.adoc
+++ /dev/null
@@ -1,82 +0,0 @@
-[[_rgsvc_spi_ClassDiscoveryService]]
-= `ClassDiscoveryService`
-: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 `ClassDiscovery` service is used to automatically discover subclasses of any given type on the classpath. The primary use case is to support "convention-over-configuration" designs that work with a minimum of configuration.
-
-This service is used by the xref:../rgcms/rgcms.adoc#_rgcms_classes_super_FixtureScripts[`FixtureScripts`] service to automatically locate any xref:../rgcms/rgcms.adoc#_rgcms_classes_super_FixtureScript[`FixtureScript`] implementations.
-
-
-
-== SPI
-
-The SPI defined by the service is:
-
-[source,java]
-----
-public interface ClassDiscoveryService2 {
- @Programmatic
- <T> Set<Class<? extends T>> findSubTypesOfClasses(Class<T> type, String packagePrefix);
- @Deprecated
- @Programmatic
- <T> Set<Class<? extends T>> findSubTypesOfClasses(Class<T> type); // <1>
-}
-----
-<1> no longer used
-
-
-
-== Implementation
-
-Isis provides an implementation of this service, namely `o.a.i.applib.services.classdiscovery.ClassDiscoveryServiceUsingReflections`.
-
-[NOTE]
-====
-This implementation is also used to discover domain services annotated with xref:../rgant/rgant.adoc#_rgant-DomainService[`@DomainService`]. Currently this logic uses the implementation directly, so is not pluggable. However, the entire `ServicesInstaller`
-====
-
-
-
-== Usage
-
-The usage will vary depending upon the conventions of the design. As of 1.9.0, the usage of the service has been
-centralized such that the packages to be scanned are located from the xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[`AppManifest`]'s `#getModules()` method.
-
-For example, the xref:../ugfun/ugfun.adoc#_ugfun_getting-started_simpleapp-archetype[SimpleApp archetype]'s app manifest includes:
-
-[source,java]
-----
-public class DomainAppAppManifest implements AppManifest {
- @Override
- public List<Class<?>> getModules() {
- return Arrays.asList(
- DomainAppDomainModule.class, // domain (entities and repositories)
- DomainAppFixtureModule.class, // fixtures
- DomainAppAppModule.class // home page service etc
- );
- }
- ...
-}
-----
-
-where the three module classes in effect define three different package prefixes to search under (for domain services, fixture scripts and persistent entities).
-
-Other usages of the `ClassDiscoveryService` are likely to work in a similar way, requiring some sort of scope to be specified.
-
-
-== Registering the Services
-
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
-implementation of `ClassDiscoveryService2` service is automatically registered and injected (it is annotated with
-`@DomainService`) so no further configuration is required.
-
-To use an alternative implementation, use
-xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introduction] to this guide).
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_CommandService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_CommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_CommandService.adoc
deleted file mode 100644
index 5f6d036..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_CommandService.adoc
+++ /dev/null
@@ -1,121 +0,0 @@
-[[_rgsvc_spi_CommandService]]
-= `CommandService`
-: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 `CommandService` service supports the xref:../rgsvc/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.
-
-As of `1.13.0`, 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_api_BackgroundService[`BackgroundService`], or implicitly by way of the
-xref:../rgant/rgant.adoc#_rgant-Action_command[`@Action#command()`] annotation.
-
-In previous versions of the framework, persistent ``Command``s also supported a number of other 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_spi_PublisherService[`PublisherService`] or
-xref:../rgsvc/rgsvc.adoc#_rgsvc_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
-
-As of `1.13.0`, these other uses cases are now more fully supported through the
-xref:../rgsvc/rgsvc.adoc#_rgsvc_api_InteractionContext[`InteractionContext`] service and persistent implementations of the
-``Interaction`` object, eg as provided by the (non-ASF)
-http://github.com/isisaddons/isis-module-publishmq[Isis addons' 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.
-
-
-[NOTE]
-====
-Note that this screencast shows an earlier version of the xref:../ugvw/ugvw.adoc#[Wicket viewer] UI (specifically, pre 1.8.0).
-====
-
-
-
-== SPI
-
-The `CommandService` service defines the following very simple API:
-
-[source,java]
-----
-public interface CommandService {
- Command create(); // <1>
- @Deprecated
- void startTransaction(Command command, UUID transactionId); // <2>
- boolean persistIfPossible(Command command); // <3>
- void complete(Command command); // <4>
-}
-----
-<1> Instantiate the appropriate instance of the `Command` (as defined by the
-xref:../rgsvc/rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`] service). Its members will be populated automatically by
-the framework.
-<2> this method (as of `1.13.0`) is *NO LONGER CALLED* and 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
-
-The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' 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
-
-* `org.isisaddons.module.command.dom.CommandServiceJdoContributions` contributes actions for searching for persisted child and sibling ``Command``s.
-
-
-
-== Usage
-
-The typical way to indicate that an action should be reified into a `Command` is by annotating the action using xref:../rgant/rgant.adoc#_rgant-Action_command[`@Action#command()`].
-
-
-
-
-== Registering the Services
-
-The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module provides an implementation
-of this service (`CommandService`), and also provides a number of related domain services
-(`CommandJdoRepository` and `CommandServiceJdoContributions`). This
-module also provides service implementations of the
-xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_CommandService[`BackgroundCommandService`].
-
-Assuming that an `AppManifest` is being used to xref:../rgcms/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.
-
-If contributions are not required in the UI, these can be suppressed either using security or by implementing a
-xref:../ugbtb/ugbtb.adoc#_ugbtb_hints-and-tips_vetoing-visibility[vetoing subscriber].
-
-
-
-
-== Related Services
-
-As discussed above, this service supports the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_CommandContext[`CommandContext`], providing the ability for `Command` objects to be
-persisted. This is closely related to the xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommandService`]that allows the xref:../rgsvc/rgsvc.adoc#_rgsvc_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_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_spi_PublishingService[`PublishingService`].
-
-All three of these services collaborate implicitly by way of the xref:../rgcms/rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[`HasTransactionId`] interface.
-
http://git-wip-us.apache.org/repos/asf/isis/blob/20b83ae7/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ContentMappingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ContentMappingService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ContentMappingService.adoc
deleted file mode 100644
index 416666a..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_spi_ContentMappingService.adoc
+++ /dev/null
@@ -1,102 +0,0 @@
-[[_rgsvc_spi_ContentMappingService]]
-= `ContentMappingService`
-: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 `ContentMappingService` supports the (default implementation of the)
-xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`] allowing the
-xref:../ugvro/ugvro.adoc#[RestfulObjects viewer] to allow domain objects to be transformed into some other format as specified
-by the HTTP `Accept` header.
-
-See xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`] for further discussion.
-
-
-[NOTE]
-====
-Unlike most other domain services, the framework (that is, `ContentNegotiationService`) will check _all_ available
-implementations of `ContentMappingService` to convert the domain object to the requested media type, rather than merely
-the first implementation found; in other words it uses the chain-of-responsibility pattern. Services are checked
-in the ordering defined by xref:../rgant/rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`]).
-The mapped object used will be the first non-`null` result returned by an implementation.
-====
-
-
-
-== SPI
-
-The SPI defined by this service is:
-
-[source,java]
-----
-public interface ContentMappingService {
- Object map(Object object, // <1>
- List<MediaType> acceptableMediaTypes); // <2>
-}
-
-----
-<1> typically the input is a domain object (whose structure might change over time), and the output is a DTO (whose structure is guaranteed to be preserved over time)
-<2> as per the caller's HTTP `Accept` header
-
-
-In versions prior to `v1.12.0`, this interface resided in a different package, internal to the
-xref:../ugvro/ugvro.adoc#[Restful Objects] viewer, and defined a slightly different signature that used an internal enum:
-
-[source,java]
-----
-public interface ContentMappingService {
- Object map(Object object,
- List<MediaType> acceptableMediaTypes,
- RepresentationType representationType); // <1>
-
-}
-
-----
-<1> enum representing the requested representation; only ever take a value of ``DOMAIN_OBJECT`` or ``ACTION_RESULT``.
-
-
-
-== Implementations
-
-No default implementations are provided by Apache Isis framework itself.
-
-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:
-
-[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;
- }
- ...
-}
-----
-
-
-
-
-== Related Services
-
-This service is a companion to the default implementation of the xref:../rgfis/rgfis.adoc#_rgfis_spi_ContentNegotiationService[`ContentNegotiationService`].
\ No newline at end of file