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/07/12 22:55:16 UTC
[7/7] isis-site git commit: internal services introduced in 1.13.0
internal services introduced in 1.13.0
Project: http://git-wip-us.apache.org/repos/asf/isis-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis-site/commit/c5f2b2e1
Tree: http://git-wip-us.apache.org/repos/asf/isis-site/tree/c5f2b2e1
Diff: http://git-wip-us.apache.org/repos/asf/isis-site/diff/c5f2b2e1
Branch: refs/heads/asf-site
Commit: c5f2b2e1407420b345e510d2c1d95ceb688715ac
Parents: 2c032b2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Jul 12 23:51:58 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Jul 12 23:51:58 2016 +0100
----------------------------------------------------------------------
content/guides/cgcom.html | 4 +-
content/guides/cgcom.pdf | 12 +-
content/guides/rgfis.html | 433 +-
content/guides/rgfis.pdf | 22866 +++++++++++++++++++---------
content/guides/rgsvc.html | 403 +-
content/guides/rgsvc.pdf | 29174 +++++++++++++++++++-----------------
content/guides/ugfun.html | 3 -
content/guides/ugfun.pdf | 6477 ++++----
content/migration-notes.html | 14 +-
content/screencasts.html | 100 +-
10 files changed, 35293 insertions(+), 24193 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis-site/blob/c5f2b2e1/content/guides/cgcom.html
----------------------------------------------------------------------
diff --git a/content/guides/cgcom.html b/content/guides/cgcom.html
index 53ac8c0..34193a7 100644
--- a/content/guides/cgcom.html
+++ b/content/guides/cgcom.html
@@ -2309,8 +2309,8 @@ Enjoy!
<pre class="CodeRay highlight"><code data-lang="bash">git checkout master # update master with latest
git pull
git merge release-1.14.0-RC1 # merge branch onto master
-git branch -d release-1.14.0-RC1 # branch no longer needed
-git push origin --delete release-1.14.0-RC1 # remote branch no longer needed</code></pre>
+git push origin --delete release-1.14.0-RC1 # remote branch no longer needed
+git branch -d release-1.14.0-RC1 # branch no longer needed</code></pre>
</div>
</div>
<div class="paragraph">
http://git-wip-us.apache.org/repos/asf/isis-site/blob/c5f2b2e1/content/guides/cgcom.pdf
----------------------------------------------------------------------
diff --git a/content/guides/cgcom.pdf b/content/guides/cgcom.pdf
index 3b46f4d..6b96e1c 100644
--- a/content/guides/cgcom.pdf
+++ b/content/guides/cgcom.pdf
@@ -4,8 +4,8 @@
<< /Title (Committers' Guide)
/Creator (Asciidoctor PDF 1.5.0.alpha.11, based on Prawn 1.3.0)
/Producer (Asciidoctor PDF 1.5.0.alpha.11, based on Prawn 1.3.0)
-/CreationDate (D:20160712063803+01'00')
-/ModDate (D:20160712063803+01'00')
+/CreationDate (D:20160712234406+01'00')
+/ModDate (D:20160712234406+01'00')
>>
endobj
2 0 obj
@@ -33753,7 +33753,7 @@ ET
BT
59.24 738.845 Td
/F3.0 11 Tf
-<676974206272616e6368202d642072656c656173652d312e31342e302d5243312020202020202020202020202020> Tj
+<6769742070757368206f726967696e202d2d64656c6574652072656c656173652d312e31342e302d524331202020> Tj
ET
0.000 0.000 0.000 SCN
@@ -33764,7 +33764,7 @@ ET
BT
312.23999999999995 738.845 Td
/F3.0 11 Tf
-<23206272616e6368206e6f206c6f6e676572206e6565646564> Tj
+<232072656d6f7465206272616e6368206e6f206c6f6e676572206e6565646564> Tj
ET
0.000 0.000 0.000 SCN
@@ -33775,7 +33775,7 @@ ET
BT
59.24 724.105 Td
/F3.0 11 Tf
-<6769742070757368206f726967696e202d2d64656c6574652072656c656173652d312e31342e302d524331202020> Tj
+<676974206272616e6368202d642072656c656173652d312e31342e302d5243312020202020202020202020202020> Tj
ET
0.000 0.000 0.000 SCN
@@ -33786,7 +33786,7 @@ ET
BT
312.23999999999995 724.105 Td
/F3.0 11 Tf
-<232072656d6f7465206272616e6368206e6f206c6f6e676572206e6565646564> Tj
+<23206272616e6368206e6f206c6f6e676572206e6565646564> Tj
ET
0.000 0.000 0.000 SCN
http://git-wip-us.apache.org/repos/asf/isis-site/blob/c5f2b2e1/content/guides/rgfis.html
----------------------------------------------------------------------
diff --git a/content/guides/rgfis.html b/content/guides/rgfis.html
index e485d4f..faf78d6 100644
--- a/content/guides/rgfis.html
+++ b/content/guides/rgfis.html
@@ -703,10 +703,10 @@ Impl’n (g: a:)</th>
<p>The <code>ContentNegotiationService</code> is responsible for inspecting the HTTP <code>Accept</code> header, and use this to select the correct representation to render. <br></p>
</div>
<div class="paragraph">
-<p>The Apache Isis framework provides a default implementation of <code>ContentNegotiationService</code> which inspects the "x-ro-domaintype" component of the HTTP <code>Accept</code> header. If present, this implementation will delegate to the companion <a href="rgsvc.html#_rgsvc_spi_ContentMappingService"><code>ContentMappingService</code></a> service, if configured. <br></p>
+<p>The Apache Isis framework provides three implementations of <code>ContentNegotiationService</code> which inspects different elements of the HTTP <code>Accept</code> header. One of these implementations, <code>ContentNegotiationServiceXRoDomainType</code> will further delegate down to the companion <a href="rgsvc.html#_rgsvc_spi_ContentMappingService"><code>ContentMappingService</code></a> service (if configured/available), based on the value of the "x-ro-domain-type" parameter of the header.<br></p>
</div>
<div class="paragraph">
-<p>A typical implementation of <code>ContentMappingService</code> will convert the domain object into some sort of DTO (data transfer object) as specified by the "x-ro-domaintype". If this DTO is annotated with JAXB or Jackson mappings, then the RO viewer (courtesy of the underlying <a href="http://resteasy.jboss.org/">RestEasy</a> framework) can serialize these directly <br></p>
+<p>A typical implementation of <code>ContentMappingService</code> will convert the domain object into some sort of DTO (data transfer object) as specified by the "x-ro-domaintype". If this DTO is annotated with JAXB or Jackson mappings, then the RO viewer (courtesy of the underlying <a href="http://resteasy.jboss.org/">RestEasy</a> framework) can serialize these directly.<br></p>
</div>
<div class="paragraph">
<p>What all that means is that, if the underlying entities change, we are required to update the mappings in the <code>ContentMappingService</code> to map to the same DTOs.</p>
@@ -730,23 +730,18 @@ Impl’n (g: a:)</th>
<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">ContentNegotiationService</span> {
- <span class="annotation">@Programmatic</span>
Response.ResponseBuilder buildResponse( <i class="conum" data-value="1"></i><b>(1)</b>
RepresentationService.Context2 renderContext2,
ObjectAdapter objectAdapter);
- <span class="annotation">@Programmatic</span>
Response.ResponseBuilder buildResponse( <i class="conum" data-value="2"></i><b>(2)</b>
RepresentationService.Context2 renderContext2,
ObjectAndProperty objectAndProperty);
- <span class="annotation">@Programmatic</span>
Response.ResponseBuilder buildResponse( <i class="conum" data-value="3"></i><b>(3)</b>
RepresentationService.Context2 renderContext2,
ObjectAndCollection objectAndCollection);
- <span class="annotation">@Programmatic</span>
Response.ResponseBuilder buildResponse( <i class="conum" data-value="4"></i><b>(4)</b>
RepresentationService.Context2 renderContext2,
ObjectAndAction objectAndAction);
- <span class="annotation">@Programmatic</span>
Response.ResponseBuilder buildResponse( <i class="conum" data-value="5"></i><b>(5)</b>
RepresentationService.Context2 renderContext2,
ObjectAndActionInvocation objectAndActionInvocation);
@@ -818,7 +813,7 @@ Impl’n (g: a:)</th>
</div>
</div>
<div class="paragraph">
-<p>As discussed in the introduction, the framework also provides a default implementation, <code>o.a.i.v.ro.rendering.service.conneg.ContentNegotiationServiceXRoDomainType</code>. This handles content negotiation for two of the possible representations, object representations and for action result representations:</p>
+<p>As discussed in the introduction, the framework also provides three implementation of this service, one of which is <code>o.a.i.v.ro.rendering.service.conneg.ContentNegotiationServiceXRoDomainType</code>. This implementation handles content negotiation for two of the possible representations, object representations and for action result representations:</p>
</div>
<div class="ulist">
<ul>
@@ -856,6 +851,25 @@ Impl’n (g: a:)</th>
<div class="paragraph">
<p>If the DTO is annotated with JAXB, then also note that the runtime type must be annotated with the JAXB <code>javax.xml.bind.annotation.XmlRootElement</code> so that RestEasy is able to unambiguously serialize it.</p>
</div>
+<div class="paragraph">
+<p>The other two implementations of <code>ContentNegotiationService</code> are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>ContentNegotiationServiceForRestfulObjectsV1_0</code><br></p>
+<div class="paragraph">
+<p>which returns representations according to the <a href="http://restfulobjects.org">Restful Objects</a> spec</p>
+</div>
+</li>
+<li>
+<p><code>ContentNegotiationServiceOrgApacheIsisV1</code><br></p>
+<div class="paragraph">
+<p>which returns <a href="ugvro.html#_ugvro_simplified-representations">simplified representations</a></p>
+</div>
+</li>
+</ul>
+</div>
</div>
<div class="sect3">
<h4 id="_usage">2.1.3. Usage</h4>
@@ -925,7 +939,7 @@ Impl’n (g: a:)</th>
<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>ContentNegotiationService</code> service is automatically registered and injected (it is annotated with
+implementations of <code>ContentNegotiationService</code> service are automatically registered and injected (it is annotated with
<code>@DomainService</code>) so no further configuration is required.</p>
</div>
<div class="paragraph">
@@ -974,25 +988,20 @@ in the <a href="rgsvc.html#_rgsvc_intro_overriding-the-services">introduction</a
<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">RepresentationService</span> {
- <span class="annotation">@Programmatic</span>
Response objectRepresentation( <i class="conum" data-value="1"></i><b>(1)</b>
<span class="predefined-type">Context</span> rendererContext,
ObjectAdapter objectAdapter);
- <span class="annotation">@Programmatic</span>
Response propertyDetails( <i class="conum" data-value="2"></i><b>(2)</b>
<span class="predefined-type">Context</span> rendererContext,
ObjectAndProperty objectAndProperty,
MemberReprMode memberReprMode);
- <span class="annotation">@Programmatic</span>
Response collectionDetails( <i class="conum" data-value="3"></i><b>(3)</b>
<span class="predefined-type">Context</span> rendererContext,
ObjectAndCollection objectAndCollection,
MemberReprMode memberReprMode);
- <span class="annotation">@Programmatic</span>
Response actionPrompt( <i class="conum" data-value="4"></i><b>(4)</b>
<span class="predefined-type">Context</span> rendererContext,
ObjectAndAction objectAndAction);
- <span class="annotation">@Programmatic</span>
Response actionResult( <i class="conum" data-value="5"></i><b>(5)</b>
<span class="predefined-type">Context</span> rendererContext,
ObjectAndActionInvocation objectAndActionInvocation,
@@ -1053,7 +1062,7 @@ in the <a href="rgsvc.html#_rgsvc_intro_overriding-the-services">introduction</a
<div class="sect3">
<h4 id="_implementation_2">2.2.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="#_rgfis_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>
+<p>As discussed in the introduction, the framework provides a default implementation, <code>o.a.i.v.ro.rendering.service.RepresentationServiceContentNegotiator</code>. This delegates to <a href="#_rgfis_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>
<div class="paragraph">
<p>To use an alternative implementation, use
@@ -1107,6 +1116,18 @@ Impl’n (g: a:)</th>
</thead>
<tbody>
<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgfis_spi_AuthenticationSessionProvider"><code>o.a.i.core.commons.</code><br>
+<code>authentication.</code><br>
+<code>AuthenticationSessionProvider</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Simply responsible for obtaining the current <code>AuthenticationSession</code> (the framework’s internal representation of the currently logged-in user).</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>AuthenticationSession-</code><br>
+<code>ProviderDefault</code><br>
+<code>isis-core-runtime</code></p></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>Default implementation looks up from <code>IsisSessionFactory</code> singleton’s thread-local</p>
+</div></div></td>
+</tr>
+<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgfis_spi_CommandDtoServiceInternal"><code>o.a.i.c.m.s.command</code><br>
<code>CommandDtoServiceInternal</code></a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Creates memento of current action invocation, for use as a serializable XML reified command. The
@@ -1115,17 +1136,26 @@ most notable usage of this is to allow the execution of the <code>Command</code>
<a href="rgant.html#_rgant-Property_command"><code>@Property#commandExecuteIn()</code></a>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CommandDtoService-</code><br>
<code>InternalServiceDefault</code><br>
-<code>o.a.i.c.r.s.command</code><br>
<code>isis-core-runtime</code></p></td>
<td class="tableblock halign-left valign-top"><div></div></td>
</tr>
<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgfis_spi_MessageBrokerServiceInternal"><code>o.a.i.c.m.s.msgbroker</code><br>
+<code>MessageBrokerServiceInternal</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A wrapper around <a href="rgsvc.html#_rgsvc_api_MessageService"><code>MessageService</code></a>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">MessageBrokerService-`<br>
+<code>InternalDefault</code><br>
+<code>isis-core-runtime</code></p></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p>This service does not provide any additional capabilities over <code>MessageService</code>, and will (most likely) be conflated with that service in the future.</p>
+</div></div></td>
+</tr>
+<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgfis_spi_InteractionDtoServiceInternal"><code>o.a.i.c.m.s.ixn</code><br>
<code>InteractionDtoServiceInternal</code></a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Creates DTO for the current execution of an action invocation or property edit, for use either as a reified command or for implementations of the <a href="rgsvc.html#_rgsvc_spi_PublishingService"><code>PublishingService</code></a>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CommandDtoService-</code><br>
<code>InternalServiceDefault</code><br>
-<code>o.a.i.c.m.s.command</code><br>
<code>isis-core-metamodel</code></p></td>
<td class="tableblock halign-left valign-top"><div></div></td>
</tr>
@@ -1151,7 +1181,35 @@ most notable usage of this is to allow the execution of the <code>Command</code>
</ul>
</div>
<div class="sect2">
-<h3 id="_rgfis_spi_CommandDtoServiceInternal">3.1. <code>CommandDtoServiceInternal</code></h3>
+<h3 id="_rgfis_spi_AuthenticationSessionProvider">3.1. <code>AuthenticationSessionProvider</code></h3>
+<div class="paragraph">
+<p>The (internal) <code>AuthenticationSessionProvider</code> domain service is simply responsible for obtaining the <code>AuthenticationSession</code> (being the framework’s internal representation of the currently logged in user).</p>
+</div>
+<div class="sect3">
+<h4 id="_spi_and_implementation">3.1.1. SPI and Implementation</h4>
+<div class="paragraph">
+<p>The SPI of the 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">AuthenticationSessionProvider</span> {
+ AuthenticationSession getAuthenticationSession();
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The framework provides a default implementation of the service, <code>AuthenticationSessionProviderDefault</code>, which looks up
+the current <code>AuthenticationSession</code> from <code>IsisSessionFactory</code> singleton service:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java">isisSessionFactory.getCurrentSession().getAuthenticationSession();</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_rgfis_spi_CommandDtoServiceInternal">3.2. <code>CommandDtoServiceInternal</code></h3>
<div class="paragraph">
<p>The <code>CommandDtoServiceInternal</code> is responsible for creating an memento of the current action
invocation or property edit, to store in the <code>Command</code> object (from
@@ -1160,7 +1218,7 @@ invocation or property edit, to store in the <code>Command</code> object (from
as a <a href="rgsvc.html#_rgsvc_spi_BackgroundCommandService">background command</a>.</p>
</div>
<div class="sect3">
-<h4 id="_spi_implementation">3.1.1. SPI & Implementation</h4>
+<h4 id="_spi_implementation">3.2.1. SPI & Implementation</h4>
<div class="paragraph">
<p>The SPI of the service is:</p>
</div>
@@ -1222,7 +1280,7 @@ targets, for symmetry with actions).</td>
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_3">3.1.2. Related Services</h4>
+<h4 id="_related_services_3">3.2.2. Related Services</h4>
<div class="paragraph">
<p>The design of this service is similar to that of
<a href="#_rgfis_spi_InteractionDtoServiceInternal"><code>InteractionDtoServiceInternal</code></a>, used to create the
@@ -1231,12 +1289,68 @@ targets, for symmetry with actions).</td>
</div>
</div>
<div class="sect2">
-<h3 id="_rgfis_spi_InteractionDtoServiceInternal">3.2. <code>InteractionDtoServiceInternal</code></h3>
+<h3 id="_rgfis_spi_MessageBrokerServiceInternal">3.3. <code>MessageBrokerServiceInternal</code></h3>
+<div class="paragraph">
+<p>The (internal) <code>MessageBrokerServiceInternal</code> domain service is a wrapper around
+<a href="rgsvc.html#_rgsvc_api_MessageService"><code>MessageService</code></a>.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The service does not provide any additional capabilities over and those of <code>MessageService</code>, and will (most likely) be
+conflated with that service in the future.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_spi_3">3.3.1. SPI</h4>
+<div class="paragraph">
+<p>The SPI of the 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">MessageBrokerServiceInternal</span> {
+ <span class="type">void</span> informUser(<span class="predefined-type">String</span> message);
+ <span class="type">void</span> warnUser(<span class="predefined-type">String</span> message);
+ <span class="type">void</span> raiseError(<span class="predefined-type">String</span> message);
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_runtime_vs_noop_implementation">3.3.2. Runtime vs Noop implementation</h4>
+<div class="paragraph">
+<p>The framework provides two implementations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>MessageBrokerServiceInternalDefault</code> is provided by <code>isis-core-runtime</code>, and is used during normal use and integration tests</p>
+</li>
+<li>
+<p><code>MessageBrokerServiceInternalNoop</code> is provided as a fallback by <code>isis-core-metamodel</code>, and is provided to allow the <a href="#rgmvn.adoc">maven plugin</a> to be bootstrapped without any "backend" database.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <code>…​Default</code> implementation takes priority over the <code>…​Noop</code> implementation.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_rgfis_spi_InteractionDtoServiceInternal">3.4. <code>InteractionDtoServiceInternal</code></h3>
<div class="paragraph">
<p>The <code>InteractionDtoServiceInternal</code> internal domain service is used by the framework to create and update DTOs representing member executions, ie the invocation of an action or the editing of a property. The DTO is in all cases a subclass of <code>MemberExecutionDto</code>, from the <a href="rgcms.html#_rgcms_schema-ixn">"ixn" schema</a>, and subsequently accessible from the <code>Interaction</code> object (per the <a href="rgsvc.html#_rgsvc_api_InteractionContext"><code>InteractionContext</code></a> service).</p>
</div>
<div class="sect3">
-<h4 id="_spi_implementation_2">3.2.1. SPI & Implementation</h4>
+<h4 id="_spi_implementation_2">3.4.1. SPI & Implementation</h4>
<div class="paragraph">
<p>The SPI of the service is:</p>
</div>
@@ -1279,7 +1393,7 @@ targets, for symmetry with actions).</td>
</div>
</div>
<div class="sect3">
-<h4 id="_related_services_4">3.2.2. Related Services</h4>
+<h4 id="_related_services_4">3.4.2. Related Services</h4>
<div class="paragraph">
<p>The design of this service is similar to that of
<a href="#_rgfis_spi_CommandDtoServiceInternal"><code>CommandDtoServiceInternal</code></a>, used to create the <code>CommandDto</code>
@@ -1335,6 +1449,17 @@ Impl’n (g: a:)</th>
<td class="tableblock halign-left valign-top"><div></div></td>
</tr>
<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgfis_spi_PersistenceSessionServiceInternal"><code>o.a.i.c.m.s.</code><br>
+<code>persistsession.</code><br>
+<code>PersistenceSessionServiceInternal</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Acts as a facade to the underlying JDO persistence session / database connection. As such it provides methods for
+querying and for persisting objects.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>PersistenceSessionService-</code><br>
+<code>InternalDefault</code><br>
+<code>isis-core-runtime</code></p></td>
+<td class="tableblock halign-left valign-top"><div></div></td>
+</tr>
+<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgfis_spi_PublishingServiceInternal"><code>o.a.i.c.m.s.publishing.</code><br>
<code>PublishingServiceInternal</code></a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Co-ordinates between
@@ -1344,7 +1469,16 @@ Impl’n (g: a:)</th>
<a href="rgsvc.html#_rgsvc_spi_PublishingService"><code>PublishingService</code></a>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>PublishingService-</code><br>
<code>InternalDefault</code><br>
-<code>o.a.i.c.r.publishing</code><br>
+<code>isis-core-runtime</code></p></td>
+<td class="tableblock halign-left valign-top"><div></div></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_rgfis_spi_TransactionStateProviderInternal"><code>o.a.i.c.m.s.</code><br>
+<code>transtate.</code><br>
+<code>TransactionStateProviderInternal</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Simply provides the ability to check as to the state of the current transaction.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>TransactionStateProvider-</code><br>
+<code>InternalDefault</code><br>
<code>isis-core-runtime</code></p></td>
<td class="tableblock halign-left valign-top"><div></div></td>
</tr>
@@ -1394,7 +1528,7 @@ create audit entries of those changes.</p>
</table>
</div>
<div class="sect3">
-<h4 id="_spi_and_implementation">4.1.1. SPI and Implementation</h4>
+<h4 id="_spi_and_implementation_2">4.1.1. SPI and Implementation</h4>
<div class="paragraph">
<p>The SPI of the service is:</p>
</div>
@@ -1453,7 +1587,7 @@ various other (internal) domain services, notably
<a href="#_rgfis_spi_PublishingServiceInternal"><code>PublishingServiceInternal</code></a>.</p>
</div>
<div class="sect3">
-<h4 id="_spi_and_implementation_2">4.2.1. SPI and Implementation</h4>
+<h4 id="_spi_and_implementation_3">4.2.1. SPI and Implementation</h4>
<div class="paragraph">
<p>The SPI of the service is:</p>
</div>
@@ -1531,7 +1665,145 @@ this object.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_rgfis_spi_PublishingServiceInternal">4.3. <code>PublishingServiceInternal</code></h3>
+<h3 id="_rgfis_spi_PersistenceSessionServiceInternal">4.3. <code>PersistenceSessionServiceInternal</code></h3>
+<div class="paragraph">
+<p>The (internal) <code>PersistenceSessionServiceInternal</code> domain service acts as a facade to the underlying JDO persistence session / database connection. As such it provides methods for querying and for persisting objects.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The default implementation of this service is not (as of <code>1.13.0</code>) request-scoped, however all of the methods delegate
+to the <code>PersistenceSession</code> of the current <code>IsisSession</code> - obtained from the thread-local of <code>IsisSessionFactory</code> singleton service.
+So, in effect the service does act as if it is request scoped.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_spi_4">4.3.1. SPI</h4>
+<div class="paragraph">
+<p>The SPI of the service is a hierarchy of types. First is <code>AdapterManagerBase</code>:</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">AdapterManagerBase</span> {
+ ObjectAdapter getAdapterFor(<span class="predefined-type">Object</span> pojo); <i class="conum" data-value="1"></i><b>(1)</b>
+ ObjectAdapter adapterFor(<span class="predefined-type">Object</span> domainObject); <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>Gets the <code>ObjectAdapter</code> for the specified domain object if it exists in the identity map, else returns <code>null</code>.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="2"></i><b>2</b></td>
+<td>Looks up or creates a standalone (value) or root adapter.</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The <code>AdapterManager</code> is the immediate subtype:</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">AdapterManager</span> <span class="directive">extends</span> AdapterManagerBase {
+ ObjectAdapter getAdapterFor(<span class="predefined-type">Object</span> pojo); <i class="conum" data-value="1"></i><b>(1)</b>
+ ObjectAdapter adapterFor( <i class="conum" data-value="2"></i><b>(2)</b>
+ <span class="predefined-type">Object</span> pojo, ObjectAdapter parentAdapter,
+ OneToManyAssociation collection);
+ ObjectAdapter mapRecreatedPojo(Oid oid, <span class="predefined-type">Object</span> recreatedPojo); <i class="conum" data-value="3"></i><b>(3)</b>
+ <span class="type">void</span> removeAdapter(ObjectAdapter adapter); <i class="conum" data-value="4"></i><b>(4)</b>
+}</code></pre>
+</div>
+</div>
+<div class="colist arabic">
+<table>
+<tr>
+<td><i class="conum" data-value="1"></i><b>1</b></td>
+<td>Gets the <code>ObjectAdapter</code> for the <code>Oid</code> if it exists in the identity map.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="2"></i><b>2</b></td>
+<td>Looks up or creates a collection adapter.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="3"></i><b>3</b></td>
+<td>Enable RecreatableObjectFacet to 'temporarily' map an existing pojo to an oid.</td>
+</tr>
+<tr>
+<td><i class="conum" data-value="4"></i><b>4</b></td>
+<td>Enable RecreatableObjectFacet to remove a 'temporarily' mapped an adapter for a pojo.</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>Finally, <code>PersistenceSessionServiceInternal</code> is a subtype of <code>AdapterManager</code>:</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">PersistenceSessionServiceInternal</span> <span class="directive">extends</span> AdapterManager {
+
+ <span class="comment">// instantiate</span>
+ ObjectAdapter createTransientInstance(
+ ObjectSpecification spec);
+ ObjectAdapter createViewModelInstance(
+ ObjectSpecification spec, <span class="predefined-type">String</span> memento);
+
+ <span class="comment">// retrieve</span>
+ <span class="type">void</span> resolve(<span class="predefined-type">Object</span> parent);
+ <span class="annotation">@Deprecated</span>
+ <span class="type">void</span> resolve(<span class="predefined-type">Object</span> parent, <span class="predefined-type">Object</span> field);
+ <span class="predefined-type">Object</span> lookup(Bookmark bookmark, <span class="directive">final</span> BookmarkService2.FieldResetPolicy fieldResetPolicy);
+ Bookmark bookmarkFor(<span class="predefined-type">Object</span> domainObject);
+ Bookmark bookmarkFor(<span class="predefined-type">Class</span><?> cls, <span class="predefined-type">String</span> identifier);
+
+ <span class="comment">// beginTran, flush, commit, currentTransaction</span>
+ <span class="type">void</span> beginTran();
+ <span class="type">boolean</span> flush();
+ <span class="type">void</span> commit();
+ Transaction currentTransaction();
+ <span class="type">void</span> executeWithinTransaction(TransactionalClosure transactionalClosure);
+
+ <span class="comment">// makePersistent, remove</span>
+ <span class="type">void</span> makePersistent(ObjectAdapter adapter);
+ <span class="type">void</span> remove(ObjectAdapter adapter);
+ <span class="comment">// allMatchingQuery, firstMatchingQuery</span>
+ <T> <span class="predefined-type">List</span><ObjectAdapter> allMatchingQuery(<span class="predefined-type">Query</span><T> query);
+ <T> ObjectAdapter firstMatchingQuery(<span class="predefined-type">Query</span><T> query);
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_runtime_vs_noop_implementation_2">4.3.2. Runtime vs Noop implementation</h4>
+<div class="paragraph">
+<p>The framework provides two implementations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>PersistenceSessionServiceInternalDefault</code> is provided by <code>isis-core-runtime</code>, and is used during normal use and integration tests</p>
+</li>
+<li>
+<p><code>PersistenceSessionServiceInternalNoop</code> is provided as a fallback by <code>isis-core-metamodel</code>, and is provided to allow the <a href="#rgmvn.adoc">maven plugin</a> to be bootstrapped without any "backend" database.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <code>…​Default</code> implementation takes priority over the <code>…​Noop</code> implementation.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_rgfis_spi_PublishingServiceInternal">4.4. <code>PublishingServiceInternal</code></h3>
<div class="paragraph">
<p>The (internal) <code>PublishingServiceInternal</code> domain service acts as an internal facade to any
configured <a href="rgsvc.html#_rgsvc_spi_PublisherService"><code>PublisherService</code></a> or (deprecated)
@@ -1548,7 +1820,7 @@ those objects that are to be published; these are then passed through to any con
<code>PublishingService</code> implementations.</p>
</div>
<div class="sect3">
-<h4 id="_spi_and_implementation_3">4.3.1. SPI and Implementation</h4>
+<h4 id="_spi_and_implementation_4">4.4.1. SPI and Implementation</h4>
<div class="paragraph">
<p>The SPI of the service is:</p>
</div>
@@ -1601,7 +1873,7 @@ of <code>PropertyEdit</code> (see <a href="rgsvc.html#_rgsvc_api_InteractionCont
</div>
</div>
<div class="sect3">
-<h4 id="_registering_the_service_3">4.3.2. Registering the Service</h4>
+<h4 id="_registering_the_service_3">4.4.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' default
@@ -1610,7 +1882,7 @@ so no further configuration is required.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_related_classes_3">4.3.3. Related Classes</h4>
+<h4 id="_related_classes_3">4.4.3. Related Classes</h4>
<div class="paragraph">
<p>The service delegates between the (internal)
<a href="#_rgfis_spi_ChangedObjectsServiceInternal"><code>ChangedObjectsServiceInternal</code></a> domain service to the
@@ -1624,6 +1896,60 @@ changed objects from <code>ChangedObjectsServiceInternal</code>.</p>
</div>
</div>
</div>
+<div class="sect2">
+<h3 id="_rgfis_spi_TransactionStateProviderInternal">4.5. <code>TransactionStateProviderInternal</code></h3>
+<div class="paragraph">
+<p>The (internal) <code>TransactionStateProviderInternal</code> domain service simply provides the ability to check as to the
+state of the current transaction.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The service will probably be combined with <a href="rgsvc.html#_rgsvc_api_TransactionService"><code>TransactionService</code></a>
+in the future.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_spi_and_implementation_5">4.5.1. SPI and Implementation</h4>
+<div class="paragraph">
+<p>The SPI of the service is simply:</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">TransactionStateProviderInternal</span> {
+ TransactionState getTransactionState();
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_runtime_vs_noop_implementation_3">4.5.2. Runtime vs Noop implementation</h4>
+<div class="paragraph">
+<p>The framework provides two implementations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>TransactionStateProviderInternalDefault</code> is provided by <code>isis-core-runtime</code>, and is used during normal use and integration tests</p>
+</li>
+<li>
+<p><code>TransactionStateProviderInternalNoop</code> is provided as a fallback by <code>isis-core-metamodel</code>, and is provided to allow the <a href="#rgmvn.adoc">maven plugin</a> to be bootstrapped without any "backend" database.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <code>…​Default</code> implementation takes priority over the <code>…​Noop</code> implementation.</p>
+</div>
+</div>
+</div>
</div>
</div>
</div>
@@ -1672,16 +1998,27 @@ changed objects from <code>ChangedObjectsServiceInternal</code>.</p>
</li>
<li><a href="#_rgfis_application-layer">3. Application Layer</a>
<ul class="sectlevel2">
-<li><a href="#_rgfis_spi_CommandDtoServiceInternal">3.1. <code>CommandDtoServiceInternal</code></a>
+<li><a href="#_rgfis_spi_AuthenticationSessionProvider">3.1. <code>AuthenticationSessionProvider</code></a>
+<ul class="sectlevel3">
+<li><a href="#_spi_and_implementation">3.1.1. SPI and Implementation</a></li>
+</ul>
+</li>
+<li><a href="#_rgfis_spi_CommandDtoServiceInternal">3.2. <code>CommandDtoServiceInternal</code></a>
+<ul class="sectlevel3">
+<li><a href="#_spi_implementation">3.2.1. SPI & Implementation</a></li>
+<li><a href="#_related_services_3">3.2.2. Related Services</a></li>
+</ul>
+</li>
+<li><a href="#_rgfis_spi_MessageBrokerServiceInternal">3.3. <code>MessageBrokerServiceInternal</code></a>
<ul class="sectlevel3">
-<li><a href="#_spi_implementation">3.1.1. SPI & Implementation</a></li>
-<li><a href="#_related_services_3">3.1.2. Related Services</a></li>
+<li><a href="#_spi_3">3.3.1. SPI</a></li>
+<li><a href="#_runtime_vs_noop_implementation">3.3.2. Runtime vs Noop implementation</a></li>
</ul>
</li>
-<li><a href="#_rgfis_spi_InteractionDtoServiceInternal">3.2. <code>InteractionDtoServiceInternal</code></a>
+<li><a href="#_rgfis_spi_InteractionDtoServiceInternal">3.4. <code>InteractionDtoServiceInternal</code></a>
<ul class="sectlevel3">
-<li><a href="#_spi_implementation_2">3.2.1. SPI & Implementation</a></li>
-<li><a href="#_related_services_4">3.2.2. Related Services</a></li>
+<li><a href="#_spi_implementation_2">3.4.1. SPI & Implementation</a></li>
+<li><a href="#_related_services_4">3.4.2. Related Services</a></li>
</ul>
</li>
</ul>
@@ -1690,23 +2027,35 @@ changed objects from <code>ChangedObjectsServiceInternal</code>.</p>
<ul class="sectlevel2">
<li><a href="#_rgfis_spi_AuditingServiceInternal">4.1. <code>AuditingServiceInternal</code></a>
<ul class="sectlevel3">
-<li><a href="#_spi_and_implementation">4.1.1. SPI and Implementation</a></li>
+<li><a href="#_spi_and_implementation_2">4.1.1. SPI and Implementation</a></li>
<li><a href="#_registering_the_service">4.1.2. Registering the Service</a></li>
<li><a href="#_related_classes">4.1.3. Related Classes</a></li>
</ul>
</li>
<li><a href="#_rgfis_spi_ChangedObjectsServiceInternal">4.2. <code>ChangedObjectsServiceInternal</code></a>
<ul class="sectlevel3">
-<li><a href="#_spi_and_implementation_2">4.2.1. SPI and Implementation</a></li>
+<li><a href="#_spi_and_implementation_3">4.2.1. SPI and Implementation</a></li>
<li><a href="#_registering_the_service_2">4.2.2. Registering the Service</a></li>
<li><a href="#_related_classes_2">4.2.3. Related Classes</a></li>
</ul>
</li>
-<li><a href="#_rgfis_spi_PublishingServiceInternal">4.3. <code>PublishingServiceInternal</code></a>
+<li><a href="#_rgfis_spi_PersistenceSessionServiceInternal">4.3. <code>PersistenceSessionServiceInternal</code></a>
+<ul class="sectlevel3">
+<li><a href="#_spi_4">4.3.1. SPI</a></li>
+<li><a href="#_runtime_vs_noop_implementation_2">4.3.2. Runtime vs Noop implementation</a></li>
+</ul>
+</li>
+<li><a href="#_rgfis_spi_PublishingServiceInternal">4.4. <code>PublishingServiceInternal</code></a>
+<ul class="sectlevel3">
+<li><a href="#_spi_and_implementation_4">4.4.1. SPI and Implementation</a></li>
+<li><a href="#_registering_the_service_3">4.4.2. Registering the Service</a></li>
+<li><a href="#_related_classes_3">4.4.3. Related Classes</a></li>
+</ul>
+</li>
+<li><a href="#_rgfis_spi_TransactionStateProviderInternal">4.5. <code>TransactionStateProviderInternal</code></a>
<ul class="sectlevel3">
-<li><a href="#_spi_and_implementation_3">4.3.1. SPI and Implementation</a></li>
-<li><a href="#_registering_the_service_3">4.3.2. Registering the Service</a></li>
-<li><a href="#_related_classes_3">4.3.3. Related Classes</a></li>
+<li><a href="#_spi_and_implementation_5">4.5.1. SPI and Implementation</a></li>
+<li><a href="#_runtime_vs_noop_implementation_3">4.5.2. Runtime vs Noop implementation</a></li>
</ul>
</li>
</ul>