You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2016/03/14 21:07:40 UTC
[1/2] isis git commit: ISIS-1228: further edits for the Domain
Service docs
Repository: isis
Updated Branches:
refs/heads/master c21c22c73 -> 719bc149d
ISIS-1228: further edits for the Domain Service docs
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/cbdc90b6
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/cbdc90b6
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/cbdc90b6
Branch: refs/heads/master
Commit: cbdc90b66874ef20fb18f2e149b0460052284df2
Parents: c21c22c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Mar 14 08:44:30 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Mar 14 08:44:30 2016 +0000
----------------------------------------------------------------------
.../main/asciidoc/guides/_rgcms_classes.adoc | 2 +-
.../src/main/asciidoc/guides/_rgsvc_api.adoc | 446 -------------------
.../src/main/asciidoc/guides/_rgsvc_intro.adoc | 123 +++++
.../src/main/asciidoc/guides/_rgsvc_spi.adoc | 343 --------------
.../asciidoc/guides/_rgsvc_testing-api.adoc | 54 ---
.../asciidoc/guides/_rgsvc_testing-spi.adoc | 39 --
.../main/asciidoc/guides/_rgsvc_testing.adoc | 89 ++++
...placing-default-service-implementations.adoc | 2 +-
...re-concepts_framework-provided-services.adoc | 2 +-
.../guides/_ugfun_how-tos_domain-services.adoc | 7 +-
.../images/reference-services/categories.png | Bin 33077 -> 31453 bytes
.../images/reference-services/categories.pptx | Bin 63566 -> 63438 bytes
.../src/main/asciidoc/guides/rgsvc.adoc | 40 +-
13 files changed, 220 insertions(+), 927 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_rgcms_classes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcms_classes.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcms_classes.adoc
index 764ebfb..10a9658 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcms_classes.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcms_classes.adoc
@@ -5,7 +5,7 @@
:_imagesdir: images/
-This chapter describes the usage of various classes and interfaces that are not otherwise associated with xref:rgsvc.adoc#_rgsvc_api[domain] xref:rgsvc.adoc#_rgsvc_spi[services], xref:ugfun.adoc#_ugfun_object-layout[object layout] or xref:rgcfg.adoc#_rgcfg[configuration].
+This chapter describes the usage of various classes and interfaces that are not otherwise associated with xref:rgsvc.adoc[domain services], xref:ugfun.adoc#_ugfun_object-layout[object layout] or xref:rgcfg.adoc#_rgcfg[configuration].
include::_rgcms_classes_AppManifest-bootstrapping.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api.adoc
deleted file mode 100644
index 420960c..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api.adoc
+++ /dev/null
@@ -1,446 +0,0 @@
-[[_rgsvc_api]]
-= Domain Services API
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../
-:_imagesdir: images/
-
-
-Apache Isis includes an extensive number of domain services for your domain objects to use; simply define the service as an annotated field and Apache Isis will inject the service into your object. These services' API are all defined in Apache Isis' applib (`o.a.i.core:isis-core-applib` module); this minimizes the coupling between your code and Apache Isis. It also allows you to easily mock out these services in your unit tests.
-
-[NOTE]
-====
-In addition there are a number of domain services that constitute an SPI; if present they are used by Apache Isis itself rather than by your domain objects. A good example of this is the xref:rgsvc.adoc#_rgsvc_spi_AuditingService[`AuditingService3`] service. The SPI services are covered in the xref:rgsvc.adoc#_rgsvc_spi[Domain Services (SPI) chapter].
-====
-
-
-
-The table below summarizes all the APIs defined by Apache Isis. It also lists their corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the in (non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
-
-.Domain Services
-[cols="3,3a,3a,3a", options="header"]
-|===
-
-|API
-|Description
-|Implementation
-|Notes
-
-
-|xref:rgsvc.adoc#_rgsvc_api_AcceptHeaderService[`o.a.i.applib.` +
-`services.acceptheader` +
-`AcceptHeaderService`]
-|Request-scoped access to HTTP Accept headers.
-|`AcceptHeaderServiceDefault` +
-``o.a.i.core`` +
-``isis-viewer-restfulobjects-rendering``
-|Populated only when the domain objects are accessed using the xref:ugvro.adoc#[Restful Objects viewer].
-
-
-|xref:rgsvc.adoc#_rgsvc_api_ActionInvocationContext[`o.a.i.applib.` +
-`services.actinv` +
-`ActionInvocation-` +
-`Context`]
-|Request-scoped access to whether action is invoked on object and/or on collection of objects
-|`ActionInvocationContext` +
-``o.a.i.core`` +
-``isis-core-applib``
-|API is also concrete class
-
-
-|xref:rgsvc.adoc#_rgsvc_api_BackgroundService[`o.a.i.applib.` +
-`services.background` +
-`BackgroundService`]
-|Programmatic persistence of commands to be persisted (so can be executed by a background mechanism, eg scheduler)
-|`BackgroundServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|depends on: +
-xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`BackgroundCommand-Service`]
-
-
-|xref:rgsvc.adoc#_rgsvc_api_BookmarkService[`o.a.i.applib.` +
-`services.bookmark` +
-`BookmarkService`]
-|Convert object reference to a serializable "bookmark", and vice versa
-|`BookmarkServiceDefault` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|related services:
-`BookmarkHolder-` +
-`ActionContributions`,
-`BookmarkHolder-` +
-`Association-` +
-`Contributions`
-
-
-|xref:rgsvc.adoc#_rgsvc_api_ClockService[`o.a.i.applib.` +
-`services.clock` +
-`ClockService`]
-|Access the current time (and for testing, allow the time to be changed)
-|`ClockService` +
-``o.a.i.core`` +
-``isis-core-applib``
-|API is also a concrete class.
-
-
-|xref:rgsvc.adoc#_rgsvc_api_CommandContext[`o.a.i.applib.` +
-`services.command` +
-`CommandContext`]
-|Request-scoped access the current action that is being invoked, represented as a command object
-|`CommandContext` +
-``o.a.i.core`` +
-``isis-core-applib``
-|API is also a concrete class. +
-depends on: +
-xref:rgsvc.adoc#_rgsvc_spi_CommandService[`CommandService`] for persistent `Command`, else in-memory impl. used
-
-
-|xref:rgsvc.adoc#_rgsvc_api_ConfigurationService[`o.a.i.applib.` +
-`services.config` +
-`ConfigurationService`]
-|(`1.12.0-SNAPSHOT`) Access configuration properties (eg from `isis.properties` file)
-|`ConfigurationService-` +
-``Default`` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
-
-
-
-
-|xref:rgsvc.adoc#_rgsvc_api_DeepLinkService[`o.a.i.applib` +
-`services.deeplink` +
-`DeepLinkService`]
-|Obtain a URL to a domain object (eg for use within an email or report)
-|`DeepLinkServiceWicket` +
-``o.a.i.viewer`` +
-``isis-viewer-wicket-impl``
-|Implementation only usable within Wicket viewer
-
-
-|xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`o.a.i.applib` +
-`DomainObjectContainer`]
-|Generic repository to search, create and delete objects. Also miscellaneous other functions, eg obtain title of object.
-|`DomainObjectContainer-` +
-`Default` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_EmailService[`o.a.i.applib.` +
-`services.email` +
-`EmailService`]
-|Send a HTML email, optionally with attachments.
-|`EmailServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_EventBusService[`o.a.i.applib.` +
-`services.eventbus` +
-`EventBusService`]
-|Programmatically post events to the internal event bus. Also used by Apache Isis itself to broadcast domain events:
-
-* xref:rgant.adoc#_rgant-Action_domainEvent[`Action#domainEvent()`]
-* xref:rgant.adoc#_rgant-Property_domainEvent[`Property#domainEvent()`]
-* xref:rgant.adoc#_rgant-Collection_domainEvent[`Collection#domainEvent()`]
-|`EventBusServiceJdo` +
-``o.a.i.core`` +
-``isis-core-objectstore-jdo-datanucleus``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_FactoryService[`o.a.i.applib.` +
-`services.factory` +
-`FactoryService`]
-|(`1.12.0-SNAPSHOT`) Methods to instantiate and initialize domain objects
-|`FactoryService-` +
-``Default`` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
-
-
-
-
-|xref:rgsvc.adoc#_rgsvc_api_FixtureScriptsDefault[`o.a.i.applib.` +
-`services.` +
-`fixturespec` +
-`FixtureScriptsDefault`]
-|Fallback implementation of xref:rgcms.adoc#_rgcms_classes_super_FixtureScripts[`FixtureScripts`], providing the ability to execute fixture scripts.
-|`FixtureScriptsDefault` +
-``o.a.i.core`` +
-``isis-core-applib``
-|Interacts with xref:rgsvc.adoc#_rgsvc_spi_FixtureScriptsSpecificationProvider[`FixtureScripts-
-SpecificationProvider`].
-
-
-|xref:rgsvc.adoc#_rgsvc_api_GuiceBeanProvider[`o.a.i.applib.` +
-`services.guice` +
-`GuiceBeanProvider`]
-|Access to internal framework services initialized using Guice DI.
-|`GuiceBeanProviderWicket` +
-``o.a.i.core`` +
-``isis-viewer-wicket-impl``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_HomePageProviderService[`o.a.i.applib.` +
-`services.homepage` +
-`HomePageProviderService`]
-|Returns the home page object, if any is defined.
-|`HomePageProvider` +
-`ServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|Used by the default implementation of xref:rgsvc.adoc#_rgsvc_spi_RoutingService[`RoutingService`].
-
-
-|xref:rgsvc.adoc#_rgsvc_api_IsisJdoSupport[`o.a.i.applib.` +
-`services.jdosupport` +
-`IsisJdoSupport`]
-|Lower level access to the JDO Persistence API.
-|`IsisJdoSupportImpl` +
-``o.a.i.core`` +
-``isis-core-objectstore-jdo-datanucleus``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_JaxbService[`o.a.i.applib.` +
-`services.jaxb` +
-`JaxbService`]
-|Marshal and unmarshal JAXB-annotated view models to/from XML.
-|`JaxbServiceDefault` +
-``o.a.i.core`` +
-``isis-core-schema``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_LayoutService[`o.a.i.applib.` +
-`services.layout` +
-`LayoutService`]
-|(`1.12.0-SNAPSHOT`) Provides the ability to download dynamic layout XML files, in various styles.
-|`LayoutServiceDefault` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|Functionality surfaced in the UI through related mixin and menu.
-
-
-
-|xref:rgsvc.adoc#_rgsvc_api_MementoService[`o.a.i.applib.` +
-`services.memento` +
-`MementoService`]
-|Capture a serializable memento of a set of primitives or xref:rgsvc.adoc#_rgsvc_api_BookmarkService[bookmarks]. Primarily used internally, eg in support of commands/auditing.
-|`MementoServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_MessageService[`o.a.i.applib.` +
-`services.message` +
-`MessageService`]
-|(`1.12.0-SNAPSHOT`) Methods to inform or warn the user, or to raise errors.
-|`FactoryService-` +
-``Default`` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
-
-
-
-|xref:rgsvc.adoc#_rgsvc_api_MetaModelService[`o.a.i.applib.` +
-`services.metamodel` +
-`MetaModelService`]
-|Access to certain information from the Apache Isis metamodel.
-|`MetaModelServiceDefault` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_QueryResultsCache[`o.a.i.applib.` +
-`services.` +
-`queryresultscache` +
-`QueryResultsCache`]
-|Request-scoped caching of the results of queries (or any data set generated by a given set of input arguments).
-|`QueryResultsCache` +
-``o.a.i.core`` +
-``isis-core-applib``
-|API is also a concrete class
-
-
-|xref:rgsvc.adoc#_rgsvc_api_RepositoryService[`o.a.i.applib.` +
-`services.repository` +
-`RepositoryService`]
-|(`1.12.0-SNAPSHOT`) Methods to help implement repositories: query for existing objects, persist new or delete existing objects
-|`RepositoryService-` +
-``Default`` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
-
-
-
-|xref:rgsvc.adoc#_rgsvc_api_Scratchpad[`o.a.i.applib.` +
-`services.scratchpad` +
-`Scratchpad`]
-|Request-scoped service for interchanging information between and aggregating over multiple method calls; in particular for use by "bulk" actions (invoking of an action for all elements of a collection)
-|`Scratchpad` +
-``o.a.i.core`` +
-``isis-core-applib``
-|API is also a concrete class
-
-
-|xref:rgsvc.adoc#_rgsvc_api_ServiceRegistry[`o.a.i.applib.` +
-`services.registry` +
-`ServiceRegistry`]
-|(`1.12.0-SNAPSHOT`) Methods to access and use other domain services.
-|`ServiceRegistry-` +
-``Default`` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
-
-
-
-|xref:rgsvc.adoc#_rgsvc_api_SudoService[`o.a.i.applib.` +
-`services.sudo` +
-`SudoService`]
-|For use in testing while running xref:rgcms.adoc#_rgcms_classes_super_FixtureScripts[fixture scripts], allows a block of code to run as a specified user account.
-|`SudoServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|API is also a concrete class
-
-
-|xref:rgsvc.adoc#_rgsvc_api_SwaggerService[`o.a.i.applib.` +
-`services.sudo` +
-`SwaggerService`]
-|Generates link:http://swagger.io/[Swagger] spec files to describe the public and/or private RESTful APIs exposed by the xref:ugvro.adoc#[RestfulObjects viewer]. These can then be used with the link:http://swagger.io/swagger-ui/[Swagger UI] page to explore the REST API, or used to generate client-side stubs using the link:http://swagger.io/swagger-codegen/[Swagger codegen] tool, eg for use in a custom REST client app.
-|`SwaggerServiceDefault` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|A `SwaggerServiceMenu` domain service is also provided which enables the swagger spec to be downloaded. Apache Isis' xref:cgcon.adoc#_cgcon_isis-maven-plugin[Maven plugin] also provides a xref:cgcon.adoc#_cgcon_isis-maven-plugin_swagger[swagger goal] which allows the spec file(s) to be generated at build time (eg so that client-side stubs can then be generated in turn).
-
-
-|xref:rgsvc.adoc#_rgsvc_api_TransactionService[`o.a.i.applib.` +
-`services.xactn` +
-`TransactionService`]
-|(`1.12.0-SNAPSHOT`) Methods for managing transactions.
-|`TransactionService-` +
-``Default`` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
-
-
-|xref:rgsvc.adoc#_rgsvc_api_UserService[`o.a.i.applib.` +
-`services.xactn` +
-`UserService`]
-|(`1.12.0-SNAPSHOT`) Methods to access the currently-logged on user.
-|`UserService-` +
-``Default`` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|Supercedes methods in xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
-
-
-
-
-|xref:rgsvc.adoc#_rgsvc_api_WrapperFactory[`o.a.i.applib.` +
-`services.wrapper` +
-`WrapperFactory`]
-|Interact with another domain object "as if" through the UI (enforcing business rules, firing domain events)
-|`WrapperFactoryDefault` +
-``o.a.i.core`` +
-``isis-core-wrapper``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_api_XmlSnapshotService[`o.a.i.applib.` +
-`services.xmlsnapshot` +
-`XmlSnapshotService`]
-|Generate an XML representation of an object and optionally a graph of related objects.
-|`XmlSnapshotServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|
-
-|===
-
-Key:
-
-* `o.a.i` is an abbreviation for `org.apache.isis`
-* `o.ia.m` is an abbreviation for `org.isisaddons.module`
-
-
-
-
-
-There is also a number of deprecated domain services.
-
-.Deprecated Domain Services
-[cols="3,3a,3a,3a", options="header"]
-|===
-
-|API
-|Description
-|Implementation
-|Notes
-
-|`o.a.i.applib.` +
-`annotation`
-`Bulk.InteractionContext`
-|Request-scoped access to whether action is invoked on object and/or on collection of objects
-|`Bulk.InteractionContext` +
-``o.a.i.core`` +
-``isis-core-applib``
-|Replaced by xref:rgsvc.adoc#_rgsvc_api_ActionInvocationContext[`ActionInvocationContext`]
-
-
-
-|===
-
-Key:
-
-* `o.a.i` is an abbreviation for `org.apache.isis`
-* `o.ia.m` is an abbreviation for `org.isisaddons.module`
-
-
-
-include::_rgsvc_api_AcceptHeaderService.adoc[leveloffset=+1]
-include::_rgsvc_api_ActionInvocationContext.adoc[leveloffset=+1]
-include::_rgsvc_api_BackgroundService.adoc[leveloffset=+1]
-include::_rgsvc_api_BookmarkService.adoc[leveloffset=+1]
-include::_rgsvc_api_ClockService.adoc[leveloffset=+1]
-include::_rgsvc_api_CommandContext.adoc[leveloffset=+1]
-include::_rgsvc_api_ConfigurationService.adoc[leveloffset=+1]
-include::_rgsvc_api_DeepLinkService.adoc[leveloffset=+1]
-include::_rgsvc_api_DomainObjectContainer.adoc[leveloffset=+1]
-include::_rgsvc_api_EmailService.adoc[leveloffset=+1]
-include::_rgsvc_api_EventBusService.adoc[leveloffset=+1]
-include::_rgsvc_api_FactoryService.adoc[leveloffset=+1]
-include::_rgsvc_api_FixtureScriptsDefault.adoc[leveloffset=+1]
-include::_rgsvc_api_GuiceBeanProvider.adoc[leveloffset=+1]
-include::_rgsvc_api_HomePageProviderService.adoc[leveloffset=+1]
-include::_rgsvc_api_IsisJdoSupport.adoc[leveloffset=+1]
-include::_rgsvc_api_JaxbService.adoc[leveloffset=+1]
-include::_rgsvc_api_LayoutService.adoc[leveloffset=+1]
-include::_rgsvc_api_MementoService.adoc[leveloffset=+1]
-include::_rgsvc_api_MessageService.adoc[leveloffset=+1]
-include::_rgsvc_api_MetamodelService.adoc[leveloffset=+1]
-include::_rgsvc_api_QueryResultsCache.adoc[leveloffset=+1]
-include::_rgsvc_api_RepositoryService.adoc[leveloffset=+1]
-include::_rgsvc_api_ServiceRegistry.adoc[leveloffset=+1]
-include::_rgsvc_api_Scratchpad.adoc[leveloffset=+1]
-include::_rgsvc_api_SudoService.adoc[leveloffset=+1]
-include::_rgsvc_api_TransactionService.adoc[leveloffset=+1]
-include::_rgsvc_api_UserService.adoc[leveloffset=+1]
-include::_rgsvc_api_SwaggerService.adoc[leveloffset=+1]
-include::_rgsvc_api_WrapperFactory.adoc[leveloffset=+1]
-include::_rgsvc_api_XmlSnapshotService.adoc[leveloffset=+1]
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc
new file mode 100644
index 0000000..42c02cf
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc
@@ -0,0 +1,123 @@
+[[_rgsvc]]
+= Introduction
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+:_basedir: ../
+:_imagesdir: images/
+:numbered:
+
+
+
+
+== Types of Domain Service
+
+The domain services also group into various broad categories. Many support functionality of the various layers of the
+system (presentation layer, application layer, core domain, persistence layer); others exist to allow the domain objects
+to integrate with other bounded contexts, or provide various metadata (eg for development-time tooling). The diagram below shows these categories:
+
+image::{_imagesdir}reference-services/categories.png[width="800px",link="{_imagesdir}reference-services/categories.png"]
+
+
+A small number of domain services can be considered both API and SPI; a good example is the xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`] that is of direct use for domain objects wishing to send out emails,
+but is also used by the framework to support the xref:ugvw.adoc#_ugvw_features_user-registration[user registration] functionality supported by the xref:ugvw.adoc#[Wicket viewer]. The same is true of the xref:rgsvc.adoc#_rgsvc_api_EventBusService[`EventBusService`]; this can be used by domain objects to broadcast arbitrary events, but is also used by the framework to automatically emit events for xref:rgant.adoc#_rgant-Action_domainEvent[`@Action#domainEvent()`] etc.
+
+For these hybrid services we have categorized the service as an "API" service. This chapter therefore contains only the strictly SPI services.
+
+This rest of this guide is broken out into several chapters, one for each of the various types/categories of domain service.
+
+
+== Applib
+
+The vast majority of Apache Isis' domain services are defined in services' API are all defined in Apache Isis' applib (`o.a.i.core:isis-core-applib` module); this minimizes the coupling between your code and Apache Isis. It also allows you to easily mock out these services in your unit tests.
+
+
+== Using the services
+
+Apache Isis includes an extensive number of domain services for your domain objects to use; simply define the service as an annotated field and Apache Isis will inject the service into your object.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+
+ public void sendEmail( String subject, String body) {
+ List<String> cc = Collections.emptyList;
+ List<String> bcc = Collections.emptyList;
+ emailService.send(getEmailAddress(), cc, bcc, subject, body);
+ }
+
+ public boolean hideSendEmail() {
+ return !emailService.isConfigured();
+ }
+
+ @Inject
+ EmailService emailService;
+}
+----
+
+
+
+== Overriding the services
+
+The framework provides default implementations for many of the domain services. This is convenient, but sometimes you will want to replace the default implementation with your own service implementation.
+
+The trick is to use the xref:rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] attribute, specifying a low number (typically `"1"`).
+
+[NOTE]
+====
+For a small number of domain services, all implementations are used (following the chain-of-responsibility pattern), not just the first one. The services in question are: xref:rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`], xref:rgsvc.adoc#_rgsvc_spi_GridSystemService[`GridSystemService`] (`1.12.0-SNAPSHOT`), and xref:rgsvc.adoc#_rgsvc_spi_RoutingService[`RoutingService`].
+====
+
+For example, suppose you wanted to provide your own implementation of xref:rgsvc.adoc#_rgsvc_api_LocaleProvider[`LocaleProvider`]. Here's how:
+
+[source,java]
+----
+@DomainService(
+ nature = NatureOfService.DOMAIN
+)
+@DomainServiceLayout(
+ menuOrder = "1" // <1>
+)
+public class MyLocaleProvider implements LocaleProvider {
+ @Override
+ public Locale getLocale() {
+ return ...
+ }
+}
+----
+<1> takes precedence over the default implementation.
+
+
+It's also quite common to want to decorate the existing implementation (ie have your own implementation delegate to the default); this is also possible and quite easy (if using `1.10.0` or later). The idea is to have the framework inject all implementations of the service, and then to delegate to the first one that isn't "this" one:
+
+[source,java]
+----
+@DomainService(
+ nature = NatureOfService.DOMAIN
+)
+@DomainServiceLayout(
+ menuOrder = "1" // <1>
+)
+public class MyLocaleProvider implements LocaleProvider {
+ @Override
+ public Locale getLocale() {
+ return getDelegateLocaleProvider().getLocale(); // <2>
+ }
+ Optional<LocaleProvider> delegateLocaleProvider; // <3>
+ private LocaleProvider getDelegateLocaleProvider() {
+ if(delegateLocaleProvider == null) {
+ delegateLocaleProvider = Iterables.tryFind(localeProviders, input -> input != this); // <4>
+ }
+ return delegateLocaleProvider.orNull();
+ }
+ @Inject
+ List<LocaleProvider> localeProviders; // <5>
+}
+----
+<1> takes precedence over the default implementation when injected elsewhere.
+<2> this implementation merely delegates to the default implementation
+<3> lazily populated
+<4> delegate to the first implementation that isn't _this_ implementation (else infinite loop!)
+<5> injects all implementations, including this implemenation
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi.adoc
deleted file mode 100644
index 3dd37bb..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi.adoc
+++ /dev/null
@@ -1,343 +0,0 @@
-[[_rgsvc_spi]]
-= Domain Services SPI
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../
-:_imagesdir: images/
-
-
-
-The table below lists the SPIs that are defined in the Isis applib (`o.a.i.core:isis-core-applib` module).
-
-
-.Applib SPI Services
-[cols="2,4a,1,1", options="header"]
-|===
-
-
-|SPI
-|Description
-|Implementation
-|Notes
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_AuditingService[`o.a.i.applib.` +
-`services.audit` +
-`AuditingService3`]
-|Create an audit record for every changed property of every changed object within a transaction.
-|`AuditingService` +
-``o.ia.m.audit`` +
-``isis-module-audit``
-|related services:
-`AuditingService-` +
-`Contributions`,
-`AuditingService-` +
-`Repository`
-
-|xref:rgsvc.adoc#_rgsvc_spi_BackgroundCommandService[`o.a.i.applib.` +
-`services.background` +
-`BackgroundCommandService`]
-|Persisted a memento of an action invocation such that it can be executed asynchronously ("in the background") eg by a scheduler.
-|`BackgroundCommandServiceJdo` +
-``o.ia.m.command`` +
-``isis-module-command``
-|related services:
-`BackgroundCommandService-` +
-`JdoContributions`,
-`BackgroundCommandService-` +
-`JdoRepository`
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_ClassDiscoveryService[`o.a.i.applib.` +
-`services.classdiscovery` +
-`ClassDiscoveryService`]
-|Mechanism to locate (from the classpath) classes with a specific annotation (eg xref:rgant.adoc#_rgant-DomainService[`@DomainService`])
-
-Subtypes of a given type (eg xref:rgcms.adoc#_rgcms_classes_super_FixtureScript[`FixtureScript`]).
-|`ClassDiscoveryService-` +
-`UsingReflections` +
-``o.a.i.core`` +
-``isis-core-applib``
-|requires `org.reflections:reflections` as Maven dependency
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_CommandService[`o.a.i.applib.` +
-`services.command.spi` +
-`CommandService`]
-|Service to act as a factory and repository (create and save) of command instances, ie representations of an action invocation. Used for command/auditing and background services.
-|`CommandServiceJdo` +
-``o.ia.m.command`` +
-``isis-module-command``
-|related services: +
-`CommandService-` ++
-`JdoContributions`,
-`CommandService-` ++
-`JdoRepository`
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_EmailNotificationService[`o.a.i.applib.` +
-`services.userreg` +
-`EmailNotificationService`]
-|Notify a user during xref:rgsvc.adoc#_rgsvc_spi_UserRegistrationService[self-registration] of users.
-|`EmailNotificationService-` +
-`Default` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|depends on: +
-a configured `EmailService`
-
-|xref:rgsvc.adoc#_rgsvc_spi_ErrorReportingService[`o.a.i.applib.` +
-`services.error` +
-`ErrorReportingService`]
-|Record details of an error occurring in the system (eg in an external incident recording system such as JIRA), and return a more friendly (jargon-free) message to display to the end user, with optional reference (eg `XXX-1234`).
-|(none)
-|
-
-|xref:rgsvc.adoc#_rgsvc_spi_EventSerializer[`o.a.i.applib.` +
-`services.publish` +
-`EventSerializer`]
-|Creates a representation of either an action invocation or a changed object being published through the xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`PublishingService`].
-|`RestfulObjects-` +
-`SpecEventSerializer` +
-``o.ia.m.publishing`` +
-``isis-module-publishing``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_ExceptionRecognizer[`o.a.i.applib.` +
-`services.exceprecog` +
-`ExceptionRecognizer2`]
-|Convert certain exceptions (eg foreign or unique key violation in the database) into a format that can be rendered to the end-user.
-|`ExceptionRecognizer-` +
-`CompositeFor-` +
-`JdoObjectStore` +
-``o.a.i.core`` +
-``isis-core-applib``
-|Extensible using composite pattern if required
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_FixtureScriptsSpecificationProvider[`o.a.i.applib.` +
-`services.fixturespec` +
-`FixtureScripts-` +
-`SpecificationProvider`]
-|Provides settings for xref:rgsvc.adoc#_rgsvc_api_FixtureScriptsDefault[`FixtureScriptsDefault`] fallback domain service for executing fixture scripts.
-|
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_GridSystemService[`o.a.i.applib.` +
-`services.grid` +
-`GridSystemService`]
-|(`1.12.0-SNAPSHOT`) Validates and normalizes the grid layout for a domain class (with respect to a particular grid
-system such as Bootstrap3), also providing a default grid (for those domain classes where there is no grid layout).
-|`GridSystemServiceBS3` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_GridLoaderService[`o.a.i.applib.` +
-`services.grid` +
-`GridLoaderService`]
-|(`1.12.0-SNAPSHOT`) Responsible for loading a grid layout for a domain class, eg from a `layout.xml` file.
-|`GridLoaderServiceDefault` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_GridService[`o.a.i.applib.` +
-`services.grid` +
-`GridService`]
-|(`1.12.0-SNAPSHOT`) A facade on top of both xref:rgsvc.adoc#_rgsvc_spi_GridLoaderService[`GridLoaderService`] and
-xref:rgsvc.adoc#_rgsvc_spi_GridSystemService[`GridSystemService`], thus being able to return normalized
-grids for any domain class.
-|`GridServiceDefault` +
-``o.a.i.core`` +
-``isis-core-metamodel``
-|
-
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_LocaleProvider[`o.a.i.applib.` +
-`services.i18n` +
-`LocaleProvider`]
-|Request-scoped service to return the locale of the current user, in support of i18n (ie so that the app's UI, messages and exceptions can be translated to the required locale by the xref:rgsvc.adoc#_rgsvc_spi_TranslationService[`TranslationService`].
-|`LocaleProviderWicket` +
-``o.a.i.viewer`` +
-``isis-viewer-wicket-impl``
-|
-
-|xref:rgsvc.adoc#_rgsvc_spi_PublishingService[`o.a.i.applib.` +
-`services.publish` +
-`PublishingService`]
-|Publish any action invocations and changed objects, typically for interchange with an external system in a different bounded context.
-|`PublishingService` +
-``o.ia.m.publishing`` +
-``isis-module-publishing``
-|related services:
-`PublishingService-` ++
-``Contributions``,
-`PublishingService-` ++
-``Repository``. +
-depends on: +
-`EventSerializer`
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_RoutingService[`o.a.i.applib.` +
-`services.routing` +
-`RoutingService`]
-|Return an alternative object than that returned by an action.
-|`RoutingServiceDefault` +
-``o.a.i.core`` +
-``isis-core-applib``
-|The default implementation will return the home page (per xref:rgsvc.adoc#_rgsvc_api_HomePageProviderService[`HomePageProviderService`]) if a void or null is returned. +
-Used by the xref:ugvw.adoc#[Wicket viewer] only.
-
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_TranslationService[`o.a.i.applib.` +
-`services.i18n` +
-`TranslationService`]
-|Translate an app's UI, messages and exceptions for the current user (as per the locale provided by xref:rgsvc.adoc#_rgsvc_spi_LocaleProvider[`LocalProvider`].
-|`TranslationServicePo` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|related services: `TranslationServicePoMenu` +
-depends on: +
-`TranslationsResolver`, `LocaleProvider`
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_TranslationsResolver[`o.a.i.applib.` +
-`services.i18n` +
-`TranslationsResolver`]
-|Obtain translations for a particuar phrase and locale, in support of i18n (ie so that the app's UI, messages and exceptions can be translated to the required locale by the xref:rgsvc.adoc#_rgsvc_spi_TranslationService[`TranslationService`]
-|`TranslationsResolverWicket` +
-``o.a.i.viewer`` +
-``isis-viewer-wicket-impl``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_UrlEncodingService[`o.a.i.applib.` +
-`services.urlencoding` +
-`UrlEncodingService`]
-|Converts strings into a form safe for use within a URL. Used to convert view models mementos into usable URL form.
-
-|`UrlEncodingService` +
-`UsingBaseEncoding` +
-``o.a.i.applib`` +
-``isis-core-applib``
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_UserProfileService[`o.a.i.applib.` +
-`services.userprof` +
-`UserProfileService`]
-|Obtain an alternative (usually enriched/customized) name for the current user, to render in the UI.
-|
-|
-
-|xref:rgsvc.adoc#_rgsvc_spi_UserRegistrationService[`o.a.i.applib.` +
-`services.userreg` +
-`UserRegistrationService`]
-|Create a new user account with the configured security mechanism.
-|`SecurityModule-` +
-`AppUserRegistrationService` +
-``o.ia.m.security`` +
-``isis-module-security``
-|depends (implicitly) on: +
-a configured `EmailService`
-
-
-|===
-
-
-Key:
-
-* `o.a.i` is an abbreviation for `org.apache.isis`
-* `o.ia.m` is an abbreviation for `org.isisaddons.module`
-
-
-Where an implementation is available (on the classpath) then it is always registered automatically (that is, they are all (with one exception) annotated with xref:rgant.adoc#_rgant-DomainService[`@DomainService`]. The one exception is xref:rgsvc.adoc#_rgsvc_spi_ExceptionRecognizer[`ExceptionRecognizer`], which must be registered explicitly in `isis.properties`; this makes the service extensible (for new exceptions to be recognized).
-
-
-
-
-There are also some "internal" SPI services whose definitions depend on the internals of the framework (rather than the applib).
-
-[WARNING]
-====
-We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these APIs.
-====
-
-
-
-."Internal" SPI Services
-[cols="3,3,2,2a", options="header"]
-|===
-
-|SPI
-|Maven Module +
-Impl'n (g: a:)
-|Implementation
-|Notes
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_ContentMappingService[`o.a.i.v.ro.` +
-`rendering.service.conneg.` +
-`ContentMappingService`]
-|(Attempt to) map the returned data into the representation required by the client's HTTP `Accept` header.
-|
-|No default implementation.
-
-|xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`o.a.i.v.ro.` +
-`rendering.service.conneg.` +
-`ContentNegotiationService`]
-|Encodes the algorithm that delegates to any registered xref:rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`]s.
-|`ContentNegotiationService-` +
-`XRoDomainType` +
-``o.a.i.core`` +
-`isis-core-viewer-restfulobjects-rendering`
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_RepresentationService[`o.a.i.v.ro.` +
-`rendering.service.` +
-`RepresentationService`]
-|Generates the representations, delegating to any registered xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`ContentNegotiationService`]s.
-|`RepresentationService-` +
-`ForRestfulObjects` +
-``o.a.i.core`` +
-`isis-core-viewer-restfulobjects-rendering`
-|
-
-
-|===
-
-Key:
-
-* `o.a.i.v.ro` is an abbreviation for `org.apache.isis.viewer.restfulobjects`
-
-
-include::_rgsvc_spi_AuditingService.adoc[leveloffset=+1]
-include::_rgsvc_spi_BackgroundCommandService.adoc[leveloffset=+1]
-include::_rgsvc_spi_ClassDiscoveryService.adoc[leveloffset=+1]
-include::_rgsvc_spi_CommandService.adoc[leveloffset=+1]
-include::_rgsvc_spi_ContentMappingService.adoc[leveloffset=+1]
-include::_rgsvc_spi_ContentNegotiationService.adoc[leveloffset=+1]
-include::_rgsvc_spi_EmailNotificationService.adoc[leveloffset=+1]
-include::_rgsvc_spi_ErrorReportingService.adoc[leveloffset=+1]
-include::_rgsvc_spi_EventSerializer.adoc[leveloffset=+1]
-include::_rgsvc_spi_ExceptionRecognizer.adoc[leveloffset=+1]
-include::_rgsvc_spi_FixtureScriptsSpecificationProvider.adoc[leveloffset=+1]
-include::_rgsvc_spi_GridSystemService.adoc[leveloffset=+1]
-include::_rgsvc_spi_GridLoaderService.adoc[leveloffset=+1]
-include::_rgsvc_spi_GridService.adoc[leveloffset=+1]
-include::_rgsvc_spi_LocaleProvider.adoc[leveloffset=+1]
-include::_rgsvc_spi_PublishingService.adoc[leveloffset=+1]
-include::_rgsvc_spi_RepresentationService.adoc[leveloffset=+1]
-include::_rgsvc_spi_RoutingService.adoc[leveloffset=+1]
-include::_rgsvc_spi_TranslationService.adoc[leveloffset=+1]
-include::_rgsvc_spi_TranslationsResolver.adoc[leveloffset=+1]
-include::_rgsvc_spi_UrlEncodingService.adoc[leveloffset=+1]
-include::_rgsvc_spi_UserProfileService.adoc[leveloffset=+1]
-include::_rgsvc_spi_UserRegistrationService.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-api.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-api.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-api.adoc
deleted file mode 100644
index a29fb9f..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-api.adoc
+++ /dev/null
@@ -1,54 +0,0 @@
-[[_rgsvc_testing-api]]
-= Testing API
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../
-:_imagesdir: images/
-
-
-
-The testing APIs provide functionality to domain objects for use when testing or demoing an application.
-
-
-The table below summarizes the testing APIs defined by Apache Isis. It also lists their corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the in (non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
-
-
-.Testing API
-[cols="2,4a,1,1", options="header"]
-|===
-
-|API
-|Description
-|Implementation
-|Notes
-
-
-|xref:rgsvc.adoc#_rgsvc_api_FixtureScriptsDefault[`o.a.i.applib.` +
-`services.` +
-`fixturespec` +
-`FixtureScriptsDefault`]
-|Fallback implementation of xref:rgcms.adoc#_rgcms_classes_super_FixtureScripts[`FixtureScripts`], providing the ability to execute fixture scripts.
-|`FixtureScriptsDefault` +
-``o.a.i.core`` +
-``isis-core-applib``
-|Interacts with xref:rgsvc.adoc#_rgsvc_spi_FixtureScriptsSpecificationProvider[`FixtureScripts-
-SpecificationProvider`].
-
-
-|xref:rgsvc.adoc#_rgsvc_api_SudoService[`o.a.i.applib.` +
-`services.sudo` +
-`SudoService`]
-|For use in testing while running xref:rgcms.adoc#_rgcms_classes_super_FixtureScripts[fixture scripts], allows a block of code to run as a specified user account.
-|`SudoServiceDefault` +
-``o.a.i.core`` +
-``isis-core-runtime``
-|API is also a concrete class
-
-
-
-
-|===
-
-
-
-include::_rgsvc_api_FixtureScriptsDefault.adoc[leveloffset=+1]
-include::_rgsvc_api_SudoService.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-spi.adoc
deleted file mode 100644
index 367d265..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing-spi.adoc
+++ /dev/null
@@ -1,39 +0,0 @@
-[[_rgsvc_testing-spi]]
-= Testing SPI
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-:_basedir: ../
-:_imagesdir: images/
-
-
-
-The testing SPIs allow the framework to provide supporting functionality for use when testing or demoing an application.
-
-
-The table below summarizes the testing SPIs defined by Apache Isis. It also lists their corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the in (non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
-
-
-.Testing SPI
-[cols="2,4a,1,1", options="header"]
-|===
-
-|SPI
-|Description
-|Implementation
-|Notes
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_FixtureScriptsSpecificationProvider[`o.a.i.applib.` +
-`services.fixturespec` +
-`FixtureScripts-` +
-`SpecificationProvider`]
-|Provides settings for xref:rgsvc.adoc#_rgsvc_api_FixtureScriptsDefault[`FixtureScriptsDefault`] fallback domain service for executing fixture scripts.
-|
-|
-
-
-
-|===
-
-
-
-include::_rgsvc_spi_FixtureScriptsSpecificationProvider.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing.adoc
new file mode 100644
index 0000000..05b9bda
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_testing.adoc
@@ -0,0 +1,89 @@
+[[_rgsvc_testing]]
+= Testing
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+The testing APIs provide functionality to domain objects for use when testing or demoing an application.
+
+The testing SPIs allow the framework to provide supporting functionality for use when testing or demoing an application.
+
+
+The table below summarizes the testing APIs defined by Apache Isis. It also lists their corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the in (non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
+
+
+.Testing API
+[cols="2,4a,1,1", options="header"]
+|===
+
+|API
+|Description
+|Implementation
+|Notes
+
+
+|xref:rgsvc.adoc#_rgsvc_api_FixtureScriptsDefault[`o.a.i.applib.` +
+`services.` +
+`fixturespec` +
+`FixtureScriptsDefault`]
+|Fallback implementation of xref:rgcms.adoc#_rgcms_classes_super_FixtureScripts[`FixtureScripts`], providing the ability to execute fixture scripts.
+|`FixtureScriptsDefault` +
+``o.a.i.core`` +
+``isis-core-applib``
+|Interacts with xref:rgsvc.adoc#_rgsvc_spi_FixtureScriptsSpecificationProvider[`FixtureScripts-
+SpecificationProvider`].
+
+
+
+|xref:rgsvc.adoc#_rgsvc_spi_FixtureScriptsSpecificationProvider[`o.a.i.applib.` +
+`services.fixturespec` +
+`FixtureScripts-` +
+`SpecificationProvider`]
+|Provides settings for xref:rgsvc.adoc#_rgsvc_api_FixtureScriptsDefault[`FixtureScriptsDefault`] fallback domain service for executing fixture scripts.
+|
+|
+
+
+|xref:rgsvc.adoc#_rgsvc_api_SudoService[`o.a.i.applib.` +
+`services.sudo` +
+`SudoService`]
+|For use in testing while running xref:rgcms.adoc#_rgcms_classes_super_FixtureScripts[fixture scripts], allows a block of code to run as a specified user account.
+|`SudoServiceDefault` +
+``o.a.i.core`` +
+``isis-core-runtime``
+|API is also a concrete class
+
+
+
+
+|===
+
+
+
+
+
+The table below summarizes the testing SPIs defined by Apache Isis. It also lists their corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the in (non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
+
+
+.Testing SPI
+[cols="2,4a,1,1", options="header"]
+|===
+
+|SPI
+|Description
+|Implementation
+|Notes
+
+
+
+
+|===
+
+
+
+
+include::_rgsvc_api_FixtureScriptsDefault.adoc[leveloffset=+1]
+include::_rgsvc_api_SudoService.adoc[leveloffset=+1]
+include::_rgsvc_spi_FixtureScriptsSpecificationProvider.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_ugbtb_other-techniques_replacing-default-service-implementations.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugbtb_other-techniques_replacing-default-service-implementations.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugbtb_other-techniques_replacing-default-service-implementations.adoc
index bff0d40..50ff20b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugbtb_other-techniques_replacing-default-service-implementations.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugbtb_other-techniques_replacing-default-service-implementations.adoc
@@ -6,7 +6,7 @@
-The framework provides default implementations for many of the xref:rgsvc.adoc#_rgsvc_api[API Services]. This is convenient, but sometimes you will want to replace the default implementation with your own service implementation.
+The framework provides default implementations for many of the xref:rgsvc.adoc[domain services]. This is convenient, but sometimes you will want to replace the default implementation with your own service implementation.
The trick is to use the xref:rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] attribute, specifying a low number (typically `"1"`).
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_framework-provided-services.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_framework-provided-services.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_framework-provided-services.adoc
index f9a6c97..3b56c16 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_framework-provided-services.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_framework-provided-services.adoc
@@ -50,5 +50,5 @@ Bookmarks and Mementos:
* xref:rgsvc.adoc#_rgsvc_api_XmlSnapshotService[`XmlSnapshotService`]
-A full list of services can be found in the xref:rgsvc.adoc#_rgsvc_api[Domain Services (API)] and xref:rgsvc.adoc#_rgsvc_spi[Domain Services (SPI)] chapters of the reference guide.
+A full list of services can be found in the xref:rgsvc.adoc#_rgsvc[Domain Services] reference guide.
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_domain-services.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_domain-services.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_domain-services.adoc
index 26a8119..de379ce 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_domain-services.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_domain-services.adoc
@@ -23,7 +23,7 @@ image::{_imagesdir}how-tos/domain-services/hexagonal-architecture-addons.png[wid
The (non-ASF) link:http://isisaddons.org[Isis Addons] are a good source of domain services, providing SPI implementations of the common cross-cutting concerns, and also a number of APIs for domain objects to invoke (eg tags, excel, settings). Of course, you can also write your own domain services as well, for example to interface with some external CMS system, say.
-The Apache Isis framework also provides numerous in-built domain services. These are catalogued in the reference guide, see xref:rgsvc.adoc#_rgsvc_api[here] and xref:rgsvc.adoc#_rgsvc_spi[here].
+The Apache Isis framework also provides numerous in-built domain services. These are catalogued in the xref:rgsvc.adoc[domain services] reference guide.
@@ -233,7 +233,7 @@ public class MyService extends AbstractService {
}
----
-The framework provides a number of request-scoped services, include a scratchpad service, query results caching, and support for co-ordinating bulk actions. See xref:rgsvc.adoc#_rgsvc_api[here] and xref:rgsvc.adoc#_rgsvc_spi[here] for further details.
+The framework provides a number of request-scoped services, include a xref:rgsvc.adoc#_rgsvc_api_Scratchpad[`Scratchpad`] service query results caching through the xref:rgsvc.adoc#_rgsvc_api_QueryResultsCache[`QueryResultsCache`], and support for co-ordinating bulk actions through the xref:rgsvc.adoc#_rgsvc_api_ActionInvocationContext[`ActionInvocationContext`] service. See the xref:rgsvc.adoc[domain services] reference guide for further details.
@@ -284,8 +284,7 @@ isis.services = employee.Employees,\
This is quite rare, however; you will often want to use default implementations of domain services that are provided by the framework and so will not reside under this prefix.
-Examples of framework-provided services (as defined in the applib) include clock, auditing, publishing, exception handling, view model support, snapshots/mementos, and user/application settings management; see the xref:rgsvc.adoc#_rgsvc_api[here] and _rgsvc_spi[here] for further details.
-
+Examples of framework-provided services (as defined in the applib) include clock, auditing, publishing, exception handling, view model support, snapshots/mementos, and user/application settings management; see the xref:rgsvc.adoc[domain services] reference guide for further details.
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.png
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.png b/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.png
index 5ab8f4c..009ae5b 100644
Binary files a/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.png and b/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.pptx
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.pptx b/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.pptx
index fcfacdc..1dce265 100644
Binary files a/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.pptx and b/adocs/documentation/src/main/asciidoc/guides/images/reference-services/categories.pptx differ
http://git-wip-us.apache.org/repos/asf/isis/blob/cbdc90b6/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
index b63079f..d938f0b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
@@ -44,50 +44,14 @@ for Apache Isis and contribute back to the project)
-=== Domain Service "Categories"
-
-The domain services also group into various broad categories. Many support functionality of the various layers of the
-system (presentation layer, application layer, core domain, persistence layer); others exist to allow the domain objects
-to integrate with other bounded contexts, or provide various metadata (eg for development-time tooling). The diagram below shows these categories:
-
-image::{_imagesdir}reference-services/categories.png[width="800px",link="{_imagesdir}reference-services/categories.png"]
-
-
-A small number of domain services can be considered both API and SPI; a good example is the xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`] that is of direct use for domain objects wishing to send out emails,
-but is also used by the framework to support the xref:ugvw.adoc#_ugvw_features_user-registration[user registration] functionality supported by the xref:ugvw.adoc#[Wicket viewer]. The same is true of the xref:rgsvc.adoc#_rgsvc_api_EventBusService[`EventBusService`]; this can be used by domain objects to broadcast arbitrary events, but is also used by the framework to automatically emit events for xref:rgant.adoc#_rgant-Action_domainEvent[`@Action#domainEvent()`] etc.
-
-For these hybrid services we have categorized the service as an "API" service. This chapter therefore contains only the strictly SPI services.
-
-This guide is broken out into several chapters, one per category.
-
-
-
-=== Applib
-
-The vast majority of Apache Isis' domain services are defined in services' API are all defined in Apache Isis' applib (`o.a.i.core:isis-core-applib` module); this minimizes the coupling between your code and Apache Isis. It also allows you to easily mock out these services in your unit tests.
-
-
-=== Using the services
-
-Apache Isis includes an extensive number of domain services for your domain objects to use; simply define the service as an annotated field and Apache Isis will inject the service into your object.
-
-
-=== Overriding the services
-
-NOTE: TODO - use @DomainServiceLayout#menuOrder() (though there are some which act as chain of responsibility; all implementations are considered).
-
-
-
-
-
+include::_rgsvc_intro.adoc[leveloffset=+1]
include::_rgsvc_presentation-layer-spi.adoc[leveloffset=+1]
include::_rgsvc_application-layer-api.adoc[leveloffset=+1]
include::_rgsvc_application-layer-spi.adoc[leveloffset=+1]
include::_rgsvc_core-domain-api.adoc[leveloffset=+1]
include::_rgsvc_integration-api.adoc[leveloffset=+1]
include::_rgsvc_metadata-api.adoc[leveloffset=+1]
-include::_rgsvc_testing-api.adoc[leveloffset=+1]
-include::_rgsvc_testing-spi.adoc[leveloffset=+1]
+include::_rgsvc_testing.adoc[leveloffset=+1]
include::_rgsvc_persistence-layer-api.adoc[leveloffset=+1]
include::_rgsvc_persistence-layer-spi.adoc[leveloffset=+1]
include::_rgsvc_bootstrapping-spi.adoc[leveloffset=+1]
[2/2] isis git commit: ISIS-1320: moved ContentMappingService to
applib, updated docs.
Posted by da...@apache.org.
ISIS-1320: moved ContentMappingService to applib, updated docs.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/719bc149
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/719bc149
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/719bc149
Branch: refs/heads/master
Commit: 719bc149deaba82c9db97f00ec49dcbdd591c6e7
Parents: cbdc90b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Mar 14 19:58:09 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Mar 14 19:58:09 2016 +0000
----------------------------------------------------------------------
.../src/main/asciidoc/guides/_rgsvc_intro.adoc | 40 ++++---
.../_rgsvc_presentation-layer-internal-spi.adoc | 66 ++++++++++++
.../guides/_rgsvc_presentation-layer-spi.adoc | 82 +++-----------
.../_rgsvc_spi_ContentMappingService.adoc | 107 +++++++++----------
.../guides/_rgsvc_spi_GridSystemService.adoc | 13 ++-
.../guides/_rgsvc_spi_RoutingService.adoc | 10 ++
.../src/main/asciidoc/guides/rgsvc.adoc | 1 +
core/applib/pom.xml | 4 +
.../applib/conmap/ContentMappingService.java | 35 ++++++
core/pom.xml | 6 ++
.../service/conmap/ContentMappingService.java | 7 +-
.../ContentNegotiationServiceXRoDomainType.java | 19 +++-
12 files changed, 241 insertions(+), 149 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc
index 42c02cf..d5153a0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_intro.adoc
@@ -14,7 +14,7 @@ The domain services also group into various broad categories. Many support func
system (presentation layer, application layer, core domain, persistence layer); others exist to allow the domain objects
to integrate with other bounded contexts, or provide various metadata (eg for development-time tooling). The diagram below shows these categories:
-image::{_imagesdir}reference-services/categories.png[width="800px",link="{_imagesdir}reference-services/categories.png"]
+image::{_imagesdir}reference-services/categories.png[width="600px",link="{_imagesdir}reference-services/categories.png"]
A small number of domain services can be considered both API and SPI; a good example is the xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`] that is of direct use for domain objects wishing to send out emails,
@@ -45,16 +45,27 @@ public class Customer {
List<String> bcc = Collections.emptyList;
emailService.send(getEmailAddress(), cc, bcc, subject, body);
}
-
public boolean hideSendEmail() {
return !emailService.isConfigured();
}
- @Inject
+ @Inject // <1>
EmailService emailService;
}
----
+<1> Service automatically injected by the framework.
+
+For objects that are already persisted, the service is automatically injected just after the object is rehydrated by
+JDO/DataNucleus.
+
+For transient objects (instantiated programmatically), the (in `1.12.0-SNAPSHOT`)
+xref:rgsvc.adoc#_rgsvc_api_FactoryService[`FactoryService`]'s ``instantiate()`` method (or the deprecated
+xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`]'s ``newTransientInstance()`` method)
+will automatically inject the services.
+Alternatively the object can be instantiated simply using `new`, then services injected using (`1.12.0-SNAPSHOT)
+xref:rgsvc.adoc#_rgsvc_api_ServiceRegistry[`ServiceRegistry`]'s ``injectServicesInto(...)`` method (or the deprecated
+xref:rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`]'s ``injectServicesInto(...)`` method).
== Overriding the services
@@ -92,32 +103,27 @@ It's also quite common to want to decorate the existing implementation (ie have
[source,java]
----
-@DomainService(
- nature = NatureOfService.DOMAIN
-)
+@DomainService(nature=NatureOfService.DOMAIN)
@DomainServiceLayout(
- menuOrder = "1" // <1>
+ menuOrder = "1" // <1>
)
public class MyLocaleProvider implements LocaleProvider {
@Override
public Locale getLocale() {
- return getDelegateLocaleProvider().getLocale(); // <2>
+ return getDelegateLocaleProvider().getLocale(); // <2>
}
- Optional<LocaleProvider> delegateLocaleProvider; // <3>
private LocaleProvider getDelegateLocaleProvider() {
- if(delegateLocaleProvider == null) {
- delegateLocaleProvider = Iterables.tryFind(localeProviders, input -> input != this); // <4>
- }
- return delegateLocaleProvider.orNull();
+ return Iterables.tryFind(localeProviders, input -> input != this).orNull(); // <3>
}
@Inject
- List<LocaleProvider> localeProviders; // <5>
+ List<LocaleProvider> localeProviders; // <4>
}
----
<1> takes precedence over the default implementation when injected elsewhere.
<2> this implementation merely delegates to the default implementation
-<3> lazily populated
-<4> delegate to the first implementation that isn't _this_ implementation (else infinite loop!)
-<5> injects all implementations, including this implemenation
+<3> find the first implementation that isn't _this_ implementation (else infinite loop!)
+<4> injects all implementations, including this implemenation
+
+The above code could be improved by caching the delegateLocaleProvider once located (rather than searching each time).
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc
new file mode 100644
index 0000000..153c61a
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-internal-spi.adoc
@@ -0,0 +1,66 @@
+[[_rgsvc_presentation-layer-internal-spi]]
+= Presentation Layer internal SPI
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+Domain service SPIs for the presentation layer influence how the Apache Isis viewers behave. In addition to those defined in the applib, the framework also defines a small number of services that use classes that are internal to the framework.
+
+[WARNING]
+====
+We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these ASPIs.
+====
+
+
+The table below summarizes the presentation layer non-public SPIs defined by Apache Isis. It also lists their corresponding implementation, either a default implementation provided by Apache Isis itself, or provided by one of the in (non-ASF) link:http://www.isisaddons.org[Isis Addons] modules.
+
+
+
+."Internal" SPI Services
+[cols="3,3,2,2a", options="header"]
+|===
+
+|SPI
+|Maven Module +
+Impl'n (g: a:)
+|Implementation
+|Notes
+
+
+
+
+|xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`o.a.i.v.ro.` +
+`rendering.service.conneg.` +
+`ContentNegotiationService`]
+|Encodes the algorithm that delegates to any registered xref:rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`]s.
+|`ContentNegotiationService-` +
+`XRoDomainType` +
+``o.a.i.core`` +
+`isis-core-viewer-restfulobjects-rendering`
+|
+
+
+|xref:rgsvc.adoc#_rgsvc_spi_RepresentationService[`o.a.i.v.ro.` +
+`rendering.service.` +
+`RepresentationService`]
+|Generates the representations, delegating to any registered xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`ContentNegotiationService`]s.
+|`RepresentationService-` +
+`ForRestfulObjects` +
+``o.a.i.core`` +
+`isis-core-viewer-restfulobjects-rendering`
+|
+
+
+|===
+
+Key:
+
+* `o.a.i.v.ro` is an abbreviation for `org.apache.isis.viewer.restfulobjects`
+
+
+
+
+include::_rgsvc_spi_ContentNegotiationService.adoc[leveloffset=+1]
+include::_rgsvc_spi_RepresentationService.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-spi.adoc
index 17c136e..92dd48a 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_presentation-layer-spi.adoc
@@ -21,6 +21,17 @@ The table below summarizes the presentation layer SPIs defined by Apache Isis.
|Notes
+|xref:rgsvc.adoc#_rgsvc_spi_ContentMappingService[`o.a.i.applb.` +
+`services.conmap` +
+`ContentMappingService`]
+|(Attempt to) map the returned data into the representation required by the client's HTTP `Accept` header.
+|
+|(Added in `1.12.0-SNAPSHOT`) Replaces (and simplifies) the earlier `ContentMappingService` that defined an SPI using classes internal to the framework. +
++
+No default implementation.
+
+
+
|xref:rgsvc.adoc#_rgsvc_spi_EmailNotificationService[`o.a.i.applib.` +
`services.userreg` +
`EmailNotificationService`]
@@ -158,76 +169,12 @@ Key:
-There are also a number of presentation layer SPIs that use "internal" classes. Semver is not guaranteed for these SPIs.
-
-
-."Internal" SPI Services
-[cols="3,3,2,2a", options="header"]
-|===
-
-|SPI
-|Maven Module +
-Impl'n (g: a:)
-|Implementation
-|Notes
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_ContentMappingService[`o.a.i.v.ro.` +
-`rendering.service.conneg.` +
-`ContentMappingService`]
-|(Attempt to) map the returned data into the representation required by the client's HTTP `Accept` header.
-|
-|No default implementation.
-
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`o.a.i.v.ro.` +
-`rendering.service.conneg.` +
-`ContentNegotiationService`]
-|Encodes the algorithm that delegates to any registered xref:rgsvc.adoc#_rgsvc_spi_ContentMappingService[`ContentMappingService`]s.
-|`ContentNegotiationService-` +
-`XRoDomainType` +
-``o.a.i.core`` +
-`isis-core-viewer-restfulobjects-rendering`
-|
-
-
-|xref:rgsvc.adoc#_rgsvc_spi_RepresentationService[`o.a.i.v.ro.` +
-`rendering.service.` +
-`RepresentationService`]
-|Generates the representations, delegating to any registered xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`ContentNegotiationService`]s.
-|`RepresentationService-` +
-`ForRestfulObjects` +
-``o.a.i.core`` +
-`isis-core-viewer-restfulobjects-rendering`
-|
-
-
-|===
-
-Key:
-
-* `o.a.i.v.ro` is an abbreviation for `org.apache.isis.viewer.restfulobjects`
-
-
+There are also a number of presentation layer SPIs that use internal classes. These can be found in the xref:rgsvc.adoc#_rgsvc_presentation-layer-internal-spi[next chapter].
-
-
-There are also some "internal" SPI services whose definitions depend on the internals of the framework (rather than the applib).
-
-[WARNING]
-====
-We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these APIs.
-====
-
-
-
include::_rgsvc_spi_ContentMappingService.adoc[leveloffset=+1]
-include::_rgsvc_spi_ContentNegotiationService.adoc[leveloffset=+1]
-
include::_rgsvc_spi_EmailNotificationService.adoc[leveloffset=+1]
include::_rgsvc_spi_ErrorReportingService.adoc[leveloffset=+1]
include::_rgsvc_spi_ExceptionRecognizer.adoc[leveloffset=+1]
@@ -235,9 +182,6 @@ include::_rgsvc_spi_GridSystemService.adoc[leveloffset=+1]
include::_rgsvc_spi_GridLoaderService.adoc[leveloffset=+1]
include::_rgsvc_spi_GridService.adoc[leveloffset=+1]
include::_rgsvc_spi_LocaleProvider.adoc[leveloffset=+1]
-
-include::_rgsvc_spi_RepresentationService.adoc[leveloffset=+1]
-
include::_rgsvc_spi_RoutingService.adoc[leveloffset=+1]
include::_rgsvc_spi_TranslationService.adoc[leveloffset=+1]
include::_rgsvc_spi_TranslationsResolver.adoc[leveloffset=+1]
@@ -245,5 +189,3 @@ include::_rgsvc_spi_UrlEncodingService.adoc[leveloffset=+1]
include::_rgsvc_spi_UserProfileService.adoc[leveloffset=+1]
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ContentMappingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ContentMappingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ContentMappingService.adoc
index 997ce3e..e755cf5 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ContentMappingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_ContentMappingService.adoc
@@ -6,99 +6,94 @@
-The `ContentMappingService` supports the (default implementation of the) xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`ContentNegotiationService`] allowing the xref:ugvro.adoc#[RestfulObjects viewer] to allow domain objects to be transformed into some other format as specified by the HTTP `Accept` header.
+The `ContentMappingService` supports the (default implementation of the)
+xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`ContentNegotiationService`] allowing the
+xref:ugvro.adoc#[RestfulObjects viewer] to allow domain objects to be transformed into some other format as specified
+by the HTTP `Accept` header.
See xref:rgsvc.adoc#_rgsvc_spi_ContentNegotiationService[`ContentNegotiationService`] for further discussion.
+[NOTE]
+====
+Unlike most other domain services, the framework (that is, `ContentNegotiationService`) will check _all_ available
+implementations of `ContentMappingService` to convert the domain object to the requested media type, rather than merely
+the first implementation found; in other words it uses the chain-of-responsibility pattern. Services are checked
+in the ordering defined by xref:rgant.adoc#_rgant_DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`]).
+The mapped object used will be the first non-`null` result returned by an implementation.
+====
+
== SPI
-The SPI defined by this service is:
+The SPI defined by this service is (as of `1.12.0-SNAPSHOT`):
[source,java]
----
public interface ContentMappingService {
- @Programmatic
Object map(Object object, // <1>
- List<MediaType> acceptableMediaTypes, // <2>
- RepresentationType representationType); // <3>
-
+ List<MediaType> acceptableMediaTypes); // <2>
}
----
<1> typically the input is a domain object (whose structure might change over time), and the output is a DTO (whose structure is guaranteed to be preserved over time)
<2> as per the caller's HTTP `Accept` header
-<3> the representation type required (as per the link:http://restfulobjects.org[Restful Objects spec]).
-[WARNING]
-====
-This is an "internal" SPI, meaning that it uses types that are not part of the Isis applib. We do not guarantee that link:http://semver.org[semantic versioning] will be honoured for these APIs.
-====
+In versions prior to `1.12.0-SNAPSHOT`, this interface resided in a different package, internal to the
+xref:ugvro.adoc[Restful Objects] viewer, and defined a slightly different signature that used an internal enum:
+
+[source,java]
+----
+public interface ContentMappingService {
+ Object map(Object object,
+ List<MediaType> acceptableMediaTypes,
+ RepresentationType representationType); // <1>
+
+}
+
+----
+<1> enum representing the requested representation; only ever take a value of ``DOMAIN_OBJECT`` or ``ACTION_RESULT``.
+
== Implementations
-No default implementations are provided by Apache Isis framework itself. However, the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp] includes a sample implementation to convert its `ToDoItem`
-entity into (two different versions of) a `ToDoItemDto` (JAXB annotated). This uses the
-link:http://orika-mapper.github.io/orika-docs/intro.html[Orika] mapping library.
+No default implementations are provided by Apache Isis framework itself.
-The source code is:
+However, the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp] includes a sample implementation to convert its `ToDoItem` entity into a (JAXB annotated) `ToDoItemDto`. The source code is:
[source,java]
----
@DomainService(nature = NatureOfService.DOMAIN)
-public class CustomContentMappingService implements ContentMappingService {
- private MapperFactory mapperFactory; // <1>
- @Programmatic
- @PostConstruct
- public void init() {
- mapperFactory = new DefaultMapperFactory.Builder().build();
- mapperFactory.registerClassMap(
- mapperFactory.classMap(ToDoItem.class, ToDoItemDto.class) // <2>
- .byDefault() // <3>
- .toClassMap());
- mapperFactory.registerClassMap(
- mapperFactory.classMap(Bookmark.class, OidDto.class) // <4>
- .field("identifier", "objectIdentifier") // <5>
- .byDefault() // all other fields are compatible // <6>
- .toClassMap());
- }
- @Programmatic
- @Override // <7>
+public class ContentMappingServiceForToDoItem implements ContentMappingService {
+ @Override
public Object map(
final Object object,
- final List<MediaType> acceptableMediaTypes,
- final RepresentationType representationType) {
+ final List<MediaType> acceptableMediaTypes) {
if(object instanceof ToDoItem) {
- final Bookmark bookmark = bookmarkService.bookmarkFor(object);
- final ToDoItemDto dto =
- mapperFactory.getMapperFacade().map(object, ToDoItemDto.class); // <8>
- final OidDto oidDto =
- mapperFactory.getMapperFacade().map(bookmark, OidDto.class); // <9>
- dto.setOid(oidDto); // <10>
- return dto;
+ for (MediaType acceptableMediaType : acceptableMediaTypes) {
+ final Map<String, String> parameters = acceptableMediaType.getParameters();
+ final String className = parameters.get("x-ro-domain-type");
+ if(className.eqausl(ToDoItemV1_1.class.getName())) {
+ return newToDoItemV1_1((ToDoItem) object);
+ }
+ }
}
return null;
}
- @javax.inject.Inject
- private BookmarkService bookmarkService;
+ private ToDoItemV1_1 newToDoItemV1_1(final ToDoItem toDoItem) {
+ final ToDoItemV1_1 dto = new ToDoItemV1_1();
+ dto.setToDoItem(toDoItem);
+ dto.setDescription(toDoItem.getDescription());
+ ...
+ return dto;
+ }
+ ...
}
----
-<1> registry of known mappings
-<2> how to map `ToDoItem` to `ToDoItemDto` ...
-<3> ... all properties have same name in both source and destination types
-<4> how to map `Bookmark` to `OidDto` ...
-<5> ... this property has a different name
-<6> ... all other properties have same name
-<7> the main API to implement. This implementation ignores the `acceptableMediaTypes` and `representationType`
-<8> map the domain object to the DTO
-<9> and map its oid (by way of the xref:rgsvc.adoc#_rgsvc_api_BookmarkService[`BookmarkService`]
-<10> and perform some additional manual wiring (because domain objects don't _know_ their Oids).
-
-You'll notice that the implementation doesn't actually use the `acceptableMediaTypes` and `representationType` parameters. That's because the calling `ContentNegotiationServiceXRoDomainType` will double check that the returned object is of the correct type (as defined by the `x-ro-domain-type` parameter of the HTTP `Accept` header). Since this (example) todoapp only offers a single mapping, there's therefore no need to for the mapping service to check further.
+
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_GridSystemService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_GridSystemService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_GridSystemService.adoc
index 68239c5..5aab8ef 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_GridSystemService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_GridSystemService.adoc
@@ -11,10 +11,19 @@ of domain objects. In particular this means being able to return a "normalized"
domain object members into the various regions of the grid) and in providing a default grid if there is no other
metadata available.
-In theory there can be multiple implementations of this service, one per concrete subclass of the applib `Grid` class. Each concrete implementation requires Wicket viewer components capable of interpreting the grid layout.
-
The framework provides a single such grid implementation, namely for Bootstrap3.
+[NOTE]
+====
+Unlike most other domain services, the framework will check _all_ available implementations of `GridSystemService` to
+obtain available grid systems, rather than merely the first implementation found; in other words it uses the
+chain-of-responsibility pattern. Services are called in the order defined by
+xref:rgant.adoc#_rgant_DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`]).
+
+Note though that each concrete implementation must also provide corresponding Wicket viewer components capable of
+interpreting the grid layout.
+====
+
== SPI
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_RoutingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_RoutingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_RoutingService.adoc
index 7de9947..3acc8c0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_RoutingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_spi_RoutingService.adoc
@@ -23,6 +23,16 @@ For example, return the home page (eg as defined by the xref:rgant.adoc#_rgant_H
Currently the routing service is used only by the xref:ugvw.adoc#[Wicket viewer]; it is ignored by the xref:ugvro.adoc#[Restful Objects] viewer.
+[NOTE]
+====
+Unlike most other domain services, the framework will check _all_ available implementations of
+`RoutingService` to return a route, rather than the first implementation found; in other words it uses the
+chain-of-responsibility pattern. Services are called in the order defined by
+xref:rgant.adoc#_rgant_DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`]). The route used will be the
+result of the first implementation checked that declares that it can provide a route.
+====
+
+
== SPI
The SPI defined by this service is:
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
index d938f0b..4cdcd62 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
@@ -46,6 +46,7 @@ for Apache Isis and contribute back to the project)
include::_rgsvc_intro.adoc[leveloffset=+1]
include::_rgsvc_presentation-layer-spi.adoc[leveloffset=+1]
+include::_rgsvc_presentation-layer-internal-spi.adoc[leveloffset=+1]
include::_rgsvc_application-layer-api.adoc[leveloffset=+1]
include::_rgsvc_application-layer-spi.adoc[leveloffset=+1]
include::_rgsvc_core-domain-api.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/core/applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/applib/pom.xml b/core/applib/pom.xml
index 757908c..243e5f8 100644
--- a/core/applib/pom.xml
+++ b/core/applib/pom.xml
@@ -105,6 +105,10 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcdi_1.0_spec</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.ws.rs</groupId>
+ <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
+ </dependency>
<!-- DataNucleus' standard JDO support -->
<dependency>
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java
new file mode 100644
index 0000000..d577dfb
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/conmap/ContentMappingService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.applib.conmap;
+
+import java.util.List;
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.isis.applib.annotation.Programmatic;
+
+public interface ContentMappingService {
+
+ /**
+ * Typically for mapping from a domain object to a DTO.
+ */
+ @Programmatic
+ Object map(Object object, final List<MediaType> acceptableMediaTypes);
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index f1181b6..1e09119 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -178,6 +178,7 @@
<javax-mail.version>1.4.7</javax-mail.version>
+ <jboss-jaxrs-api_2.0_spec.version>1.0.0.Final</jboss-jaxrs-api_2.0_spec.version>
</properties>
<scm>
@@ -1876,6 +1877,11 @@ ${license.additional-notes}
<version>${geronimo-jcdi_1.0_spec.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.ws.rs</groupId>
+ <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
+ <version>${jboss-jaxrs-api_2.0_spec.version}</version>
+ </dependency>
<!-- javax APIs -->
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conmap/ContentMappingService.java
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conmap/ContentMappingService.java b/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conmap/ContentMappingService.java
index cb69f98..b4585d7 100644
--- a/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conmap/ContentMappingService.java
+++ b/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conmap/ContentMappingService.java
@@ -25,11 +25,16 @@ import javax.ws.rs.core.MediaType;
import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+/**
+ * @deprecated - replaced by simplified version, {@link org.apache.isis.applib.conmap.ContentMappingService}, in the applib.
+ */
+@Deprecated
public interface ContentMappingService {
/**
- * Typically for mapping from a domain object to a DTO.
+ * @deprecated - replaced by simplified version, {@link org.apache.isis.applib.conmap.ContentMappingService#map(Object, List)}, in the applib.
*/
+ @Deprecated
@Programmatic
Object map(Object object, final List<MediaType> acceptableMediaTypes, final RepresentationType representationType);
http://git-wip-us.apache.org/repos/asf/isis/blob/719bc149/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceXRoDomainType.java
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceXRoDomainType.java b/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceXRoDomainType.java
index 6905cd7..06914fd 100644
--- a/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceXRoDomainType.java
+++ b/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceXRoDomainType.java
@@ -20,6 +20,7 @@ package org.apache.isis.viewer.restfulobjects.rendering.service.conneg;
import java.util.List;
+import javax.inject.Inject;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@@ -140,15 +141,22 @@ public class ContentNegotiationServiceXRoDomainType extends ContentNegotiationSe
}
/**
- * Delegates to any {@link ContentMappingService}s.
+ * Delegates to either the applib {@link org.apache.isis.applib.conmap.ContentMappingService}, else the
+ * original non-applib {@link ContentMappingService}.
*/
protected Object map(
final Object domainObject,
final List<MediaType> acceptableMediaTypes,
final RepresentationType representationType) {
- final Iterable<ContentMappingService> contentMappingServices = container.lookupServices(ContentMappingService.class);
- for (ContentMappingService contentMappingService : contentMappingServices) {
+ for (org.apache.isis.applib.conmap.ContentMappingService contentMappingService : contentMappingServices) {
+ Object mappedObject = contentMappingService.map(domainObject, acceptableMediaTypes);
+ if(mappedObject != null) {
+ return mappedObject;
+ }
+ }
+
+ for (ContentMappingService contentMappingService : legacyContentMappingServices) {
Object mappedObject = contentMappingService.map(domainObject, acceptableMediaTypes, representationType);
if(mappedObject != null) {
return mappedObject;
@@ -158,4 +166,9 @@ public class ContentNegotiationServiceXRoDomainType extends ContentNegotiationSe
return domainObject;
}
+ @Inject
+ List<org.apache.isis.applib.conmap.ContentMappingService> contentMappingServices;
+
+ @Inject
+ List<ContentMappingService> legacyContentMappingServices;
}