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 2018/01/03 14:49:43 UTC
[71/87] [abbrv] isis-site git commit: multi-version website now looks
ok
http://git-wip-us.apache.org/repos/asf/isis-site/blob/d1d0f1b8/content/guides/rgsvc/rgsvc.html
----------------------------------------------------------------------
diff --git a/content/guides/rgsvc/rgsvc.html b/content/guides/rgsvc/rgsvc.html
index 8d27aa1..383fd70 100644
--- a/content/guides/rgsvc/rgsvc.html
+++ b/content/guides/rgsvc/rgsvc.html
@@ -179,7 +179,6 @@ table.CodeRay td.code>pre{padding:0}
<li><a href="../../guides/ugfun/ugfun.html">Fundamentals</a></li>
<li><a href="../../guides/ugvw/ugvw.html">Wicket Viewer</a></li>
<li><a href="../../guides/ugvro/ugvro.html">Restful Objects Viewer</a></li>
- <li><a href="../../guides/ugodn/ugodn.html">DataNucleus Object Store</a></li>
<li><a href="../../guides/ugsec/ugsec.html">Security</a></li>
<li><a href="../../guides/ugtst/ugtst.html">Testing</a></li>
<li><a href="../../guides/ugbtb/ugbtb.html">Beyond the Basics</a></li>
@@ -566,379 +565,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect1">
- <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>
- </div>
- <div class="sect2">
- <h3 id="_rgsvc_presentation-api_DeepLinkService">3.3. <code>DeepLinkService</code></h3>
- <div class="paragraph">
- <p>The <code>DeepLinkService</code> provides the ability to obtain a <code>java.net.URI</code> that links to a representation of any (persisted) domain entity or view model.</p>
- </div>
- <div class="paragraph">
- <p>A typical use case is to generate a clickable link for rendering in an email, PDF, tweet or other communication.</p>
- </div>
- <div class="sect3">
- <h4 id="_api_implementation_3">3.3.1. API & Implementation</h4>
- <div class="paragraph">
- <p>The API defined by <code>DeepLinkService</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">DeepLinkService</span> {
- <span class="predefined-type">URI</span> deepLinkFor(<span class="predefined-type">Object</span> domainObject); <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>Creates a URI that can be used to obtain a representation of the provided domain object in one of the Apache Isis viewers.</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.DeepLinkServiceWicket</code>.</p>
- </div>
- <div class="paragraph">
- <p>For the <a href="../ugvro/ugvro.html">RestfulObjects viewer</a>, a URL can be constructed according to the <a href="http://www.restfulobjects.org">Restful Objects spec</a> in conjunction with a <code>Bookmark</code> obtained via the <a href="../rgsvc/rgsvc.html#_rgsvc_integration-api_BookmarkService"><code>BookmarkService</code></a>.</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_usage_within_the_framework">3.3.2. Usage within the framework</h4>
- <div class="paragraph">
- <p>The <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-layer-spi_EmailNotificationService"><code>EmailNotificationService</code></a> uses this service in order to generate emails as part of <a href="../ugvw/ugvw.html#_ugvw_features_user-registration">user registration</a>.</p>
- </div>
- </div>
- </div>
- <div class="sect2">
- <h3 id="_rgsvc_presentation-api_GuiceBeanProvider">3.4. <code>GuiceBeanProvider</code></h3>
- <div class="paragraph">
- <p>The <code>GuiceBeanProvider</code> domain service acts as a bridge between Apache Isis' <a href="../ugvw/ugvw.html">Wicket viewer</a> internal bootstrapping using <a href="https://github.com/google/guice">Google Guice</a>.</p>
- </div>
- <div class="paragraph">
- <p>This service operates at a very low-level, and you are unlikely to have a need for it. It is used internally by the framework, in the default implementation of the <a href="../rgsvc/rgsvc.html#_rgsvc_presentation-api_DeepLinkService"><code>DeepLinkService</code></a>.</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>Currently Apache Isis uses a combination of Guice (within the Wicket viewer only) and a home-grown dependency injection framework. In future versions we intended to refactor the framework to use CDI throughout. At that time this service is likely to become redundant because we will allow any of the internal components of Apache Isis to be injected into your domain object code.</p>
- </div> </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="sect3">
- <h4 id="_api_implementation_4">3.4.1. API & Implementation</h4>
- <div class="paragraph">
- <p>The API defined by this service is:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">interface</span> <span class="class">GuiceBeanProvider</span> {
- <span class="annotation">@Programmatic</span>
- <T> T lookup(<span class="predefined-type">Class</span><T> beanType);
- <span class="annotation">@Programmatic</span>
- <T> T lookup(<span class="predefined-type">Class</span><T> beanType, <span class="directive">final</span> <span class="predefined-type">Annotation</span> qualifier);
-}</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>The <a href="../ugvw/ugvw.html">Wicket viewer</a> this provides an implementation of this service.</p>
- </div>
- </div>
- <div class="sect3">
- <h4 id="_usage_2">3.4.2. Usage</h4>
- <div class="paragraph">
- <p>Using the <a href="../ugvw/ugvw.html">Wicket viewer</a> requires subclassing of <code>IsisWicketApplication</code>. In the subclass it is commonplace to override <code>newIsisWicketModule()</code>, for example:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@Override</span>
-<span class="directive">protected</span> Module newIsisWicketModule() {
- <span class="directive">final</span> Module isisDefaults = <span class="local-variable">super</span>.newIsisWicketModule();
- <span class="directive">final</span> Module overrides = <span class="keyword">new</span> AbstractModule() {
- <span class="annotation">@Override</span>
- <span class="directive">protected</span> <span class="type">void</span> configure() {
- bind(<span class="predefined-type">String</span>.class).annotatedWith(Names.named(<span class="string"><span class="delimiter">"</span><span class="content">applicationName</span><span class="delimiter">"</span></span>))
- .toInstance(<span class="string"><span class="delimiter">"</span><span class="content">ToDo App</span><span class="delimiter">"</span></span>);
- bind(<span class="predefined-type">String</span>.class).annotatedWith(Names.named(<span class="string"><span class="delimiter">"</span><span class="content">applicationCss</span><span class="delimiter">"</span></span>))
- .toInstance(<span class="string"><span class="delimiter">"</span><span class="content">css/application.css</span><span class="delimiter">"</span></span>);
- bind(<span class="predefined-type">String</span>.class).annotatedWith(Names.named(<span class="string"><span class="delimiter">"</span><span class="content">applicationJs</span><span class="delimiter">"</span></span>))
- .toInstance(<span class="string"><span class="delimiter">"</span><span class="content">scripts/application.js</span><span class="delimiter">"</span></span>);
- ...
- }
- };
- <span class="keyword">return</span> Modules.override(isisDefaults).with(overrides);
-}</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>This "module" is in fact a Guice module, and so the <code>GuiceBeanProvider</code> service can be used to lookup any of the components bound into it.</p>
- </div>
- <div class="paragraph">
- <p>For example:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">SomeDomainObject</span> {
- <span class="directive">private</span> <span class="predefined-type">String</span> lookupApplicationName() {
- <span class="keyword">return</span> guiceBeanProvider.lookup(<span class="predefined-type">String</span>.class, Names.named(<span class="string"><span class="delimiter">"</span><span class="content">applicationName</span><span class="delimiter">"</span></span>));
- }
- <span class="annotation">@Inject</span>
- GuiceBeanProvider guiceBeanProvider;
-}</code></pre>
- </div>
- </div>
- <div class="paragraph">
- <p>should return "ToDo App".</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="sect1">
- <h2 id="_rgsvc_presentation-layer-spi">4. Presentation Layer SPI</h2>
+ <h2 id="_rgsvc_presentation-layer-spi">3. 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>
@@ -958,7 +585,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
<table class="tableblock frame-all grid-all spread">
<caption class="title">
- Table 2. Presentation Layer SPI
+ Table 1. Presentation Layer SPI
</caption>
<colgroup>
<col style="width: 25%;">
@@ -1154,7 +781,7 @@ table.CodeRay td.code>pre{padding:0}
</ul>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_ContentMappingService">4.1. <code>ContentMappingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_ContentMappingService">3.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>
@@ -1185,7 +812,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi">4.1.1. SPI</h4>
+ <h4 id="_spi">3.1.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1236,7 +863,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementations">4.1.2. Implementations</h4>
+ <h4 id="_implementations">3.1.2. Implementations</h4>
<div class="paragraph">
<p>No default implementations are provided by Apache Isis framework itself.</p>
</div>
@@ -1275,14 +902,14 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services">4.1.3. Related Services</h4>
+ <h4 id="_related_services">3.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">4.2. <code>EmailNotificationService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_EmailNotificationService">3.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>
@@ -1306,7 +933,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">4.2.1. SPI</h4>
+ <h4 id="_spi_2">3.2.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1345,7 +972,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation">4.2.2. Implementation</h4>
+ <h4 id="_implementation">3.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>
@@ -1375,7 +1002,16 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services_2">4.2.3. Related Services</h4>
+ <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>
<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>
@@ -1385,7 +1021,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_ErrorReportingService">4.3. <code>ErrorReportingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_ErrorReportingService">3.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>
@@ -1400,7 +1036,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">4.3.1. SPI</h4>
+ <h4 id="_spi_3">3.3.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1479,10 +1115,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_2">4.3.2. Implementation</h4>
- <div class="paragraph">
- <p>There is no default implementation of this service.</p>
- </div>
+ <h4 id="_implementation_2">3.3.2. Implementation</h4>
<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>
@@ -1518,9 +1151,15 @@ 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">4.4. <code>ExceptionRecognizer</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_ExceptionRecognizer">3.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>
@@ -1541,7 +1180,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">4.4.1. SPI</h4>
+ <h4 id="_spi_4">3.4.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1644,7 +1283,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_3">4.4.2. Implementation</h4>
+ <h4 id="_implementation_3">3.4.2. Implementation</h4>
<div class="paragraph">
<p>The framework provides two default implementations:</p>
</div>
@@ -1665,9 +1304,41 @@ 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">4.5. <code>GridLoaderService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_GridLoaderService">3.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>
@@ -1682,7 +1353,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">4.5.1. SPI</h4>
+ <h4 id="_spi_5">3.5.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1720,7 +1391,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_4">4.5.2. Implementation</h4>
+ <h4 id="_implementation_4">3.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>
@@ -1729,14 +1400,23 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services_3">4.5.3. Related Services</h4>
+ <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>
<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">4.6. <code>GridService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_GridService">3.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>
@@ -1760,7 +1440,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">4.6.1. SPI</h4>
+ <h4 id="_spi_6">3.6.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1821,13 +1501,22 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_5">4.6.2. Implementation</h4>
+ <h4 id="_implementation_5">3.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="_related_services_4">4.6.3. Related Services</h4>
+ <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>
<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>
@@ -1837,7 +1526,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_GridSystemService">4.7. <code>GridSystemService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_GridSystemService">3.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>
@@ -1871,7 +1560,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_7">4.7.1. SPI</h4>
+ <h4 id="_spi_7">3.7.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -1924,20 +1613,29 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_6">4.7.2. Implementation</h4>
+ <h4 id="_implementation_6">3.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="_related_services_5">4.7.3. Related Services</h4>
+ <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>
<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">4.8. <code>HintStore</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_HintStore">3.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>
@@ -1955,7 +1653,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">4.8.1. SPI</h4>
+ <h4 id="_spi_8">3.8.1. SPI</h4>
<div class="paragraph">
<p>The SPI of <code>HintStore</code> is:</p>
</div>
@@ -1998,13 +1696,13 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_7">4.8.2. Implementation</h4>
+ <h4 id="_implementation_7">3.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">4.8.3. View models</h4>
+ <h4 id="_view_models">3.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>
@@ -2046,14 +1744,23 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services_6">4.8.4. Related Services</h4>
+ <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>
<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">4.9. <code>LocaleProvider</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_LocaleProvider">3.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>
@@ -2084,7 +1791,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_9">4.9.1. SPI</h4>
+ <h4 id="_spi_9">3.9.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2101,7 +1808,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_8">4.9.2. Implementation</h4>
+ <h4 id="_implementation_8">3.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>
@@ -2120,122 +1827,23 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services_7">4.9.3. Related Services</h4>
+ <h4 id="_registering_the_services_6">3.9.3. Registering the 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>
+ <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>
- </div>
- <div class="sect2">
- <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>
- <ul class="dropdown-menu">
- <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsLoaderService.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-spi_MenuBarsLoaderService.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-spi_MenuBarsLoaderService.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-spi_MenuBarsLoaderService.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>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">4.10.1. SPI and Implementation</h4>
<div class="paragraph">
- <p>The SPI defined by this service is:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">interface</span> <span class="class">MenuBarsLoaderService</span> {
- <span class="type">boolean</span> supportsReloading(); <i class="conum" data-value="1"></i><b>(1)</b>
- MenuBars menuBars(); <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>Whether dynamic reloading of the menu bars layout is enabled. If not, then the <a href="#_rgsvc_presentation-layer-spi_MenuBarsService">MenuBarsService</a> will cache the layout once loaded.</td>
- </tr>
- <tr>
- <td><i class="conum" data-value="2"></i><b>2</b></td>
- <td>Returns a new instance of <code>MenuBars</code> if possible, otherwise null.</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="paragraph">
- <p>The framework provides a default implementation of this service, namely <code>o.a.i.core.runtime.services.menu.MenuBarsLayoutServiceDefault</code>.</p>
- </div>
- <div class="paragraph">
- <p>This searches for a file resource <code>menubars.layout.xml</code>, expected to reside in the same package as the <code>AppManifest</code> used to bootstrap the application.</p>
- </div>
- <div class="paragraph">
- <p>It supports reloading only in prototype mode.</p>
+ <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>
- <div class="sect2">
- <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>
- <ul class="dropdown-menu">
- <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.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-spi_MenuBarsService.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-spi_MenuBarsService.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-spi_MenuBarsService.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>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">4.11.1. SPI and Implementation</h4>
- <div class="paragraph">
- <p>The SPI defined by this service is:</p>
- </div>
- <div class="listingblock">
- <div class="content">
- <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">interface</span> <span class="class">MenuBarsService</span> {
- <span class="type">enum</span> Strategy { <i class="conum" data-value="1"></i><b>(1)</b>
- DEFAULT,
- FALLBACK
- }
- MenuBars menuBars(); <i class="conum" data-value="2"></i><b>(2)</b>
- MenuBars menuBars(Strategy strategy); <i class="conum" data-value="3"></i><b>(3)</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>Select whether to return the "default" <code>MenuBars</code> instance - which may be obtained from anywhere, eg read from the classpath, or to "fallback"" and derive from the metamodel facet/annotations.</td>
- </tr>
- <tr>
- <td><i class="conum" data-value="2"></i><b>2</b></td>
- <td>Convenience API to return the default <code>MenuBars</code> instance</td>
- </tr>
- <tr>
- <td><i class="conum" data-value="3"></i><b>3</b></td>
- <td>Returns an instance of <code>MenuBars</code> according the specified strategy.</td>
- </tr>
- </tbody>
- </table>
- </div>
+ <h4 id="_related_services_7">3.9.4. Related Services</h4>
<div class="paragraph">
- <p>The framework provides a default implementation of this service, namely <code>o.a.i.core.runtime.services.menu.MenuBarsServiceDefault</code>. This uses the <a href="#_rgsvc_presentation-layer-spi_MenuBarsLoaderService">MenuBarsLoaderService</a> to load a serialized form of <code>MenuBars</code> instance, called <code>menubars.layout.xml</code>, from the classpath.</p>
+ <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_RoutingService">4.12. <code>RoutingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_RoutingService">3.10. <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>
@@ -2281,7 +1889,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_10">4.12.1. SPI</h4>
+ <h4 id="_spi_10">3.10.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2311,7 +1919,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_9">4.12.2. Implementation</h4>
+ <h4 id="_implementation_9">3.10.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>
@@ -2320,14 +1928,20 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services_8">4.12.3. Related Services</h4>
+ <h4 id="_registering_the_services_7">3.10.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.10.4. 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">4.13. <code>SessionLoggingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_SessionLoggingService">3.11. <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>
@@ -2342,7 +1956,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">4.13.1. SPI</h4>
+ <h4 id="_spi_11">3.11.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2373,7 +1987,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementations_2">4.13.2. Implementations</h4>
+ <h4 id="_implementations_2">3.11.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>
@@ -2383,7 +1997,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_TableColumnOrderService">4.14. <code>TableColumnOrderService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_TableColumnOrderService">3.12. <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>
@@ -2398,7 +2012,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">4.14.1. SPI</h4>
+ <h4 id="_spi_12">3.12.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2435,14 +2049,20 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_10">4.14.2. Implementation</h4>
+ <h4 id="_implementation_10">3.12.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.12.3. Registering the Services</h4>
<div class="paragraph">
- <p>The framework provides a fallback implementation of this service, namely <code>TableColumnOrderService.Default</code>.</p>
+ <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">4.15. <code>TranslationService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_TranslationService">3.13. <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>
@@ -2470,7 +2090,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_13">4.15.1. SPI</h4>
+ <h4 id="_spi_13">3.13.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2516,7 +2136,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_11">4.15.2. Implementation</h4>
+ <h4 id="_implementation_11">3.13.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>
@@ -2524,27 +2144,36 @@ 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.13.3. Registering the Services</h4>
+ <div class="paragraph">
+ <p>Assuming that the <code>configuration-and-annotation</code> services installer is configured (implicit if using the <code>AppManifest</code> to <a href="../rgcms/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>For more details on the implementation, see <a href="../ugbtb/ugbtb.html#_ugbtb_i18n">i18n support</a>.</p>
+ <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="__rgsvc_metadata-api_LayoutService_related-mixins-and-menus">4.15.3. Related Menus</h4>
+ <h4 id="__rgsvc_metadata-api_LayoutService_related-mixins-and-menus">3.13.4. Related Menus</h4>
<div class="paragraph">
<p>The <code>TranslationServicePoMenu</code> menu exposes the <code>TranslationServicePo</code> service’s <code>toPot()</code> method so that all translations can be downloaded as a single file.</p>
</div>
</div>
<div class="sect3">
- <h4 id="_related_services_9">4.15.4. Related Services</h4>
+ <h4 id="_related_services_9">3.13.5. 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">4.16. <code>TranslationsResolver</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_TranslationsResolver">3.14. <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>
@@ -2575,7 +2204,7 @@ table.CodeRay td.code>pre{padding:0}
</table>
</div>
<div class="sect3">
- <h4 id="_spi_14">4.16.1. SPI</h4>
+ <h4 id="_spi_14">3.14.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by this service is:</p>
</div>
@@ -2589,7 +2218,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_12">4.16.2. Implementation</h4>
+ <h4 id="_implementation_12">3.14.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>
@@ -2608,14 +2237,23 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_related_services_10">4.16.3. Related Services</h4>
+ <h4 id="_registering_the_service_3">3.14.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.14.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_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">4.17. <code>UrlEncodingService</code></h3>
+ <h3 id="_rgsvc_presentation-layer-spi_UrlEncodingService">3.15. <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>
@@ -2645,7 +2283,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">4.17.1. SPI</h4>
+ <h4 id="_spi_15">3.15.1. SPI</h4>
<div class="paragraph">
<p>The SPI defined by the service is:</p>
</div>
@@ -2675,7 +2313,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect3">
- <h4 id="_implementation_13">4.17.2. Implementation</h4>
+ <h4 id="_implementation_13">3.15.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>
@@ -2685,7 +2323,7 @@ table.CodeRay td.code>pre{padding:0}
</div>
</div>
<div class="sect2">
- <h3 id="_rgsvc_presentation-layer-spi_UserProfileService">4.18. <code>UserProfileService</c
<TRUNCATED>