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/03/08 00:19:37 UTC
[2/3] isis-site git commit: ISIS-993: layouts
http://git-wip-us.apache.org/repos/asf/isis-site/blob/e106aba4/content/guides/rgsvc.html
----------------------------------------------------------------------
diff --git a/content/guides/rgsvc.html b/content/guides/rgsvc.html
index 22abd06..10d1baf 100644
--- a/content/guides/rgsvc.html
+++ b/content/guides/rgsvc.html
@@ -870,6 +870,22 @@ SpecificationProvider</code></a>.</p>
<td class="tableblock halign-left valign-top"><div></div></td>
</tr>
<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_api_LayoutService"><code>o.a.i.applib.</code><br>
+<code>services.layout</code><br>
+<code>LayoutService</code></a></p></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>(<code>1.12.0-SNAPSHOT</code>) Provides the ability to download dynamic layout XML files, in various styles.</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>LayoutServiceDefault</code><br>
+<code>o.a.i.core</code><br>
+<code>isis-core-metamodel</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>Functionality surfaced in the UI through related mixin and menu.</p>
+</div></div></td>
+</tr>
+<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_api_MementoService"><code>o.a.i.applib.</code><br>
<code>services.memento</code><br>
<code>MementoService</code></a></p></td>
@@ -1188,7 +1204,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
<p>When an action is invoked in this way, this service allows each object instance to "know where it is" in the collection; it acts a little like an iterator. In particular, an object can determine if it is the last object to be called, and so can perform special processing, eg to return a summary calculated result.</p>
</div>
<div class="sect3">
-<h4 id="_api">2.2.1. API</h4>
+<h4 id="_api_implementation_2">2.2.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by the service is:</p>
</div>
@@ -1322,7 +1338,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
implementation of this class depends on the configured <code>BackgroundCommandService</code> (in order to query for the persisted (background) <code>Command</code>s.</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_2">2.3.1. API & Implementation</h4>
+<h4 id="_api_implementation_3">2.3.1. API & Implementation</h4>
<div class="paragraph">
<p>Returns a proxy around the object which is then used to obtain the signature of the action to be invoked in the background.</p>
</div>
@@ -1685,7 +1701,7 @@ org.quartz.plugin.jobInitializer.failOnFileNotFound = true</code></pre>
</table>
</div>
<div class="sect3">
-<h4 id="_api_implementation_3">2.4.1. API & Implementation</h4>
+<h4 id="_api_implementation_4">2.4.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by <code>BookmarkService</code> is:</p>
</div>
@@ -1800,7 +1816,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
<p>Therefore it’s common to provide a domain service whose responsibility is to provide the current time. This service can be injected into any domain object (and can be mocked out for unit testing). Apache Isis provides such a facade through the <code>ClockService</code>.</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_4">2.5.1. API & Implementation</h4>
+<h4 id="_api_implementation_5">2.5.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by <code>ClockService</code> is:</p>
</div>
@@ -1970,7 +1986,7 @@ instead subclass from <code>o.a.i.applib.clock.Clock</code> singleton (as descri
</div>
</div>
<div class="sect3">
-<h4 id="_api_implementation_5">2.6.2. API & Implementation</h4>
+<h4 id="_api_implementation_6">2.6.2. API & Implementation</h4>
<div class="paragraph">
<p>The <code>CommandContext</code> request-scoped service defines the following very simple API:</p>
</div>
@@ -2229,7 +2245,7 @@ view model.</p>
<p>A typical use case is to generate a clickable link for rendering in an email, PDF, tweet or other communication.</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_6">2.7.1. API & Implementation</h4>
+<h4 id="_api_implementation_7">2.7.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by <code>DeepLinkService</code> is:</p>
</div>
@@ -2949,7 +2965,7 @@ implementation of <code>DomainObjectContainer</code> service is automatically re
<p>Apache Isis provides a default implementation to send emails using an external SMTP provider. Note that this must be configured (using a number of configuration properties) before it can be used. The that sends email as an HTML message, using an external SMTP provider.</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_7">2.9.1. API & Implementation</h4>
+<h4 id="_api_implementation_8">2.9.1. API & Implementation</h4>
<div class="paragraph">
<p>The API for the service is:</p>
</div>
@@ -3632,7 +3648,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</table>
</div>
<div class="sect3">
-<h4 id="_api_implementation_8">2.11.1. API & Implementation</h4>
+<h4 id="_api_implementation_9">2.11.1. API & Implementation</h4>
<div class="paragraph">
<p>The API for the service is:</p>
</div>
@@ -3693,7 +3709,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</table>
</div>
<div class="sect3">
-<h4 id="_api_implementation_9">2.12.1. API & Implementation</h4>
+<h4 id="_api_implementation_10">2.12.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by this service is:</p>
</div>
@@ -3785,7 +3801,7 @@ action annotated with <a href="rgant.html#_rgant_HomePage"><code>@HomePage</code
of that service (and may be useful for other use cases).</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_10">2.13.1. API & Implementation</h4>
+<h4 id="_api_implementation_11">2.13.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by <code>HomePageProviderService</code> is:</p>
</div>
@@ -4202,7 +4218,7 @@ a persistent entity). The enum indicates whether these schemas should be includ
<p>This service is provided as a convenience for applications, but is also used internally by the framework to
<a href="rgant.html#_rgant-XmlRootElement"><code>@XmlRootElement</code></a>-annotated
<a href="ugbtb.html#_ugbtb_view-models">view models</a>. The functionality to download XML and XSD schemas is also
-exposed in the UI through mixins to <a href="rgcms.html#_rgcms_classes_roles_Dto"><code>Dto</code></a> interface.</p>
+exposed in the UI through mixins to <a href="rgcms.html#_rgcms_classes_mixins_Dto"><code>Dto</code></a> interface.</p>
</div>
</div>
<div class="sect3">
@@ -4221,7 +4237,142 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_MementoService">2.16. <code>MementoService</code></h3>
+<h3 id="_rgsvc_api_LayoutService">2.16. <code>LayoutService</code> (<code>1.12.0-SNAPSHOT</code>)</h3>
+<div class="paragraph">
+<p>The <code>LayoutService</code> provides the ability to obtain the XML layout for a single domain object or for all domain
+objects. This functionality is surfaced through the user interface through a related <a href="#_rgsvc_api_LayoutService_related-mixins-and-menus">mixin and menu action</a>.</p>
+</div>
+<div class="sect3">
+<h4 id="_rgsvc_api_LayoutService_api-and-implementation">2.16.1. API & Implementation</h4>
+<div class="paragraph">
+<p>The API defined by <code>LayoutService</code> is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">interface</span> <span class="class">LayoutService</span> {
+ <span class="predefined-type">String</span> toXml(<span class="predefined-type">Class</span><?> domainClass, <span class="predefined-type">Style</span> style); <i class="conum" data-value="1"></i><b>(1)</b>
+ <span class="type">byte</span><span class="type">[]</span> toZip(<span class="predefined-type">Style</span> style); <i class="conum" data-value="2"></i><b>(2)</b>
+}</code></pre>
+</div>
+</div>
+<div class="colist arabic">
+<table>
+<tr>
+<td><i class="conum" data-value="1"></i><b>1</b></td>
+<td>Returns the serialized XML form of the layout (grid) for the specified domain class, in specified style (discussed below).</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="2"></i><b>2</b></td>
+<td>Returns (a byte array) of a zip of the serialized XML of the layouts (grids), for all domain entities and view models.</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The <code>Style</code> enum is defined as:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="type">enum</span> <span class="predefined-type">Style</span> {
+ CURRENT,
+ COMPLETE,
+ NORMALIZED,
+ MINIMAL
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>CURRENT</code> style corresponds to the layout already loaded for the domain class, typically from an already persisted
+<code>layout.xml</code> file. The other three styles allow the developer to choose how much metadata is to be specified in the
+XML, and how much (if any) will be obtained elsewhere, typically from annotations in the metamodel (but also from
+<code>.layout.json</code> file if present). The table below summarises the choices:</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<caption class="title">Table 3. Table caption</caption>
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-bottom">Style</th>
+<th class="tableblock halign-center valign-bottom"><a href="rgant.html#_rgant_MemberGroupLayout"><code>@MemberGroupLayout</code></a></th>
+<th class="tableblock halign-center valign-bottom"><a href="rgant.html#_rgant_MemberOrder"><code>@MemberOrder</code></a></th>
+<th class="tableblock halign-center valign-bottom"><a href="rgant.html#_rgant_ActionLayout"><code>@ActionLayout</code></a>, <a href="rgant.html#_rgant_PropertyLayout"><code>@PropertyLayout</code></a>, <a href="rgant.html#_rgant_CollectionLayout"><code>@CollectionLayout</code></a></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-bottom"><p class="tableblock"><code>COMPLETE</code></p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">serialized as XML</p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">serialized as XML</p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">serialized as XML</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-bottom"><p class="tableblock"><code>NORMALIZED</code></p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">serialized as XML</p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">serialized as XML</p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">not in the XML</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-bottom"><p class="tableblock"><code>MINIMAL</code></p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">serialized as XML</p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">not in the XML</p></td>
+<td class="tableblock halign-center valign-bottom"><p class="tableblock">not in the XML</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>As a developer, you therefore have a choice as to how you provide the metadata required for customised layouts:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>if you want all layout metadata to be read from the <code>.layout.xml</code> file, then download the "complete" version, and copy the file alongside the domain class. You can then remove all <code>@MemberGroupLayout</code>, <code>@MemberOrder</code>, <code>@ActionLayout</code>, <code>@PropertyLayout</code> and <code>@CollectionLayout</code> annotations from the source code of the domain class.</p>
+</li>
+<li>
+<p>if you want to use layout XML file to describe the grid (columns, tabs etc) and specify which object members are associated with those regions of the grid, then download the "normalized" version. You can then remove the <code>@MemberGroupLayout</code> and <code>@MemberOrder</code> annotations from the source code of the domain class, but retain the <code>@ActionLayout</code>, <code>@PropertyLayout</code> and <code>@CollectionLayout</code> annotations.</p>
+</li>
+<li>
+<p>if you want to use layout XML file ONLY to describe the grid, then download the "minimal" version. The grid regions will be empty in this version, and the framework will use the <code>@MemberOrder</code> annotation to bind object members to those regions. The only annotation that can be safely removed from the source code with this style is the <code>@MemberGroupLayout</code> annotation.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_rgsvc_api_LayoutService_related-mixins-and-menus">2.16.2. Related Mixins and Menus</h4>
+<div class="paragraph">
+<p>The service’s functionality is exposed in the UI through a mixin (per object) and a menu action (for all objects):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>the <a href="rgant.html#_rgcms_classes_mixins_Object"><code>Object</code> mixin</a> provides the ability to download the XML layout for
+any domain object (entity or view model).</p>
+</li>
+<li>
+<p>the <code>LayoutServiceMenu</code> provides the ability to download all XML layouts as a single ZIP file (in any of the
+three styles).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The XML can then be copied into the codebase of the application, and annotations in the domain classes removed as
+desired.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_rgsvc_api_LayoutService_related-domain-services">2.16.3. Related Domain Services</h4>
+<div class="paragraph">
+<p>The <a href="#_rgsvc_spi_GridService"><code>GridService</code></a> is responsible for loading and normalizing layout XML for
+a domain class. It in turn uses the <a href="#_rgsvc_spi_GridLoaderService"><code>GridLoaderService</code></a> and <a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a>
+services.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_rgsvc_api_MementoService">2.17. <code>MementoService</code></h3>
<div class="paragraph">
<p>The <code>MementoService</code> was originally introduced to simplify the implementation of <a href="ugbtb.html#_ugbtb_view-models">ViewModel</a>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.</p>
</div>
@@ -4229,7 +4380,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
<p>However, it can also be used to create a memento of arbitrary objects. Indeed, it is used internally by the core implementation of <a href="#_rgsvc_api_BackgroundService"><code>BackgroundService</code></a> to capture the state of action invocations so that they can be executed by a background process.</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_11">2.16.1. API & Implementation</h4>
+<h4 id="_api_implementation_12">2.17.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by <code>MementoService</code> is:</p>
</div>
@@ -4328,7 +4479,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_usage_6">2.16.2. Usage</h4>
+<h4 id="_usage_6">2.17.2. Usage</h4>
<div class="paragraph">
<p>As noted in the introduction, a common use case for this service is in the implementation of the <a href="rgcms.html#_rgcms_classes_super_AbstractViewModel"><code>ViewModel</code></a> interface.</p>
</div>
@@ -4390,13 +4541,13 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_6">2.16.3. Related Services</h4>
+<h4 id="_related_services_6">2.17.3. Related Services</h4>
<div class="paragraph">
<p>The memento service is used by the <a href="#_rgsvc_api_CommandContext"><code>CommandContext</code></a> service and also <a href="#_rgsvc_spi_BackgroundCommandService"><code>BackgroundCommandService</code></a>. These both use a memento to capture a representation of an action invocation.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_8">2.16.4. Registering the Service</h4>
+<h4 id="_registering_the_service_8">2.17.4. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -4411,7 +4562,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_MetamodelService">2.17. <code>MetamodelService</code></h3>
+<h3 id="_rgsvc_api_MetamodelService">2.18. <code>MetamodelService</code></h3>
<div class="paragraph">
<p>The <code>MetaModelService</code> provides access (albeit currently extremely limited) to aspects of Apache Isis' internal metamodel.</p>
</div>
@@ -4419,7 +4570,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
<p>Currently this is limited to looking up the object type (as specified in <a href="rgant.html#_rgant-DomainObject_objectType"><code>@DomainObject#objectType()</code></a> and equivalent mechanisms, and as used in <a href="#_rgsvc_api_BookmarkService"><code>Bookmark</code></a>s and elsewhere) from an object’s class, and vice versa. In the future we expect other aspects of the metamodel to also be formally surfaced through this API.</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_12">2.17.1. API & Implementation</h4>
+<h4 id="_api_implementation_13">2.18.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by the service is:</p>
</div>
@@ -4447,7 +4598,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_9">2.17.2. Registering the Service</h4>
+<h4 id="_registering_the_service_9">2.18.2. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -4462,7 +4613,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_QueryResultsCache">2.18. <code>QueryResultsCache</code></h3>
+<h3 id="_rgsvc_api_QueryResultsCache">2.19. <code>QueryResultsCache</code></h3>
<div class="paragraph">
<p>The purpose of the <code>QueryResultsCache</code> is to improve response times to the user, by providing a short-term (<a href="../../more-advanced-topics/how-to-09-020-How-to-write-a-typical-domain-service.html">request-scoped</a>) cache of the value of some (safe or idempotent) method call. This will typically be as the result of running a query, but could be any expensive operation.</p>
</div>
@@ -4484,7 +4635,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</table>
</div>
<div class="sect3">
-<h4 id="_api_implementation_13">2.18.1. API & Implementation</h4>
+<h4 id="_api_implementation_14">2.19.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by <code>QueryResultsCache</code> is:</p>
</div>
@@ -4526,7 +4677,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_usage_7">2.18.2. Usage</h4>
+<h4 id="_usage_7">2.19.2. Usage</h4>
<div class="paragraph">
<p>Suppose that there’s a <code>TaxService</code> that calculates tax on <code>Taxable</code> items, with respect to some <code>TaxType</code>, and for a given <code>LocalDate</code>. To calculate tax it must run a database query and then perform some additional calculations.</p>
</div>
@@ -4587,7 +4738,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_10">2.18.3. Registering the Service</h4>
+<h4 id="_registering_the_service_10">2.19.3. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -4601,19 +4752,19 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_7">2.18.4. Related Services</h4>
+<h4 id="_related_services_7">2.19.4. Related Services</h4>
<div class="paragraph">
<p>The <a href="#_rgsvc_api_Scratchpad"><code>Scratchpad</code></a> service is also intended for actions that are called many times, allowing arbitrary information to be shared between them. Those methods could be called from some outer loop in domain code, or by the framework itself if the action invoked has the <a href="rgant.html#_rgant-Action_invokeOn"><code>@Action#invokeOn()</code></a> annotation attribute set to <code>OBJECT_AND_COLLECTION</code> or <code>COLLECTION_ONLY</code>.</p>
</div>
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_Scratchpad">2.19. <code>Scratchpad</code></h3>
+<h3 id="_rgsvc_api_Scratchpad">2.20. <code>Scratchpad</code></h3>
<div class="paragraph">
<p>The <code>Scratchpad</code> service is a <a href="../../more-advanced-topics/how-to-09-020-How-to-write-a-typical-domain-service.html">request-scoped</a> service to allow objects to exchange information even if they do not directly call each other.</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_14">2.19.1. API & Implementation</h4>
+<h4 id="_api_implementation_15">2.20.1. API & Implementation</h4>
<div class="paragraph">
<p>The API of <code>Scratchpad</code> service is:</p>
</div>
@@ -4635,7 +4786,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_usage_8">2.19.2. Usage</h4>
+<h4 id="_usage_8">2.20.2. Usage</h4>
<div class="paragraph">
<p>The most common use-case is for <a href="rgant.html#_rgant-Action_invokeOn">bulk</a> actions that act upon multiple objects in a list. The (same) <code>Scratchpad</code> service is injected into each of these objects, and so they can use pass information.</p>
</div>
@@ -4725,7 +4876,7 @@ Scratchpad scratchpad;</code></pre>
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_11">2.19.3. Registering the Service</h4>
+<h4 id="_registering_the_service_11">2.20.3. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -4739,7 +4890,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_8">2.19.4. Related Services</h4>
+<h4 id="_related_services_8">2.20.4. Related Services</h4>
<div class="paragraph">
<p>The <a href="#_rgsvc_api_ActionInteractionContext"><code>ActionInteractionContext</code></a> service allows <a href="rgant.html#_rgant-Action_invokeOn">bulk actions</a> to co-ordinate with each other.</p>
</div>
@@ -4749,13 +4900,13 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_SudoService">2.20. <code>SudoService</code></h3>
+<h3 id="_rgsvc_api_SudoService">2.21. <code>SudoService</code></h3>
<div class="paragraph">
<p>The <code>SudoService</code> allows the current user reported by the <code>DomainObjectContainer</code> to be temporarily changed to some
other user. This is useful both for <a href="ugtst.html#_ugtst_integ-test-support">integration testing</a> (eg if testing a workflow system whereby objects are moved from one user to another) and while running <a href="ugtst.html#_ugtst_fixture-scripts">fixture scripts</a> (eg setting up objects that would normally require several users to have acted upon the objects).</p>
</div>
<div class="sect3">
-<h4 id="_api_implementation_15">2.20.1. API & Implementation</h4>
+<h4 id="_api_implementation_16">2.21.1. API & Implementation</h4>
<div class="paragraph">
<p>The API provided by the service is:</p>
</div>
@@ -4782,7 +4933,7 @@ other user. This is useful both for <a href="ugtst.html#_ugtst_integ-test-suppor
</div>
</div>
<div class="sect3">
-<h4 id="_usage_9">2.20.2. Usage</h4>
+<h4 id="_usage_9">2.21.2. Usage</h4>
<div class="paragraph">
<p>A good example can be found in the (non-ASF) <a href="http://github.com/isisaddons/isis-app-todoapp">Isis addons' todoapp</a> which uses the <code>SudoService</code> in a fixture script to set up <code>ToDoItem</code> objects:</p>
</div>
@@ -4803,7 +4954,7 @@ other user. This is useful both for <a href="ugtst.html#_ugtst_integ-test-suppor
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_12">2.20.3. Registering the Service</h4>
+<h4 id="_registering_the_service_12">2.21.3. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -4818,7 +4969,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_SwaggerService">2.21. <code>SwaggerService</code></h3>
+<h3 id="_rgsvc_api_SwaggerService">2.22. <code>SwaggerService</code></h3>
<div class="paragraph">
<p>The <code>SwaggerService</code> generates <a href="http://swagger.io/">Swagger</a> spec files to describe the public and/or private RESTful APIs exposed by the <a href="ugvro.html">RestfulObjects viewer</a>.</p>
</div>
@@ -4840,7 +4991,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</table>
</div>
<div class="sect3">
-<h4 id="_rgsvc_api_SwaggerService_api-and-implementation">2.21.1. API & Implementation</h4>
+<h4 id="_rgsvc_api_SwaggerService_api-and-implementation">2.22.1. API & Implementation</h4>
<div class="paragraph">
<p>The API defined by <code>SwaggerService</code> is:</p>
</div>
@@ -4886,13 +5037,13 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_usage_within_the_framework_3">2.21.2. Usage within the framework</h4>
+<h4 id="_usage_within_the_framework_3">2.22.2. Usage within the framework</h4>
<div class="paragraph">
<p>This service is provided as a convenience for applications, it is not (currently) used by the framework itself.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_13">2.21.3. Registering the Service</h4>
+<h4 id="_registering_the_service_13">2.22.3. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -4900,7 +5051,7 @@ implementation of <code>SwaggerService</code> service is automatically registere
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_9">2.21.4. Related Services</h4>
+<h4 id="_related_services_9">2.22.4. Related Services</h4>
<div class="paragraph">
<p>A <code>SwaggerServiceMenu</code> domain service provides a prototype action that enables the swagger spec to be downloaded from the Wicket viewer’s UI.</p>
</div>
@@ -4910,7 +5061,7 @@ implementation of <code>SwaggerService</code> service is automatically registere
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_WrapperFactory">2.22. <code>WrapperFactory</code></h3>
+<h3 id="_rgsvc_api_WrapperFactory">2.23. <code>WrapperFactory</code></h3>
<div class="paragraph">
<p>The <code>WrapperFactory</code> provides the ability to enforce business rules for programmatic interactions between domain objects. If there is a (lack-of-) trust boundary between the caller and callee — eg if they reside in different modules — then the wrapper factory is a useful mechanism to ensure that any business constraints defined by te callee are honoured.</p>
</div>
@@ -4938,7 +5089,7 @@ implementation of <code>SwaggerService</code> service is automatically registere
<p>This capability is frequently used within <a href="ugtst.html#_ugtst_integ-test-support">integration tests</a>, but can also be used in production code. (There are analogies that can be drawn here with the way that JEE beans can interact through an EJB local interface).</p>
</div>
<div class="sect3">
-<h4 id="_api_2">2.22.1. API</h4>
+<h4 id="_api">2.23.1. API</h4>
<div class="paragraph">
<p>The API provided by the service is:</p>
</div>
@@ -5047,7 +5198,7 @@ implementation of <code>SwaggerService</code> service is automatically registere
</div>
</div>
<div class="sect3">
-<h4 id="_usage_10">2.22.2. Usage</h4>
+<h4 id="_usage_10">2.23.2. Usage</h4>
<div class="paragraph">
<p>The caller will typically obtain the target object (eg from some repository) and then use the injected <code>WrapperFactory</code> to wrap it before interacting with it.</p>
</div>
@@ -5106,7 +5257,7 @@ implementation of <code>SwaggerService</code> service is automatically registere
</div>
</div>
<div class="sect3">
-<h4 id="_listener_api">2.22.3. Listener API</h4>
+<h4 id="_listener_api">2.23.3. Listener API</h4>
<div class="paragraph">
<p>The <code>WrapperFactory</code> also provides a listener API to allow other services to listen in on interactions.</p>
</div>
@@ -5150,7 +5301,7 @@ implementation of <code>SwaggerService</code> service is automatically registere
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_14">2.22.4. Registering the Service</h4>
+<h4 id="_registering_the_service_14">2.23.4. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -5165,7 +5316,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_api_XmlSnapshotService">2.23. <code>XmlSnapshotService</code></h3>
+<h3 id="_rgsvc_api_XmlSnapshotService">2.24. <code>XmlSnapshotService</code></h3>
<div class="paragraph">
<p>The <code>XmlSnapshotService</code> provides the capability to generate XML snapshots (and if required corresponding XSD schemas) based on graphs of domain objects.</p>
</div>
@@ -5182,7 +5333,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
<p>The core framework provides an implementation of this service (<code>o.a.i.core.runtime.services.xmlsnapshot.XmlSnapshotServiceDefault</code>).</p>
</div>
<div class="sect3">
-<h4 id="_standard_api">2.23.1. Standard API</h4>
+<h4 id="_standard_api">2.24.1. Standard API</h4>
<div class="paragraph">
<p>The (basic) API of <code>XmlSnapshotService</code> is:</p>
</div>
@@ -5228,7 +5379,7 @@ Element customerXsd = snapshot.getXsdElement();</code></pre>
</div>
</div>
<div class="sect3">
-<h4 id="_builder_api">2.23.2. Builder API</h4>
+<h4 id="_builder_api">2.24.2. Builder API</h4>
<div class="paragraph">
<p>The contents of the snapshot can be adjusted by including "paths" to other references or collections. To do this, the
builder is used. The API for this is:</p>
@@ -5312,7 +5463,7 @@ product of every order:</p>
</div>
</div>
<div class="sect3">
-<h4 id="_automatic_inclusions">2.23.3. Automatic inclusions</h4>
+<h4 id="_automatic_inclusions">2.24.3. Automatic inclusions</h4>
<div class="paragraph">
<p>If the domain object being snapshotted implements the <code>SnapshottableWithInclusions</code> interace, then this moves the
responsibility for determining what is included within the snapshot from the caller to the snapshottable object itself:</p>
@@ -5346,7 +5497,7 @@ responsibility for determining what is included within the snapshot from the cal
</div>
</div>
<div class="sect3">
-<h4 id="_convenience_api">2.23.4. Convenience API</h4>
+<h4 id="_convenience_api">2.24.4. Convenience API</h4>
<div class="paragraph">
<p>The <code>XmlSnapshotService</code> also provides some API for simply manipulating XML:</p>
</div>
@@ -5389,7 +5540,7 @@ responsibility for determining what is included within the snapshot from the cal
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_15">2.23.5. Registering the Service</h4>
+<h4 id="_registering_the_service_15">2.24.5. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -5403,7 +5554,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_10">2.23.6. Related Services</h4>
+<h4 id="_related_services_10">2.24.6. Related Services</h4>
<div class="paragraph">
<p>The <a href="#_rgsvc_api_BookmarkService"><code>BookmarkService</code></a> provides a mechanism for obtaining a string representations of a single domain object.</p>
</div>
@@ -5438,7 +5589,7 @@ standard JAXB functionality for generating both XMLs and XSDs from JAXB-annotate
<p>The table below lists the SPIs that are defined in the Isis applib (<code>o.a.i.core:isis-core-applib</code> module).</p>
</div>
<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 3. Applib SPI Services</caption>
+<caption class="title">Table 4. Applib SPI Services</caption>
<colgroup>
<col style="width: 25%;">
<col style="width: 50%;">
@@ -5570,6 +5721,56 @@ a configured <code>EmailService</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Extensible using composite pattern if required</p></td>
</tr>
<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_spi_FixtureScriptsSpecificationProvider"><code>o.a.i.applib.</code><br>
+<code>services.fixturespec</code><br>
+<code>FixtureScripts-</code><br>
+<code>SpecificationProvider</code></a></p></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>Provides settings for <a href="#_rgsvc_api_FixtureScriptsDefault"><code>FixtureScriptsDefault</code></a> fallback domain service for executing fixture scripts.</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_spi_GridSystemService"><code>o.a.i.applib.</code><br>
+<code>services.grid</code><br>
+<code>GridSystemService</code></a></p></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>(<code>1.12.0-SNAPSHOT</code>) Validates and normalizes the grid layout for a domain class (with respect to a particular grid
+system such as Bootstrap3), also providing a default grid (for those domain classes where there is no grid layout).</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>GridSystemServiceBS3</code><br>
+<code>o.a.i.core</code><br>
+<code>isis-core-metamodel</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_spi_GridLoaderService"><code>o.a.i.applib.</code><br>
+<code>services.grid</code><br>
+<code>GridLoaderService</code></a></p></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>(<code>1.12.0-SNAPSHOT</code>) Responsible for loading a grid layout for a domain class, eg from a <code>layout.xml</code> file.</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>GridLoaderServiceDefault</code><br>
+<code>o.a.i.core</code><br>
+<code>isis-core-metamodel</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_spi_GridService"><code>o.a.i.applib.</code><br>
+<code>services.grid</code><br>
+<code>GridService</code></a></p></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>(<code>1.12.0-SNAPSHOT</code>) A facade on top of both <a href="#_rgsvc_spi_GridLoaderService"><code>GridLoaderService</code></a> and
+<a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a>, thus being able to return normalized
+grids for any domain class.</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>GridServiceDefault</code><br>
+<code>o.a.i.core</code><br>
+<code>isis-core-metamodel</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_spi_LocaleProvider"><code>o.a.i.applib.</code><br>
<code>services.i18n</code><br>
<code>LocaleProvider</code></a></p></td>
@@ -5582,17 +5783,6 @@ a configured <code>EmailService</code></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_spi_FixtureScriptsSpecificationProvider"><code>o.a.i.applib.</code><br>
-<code>services.fixturespec</code><br>
-<code>FixtureScripts-</code><br>
-<code>SpecificationProvider</code></a></p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>Provides settings for <a href="#_rgsvc_api_FixtureScriptsDefault"><code>FixtureScriptsDefault</code></a> fallback domain service for executing fixture scripts.</p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgsvc_spi_PublishingService"><code>o.a.i.applib.</code><br>
<code>services.publish</code><br>
<code>PublishingService</code></a></p></td>
@@ -5722,7 +5912,7 @@ a configured <code>EmailService</code></p></td>
</table>
</div>
<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 4. "Internal" SPI Services</caption>
+<caption class="title">Table 5. "Internal" SPI Services</caption>
<colgroup>
<col style="width: 30%;">
<col style="width: 30%;">
@@ -7246,7 +7436,7 @@ implementations provided by the framework (<code>DomainObjectContainerDefault</c
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_FixtureScriptsSpecificationProvider">3.11. <code>FixtureScriptsSpecificationProvider</code></h3>
+<h3 id="_rgsvc_spi_FixtureScriptsSpecificationProvider">3.11. <code>FixtureScriptsSpec’nProvider</code></h3>
<div class="paragraph">
<p>The <code>FixtureScriptsSpecificationProvider</code> configures the
<a href="#_rgsvc_api_FixtureScriptsDefault"><code>FixtureScriptsDefault</code></a> domain service, providing the
@@ -7331,7 +7521,265 @@ primary benefit (apart from decoupling responsibilities) is that it ensures that
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_LocaleProvider">3.12. <code>LocaleProvider</code></h3>
+<h3 id="_rgsvc_spi_GridSystemService">3.12. <code>GridSystemService</code> (<code>1.12.0-SNAPSHOT</code>)</h3>
+<div class="paragraph">
+<p>The <code>GridSystemService</code> 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.</p>
+</div>
+<div class="paragraph">
+<p>In theory there can be multiple implementations of this service, one per concrete subclass of the applib <code>Grid</code> class. Each concrete implementation requires Wicket viewer components capable of interpreting the grid layout.</p>
+</div>
+<div class="paragraph">
+<p>The framework provides a single such grid implementation, namely for Bootstrap3.</p>
+</div>
+<div class="sect3">
+<h4 id="_spi_12">3.12.1. SPI</h4>
+<div class="paragraph">
+<p>The SPI defined by this service is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">interface</span> <span class="class">GridSystemService</span><G <span class="directive">extends</span> Grid> {
+ <span class="predefined-type">Class</span><? <span class="directive">extends</span> Grid> gridImplementation(); <i class="conum" data-value="1"></i><b>(1)</b>
+ <span class="predefined-type">String</span> tns(); <i class="conum" data-value="2"></i><b>(2)</b>
+ <span class="predefined-type">String</span> schemaLocation(); <i class="conum" data-value="3"></i><b>(3)</b>
+ Grid defaultGrid(<span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="4"></i><b>(4)</b>
+ <span class="type">void</span> normalize(G grid, <span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="5"></i><b>(5)</b>
+ <span class="type">void</span> complete(G grid, <span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="6"></i><b>(6)</b>
+ <span class="type">void</span> minimal(G grid, <span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="7"></i><b>(7)</b>
+}</code></pre>
+</div>
+</div>
+<div class="colist arabic">
+<table>
+<tr>
+<td><i class="conum" data-value="1"></i><b>1</b></td>
+<td>The concrete subclass of <code>Grid</code> 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 <a href="rgant.html#_rgant_DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> takes precedence.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="2"></i><b>2</b></td>
+<td>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 <code><a href="http://isis.apache.org/applib/layout/grid/bootstrap3" class="bare">http://isis.apache.org/applib/layout/grid/bootstrap3</a></code>.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="3"></i><b>3</b></td>
+<td>the schema location for the XSD. The Bootstrap3 grid system provided by the framework returns the value <code><a href="http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd" class="bare">http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd</a></code>.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="4"></i><b>4</b></td>
+<td>a default grid, eg two columns in ratio 4:8. Used when no existing grid layout exists for a domain class.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="5"></i><b>5</b></td>
+<td>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 <a href="rgant.html#_rgant_MemberOrder"><code>@MemberOrder</code></a> annotation. Such a grid, if persisted as the layout XML file for the domain class, allows the
+<code>@MemberOrder</code> annotation to be removed from the source code of the domain class (but other annotations must be retained).</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="6"></i><b>6</b></td>
+<td>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 (<a href="rgant.html#_rgant_ActionLayout"><code>@ActionLayout</code></a>, <a href="rgant.html#_rgant_PropertyLayout"><code>@PropertyLayout</code></a> and <a href="rgant.html#_rgant_CollectionLayout"><code>@CollectionLayout</code></a>) to be removed from the source code of the domain class.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="7"></i><b>7</b></td>
+<td>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 <a href="rgant.html#_rgant_MemberOrder"><code>@MemberOrder</code></a> annotation is retained in the source code of said class in order to bind members to the regions of the grid.</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_implementation_11">3.12.2. Implementation</h4>
+<div class="paragraph">
+<p>The framework provides <code>GridSystemServiceBS3</code>, an implementation that encodes the bootstrap3 grid system. (The framework
+also provides <a href="#ugvw.adoc">Wicket viewer</a> components that are capable of interpreting and rendering this metadata).</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_registering_the_services_16">3.12.3. Registering the Services</h4>
+<div class="paragraph">
+<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
+<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), then the
+ Bootstrap3 default implementation of <code>GridSystemService</code> is automatically registered and injected, and no further
+ configuration is required.</p>
+</div>
+<div class="paragraph">
+<p>To use an alternative implementation, use
+<a href="rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained
+further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-implementations">"how to"</a> tip).</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_related_services_18">3.12.4. Related Services</h4>
+<div class="paragraph">
+<p>This service is used by <a href="#_rgsvc_spi_GridService"><code>GridService</code></a>.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_rgsvc_spi_GridLoaderService">3.13. <code>GridLoaderService</code> (<code>1.12.0-SNAPSHOT</code>)</h3>
+<div class="paragraph">
+<p>The <code>GridLoaderService</code> provides the ability to load the XML layout (grid) for a domain class.</p>
+</div>
+<div class="sect3">
+<h4 id="_spi_13">3.13.1. SPI</h4>
+<div class="paragraph">
+<p>The SPI defined by this service is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">interface</span> <span class="class">GridLoaderService</span> {
+ <span class="type">boolean</span> existsFor(<span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="1"></i><b>(1)</b>
+ Grid load(<span class="directive">final</span> <span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="2"></i><b>(2)</b>
+}</code></pre>
+</div>
+</div>
+<div class="colist arabic">
+<table>
+<tr>
+<td><i class="conum" data-value="1"></i><b>1</b></td>
+<td>whether any persisted layout metadata (eg a <code>.layout.xml</code> file) exists for this domain class.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="2"></i><b>2</b></td>
+<td>returns a new instance of a <a href="rgcms.html#_rgcms_classes_layout_component"><code>Grid</code></a> for the specified domain class, eg as loaded from a <code>layout.xml</code> file. If none exists, will return null (and the calling <a href="#_rgsvc_spi_GridService"><code>GridService</code></a> will use <a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a> to obtain a default grid for the domain class).</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_implementation_12">3.13.2. Implementation</h4>
+<div class="paragraph">
+<p>The framework provides a default implementation of this service, namely <code>GridLoaderServiceDefault</code>. This implementation
+loads the grid from its serialized representation as a <code>.layout.xml</code> file, loaded from the classpath.</p>
+</div>
+<div class="paragraph">
+<p>For example, the layout for a domain class <code>com.mycompany.myapp.Customer</code> would be loaded from <code>com/mycompany/myapp/Customer.layout.xml</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_registering_the_services_17">3.13.3. Registering the Services</h4>
+<div class="paragraph">
+<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
+<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), then the
+ default implementation of <code>GridLoaderService</code> is automatically registered and injected, and no further
+ configuration is required.</p>
+</div>
+<div class="paragraph">
+<p>To use an alternative implementation, use
+<a href="rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained
+further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-implementations">"how to"</a> tip).</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_related_services_19">3.13.4. Related Services</h4>
+<div class="paragraph">
+<p>This service is used by <a href="#_rgsvc_spi_GridService"><code>GridService</code></a>.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_rgsvc_spi_GridService">3.14. <code>GridService</code> (<code>1.12.0-SNAPSHOT</code>)</h3>
+<div class="paragraph">
+<p>The <code>GridService</code> provides the ability to load the XML layout (grid) for a domain class. To do this it delegates:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>to <a href="#_rgsvc_spi_GridLoaderService"><code>GridLoaderService</code></a> to load a pre-existing layout for the domain class, if possible</p>
+</li>
+<li>
+<p>to <a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a> 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.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Once a grid has been loaded for a domain class, this is cached internally by Apache Isis' internal meta model (in the
+<code>GridFacet</code> 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.</p>
+</div>
+<div class="sect3">
+<h4 id="_spi_14">3.14.1. SPI</h4>
+<div class="paragraph">
+<p>The SPI defined by this service is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">interface</span> <span class="class">GridService</span> {
+ <span class="type">boolean</span> existsFor(<span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="1"></i><b>(1)</b>
+ Grid load(<span class="directive">final</span> <span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="2"></i><b>(2)</b>
+ Grid defaultGridFor(<span class="predefined-type">Class</span><?> domainClass); <i class="conum" data-value="3"></i><b>(3)</b>
+ Grid normalize(<span class="directive">final</span> Grid grid); <i class="conum" data-value="4"></i><b>(4)</b>
+ Grid complete(Grid grid); <i class="conum" data-value="5"></i><b>(5)</b>
+ Grid minimal(Grid grid); <i class="conum" data-value="6"></i><b>(6)</b>
+}</code></pre>
+</div>
+</div>
+<div class="colist arabic">
+<table>
+<tr>
+<td><i class="conum" data-value="1"></i><b>1</b></td>
+<td>whether any persisted layout metadata (eg a <code>.layout.xml</code> file) exists for this domain class. Just delegates to corresponding method in <a href="#_rgsvc_spi_GridLoaderService"><code>GridLoaderService</code></a>.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="2"></i><b>2</b></td>
+<td>returns a new instance of a <a href="rgcms.html#_rgcms_classes_layout_component"><code>Grid</code></a> for the specified domain class, eg as loaded from a <code>layout.xml</code> file. If none exists, will return null (and the calling <a href="#_rgsvc_spi_GridService"><code>GridService</code></a> will use <a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a> to obtain a default grid for the domain class).</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="3"></i><b>3</b></td>
+<td>returns a default grid, eg two columns in ratio 4:8. Used when no existing grid layout exists for a domain class.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="4"></i><b>4</b></td>
+<td>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 <a href="rgant.html#_rgant_MemberOrder"><code>@MemberOrder</code></a> annotation. Such a grid, if persisted as the layout XML file for the domain class, allows the <code>@MemberOrder</code> annotation to be removed from the source code of the domain class (but other annotations must be retained).</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="5"></i><b>5</b></td>
+<td>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 (<a href="rgant.html#_rgant_ActionLayout"><code>@ActionLayout</code></a>, <a href="rgant.html#_rgant_PropertyLayout"><code>@PropertyLayout</code></a> and <a href="rgant.html#_rgant_CollectionLayout"><code>@CollectionLayout</code></a>) to be removed from the source code of the domain class.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="6"></i><b>6</b></td>
+<td>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 <a href="rgant.html#_rgant_MemberOrder"><code>@MemberOrder</code></a> annotation is retained in the source code of said class in order to bind members to the regions of the grid.</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The first two methods just delegate to the corresponding methods in <a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a>, while the last four delegate to the corresponding method in <a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a>. The service inspects the <code>Grid</code>'s concrete class to determine which actual <code>GridSystemService</code> instance to delegate to.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_implementation_13">3.14.2. Implementation</h4>
+<div class="paragraph">
+<p>The framework provides a default implementation of this service, namely <code>GridServiceDefault</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_registering_the_services_18">3.14.3. Registering the Services</h4>
+<div class="paragraph">
+<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
+<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), then the
+ default implementation of <code>GridLoaderService</code> is automatically registered and injected, and no further
+ configuration is required.</p>
+</div>
+<div class="paragraph">
+<p>To use an alternative implementation, use
+<a href="rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained
+further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-implementations">"how to"</a> tip).
+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 <code>GridLoaderService</code> or the <code>GridSystemService</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_related_services_20">3.14.4. Related Services</h4>
+<div class="paragraph">
+<p>This service calls <a href="#_rgsvc_spi_GridLoaderService"><code>GridLoaderService</code></a> and <a href="#_rgsvc_spi_GridSystemService"><code>GridSystemService</code></a>.</p>
+</div>
+<div class="paragraph">
+<p>This service is called by <a href="#_rgsvc_api_LayoutService"><code>LayoutService</code></a>, exposed in the UI through <code>LayoutServiceMenu</code> (to download the layout XML as a zip file for all domain objects) and the <a href="rgcms.html#_rgcms_classes_mixins_Object"><code>downloadLayoutXml()</code></a> mixin (to download the layout XML for a single domain
+object).</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_rgsvc_spi_LocaleProvider">3.15. <code>LocaleProvider</code></h3>
<div class="paragraph">
<p>The <code>LocaleProvider</code> service is one of the services that work together to implement Apache Isis' support for i18n, being used by Isis' default implementation of <a href="#_rgsvc_spi_TranslationService"><code>TranslationService</code></a>.</p>
</div>
@@ -7353,7 +7801,7 @@ primary benefit (apart from decoupling responsibilities) is that it ensures that
</table>
</div>
<div class="sect3">
-<h4 id="_spi_12">3.12.1. SPI</h4>
+<h4 id="_spi_15">3.15.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -7370,7 +7818,7 @@ primary benefit (apart from decoupling responsibilities) is that it ensures that
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_11">3.12.2. Implementation</h4>
+<h4 id="_implementation_14">3.15.2. Implementation</h4>
<div class="paragraph">
<p>Isis' <a href="ugvw.html">Wicket viewer</a> provides an implementation of this service (<code>LocaleProviderWicket</code>) which leverages Apache Wicket APIs.</p>
</div>
@@ -7390,10 +7838,10 @@ primary benefit (apart from decoupling responsibilities) is that it ensures that
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_services_16">3.12.3. Registering the Services</h4>
+<h4 id="_registering_the_services_19">3.15.3. Registering the Services</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
-<code>AppManifest</code> to <a href="rgcms.html#<em>rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), _and</em> that the
+<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), <em>and</em> that the
<a href="ugvw.html">Wicket viewer</a> is being used, then an implementation of <code>LocaleProvider</code> is
automatically registered and injected (it is annotated with <code>@DomainService</code>) so no further configuration is required.</p>
</div>
@@ -7404,19 +7852,19 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_18">3.12.4. Related Services</h4>
+<h4 id="_related_services_21">3.15.4. Related Services</h4>
<div class="paragraph">
<p>This service works in conjunction with <a href="#_rgsvc_spi_TranslationService"><code>TranslationService</code></a> and <a href="#_rgsvc_spi_TranslationsResolver"><code>TranslationsResolver</code></a> in order to provide i18n support.</p>
</div>
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_PublishingService">3.13. <code>PublishingService</code></h3>
+<h3 id="_rgsvc_spi_PublishingService">3.16. <code>PublishingService</code></h3>
<div class="paragraph">
<p>The <code>PublishingService</code> is intended for coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system. Here the only events published are those that action invocations and of changed objects. A typical use case is to publish onto a pub/sub bus such as <a href="http://activemq.apache.org/">ActiveMQ</a> with <a href="http://camel.apache.org">Camel</a> to keep other systems up to date.</p>
</div>
<div class="sect3">
-<h4 id="_spi_13">3.13.1. SPI</h4>
+<h4 id="_spi_16">3.16.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by the service is:</p>
</div>
@@ -7463,7 +7911,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_12">3.13.2. Implementation</h4>
+<h4 id="_implementation_15">3.16.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides no default implementations of this service. There are however two implementations available in
the (non-ASF) <a href="http://isisaddons.org">Isis Addons</a>.</p>
@@ -7512,7 +7960,7 @@ the <a href="ugvro.html">RestfulObjects viewer</a>.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_usage_16">3.13.3. Usage</h4>
+<h4 id="_usage_16">3.16.3. Usage</h4>
<div class="paragraph">
<p>To indicate that an action invocation should be published, annotate it with the <a href="rgant.html#_rgant-Action_publishing"><code>@Action#publishing()</code></a> annotation.</p>
</div>
@@ -7606,7 +8054,7 @@ the <a href="ugvro.html">RestfulObjects viewer</a>.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_services_17">3.13.4. Registering the Services</h4>
+<h4 id="_registering_the_services_20">3.16.4. Registering the Services</h4>
<div class="paragraph">
<p>There is no default implementation of this service provided by the core Apache Isis framework.</p>
</div>
@@ -7623,7 +8071,7 @@ suppressed either using security or by implementing a
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_19">3.13.5. Related Services</h4>
+<h4 id="_related_services_22">3.16.5. Related Services</h4>
<div class="paragraph">
<p>The <code>PublishingService</code> is intended for coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system. Here the only events published are those that action invocations (for actions annotated with <a href="rgant.html#_rgant-Action_publishing"><code>@Action#publishing()</code></a>) and of changed objects (for objects annotated with <a href="rgant.html#_rgant-DomainObject_publishing"><code>@DomainObject#publishing()</code></a>.</p>
</div>
@@ -7635,7 +8083,7 @@ suppressed either using security or by implementing a
</div>
</div>
<div class="sect3">
-<h4 id="_design_notes">3.13.6. Design Notes</h4>
+<h4 id="_design_notes">3.16.6. Design Notes</h4>
<div class="paragraph">
<p>The following class diagram shows how the above components fit together:</p>
</div>
@@ -7650,7 +8098,7 @@ suppressed either using security or by implementing a
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_RepresentationService">3.14. <code>RepresentationService</code></h3>
+<h3 id="_rgsvc_spi_RepresentationService">3.17. <code>RepresentationService</code></h3>
<div class="paragraph">
<p>The <code>RepresentationService</code> is the main plug-in point for the <a href="ugvro.html">RestfulObjects viewer</a> to generate representations.</p>
</div>
@@ -7672,7 +8120,7 @@ suppressed either using security or by implementing a
<p>The <code>RepresentationServiceForRestfulObjects</code> is the default implementation of this service; likewise <code>ContentNegotiationServiceXRoDomainType</code> is the default implementation of the <code>ContentNegotiationService</code>. If you inspect the source code you’ll see that the default implementation of this service’s primary responsibility is to generate the default Restful Objects representations. Therefore, if you what you want to do is to generate a <em>different _representation then in many cases replacing either this service _or</em> the <code>ContentNegotiationService</code> will be equivalent (you’ll notice that their SPIs are very similar).</p>
</div>
<div class="sect3">
-<h4 id="_spi_14">3.14.1. SPI</h4>
+<h4 id="_spi_17">3.17.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -7770,7 +8218,7 @@ suppressed either using security or by implementing a
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_13">3.14.2. Implementation</h4>
+<h4 id="_implementation_16">3.17.2. Implementation</h4>
<div class="paragraph">
<p>As discussed in the introduction, the framework provides a default implementation, <code>o.a.i.v.ro.rendering.service.RepresentationServiceForRestfulObjects</code>. This delegates to <a href="#_rgsvc_spi_ContentNegotiationService"><code>ContentNegotiationService</code></a> to generate an alternative representation; but if none is provided then it falls back on generating the representations as defined in the <a href="http://restfulobjects.org">Restful Objects spec</a> v1.0.</p>
</div>
@@ -7781,21 +8229,21 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_services_18">3.14.3. Registering the Services</h4>
+<h4 id="_registering_the_services_21">3.17.3. Registering the Services</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' default implementation of <code>RepresentationService</code> service is automatically registered and injected (it is annotated with <code>@DomainService</code>) so no further configuration is required.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_20">3.14.4. Related Services</h4>
+<h4 id="_related_services_23">3.17.4. Related Services</h4>
<div class="paragraph">
<p>The default implementation delegates to <a href="#_rgsvc_spi_ContentNegotiationService"><code>ContentNegotiationService</code></a>, whose default implementation may delegate in turn to <a href="#_rgsvc_spi_ContentMappingService"><code>ContentMappingService</code></a> (if present).</p>
</div>
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_RoutingService">3.15. <code>RoutingService</code></h3>
+<h3 id="_rgsvc_spi_RoutingService">3.18. <code>RoutingService</code></h3>
<div class="paragraph">
<p>The <code>RoutingService</code> provides the ability to return (and therefore render) an alternative object from an action invocation.</p>
</div>
@@ -7824,7 +8272,7 @@ of the implementation to figure out what the "owning" object might be.</p>
<p>Currently the routing service is used only by the <a href="ugvw.html">Wicket viewer</a>; it is ignored by the <a href="ugvro.html">Restful Objects</a> viewer.</p>
</div>
<div class="sect3">
-<h4 id="_spi_15">3.15.1. SPI</h4>
+<h4 id="_spi_18">3.18.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -7852,7 +8300,7 @@ of the implementation to figure out what the "owning" object might be.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_14">3.15.2. Implementation</h4>
+<h4 id="_implementation_17">3.18.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides a default implementation which will always return the original object provided, or the home page
if a <code>null</code> or <code>void</code> was provided. It uses the <a href="#_rgsvc_api_HomePageProviderService"><code>HomePageProviderService</code></a>.</p>
@@ -7865,7 +8313,7 @@ The route from the first service that returns <code>true</code> from its <code>c
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_services_19">3.15.3. Registering the Services</h4>
+<h4 id="_registering_the_services_22">3.18.3. Registering the Services</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis'
@@ -7874,7 +8322,7 @@ default implementation of <code>RoutingService</code> service is automatically r
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_21">3.15.4. Related Services</h4>
+<h4 id="_related_services_24">3.18.4. Related Services</h4>
<div class="paragraph">
<p>The default implementation of ths service uses the
<a href="#_rgsvc_api_HomePageProviderService"><code>HomePageProviderService</code></a>.</p>
@@ -7882,7 +8330,7 @@ default implementation of <code>RoutingService</code> service is automatically r
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_TranslationService">3.16. <code>TranslationService</code></h3>
+<h3 id="_rgsvc_spi_TranslationService">3.19. <code>TranslationService</code></h3>
<div class="paragraph">
<p>The <code>TranslationService</code> 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.</p>
</div>
@@ -7901,7 +8349,7 @@ default implementation of <code>RoutingService</code> service is automatically r
</table>
</div>
<div class="sect3">
-<h4 id="_spi_16">3.16.1. SPI</h4>
+<h4 id="_spi_19">3.19.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -7945,7 +8393,7 @@ default implementation of <code>RoutingService</code> service is automatically r
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_15">3.16.2. Implementation</h4>
+<h4 id="_implementation_18">3.19.2. Implementation</h4>
<div class="paragraph">
<p>The Apache Isis framework provides a default implementation (<code>TranslationServicePo</code>) that uses the GNU <code>.pot</code> and <code>.po</code> files for translations. It relies on the <code>LocaleProvider</code> service (to return the <code>Locale</code> of the current user) and also the <code>TranslationsResolver</code> service (to read existing translations).</p>
</div>
@@ -7957,7 +8405,7 @@ default implementation of <code>RoutingService</code> service is automatically r
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_services_20">3.16.3. Registering the Services</h4>
+<h4 id="_registering_the_services_23">3.19.3. Registering the Services</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core
@@ -7973,14 +8421,21 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_22">3.16.4. Related Services</h4>
+<h4 id="_rgsvc_api_LayoutService_related-mixins-and-menus">3.19.4. Related Menus</h4>
+<div class="paragraph">
+<p>The <code>TranslationServicePoMenu</code> menu exposes the <code>TranslationServicePo</code> service’s <code>toPot()</code> method so that all
+translations can be downloaded as a single file.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_related_services_25">3.19.5. Related Services</h4>
<div class="paragraph">
<p>This service works in conjunction with <a href="#_rgsvc_spi_LocaleProvider"><code>LocaleProvider</code></a> and <a href="#_rgsvc_spi_TranslationsResolver"><code>TranslationsResolver</code></a> in order to provide i18n support.</p>
</div>
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_TranslationsResolver">3.17. <code>TranslationsResolver</code></h3>
+<h3 id="_rgsvc_spi_TranslationsResolver">3.20. <code>TranslationsResolver</code></h3>
<div class="paragraph">
<p>The <code>TranslationsResolver</code> service is one of the services that work together to implement Apache Isis' support for i18n, being used by Isis' default implementation of <a href="#_rgsvc_spi_TranslationService"><code>TranslationService</code></a>.</p>
</div>
@@ -8002,7 +8457,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</table>
</div>
<div class="sect3">
-<h4 id="_spi_17">3.17.1. SPI</h4>
+<h4 id="_spi_20">3.20.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -8016,7 +8471,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_16">3.17.2. Implementation</h4>
+<h4 id="_implementation_19">3.20.2. Implementation</h4>
<div class="paragraph">
<p>Isis' <a href="ugvw.html">Wicket viewer</a> provides an implementation of this service (<code>TranslationsResolverWicket</code>) which leverages Apache Wicket APIs. This searches for translation files in the standard <code>WEB-INF/</code> directory.</p>
</div>
@@ -8036,7 +8491,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_17">3.17.3. Registering the Service</h4>
+<h4 id="_registering_the_service_17">3.20.3. Registering the Service</h4>
<div class="paragraph">
<p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the
<code>AppManifest</code> to <a href="rgcms.html#<em>rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), _and</em> that the <a href="ugvw.html">Wicket viewer</a> is being used, then an implementation of <code>TranslationsResolver</code> is
@@ -8049,14 +8504,14 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_23">3.17.4. Related Services</h4>
+<h4 id="_related_services_26">3.20.4. Related Services</h4>
<div class="paragraph">
<p>This service works in conjunction with <a href="#_rgsvc_spi_LocaleProvider"><code>LocaleProvider</code></a> and <a href="#_rgsvc_spi_TranslationService"><code>TranslationService</code></a> in order to provide i18n support.</p>
</div>
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_UrlEncodingService">3.18. <code>UrlEncodingService</code></h3>
+<h3 id="_rgsvc_spi_UrlEncodingService">3.21. <code>UrlEncodingService</code></h3>
<div class="paragraph">
<p>The <code>UrlEncodingService</code> 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 <a href="ugbtb.html#_ugbtb_view-models">view model</a>
@@ -8089,7 +8544,7 @@ state within the URL.</p>
applib) that uses <code>base-64</code> encoding to <code>UTF-8</code> charset.</p>
</div>
<div class="sect3">
-<h4 id="_spi_18">3.18.1. SPI</h4>
+<h4 id="_spi_21">3.21.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by the service is:</p>
</div>
@@ -8117,7 +8572,7 @@ applib) that uses <code>base-64</code> encoding to <code>UTF-8</code> charset.</
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_17">3.18.2. Implementation</h4>
+<h4 id="_implementation_20">3.21.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides a default implementation (<code>UrlEncodingServiceUsingBaseEncoding</code>) 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
@@ -8132,7 +8587,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_UserProfileService">3.19. <code>UserProfileService</code></h3>
+<h3 id="_rgsvc_spi_UserProfileService">3.22. <code>UserProfileService</code></h3>
<div class="paragraph">
<p>The <code>UserProfileService</code> provides the ability for the domain application to return supplementary metadata about the current user. This information is used (by the <a href="ugvw.html">Wicket viewer</a>) 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.</p>
</div>
@@ -8140,7 +8595,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
<p>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.</p>
</div>
<div class="sect3">
-<h4 id="_spi_19">3.19.1. SPI</h4>
+<h4 id="_spi_22">3.22.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by the service is:</p>
</div>
@@ -8168,7 +8623,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_18">3.19.2. Implementation</h4>
+<h4 id="_implementation_21">3.22.2. Implementation</h4>
<div class="paragraph">
<p>There is no default implementation of this service provided by the core Apache Isis framework.</p>
</div>
@@ -8198,7 +8653,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect2">
-<h3 id="_rgsvc_spi_UserRegistrationService">3.20. <code>UserRegistrationService</code></h3>
+<h3 id="_rgsvc_spi_UserRegistrationService">3.23. <code>UserRegistrationService</code></h3>
<div class="paragraph">
<p>The <code>UserRegistrationService</code> provides the ability for users to sign-up to access an application by providing a valid email address, and also provides the capability for users to reset their password if forgotten.</p>
</div>
@@ -8226,7 +8681,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</table>
</div>
<div class="sect3">
-<h4 id="_spi_20">3.20.1. SPI</h4>
+<h4 id="_spi_23">3.23.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by the service is:</p>
</div>
@@ -8266,7 +8721,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_implementation_19">3.20.2. Implementation</h4>
+<h4 id="_implementation_22">3.23.2. Implementation</h4>
<div class="paragraph">
<p>The core Apache Isis framework itself defines only an API; there is no default implementation. Rather, the implementation will depend on the security mechanism being used.</p>
</div>
@@ -8278,7 +8733,7 @@ further in this <a href="ugfun.html#_ugfun_how-tos_replacing-default-service-imp
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_services_21">3.20.3. Registering the Services</h4>
+<h4 id="_registering_the_services_24">3.23.3. Registering the Services</h4>
<div class="paragraph">
<p>There is no default implementation of this service provided by the core Apache Isis framework.</p>
</div>
@@ -8311,7 +8766,7 @@ to implement a subclass and register.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_24">3.20.4. Related Services</h4>
+<h4 id="_related_services_27">3.23.4. Related Services</h4>
<div class="paragraph">
<p>The most common use case is to allow users to sign-up through Apache Isis' Wicket viewer. Because the process requires email to be sent, the following services must be configured:</p>
</div>
@@ -8368,7 +8823,7 @@ to implement a subclass and register.</p>
</li>
<li><a href="#_rgsvc_api_ActionInvocationContext">2.2. <code>ActionInvocationContext</code></a>
<ul class="sectlevel3">
-<li><a href="#_api">2.2.1. API</a></li>
+<li><a href="#_api_implementation_2">2.2.1. API & Implementation</a></li>
<li><a href="#_usage_2">2.2.2. Usage</a></li>
<li><a href="#_registering_the_service_2">2.2.3. Registering the Service</a></li>
<li><a href="#_unit_testing_support">2.2.4. Unit testing support</a></li>
@@ -8376,7 +8831,7 @@ to implement a subclass and register.</p>
</li>
<li><a href="#_rgsvc_api_BackgroundService">2.3. <code>BackgroundService</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_2">2.3.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_3">2.3.1. API & Implementation</a></li>
<li><a href="#_usage_3">2.3.2. Usage</a></li>
<li><a href="#_end_user_experience">2.3.3. End-user experience</a></li>
<li><a href="#_registering_the_services">2.3.4. Registering the Services</a></li>
@@ -8387,7 +8842,7 @@ to implement a subclass and register.</p>
</li>
<li><a href="#_rgsvc_api_BookmarkService">2.4. <code>BookmarkService</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_3">2.4.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_4">2.4.1. API & Implementation</a></li>
<li><a href="#__code_bookmarkholder_code">2.4.2. <code>BookmarkHolder</code></a></li>
<li><a href="#_usage_by_other_services">2.4.3. Usage by other services</a></li>
<li><a href="#_registering_the_service_3">2.4.4. Registering the Service</a></li>
@@ -8395,7 +8850,7 @@ to implement a subclass and register.</p>
</li>
<li><a href="#_rgsvc_api_ClockService">2.5. <code>ClockService</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_4">2.5.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_5">2.5.1. API & Implementation</a></li>
<li><a href="#_testing_support">2.5.2. Testing Support</a>
<ul class="sectlevel4">
<li><a href="#_alternative_implementations">Alternative Implementations</a></li>
@@ -8407,7 +8862,7 @@ to implement a subclass and register.</p>
<li><a href="#_rgsvc_api_CommandContext">2.6. <code>CommandContext</code></a>
<ul class="sectlevel3">
<li><a href="#_rgsvc_api_CommandContext_screencast">2.6.1. Screencast</a></li>
-<li><a href="#_api_implementation_5">2.6.2. API & Implementation</a></li>
+<li><a href="#_api_implementation_6">2.6.2. API & Implementation</a></li>
<li><a href="#_usage_4">2.6.3. Usage</a></li>
<li><a href="#_interacting_with_the_services">2.6.4. Interacting with the services</a></li>
<li><a href="#_registering_the_services_2">2.6.5. Registering the Services</a></li>
@@ -8416,7 +8871,7 @@ to implement a subclass and register.</p>
</li>
<li><a href="#_rgsvc_api_DeepLinkService">2.7. <code>DeepLinkService</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_6">2.7.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_7">2.7.1. API & Implementation</a></li>
<li><a href="#_usage_within_the_framework">2.7.2. Usage within the framework</a></li>
<li><a href="#_implementations">2.7.3. Implementations</a></li>
<li><a href="#_registering_the_services_3">2.7.4. Registering the Services</a></li>
@@ -8438,7 +8893,7 @@ to implement a subclass and register.</p>
</li>
<li><a href="#_rgsvc_api_EmailService">2.9. <code>EmailService</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_7">2.9.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_8">2.9.1. API & Implementation</a></li>
<li><a href="#_configuration">2.9.2. Configuration</a></li>
<li><a href="#_alternative_implementations_2">2.9.3. Alternative Implementations</a></li>
<li><a href="#_registering_the_services_4">2.9.4. Registering the Services</a></li>
@@ -8465,21 +8920,21 @@ to implement a subclass and register.</p>
</li>
<li><a href="#_rgsvc_api_FixtureScriptsDefault">2.11. <code>FixtureScriptsDefault</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_8">2.11.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_9">2.11.1. API & Implementation</a></li>
<li><a href="#_configuration_2">2.11.2. Configuration</a></li>
<li><a href="#_related_services_5">2.11.3. Related Services</a></li>
</ul>
</li>
<li><a href="#_rgsvc_api_GuiceBeanProvider">2.12. <code>GuiceBeanProvider</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_9">2.12.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_10">2.12.1. API & Implementation</a></li>
<li><a href="#_usage_5">2.12.2. Usage</a></li>
<li><a href="#_registering_the_services_6">2.12.3. Registering the Services</a></li>
</ul>
</li>
<li><a href="#_rgsvc_api_HomePageProviderService">2.13. <code>HomePageProviderService</code></a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_10">2.13.1. API & Implementation</a></li>
+<li><a href="#_api_implementation_11">2.13.1. API & Implementation</a></li>
<li><a href="#_registering_the_service_6">2.13.2. Registering the Service</a></li>
</ul>
</li>
@@ -8500,67 +8955,74 @@ to implement a subclass and register.</p>
<li><a href="#_registering_the_service_7">2.15.3. Registering the Service</a></li>
</ul>
</li>
-<li><a href="#_rgsvc_api_MementoService">2.16. <code>MementoService</code></a>
+<li><a href="#_rgsvc_api_LayoutService">2.16. <code>LayoutService</code> (<code>1.12.0-SNAPSHOT</code>)</a>
<ul class="sectlevel3">
-<li><a href="#_api_implementation_11">2.16.1. API & Implementation</a></li>
-<li><a href="#_usage_6">2.16.2. Usage</a></li>
-<li><a href="#_related_services_6">2.16.3. Related Services</a></li>
-<li><a href="#_registering_the_service_8">2.16.4. Registering the Service</a></li>
+<li><a href="#_rgsvc_api_LayoutService_api-and-implementation">2.16.1. API & Implementation</a></li>
+<li><a href="#_rgsvc_api_LayoutService_related-mixins-and-menus">2.16.2. Related Mixins and Menus</a></li>
+<li><a href="#_rgsvc_api_LayoutService_related-domain-services">2.16.3. Related Domain Services</a></li>
</ul>
</li>
-<li><a href="#_rgsvc_api_MetamodelService">2.17. <code>MetamodelService</code></a>
+<li><a href="#_rgsvc_api_MementoService">2.17. <code>MementoService</code></a>
<ul class="sectlevel3">
<li><a href="#_api_implementation_12">2.17.1. API & Implementation</a></li>
-<li><a href="#_registering_the_service_9">2.17.2. Registering the Service</a></li>
+<li><a href="#_usage_6">2.17.2. Usage</a></li>
+<li><a href="#_related_services_6">2.17.3. Related Services</a></li>
+<li><a href="#_registering_the_service_8">2.17.4. Registering the Service</a></li>
</ul>
</li>
-<li><a href="#_rgsvc_api_QueryResultsCache">2.18. <code>QueryResultsCache</code></a>
+<li><a href="#_rgsvc_api_MetamodelService">2.18. <code>MetamodelService</code></a>
<ul class="sectlevel3">
<li><a href="#_api_implementation_13">2.18.1. API & Implementation</a></li>
-<li><a href="#_usage_7">2.18.2. Usage</a></li>
-<li><a href="#_registering_the_service_10">2.18.3. Registering the Service</a></li>
-<li><a href="#_related_services_7">2.18.4. Related Services</a></li>
+<li><a href="#_registering_the_service_9">2.18.2. Registering the Service</a></li>
</ul>
</li>
-<li><a href="#_rgsvc_api_Scratchpad">2.19. <code>Scratchpad</code></a>
+<li><a href="#_rgsvc_ap
<TRUNCATED>