You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/12/28 16:08:59 UTC
[2/6] isis-site git commit: ISIS-1465: tidies up documentation of
FixtureScripts
http://git-wip-us.apache.org/repos/asf/isis-site/blob/991e7cdf/content/guides/rgsvc/rgsvc.html
----------------------------------------------------------------------
diff --git a/content/guides/rgsvc/rgsvc.html b/content/guides/rgsvc/rgsvc.html
index a35d6d0..db0f5de 100644
--- a/content/guides/rgsvc/rgsvc.html
+++ b/content/guides/rgsvc/rgsvc.html
@@ -565,7 +565,250 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect1">
- <h2 id="_rgsvc_presentation-layer-spi">3. Presentation Layer SPI</h2>
+ <h2 id="_rgsvc_presentation-layer-api">3. Presentation Layer API</h2>
+ <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
+ <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
+ <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
+ <ul class="dropdown-menu">
+ <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li>
+ <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li>
+ <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li>
+ <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li>
+ </ul>
+ </div>
+ <div class="sectionbody">
+ <div class="paragraph">
+ <p>Domain service APIs for the presentation layer allow the domain objects to control aspects of the user interface. The implementations are specific to the particular viewer (<a href="../ugvw/ugvw.html">Wicket viewer</a> or <a href="../ugvro/ugvro.html">Restful Objects viewer</a>) so the domain code must guard against them being unavailable in some cases.</p>
+ </div>
+ <div class="paragraph">
+ <p>The table below summarizes the presentation layer APIs defined by Apache Isis. It also lists their corresponding implementation.</p>
+ </div>
+ <table class="tableblock frame-all grid-all spread">
+ <caption class="title">
+ Table 1. Presentation Layer API
+ </caption>
+ <colgroup>
+ <col style="width: 25%;">
+ <col style="width: 50%;">
+ <col style="width: 12.5%;">
+ <col style="width: 12.5%;">
+ </colgroup>
+ <thead>
+ <tr>
+ <th class="tableblock halign-left valign-top">API</th>
+ <th class="tableblock halign-left valign-top">Description</th>
+ <th class="tableblock halign-left valign-top">Implementation</th>
+ <th class="tableblock halign-left valign-top">Notes</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-api_AcceptHeaderService"><code>o.a.i.applib.</code><br> <code>services.acceptheader</code><br> <code>AcceptHeaderService</code></a></p></td>
+ <td class="tableblock halign-left valign-top">
+ <div>
+ <div class="paragraph">
+ <p>Request-scoped access to HTTP Accept headers.</p>
+ </div>
+ </div></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><code>AcceptHeaderServiceDefault</code><br> <code>o.a.i.core</code><br> <code>isis-core-viewer-restfulobjects-rendering</code></p></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Implementation only usable within the <a href="../ugvro/ugvro.html">Restful Objects viewer</a>.</p></td>
+ </tr>
+ <tr>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-api_BookmarkUiService"><code>o.a.i.applib.</code><br> <code>services.bookmarkui</code><br> <code>BookmarkUiService</code></a></p></td>
+ <td class="tableblock halign-left valign-top">
+ <div>
+ <div class="paragraph">
+ <p>Manage bookmarks and breadcrumbs in the UIO.</p>
+ </div>
+ </div></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><code>BookmarkUiServiceWicket</code><br> <code>o.a.i.core</code><br> <code>isis-core-viewer-wicket-impl</code></p></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock">(<code>1.16.0-SNAPSHOT</code>) Implementation only usable within the <a href="../ugvw/ugvw.html">Wicket viewer</a>.</p></td>
+ </tr>
+ <tr>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_presentation-api_DeepLinkService"><code>o.a.i.applib</code><br> <code>services.deeplink</code><br> <code>DeepLinkService</code></a></p></td>
+ <td class="tableblock halign-left valign-top">
+ <div>
+ <div class="paragraph">
+ <p>Obtain a URL to a domain object (eg for use within an email or report)</p>
+ </div>
+ </div></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><code>DeepLinkServiceWicket</code><br> <code>o.a.i.viewer</code><br> <code>isis-core-viewer-wicket-impl</code></p></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Implementation only usable within the <a href="../ugvw/ugvw.html">Wicket viewer</a>.</p></td>
+ </tr>
+ <tr>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_presentation-api_GuiceBeanProvider"><code>o.a.i.applib.</code><br> <code>services.guice</code><br> <code>GuiceBeanProvider</code></a></p></td>
+ <td class="tableblock halign-left valign-top">
+ <div>
+ <div class="paragraph">
+ <p>Access to internal framework services initialized using Guice DI.</p>
+ </div>
+ </div></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock"><code>GuiceBeanProviderWicket</code><br> <code>o.a.i.core</code><br> <code>isis-core-viewer-wicket-impl</code></p></td>
+ <td class="tableblock halign-left valign-top"><p class="tableblock">Implementation only usable within the <a href="../ugvw/ugvw.html">Wicket viewer</a>.</p></td>
+ </tr>
+ </tbody>
+ </table>
+ <div class="paragraph">
+ <p>Key:</p>
+ </div>
+ <div class="ulist">
+ <ul>
+ <li> <p><code>o.a.i</code> is an abbreviation for <code>org.apache.isis</code></p> </li>
+ <li> <p><code>o.ia.m</code> is an abbreviation for <code>org.isisaddons.module</code></p> </li>
+ <li> <p><code>o.a.i.c.m.s</code> is an abbreviation for <code>org.apache.isis.core.metamodel.services</code></p> </li>
+ <li> <p><code>o.a.i.c.r.s</code> is an abbreviation for <code>org.apache.isis.core.runtime.services</code></p> </li>
+ </ul>
+ </div>
+ <div class="sect2">
+ <h3 id="_rgsvc_presentation-layer-api_AcceptHeaderService">3.1. <code>AcceptHeaderService</code></h3>
+ <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
+ <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api_AcceptHeaderService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
+ <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
+ <ul class="dropdown-menu">
+ <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li>
+ <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li>
+ <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li>
+ <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li>
+ </ul>
+ </div>
+ <div class="paragraph">
+ <p>The <code>AcceptHeaderService</code> domain service is a <a href="../rgant/rgant.html#_rgant-RequestScoped"><code>@RequestScoped</code></a> service that simply exposes the HTTP <code>Accept</code> header to the domain. Its intended use is to support multiple versions of a REST API, where the responsibility for content negotiation (determining which version of the REST API is to be used) is managed by logic in the domain objects themselves.</p>
+ </div>
+ <div class="admonitionblock note">
+ <table>
+ <tbody>
+ <tr>
+ <td class="icon"> <i class="fa icon-note" title="Note"></i> </td>
+ <td class="content">
+ <div class="paragraph">
+ <p>As an alternative to performing content negotiation within the domain classes, the <a href="../rgfis/rgfis.html#_rgfis_presentation-layer_ContentNegotiationService"><code>ContentNegotiationService</code></a> and <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_ContentMappingService"><code>ContentMappingService</code></a> SPI domain services allow the framework to perform the content negotiation responsibility.</p>
+ </div> </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="sect3">
+ <h4 id="_api_implementation">3.1.1. API & Implementation</h4>
+ <div class="paragraph">
+ <p>The API defined by the service is:</p>
+ </div>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@DomainService</span>(nature = NatureOfService.DOMAIN)
+<span class="annotation">@RequestScoped</span> <i class="conum" data-value="1"></i><b>(1)</b>
+<span class="directive">public</span> <span class="type">interface</span> <span class="class">AcceptHeaderService</span> {
+ <span class="annotation">@Programmatic</span>
+ <span class="predefined-type">List</span><MediaType> getAcceptableMediaTypes(); <i class="conum" data-value="2"></i><b>(2)</b>
+}</code></pre>
+ </div>
+ </div>
+ <div class="colist arabic">
+ <table>
+ <tbody>
+ <tr>
+ <td><i class="conum" data-value="1"></i><b>1</b></td>
+ <td>is <a href="../rgant/rgant.html#_rgant-RequestScoped"><code>@RequestScoped</code></a>, so this domain service instance is scoped to a particular request and is then destroyed</td>
+ </tr>
+ <tr>
+ <td><i class="conum" data-value="2"></i><b>2</b></td>
+ <td>returns the list of media types found in the HTTP Accept header.</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="paragraph">
+ <p>The default implementation is provided by <code>o.a.i.v.ro.rendering.service.acceptheader.AcceptHeaderServiceForRest</code>.</p>
+ </div>
+ <div class="admonitionblock note">
+ <table>
+ <tbody>
+ <tr>
+ <td class="icon"> <i class="fa icon-note" title="Note"></i> </td>
+ <td class="content">
+ <div class="paragraph">
+ <p>Note that the service will only return a list when the request is initiated through the <a href="../ugvro/ugvro.html">Restful Objects viewer</a>. Otherwise the service will return <code>null</code>.</p>
+ </div> </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div class="sect3">
+ <h4 id="_usage">3.1.2. Usage</h4>
+ <div class="paragraph">
+ <p>The intended use of this service is where there are multiple concurrent versions of a REST API, for backward compatibility of existing clients. The <code>AcceptHeaderService</code> allows the responsibility for content negotiation (determining which version of the REST API is to be used) to be performed by logic in the domain objects themselves.</p>
+ </div>
+ <div class="paragraph">
+ <p>The diagram below illustrated this:</p>
+ </div>
+ <div class="imageblock">
+ <div class="content">
+ <a class="image" href="images/reference-services-api/acceptheaderservice.png"><img src="images/reference-services-api/acceptheaderservice.png" alt="acceptheaderservice" width="700px"></a>
+ </div>
+ </div>
+ <div class="paragraph">
+ <p>The REST request is submitted to a domain service with a <a href="../rgant/rgant.html#_rgant-DomainService_nature">nature</a> of <code>VIEW_REST_ONLY</code> (<code>MyRestApi</code> in the diagram). This uses the <code>AcceptHeaderService</code> to obtain the values of the HTTP <code>Accept</code> header. Based on this it delegates to the appropriate underlying domain service (with a nature of <code>DOMAIN</code> so that they are not exposed in the REST API at all).</p>
+ </div>
+ <div class="admonitionblock tip">
+ <table>
+ <tbody>
+ <tr>
+ <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td>
+ <td class="content">
+ <div class="paragraph">
+ <p>The service does not define any conventions as to the format of the media types. The option is to use the media type’s type/subtype, eg <code>application/vnd.myrestapi-v1+json</code>; an alternative is to use a media type parameter as a hint, eg <code>application/json;x-my-rest-api-version=1</code> (where <code>x-my-rest-api-version</code> is the media type parameter).</p>
+ </div>
+ <div class="paragraph">
+ <p>The Restful Objects specification does this something similar with its own <code>x-ro-domain-type</code> media type parameter; this is used by the <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_ContentMappingService"><code>ContentMappingService</code></a> to determine how to map domain objects to view models/DTOs.</p>
+ </div> </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div class="sect2">
+ <h3 id="_rgsvc_presentation-api_BookmarkUiService">3.2. <code>BookmarkUiService</code> (<code>1.16.0-SNAPSHOT</code>)</h3>
+ <div class="paragraph">
+ <p>The <code>BookmarkUiService</code> provides the ability to programmatically interact with bookmarked pages and breadcrumbs, as rendered by the Wicket viewer.</p>
+ </div>
+ <div class="paragraph">
+ <p>One possible use case is programmatically to support multiple "contexts" and allow the end-user to switch from one context to another.</p>
+ </div>
+ <div class="sect3">
+ <h4 id="_api_implementation_2">3.2.1. API & Implementation</h4>
+ <div class="paragraph">
+ <p>The API defined by <code>BookmarkUiService</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">BookmarkUiService</span> {
+ <span class="type">void</span> clear(); <i class="conum" data-value="1"></i><b>(1)</b>
+}</code></pre>
+ </div>
+ </div>
+ <div class="colist arabic">
+ <table>
+ <tbody>
+ <tr>
+ <td><i class="conum" data-value="1"></i><b>1</b></td>
+ <td>Simply clears the current list of breadcrumbs and bookmarks.</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="paragraph">
+ <p>The <a href="../ugvw/ugvw.html">Wicket viewer</a> provides an implementation of this service, <code>o.a.i.viewer.wicket.viewer.services.BookmarkUiServiceWicket</code>.</p>
+ </div>
+ <div class="paragraph">
+ <p>Unresolved directive in _rgsvc_presentation-layer-api.adoc - include::_rgsvc_presentation-api_DeepLinkService.adoc[leveloffset=+1] Unresolved directive in _rgsvc_presentation-layer-api.adoc - include::_rgsvc_presentation-api_GuiceBeanProvider.adoc[leveloffset=+1]</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="sect1">
+ <h2 id="_rgsvc_presentation-layer-spi">4. Presentation Layer SPI</h2>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -585,7 +828,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
<table class="tableblock frame-all grid-all spread">
<caption class="title">
- Table 1. Presentation Layer SPI
+ Table 2. Presentation Layer SPI
</caption>
<colgroup>
<col style="width: 25%;">
@@ -781,7 +1024,7 @@ table.CodeRay td.code>pre{padding:0}
</ul>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_ContentMappingService">3.1. <code>ContentMappingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_ContentMappingService">4.1. <code>ContentMappingService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ContentMappingService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -812,7 +1055,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi">3.1.1. SPI</h4>
+ <h4 id="_spi">4.1.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -863,7 +1106,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementations">3.1.2. Implementations</h4>
+ <h4 id="_implementations">4.1.2. Implementations</h4>
<div class="paragraph">
<p>No default implementations are provided by Apache Isis framework itself.</p>
</div>
@@ -902,14 +1145,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services">3.1.3. Related Services</h4>
+ <h4 id="_related_services">4.1.3. Related Services</h4>
<div class="paragraph">
<p>This service is a companion to the default implementation of the <a href="../rgfis/rgfis.html#_rgfis_presentation-layer_ContentNegotiationService"><code>ContentNegotiationService</code></a>.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_EmailNotificationService">3.2. <code>EmailNotificationService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_EmailNotificationService">4.2. <code>EmailNotificationService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_EmailNotificationService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -933,7 +1176,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The default implementation of this service uses the <a href="../rgsvc/rgsvc.html#_rgsvc_integration-api_EmailService"><code>EmailService</code></a>, which must be configured in order for user registration to be enabled.</p>
</div>
<div class="sect3">
- <h4 id="_spi_2">3.2.1. SPI</h4>
+ <h4 id="_spi_2">4.2.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -972,7 +1215,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation">3.2.2. Implementation</h4>
+ <h4 id="_implementation">4.2.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides a default implementation, <code>o.a.i.core.runtime.services.userreg.EmailNotificationServiceDefault</code> that constructs the emails to send.</p>
</div>
@@ -1002,16 +1245,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_registering_the_service">3.2.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/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' default implementation of <code>EmailNotificationService</code> service is automatically registered and injected (it is annotated with <code>@DomainService</code>) so no further configuration is required.</p>
- </div>
- <div class="paragraph">
- <p>To use an alternative implementation, use <a href="../rgant/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide).</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_related_services_2">3.2.4. Related Services</h4>
+ <h4 id="_related_services_2">4.2.3. Related Services</h4>
<div class="paragraph">
<p>As noted elsewhere, the default implementation of this service uses <a href="../rgsvc/rgsvc.html#_rgsvc_integration-api_EmailService"><code>EmailService</code></a>. This service has no specific configuration properties but does require that the <code>EmailService</code> has been configured.</p>
</div>
@@ -1021,7 +1255,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_ErrorReportingService">3.3. <code>ErrorReportingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_ErrorReportingService">4.3. <code>ErrorReportingService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ErrorReportingService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1036,7 +1270,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The <code>ErrorReportingService</code> service is an optional SPI that provides the ability to record any errors/exceptions that might occur in the application into an external incident recording system (such as JIRA). The service also allows a user-friendly (jargon-free) error message to be returned and rendered to the end-user, along with an optional incident reference (eg a JIRA issue <code>XXX-1234</code>).</p>
</div>
<div class="sect3">
- <h4 id="_spi_3">3.3.1. SPI</h4>
+ <h4 id="_spi_3">4.3.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1115,7 +1349,10 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_2">3.3.2. Implementation</h4>
+ <h4 id="_implementation_2">4.3.2. Implementation</h4>
+ <div class="paragraph">
+ <p>There is no default implementation of this service.</p>
+ </div>
<div class="paragraph">
<p>The (non-ASF) <a href="http://github.com/isisaddons/isis-app-kitchensink">Isis addons' kitchensink</a> app provides an example implementation:</p>
</div>
@@ -1151,15 +1388,9 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
</div>
- <div class="sect3">
- <h4 id="_registering_the_services">3.3.3. Registering the Services</h4>
- <div class="paragraph">
- <p>There is no default implementation of this service. To register your own implementation (and assuming that an <code>AppManifest</code> is being used to <a href="../rgcms/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), then just ensure that the implementation is on the classpath and the module containing the implementation is returned in <code>AppManifest#getModules()</code>.</p>
- </div>
- </div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_ExceptionRecognizer">3.4. <code>ExceptionRecognizer</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_ExceptionRecognizer">4.4. <code>ExceptionRecognizer</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_ExceptionRecognizer.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1180,7 +1411,7 @@ table.CodeRay td.code>pre{padding:0}
<p>It is also possible to provide additional implementations, registered in <code>isis.properties</code>. Unlike other services, where any service registered in <code>isis.properties</code> replaces any default implementations, in the case of this service all implementations registered are "consulted" to see if they recognize an exception (the chain-of-responsibility pattern).</p>
</div>
<div class="sect3">
- <h4 id="_spi_4">3.4.1. SPI</h4>
+ <h4 id="_spi_4">4.4.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1283,7 +1514,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_3">3.4.2. Implementation</h4>
+ <h4 id="_implementation_3">4.4.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides two default implementations:</p>
</div>
@@ -1304,41 +1535,9 @@ table.CodeRay td.code>pre{padding:0}
<p>If you want to recognize and handle additional exceptions (for example to capture error messages specific to the JDBC driver you might be using), then create a fine-grained implementation of <code>ExceptionRecognizer2</code> for the particular error message (there are some convenience implementations of the interface that you can subclass from if required) and register in <code>isis.properties</code>.</p>
</div>
</div>
- <div class="sect3">
- <h4 id="_registering_the_services_2">3.4.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/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then the default implementations provided by the framework (<code>DomainObjectContainerDefault</code> and <code>ExceptionRecognizerCompositeForJdoObjectStore</code>) will be registered.</p>
- </div>
- <div class="paragraph">
- <p>In addition, you can register any further exception recognizers in <code>isis.properties</code>:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="CodeRay highlight"><code data-lang="ini">isis.services=...,\
- com.mycompany.myapp.MyExceptionRecognizer,\
- ...</code></pre>
- </div>
- </div>
- <div class="admonitionblock note">
- <table>
- <tbody>
- <tr>
- <td class="icon"> <i class="fa icon-note" title="Note"></i> </td>
- <td class="content">
- <div class="paragraph">
- <p>Prior to 1.9.0, the <code>ExceptionRecognizerCompositeForJdoObjectStore</code> also required manual registration.</p>
- </div> </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="paragraph">
- <p>If the JDO exception recognizers are not required (rather unlikely), then they can be disabled en-masse using the <a href="../rgcfg/rgcfg.html#_rgcfg_configuring-core">configuration property</a> <code>isis.services.ExceptionRecognizerCompositeForJdoObjectStore.disable</code>.</p>
- </div>
- </div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_GridLoaderService">3.5. <code>GridLoaderService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_GridLoaderService">4.5. <code>GridLoaderService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridLoaderService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1353,7 +1552,7 @@ table.CodeRay td.code>pre{padding:0}
<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_5">3.5.1. SPI</h4>
+ <h4 id="_spi_5">4.5.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1391,7 +1590,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_4">3.5.2. Implementation</h4>
+ <h4 id="_implementation_4">4.5.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>
@@ -1400,23 +1599,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_registering_the_services_3">3.5.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/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/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide).</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_related_services_3">3.5.4. Related Services</h4>
+ <h4 id="_related_services_3">4.5.3. Related Services</h4>
<div class="paragraph">
<p>This service is used by <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_GridService"><code>GridService</code></a>.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_GridService">3.6. <code>GridService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_GridService">4.6. <code>GridService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1440,7 +1630,7 @@ table.CodeRay td.code>pre{padding:0}
<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_6">3.6.1. SPI</h4>
+ <h4 id="_spi_6">4.6.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1501,22 +1691,13 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_5">3.6.2. Implementation</h4>
+ <h4 id="_implementation_5">4.6.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_4">3.6.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/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/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide). That said, there should be little reason to use a different implementation; if behaviour does need to be changed, it would also be possible to replace the implementation of either the <code>GridLoaderService</code> or the <code>GridSystemService</code>.</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_related_services_4">3.6.4. Related Services</h4>
+ <h4 id="_related_services_4">4.6.3. Related Services</h4>
<div class="paragraph">
<p>This service calls <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_GridLoaderService"><code>GridLoaderService</code></a> and <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_GridSystemService"><code>GridSystemService</code></a>.</p>
</div>
@@ -1526,7 +1707,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_GridSystemService">3.7. <code>GridSystemService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_GridSystemService">4.7. <code>GridSystemService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_GridSystemService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1560,7 +1741,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_7">3.7.1. SPI</h4>
+ <h4 id="_spi_7">4.7.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1613,29 +1794,20 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_6">3.7.2. Implementation</h4>
+ <h4 id="_implementation_6">4.7.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/ugvw.html">Wicket viewer</a> components that are capable of interpreting and rendering this metadata).</p>
</div>
</div>
<div class="sect3">
- <h4 id="_registering_the_services_5">3.7.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/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/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide).</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_related_services_5">3.7.4. Related Services</h4>
+ <h4 id="_related_services_5">4.7.3. Related Services</h4>
<div class="paragraph">
<p>This service is used by <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_GridService"><code>GridService</code></a>.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_HintStore">3.8. <code>HintStore</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_HintStore">4.8. <code>HintStore</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_HintStore.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1653,7 +1825,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The default implementation of this service uses the HTTP session. The service is an SPI because the amount of data stored could potentially be quite large (for large numbers of users who use the app all day). An SPI makes it easy to plug in an alternative implementation that is more sophisticated than the default (eg implementing MRU/LRU queue, or using a NoSQL database, or simply to disabling the functionality altogether).</p>
</div>
<div class="sect3">
- <h4 id="_spi_8">3.8.1. SPI</h4>
+ <h4 id="_spi_8">4.8.1. SPI</h4>
<div class="paragraph">
<p>The SPI of <code>HintStore</code> is:</p>
</div>
@@ -1696,13 +1868,13 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_7">3.8.2. Implementation</h4>
+ <h4 id="_implementation_7">4.8.2. Implementation</h4>
<div class="paragraph">
<p>The core framework provides a default implementation of this service (<code>org.apache.isis.viewer.wicket.viewer.services.HintStoreUsingWicketSession</code>).</p>
</div>
</div>
<div class="sect3">
- <h4 id="_view_models">3.8.3. View models</h4>
+ <h4 id="_view_models">4.8.3. View models</h4>
<div class="paragraph">
<p>Hints are stored against the <code>Bookmark</code> of a domain object, essentially the identifier of the domain object. For a domain entity this identifier is fixed and unchanging but for a view models the identifier changes each time the view model’s state changes (the identifier is basically a digest of the object’s state). This means that any hints stored against the view model’s bookmark are in effect lost as soon as the view model is modified.</p>
</div>
@@ -1744,23 +1916,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_registering_the_service_2">3.8.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/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core implementation of <code>HintStore</code> service is automatically registered and injected (it is annotated with <code>@DomainService</code>) so no further configuration is required.</p>
- </div>
- <div class="paragraph">
- <p>To use an alternative implementation, use <a href="../rgant/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide).</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_related_services_6">3.8.5. Related Services</h4>
+ <h4 id="_related_services_6">4.8.4. Related Services</h4>
<div class="paragraph">
<p>The <a href="../ugvw/ugvw.html">Wicket viewer</a> exposes the <a href="../rgcms/rgcms.html#__rgcms_classes_mixins_Object_clearHints">"clear hints"</a> mixin action that is for use by end-users of the application to clear any UI hints that have accumulated for a domain object.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_LocaleProvider">3.9. <code>LocaleProvider</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_LocaleProvider">4.9. <code>LocaleProvider</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_LocaleProvider.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1791,7 +1954,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_9">3.9.1. SPI</h4>
+ <h4 id="_spi_9">4.9.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1808,7 +1971,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_8">3.9.2. Implementation</h4>
+ <h4 id="_implementation_8">4.9.2. Implementation</h4>
<div class="paragraph">
<p>Isis' <a href="../ugvw/ugvw.html">Wicket viewer</a> provides an implementation of this service (<code>LocaleProviderWicket</code>) which leverages Apache Wicket APIs.</p>
</div>
@@ -1827,23 +1990,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_registering_the_services_6">3.9.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/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), <em>and</em> that the <a href="../ugvw/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>
- <div class="paragraph">
- <p>To use an alternative implementation, use <a href="../rgant/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide).</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_related_services_7">3.9.4. Related Services</h4>
+ <h4 id="_related_services_7">4.9.3. Related Services</h4>
<div class="paragraph">
<p>This service works in conjunction with <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_TranslationService"><code>TranslationService</code></a> and <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_TranslationsResolver"><code>TranslationsResolver</code></a> in order to provide i18n support.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_MenuBarsLoaderService">3.10. <code>MenuBarsLoaderService</code> (<code>1.16.0-SNAPSHOT</code>)</h3>
+ <h3 id="_rgsvc_presentation-layer-spi_MenuBarsLoaderService">4.10. <code>MenuBarsLoaderService</code> (<code>1.16.0-SNAPSHOT</code>)</h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsLoaderService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1858,7 +2012,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The <code>MenuBarsLoaderService</code> is used by the default implementation of <a href="#_rgsvc_presentation-layer-spi_MenuBarsService">MenuBarsService</a> to return a a <a href="../rgcms/rgcms.html#_rgcms_classes_menubars"><code>MenuBars</code></a> instance deserialized from the <code>menubars.layout.xml</code> file read from the classpath.</p>
</div>
<div class="sect3">
- <h4 id="_spi_and_implementation">3.10.1. SPI and Implementation</h4>
+ <h4 id="_spi_and_implementation">4.10.1. SPI and Implementation</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1896,7 +2050,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_MenuBarsService">3.11. <code>MenuBarsService</code> (<code>1.16.0-SNAPSHOT</code>)</h3>
+ <h3 id="_rgsvc_presentation-layer-spi_MenuBarsService">4.11. <code>MenuBarsService</code> (<code>1.16.0-SNAPSHOT</code>)</h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1911,7 +2065,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The <code>MenuBarsService</code> is responsible for returning a <a href="../rgcms/rgcms.html#_rgcms_classes_menubars"><code>MenuBars</code></a> instance, a data structure representing the arrangement of domain service actions across multiple menu bars, menus and sections. This is used by the Wicket viewer to build up the menu, and is also served as the "menuBars" resource by the <a href="../ugvro/ugvro.html">Restful Objects</a> viewer.</p>
</div>
<div class="sect3">
- <h4 id="_spi_and_implementation_2">3.11.1. SPI and Implementation</h4>
+ <h4 id="_spi_and_implementation_2">4.11.1. SPI and Implementation</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1951,7 +2105,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_RoutingService">3.12. <code>RoutingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_RoutingService">4.12. <code>RoutingService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_RoutingService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -1997,7 +2151,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_10">3.12.1. SPI</h4>
+ <h4 id="_spi_10">4.12.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2027,7 +2181,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_9">3.12.2. Implementation</h4>
+ <h4 id="_implementation_9">4.12.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides a default implementation - <code>RoutingServiceDefault</code> - 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/rgsvc.html#_rgsvc_application-layer-spi_HomePageProviderService"><code>HomePageProviderService</code></a>.</p>
</div>
@@ -2036,20 +2190,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_registering_the_services_7">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/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' default implementation of <code>RoutingService</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_8">3.12.4. Related Services</h4>
+ <h4 id="_related_services_8">4.12.3. Related Services</h4>
<div class="paragraph">
<p>The default implementation of this service uses the <a href="../rgsvc/rgsvc.html#_rgsvc_application-layer-spi_HomePageProviderService"><code>HomePageProviderService</code></a>.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_SessionLoggingService">3.13. <code>SessionLoggingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_SessionLoggingService">4.13. <code>SessionLoggingService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_SessionLoggingService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2064,7 +2212,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The <code>SessionLoggingService</code> defines an SPI to keep track of (typically: to log) the current sessions that are using the application.</p>
</div>
<div class="sect3">
- <h4 id="_spi_11">3.13.1. SPI</h4>
+ <h4 id="_spi_11">4.13.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2095,7 +2243,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementations_2">3.13.2. Implementations</h4>
+ <h4 id="_implementations_2">4.13.2. Implementations</h4>
<div class="paragraph">
<p>The framework provides an implementation, <code>SessionLoggingService.Stderr</code> that just prints out to standard error. This is not registered by default, but can be easily registered manually using <code>AppManifestAbstract.Builder#withAdditionalServices(…)</code>.</p>
</div>
@@ -2105,7 +2253,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_TableColumnOrderService">3.14. <code>TableColumnOrderService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_TableColumnOrderService">4.14. <code>TableColumnOrderService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TableColumnOrderService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2120,7 +2268,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The <code>TableColumnOrderService</code> provides the ability to reorder (or suppress) columns in both parented- and standalone tables.</p>
</div>
<div class="sect3">
- <h4 id="_spi_12">3.14.1. SPI</h4>
+ <h4 id="_spi_12">4.14.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2157,20 +2305,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_10">3.14.2. Implementation</h4>
+ <h4 id="_implementation_10">4.14.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides a fallback implementation of this service, namely <code>TableColumnOrderService.Default</code>.</p>
</div>
</div>
- <div class="sect3">
- <h4 id="_registering_the_services_8">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/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), then the default implementation of <code>TableColumnOrderService</code> is automatically registered and injected, and no further configuration is required.</p>
- </div>
- </div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_TranslationService">3.15. <code>TranslationService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_TranslationService">4.15. <code>TranslationService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2198,7 +2340,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_13">3.15.1. SPI</h4>
+ <h4 id="_spi_13">4.15.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2244,7 +2386,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_11">3.15.2. Implementation</h4>
+ <h4 id="_implementation_11">4.15.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>
@@ -2252,36 +2394,27 @@ table.CodeRay td.code>pre{padding:0}
<p>The framework also provides a supporting <code>TranslationServicePoMenu</code> provides menu items under the "Prototyping" secondary menu for controlling this service and downloading <code>.pot</code> files for translation.</p>
</div>
<div class="paragraph">
- <p>For more details on the implementation, see <a href="../ugbtb/ugbtb.html#_ugbtb_i18n">i18n support</a>.</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_registering_the_services_9">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/rgcms.html#_rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>) then Apache Isis' core implementation of <code>TranslationService</code> service (along with the supporting menu service) are automatically registered and injected (it is annotated with <code>@DomainService</code>) so no further configuration is required.</p>
- </div>
- <div class="paragraph">
<p>If the menu items are not required then these can be suppressed either using security or by implementing a <a href="../ugbtb/ugbtb.html#_ugbtb_hints-and-tips_vetoing-visibility">vetoing subscriber</a>.</p>
</div>
<div class="paragraph">
- <p>To use an alternative implementation, use <a href="../rgant/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide).</p>
+ <p>For more details on the implementation, see <a href="../ugbtb/ugbtb.html#_ugbtb_i18n">i18n support</a>.</p>
</div>
</div>
<div class="sect3">
- <h4 id="__rgsvc_metadata-api_LayoutService_related-mixins-and-menus">3.15.4. Related Menus</h4>
+ <h4 id="__rgsvc_metadata-api_LayoutService_related-mixins-and-menus">4.15.3. 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_9">3.15.5. Related Services</h4>
+ <h4 id="_related_services_9">4.15.4. Related Services</h4>
<div class="paragraph">
<p>This service works in conjunction with <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_LocaleProvider"><code>LocaleProvider</code></a> and <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_TranslationsResolver"><code>TranslationsResolver</code></a> in order to provide i18n support.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_TranslationsResolver">3.16. <code>TranslationsResolver</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_TranslationsResolver">4.16. <code>TranslationsResolver</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationsResolver.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2312,7 +2445,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_14">3.16.1. SPI</h4>
+ <h4 id="_spi_14">4.16.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2326,7 +2459,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_12">3.16.2. Implementation</h4>
+ <h4 id="_implementation_12">4.16.2. Implementation</h4>
<div class="paragraph">
<p>Isis' <a href="../ugvw/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>
@@ -2345,23 +2478,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_registering_the_service_3">3.16.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/rgcms.html#<em>rgcms_classes_AppManifest-bootstrapping">bootstrap the app</a>), _and that the <a href="../ugvw/ugvw.html">Wicket viewer</a> is being used, then an implementation of <code>TranslationsResolver</code> is automatically registered and injected (it is annotated with <code>@DomainService</code>) so no further configuration is required.</p>
- </div>
- <div class="paragraph">
- <p>To use an alternative implementation, use <a href="../rgant/rgant.html#_rgant-DomainServiceLayout_menuOrder"><code>@DomainServiceLayout#menuOrder()</code></a> (as explained in the <a href="../rgsvc/rgsvc.html#__rgsvc_intro_overriding-the-services">introduction</a> to this guide).</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_related_services_10">3.16.4. Related Services</h4>
+ <h4 id="_related_services_10">4.16.3. Related Services</h4>
<div class="paragraph">
<p>This service works in conjunction with <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_LocaleProvider"><code>LocaleProvider</code></a> and <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_TranslationService"><code>TranslationService</code></a> in order to provide i18n support.</p>
</div>
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_UrlEncodingService">3.17. <code>UrlEncodingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_UrlEncodingService">4.17. <code>UrlEncodingService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UrlEncodingService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2391,7 +2515,7 @@ table.CodeRay td.code>pre{padding:0}
<p>The framework provides a default implementation of this service, <code>UrlEncodingServiceUsingBaseEncoding</code> (also in the applib) that uses <code>base-64</code> encoding to <code>UTF-8</code> charset.</p>
</div>
<div class="sect3">
- <h4 id="_spi_15">3.17.1. SPI</h4>
+ <h4 id="_spi_15">4.17.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by the service is:</p>
</div>
@@ -2421,7 +2545,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_13">3.17.2. Implementation</h4>
+ <h4 id="_implementation_13">4.17.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 exceed 2083 characters. For large view models, there’s the possibility that this limit could be exceeded; in such cases register an alternative implementation of this service.</p>
</div>
@@ -2431,7 +2555,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_UserProfileService">3.18. <code>UserProfileService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_UserProfileService">4.18. <code>UserProfileService</code></h3>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_UserProfileService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2449,7 +2573,7 @@ table.CodeRay td.code>pre{padding:0}
<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_16">3.18.1. SPI</h4>
+ <h4 id="_spi_16">4.18.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by the service is:</p>
</div>
@@ -2479,7 +2603,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_14">3.18.2. Implementation</h4>
+ <h4 id="_implementation_14">4.18.2. Implementation</h4>
<div class="paragraph">
<p>(As of <code>1.16.0-SNAPSHOT</code>) the framework provides a default implementation of this service, <code>o.a.i.core.runtime.services.UserProfileServiceDefault</code>. This simply returns the user’s name as the user’s profile name.</p>
</div>
@@ -2509,7 +2633,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect1">
- <h2 id="_rgsvc_application-layer-api">4. Application Layer API</h2>
+ <h2 id="_rgsvc_application-layer-api">5. Application Layer API</h2>
<div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
<button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2529,7 +2653,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
<table class="tableblock frame-all grid-all spread">
<caption class="title">
- Table 2. Application Layer API
+ Table 3. Application Layer API
</caption>
<colgroup>
<col style="width: 25%;">
@@ -2547,17 +2671,6 @@ table.CodeRay td.code>pre{padding:0}
</thead>
<tbody>
<tr>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_application-layer-api_AcceptHeaderService"><code>o.a.i.applib.</code><br> <code>services.acceptheader</code><br> <code>AcceptHeaderService</code></a></p></td>
- <td class="tableblock halign-left valign-top">
- <div>
- <div class="paragraph">
- <p>Request-scoped access to HTTP Accept headers.</p>
- </div>
- </div></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><code>AcceptHeaderServiceDefault</code><br> <code>o.a.i.core</code><br> <code>isis-viewer-restfulobjects-rendering</code></p></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock">Populated only when the domain objects are accessed using the <a href="../ugvro/ugvro.html">Restful Objects viewer</a>.</p></td>
- </tr>
- <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_application-layer-api_ActionInvocationContext"><code>o.a.i.applib.</code><br> <code>services.actinv</code><br> <code>ActionInvocation-</code><br> <code>Context</code></a></p></td>
<td class="tableblock halign-left valign-top">
<div>
@@ -2631,174 +2744,57 @@ table.CodeRay td.code>pre{padding:0}
<p>Methods for batching long-running work (eg data migration) into multiple sessions.</p>
</div>
</div></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><code>SessionManagementService-</code><br> <code>Default</code><br> <code>o.a.i.core</code><br> <code>isis-core-runtime</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/rgsvc.html#_rgsvc_application-layer-api_TitleService"><code>o.a.i.applib.</code><br> <code>services.title</code><br> <code>TitleService</code></a></p></td>
- <td class="tableblock halign-left valign-top">
- <div>
- <div class="paragraph">
- <p>Methods to programmatically obtain the title or icon of a domain object.</p>
- </div>
- </div></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><code>TitleService-</code><br> <code>Default</code><br> <code>o.a.i.core</code><br> <code>isis-core-metamodel</code></p></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock">Supercedes methods in <a href="../rgsvc/rgsvc.html#_rgsvc_core-domain-api_DomainObjectContainer"><code>DomainObjectContainer</code></a>.</p></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_application-layer-api_TransactionService"><code>o.a.i.applib.</code><br> <code>services.xactn</code><br> <code>TransactionService</code></a></p></td>
- <td class="tableblock halign-left valign-top">
- <div>
- <div class="paragraph">
- <p>Methods for managing transactions.</p>
- </div>
- </div></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><code>TransactionService-</code><br> <code>Default</code><br> <code>o.a.i.core</code><br> <code>isis-core-metamodel</code></p></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock">Supercedes methods in <a href="../rgsvc/rgsvc.html#_rgsvc_core-domain-api_DomainObjectContainer"><code>DomainObjectContainer</code></a>.</p></td>
- </tr>
- <tr>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../rgsvc/rgsvc.html#_rgsvc_application-layer-api_WrapperFactory"><code>o.a.i.applib.</code><br> <code>services.wrapper</code><br> <code>WrapperFactory</code></a></p></td>
- <td class="tableblock halign-left valign-top">
- <div>
- <div class="paragraph">
- <p>Interact with another domain object "as if" through the UI (enforcing business rules, firing domain events)</p>
- </div>
- </div></td>
- <td class="tableblock halign-left valign-top"><p class="tableblock"><code>WrapperFactoryDefault</code><br> <code>o.a.i.core</code><br> <code>isis-core-wrapper</code></p></td>
- <td class="tableblock halign-left valign-top"></td>
- </tr>
- </tbody>
- </table>
- <div class="paragraph">
- <p>Key:</p>
- </div>
- <div class="ulist">
- <ul>
- <li> <p><code>o.a.i</code> is an abbreviation for <code>org.apache.isis</code></p> </li>
- <li> <p><code>o.ia.m</code> is an abbreviation for <code>org.isisaddons.module</code></p> </li>
- <li> <p><code>o.a.i.c.m.s</code> is an abbreviation for <code>org.apache.isis.core.metamodel.services</code></p> </li>
- <li> <p><code>o.a.i.c.r.s</code> is an abbreviation for <code>org.apache.isis.core.runtime.services</code></p> </li>
- </ul>
- </div>
- <div class="sect2">
- <h3 id="_rgsvc_application-layer-api_AcceptHeaderService">4.1. <code>AcceptHeaderService</code></h3>
- <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; ">
- <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_AcceptHeaderService.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button>
- <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
- <ul class="dropdown-menu">
- <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li>
- <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li>
- <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li>
- <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_AcceptHeaderService.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li>
- </ul>
- </div>
- <div class="paragraph">
- <p>The <code>AcceptHeaderService</code> domain service is a <a href="../rgant/rgant.html#_rgant-RequestScoped"><code>@RequestScoped</code></a> service that simply exposes the HTTP <code>Accept</code> header to the domain. Its intended use is to support multiple versions of a REST API, where the responsibility for content negotiation (determining which version of the REST API is to be used) is managed by logic in the domain objects themselves.</p>
- </div>
- <div class="admonitionblock note">
- <table>
- <tbody>
- <tr>
- <td class="icon"> <i class="fa icon-note" title="Note"></i> </td>
- <td class="content">
- <div class="paragraph">
- <p>As an alternative to performing content negotiation within the domain classes, the <a href="../rgfis/rgfis.html#_rgfis_presentation-layer_ContentNegotiationService"><code>ContentNegotiationService</code></a> and <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_ContentMappingService"><code>ContentMappingService</code></a> SPI domain services allow the framework to perform the content negotiation responsibility.</p>
- </div> </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="sect3">
- <h4 id="_api_implementation">4.1.1. API & Implementation</h4>
- <div class="paragraph">
- <p>The API defined by the service is:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@DomainService</span>(nature = NatureOfService.DOMAIN)
-<span class="annotation">@RequestScoped</span> <i class="conum" data-value="1"></i><b>(1)</b>
-<span class="directive">public</span> <span class="type">interface</span> <span class="class">AcceptHeaderService</span> {
- <span class="annotation">@Programmatic</span>
- <span class="predefined-type">List</span><MediaType> getAcceptableMediaTypes(); <i class="conum" data-value="2"></i><b>(2)</b>
-}</code></pre>
- </div>
- </div>
- <div class="colist arabic">
- <table>
- <tbody>
- <tr>
- <td><i class="conum" data-value="1"></i><b>1</b></td>
- <td>is <a href="../rgant/rgant.html#_rgant-RequestScoped"><code>@RequestScoped</code></a>, so this domain service instance is scoped to a particular request and is then destroyed</td>
- </tr>
- <tr>
- <td><i class="conum" data-value="2"></i><b>2</b></td>
- <td>returns the list of media types found in the HTTP Accept header.</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="paragraph">
- <p>The default implementation is provided by <code>o.a.i.v.ro.rendering.service.acceptheader.AcceptHeaderServiceForRest</code>.</p>
- </div>
- <div class="admonitionblock note">
- <table>
- <tbody>
- <tr>
- <td class="icon"> <i class="fa icon-note" title="Note"></i> </td>
- <td class="content">
- <div class="paragraph">
- <p>Note that the service will only return a list when the request is initiated through the <a href="../ugvro/ugvro.html">Restful Objects viewer</a>. Otherwise the service will return <code>null</code>.</p>
- </div> </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_usage">4.1.2. Usage</h4>
- <div class="paragraph">
- <p>The intended use of this service is where there are multiple concurrent versions of a REST API, for backward compatibility of existing clients. The <code>AcceptHeaderService</code> allows the responsibility for content negotiation (determining which version of the REST API is to be used) to be performed by logic in the domain objects themselves.</p>
- </div>
- <div class="paragraph">
- <p>The diagram below illustrated this:</p>
- </div>
- <div class="imageblock">
- <div class="content">
- <a class="image" href="images/reference-services-api/acceptheaderservice.png"><img src="images/reference-services-api/acceptheaderservice.png" alt="acceptheaderservice" width="700px"></a>
- </div>
- </div>
- <div class="paragraph">
- <p>The REST request is submitted to a domain service with a <a href=".
<TRUNCATED>