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 2015/11/17 21:49:04 UTC

[1/4] isis git commit: ISIS-1250: custom MessageBodyWriter for x-ro-domain-type Accept requests; remove the configuration option for ignoring/including Isis common schemas; move Dto role interface to own package; updating docs

Repository: isis
Updated Branches:
  refs/heads/master a8c48a238 -> e0de7da81


http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/RestfulObjectsApplication.java
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/RestfulObjectsApplication.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/RestfulObjectsApplication.java
index 2724886..637a358 100644
--- a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/RestfulObjectsApplication.java
+++ b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/RestfulObjectsApplication.java
@@ -18,6 +18,7 @@
  */
 package org.apache.isis.viewer.restfulobjects.server;
 
+import org.apache.isis.viewer.restfulobjects.server.conneg.RestfulObjectsMessageBodyWriter;
 import org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside;
 import org.apache.isis.viewer.restfulobjects.server.resources.DomainServiceResourceServerside;
 import org.apache.isis.viewer.restfulobjects.server.resources.DomainTypeResourceServerside;
@@ -37,6 +38,8 @@ public class RestfulObjectsApplication extends AbstractJaxRsApplication {
         addClass(DomainServiceResourceServerside.class);
         addClass(VersionResourceServerside.class);
 
+        final RestfulObjectsMessageBodyWriter roWriter = new RestfulObjectsMessageBodyWriter();
+        addSingleton(roWriter);
         addSingleton(new RestfulObjectsApplicationExceptionMapper());
         addSingleton(new RuntimeExceptionMapper());
         

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/conneg/RestfulObjectsMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/conneg/RestfulObjectsMessageBodyWriter.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/conneg/RestfulObjectsMessageBodyWriter.java
new file mode 100644
index 0000000..8a6b2ce
--- /dev/null
+++ b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/conneg/RestfulObjectsMessageBodyWriter.java
@@ -0,0 +1,68 @@
+/*
+ *  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.viewer.restfulobjects.server.conneg;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.Provider;
+import javax.xml.bind.Marshaller;
+
+import org.jboss.resteasy.plugins.providers.jaxb.JAXBXmlRootElementProvider;
+
+import org.apache.isis.applib.services.bookmark.BookmarkService;
+import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.schema.utils.jaxbadapters.PersistentEntityAdapter;
+
+@Provider
+@Produces({"application/xml", "application/*+xml", "text/*+xml"})
+public class RestfulObjectsMessageBodyWriter extends JAXBXmlRootElementProvider {
+
+    public RestfulObjectsMessageBodyWriter(){
+        ;
+    }
+
+    @Override protected boolean isReadWritable(
+            final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType) {
+        return super.isReadWritable(type, genericType, annotations, mediaType) && hasXRoDomainTypeParameter(mediaType);
+    }
+
+    protected static boolean hasXRoDomainTypeParameter(final MediaType mediaType) {
+        final boolean retval = mediaType.getParameters().containsKey("x-ro-domain-type");
+        return retval;
+    }
+
+    @Override protected Marshaller getMarshaller(
+            final Class<?> type, final Annotation[] annotations, final MediaType mediaType) {
+        final Marshaller marshaller = super.getMarshaller(type, annotations, mediaType);
+        marshaller.setAdapter(PersistentEntityAdapter.class, new PersistentEntityAdapter() {
+            @Override
+            protected BookmarkService getBookmarkService() {
+                final PersistenceSession persistenceSession = IsisContext.getPersistenceSession();
+                final ServicesInjectorSpi servicesInjector = persistenceSession.getServicesInjector();
+                return servicesInjector.lookupService(BookmarkService.class);
+            }
+        });
+        return marshaller;
+    }
+}


[2/4] isis git commit: ISIS-1250: custom MessageBodyWriter for x-ro-domain-type Accept requests; remove the configuration option for ignoring/including Isis common schemas; move Dto role interface to own package; updating docs

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ErrorReportingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ErrorReportingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ErrorReportingService.adoc
index a4c81d5..525e1d9 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ErrorReportingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ErrorReportingService.adoc
@@ -99,7 +99,8 @@ image::{_imagesdir}reference-services-spi/ErrorReportingService/kitchensink-exam
 
 == Registering the Services
 
-Assuming that the `AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app], then just
- ensure that the implementation is on the classpath and the module containing the implementation is returned in
- `AppManifest#getModules()`.
+There is no default implementation of this service.  To register your own implementation (and assuming that an
+`AppManifest` is being used to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]), then just
+ensure that the implementation is on the classpath and the module containing the implementation is returned in
+`AppManifest#getModules()`.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EventSerializer.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EventSerializer.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EventSerializer.adoc
index 3253323..4a02273 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EventSerializer.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EventSerializer.adoc
@@ -53,21 +53,22 @@ You could if you wish change the representation by registering your own implemen
 
 
 
-
 == Registering the Services
 
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+There is no default implementation of this service provided by the core Apache Isis framework.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+The (non-ASF) http://github.com/isisaddons/isis-module-publishing[Isis addons' publishing] module provides an
+implementation of this service (`RestfulObjectsSpecEventSerializer`) that serializes action invocations and published
+objects into a format based on the Restful Objects specification.  It also (as you might imagine) provides an
+implementation of the xref:rg.adoc#_rg_services-spi_manpage-PublishingService[`PublishingService`].
 
-then adding the (non-ASF) http://github.com/isisaddons/isis-module-publishing[Isis addons' publishing] module to the classpath will automatically register the `RestfulObjectsSpecEventSerializer` implementation (and also the module's `PublishingService` implementation).
+Assuming that an `AppManifest` is being used to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app])
+then this can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
 
 
 
 == Related Services
 
-This service is intended (though not mandated) to be used by implementations of xref:rg.adoc#_rg_services-spi_manpage-PublishingService[`PublishingService`].
\ No newline at end of file
+This service is intended (though not mandated) to be used by implementations of xref:rg.adoc#_rg_services-spi_manpage-PublishingService[`PublishingService`].  The (non-ASF) http://github.com/isisaddons/isis-module-publishing[Isis addons' publishing] module does use it (though the (non-ASF)
+http://github.com/isisaddons/isis-module-publishmq[Isis addons' publishmq] module does not).
+

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ExceptionRecognizer.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ExceptionRecognizer.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ExceptionRecognizer.adoc
index dba9775..c0227eb 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ExceptionRecognizer.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ExceptionRecognizer.adoc
@@ -96,16 +96,10 @@ If you want to recognize and handle additional exceptions (for example to captur
 
 == Registering the Services
 
-
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then the default implementations provided by the framework (`DomainObjectContainerDefault` and `ExceptionRecognizerCompositeForJdoObjectStore`) will be registered.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then the default
+implementations provided by the framework (`DomainObjectContainerDefault` and
+`ExceptionRecognizerCompositeForJdoObjectStore`) will be registered.
 
 In addition, you can register any further exception recognizers in `isis.properties`:
 
@@ -121,6 +115,5 @@ isis.services=...,\
 Prior to 1.9.0, the `ExceptionRecognizerCompositeForJdoObjectStore` also required manual registration.
 ====
 
-
 If the JDO exception recognizers are not required (rather unlikely), then they can be disabled en-masse using the xref:rg.adoc#_rg_runtime_configuring-core[configuration property] `isis.services.ExceptionRecognizerCompositeForJdoObjectStore.disable`.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-FixtureScriptsSpecificationProvider.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-FixtureScriptsSpecificationProvider.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-FixtureScriptsSpecificationProvider.adoc
index 38c07f4..3e3dc2a 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-FixtureScriptsSpecificationProvider.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-FixtureScriptsSpecificationProvider.adoc
@@ -6,13 +6,19 @@
 
 
 
-The `FixtureScriptsSpecificationProvider` configures the xref:rg.adoc#_rg_services-api_manpage-FixtureScriptsDefault[`FixtureScriptsDefault`] domain service, providing the location to search for fixture scripts and other settings.
+The `FixtureScriptsSpecificationProvider` configures the
+xref:rg.adoc#_rg_services-api_manpage-FixtureScriptsDefault[`FixtureScriptsDefault`] domain service, providing the
+location to search for fixture scripts and other settings.
 
-The service is only used if the `FixtureScriptsDefault` service is instantiated as a fallback by the framework.  If the application provides its own subclass of xref:rg.adoc#_rg_classes_super_manpage-FixtureScripts[`FixtureScripts`] superclass, then this provider service is not used.
+The service is only used if the `FixtureScriptsDefault` service is instantiated as a fallback by the framework.  If
+the application provides its own subclass of xref:rg.adoc#_rg_classes_super_manpage-FixtureScripts[`FixtureScripts`]
+superclass, then this provider service is not used.
 
 [TIP]
 ====
-Of the two designs, we encourage you to implement this "provider" SPI rather than subclass `FixtureScripts`.  The primary benefit (apart from decoupling responsibilities) is that it ensures that there is always an instance of `FixtureScripts` available for use.
+Of the two designs, we encourage you to implement this "provider" SPI rather than subclass `FixtureScripts`.  The
+primary benefit (apart from decoupling responsibilities) is that it ensures that there is always an instance of
+`FixtureScripts` available for use.
 ====
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-LocaleProvider.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-LocaleProvider.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-LocaleProvider.adoc
index 81f8ecf..686e654 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-LocaleProvider.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-LocaleProvider.adoc
@@ -50,15 +50,13 @@ Currently there is no equivalent implementation for the xref:ug.adoc#_ug_restful
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-and that the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used then an implementation of `LocaleProvider` is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]), _and_ that the
+xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used, then an implementation of `LocaleProvider` is
+automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-PublishingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-PublishingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-PublishingService.adoc
index 9a197a6..2af475b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-PublishingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-PublishingService.adoc
@@ -45,10 +45,36 @@ The serialized form returned by `EventSerializer` must be in a form that the `Pu
 
 == Implementation
 
-The (non-ASF) http://github.com/isisaddons/isis-module-publishing[Isis addons' publishing] module provides an implementation (`org.isisaddons.module.publishing.dom.org.apache.isis.applib.services.publish`) that persists each event as a `PublishedEvent` entity.  This holds the serialized form of the event metadata and payload as translated into a string by the injected `EventSerializer`.  The module also provides its own implementation of `EventSerializer`, namely `RestfulObjectsSpecEventSerializer`, which represents the event payload using the representation defined by the link:http://restfulobjects.org[Restful Objects spec] of (transient) objects, grafting on the metadata as additional JSON nodes.
+The framework provides no default implementations of this service.  There are however two implementations available in
+the (non-ASF) link:http://isisaddons.org[Isis Addons].
 
-The `PublishedEvent` entity also has a `state` field taking the values either "QUEUED" or "PROCESSED".  The intention here is that an event bus can poll this table to grab pending events and dispatch them to downstream systems.  When ``PublishedEvent``s are persisted initially they always take the value "QUEUED".
+=== isis-module-publishing
 
+The (non-ASF) http://github.com/isisaddons/isis-module-publishing[Isis addons' publishing] module provides an
+implementation (`org.isisaddons.module.publishing.dom.PublishingService`) that persists each
+event as a `PublishedEvent` entity.  This holds the serialized form of the event metadata and payload as translated
+into a string by the injected `EventSerializer`.  The module also provides its own implementation of `EventSerializer`,
+namely `RestfulObjectsSpecEventSerializer`, which represents the event payload using the representation defined by the link:http://restfulobjects.org[Restful Objects spec] of (transient) objects, grafting on the metadata as additional
+JSON nodes.
+
+The `PublishedEvent` entity also has a `state` field taking the values either "QUEUED" or "PROCESSED".  The intention
+here is that an event bus can poll this table to grab pending events and dispatch them to downstream systems.  When
+``PublishedEvent``s are persisted initially they always take the value "QUEUED".
+
+=== isis-module-publishmq
+
+The (non-ASF) http://github.com/isisaddons/isis-module-publishmq[Isis addons' publishmq] module provides an
+implementation (`org.isisaddons.module.publismq.dom.servicespi.PublishingServiceUsingActiveMq`) that publishes each 
+action invocation as an event on an link:http://activemq.apache.org[ActiveMQ] message queue.  These are converted into
+a canonical XML form (the xref:rg.adoc#_rg_schema-aim[ActionInvocationMemento] schema) using the
+xref:rg.adoc#_rg_schema-utilities-ActionInvocationMementoDtoUtils[`ActionInvocationMementoDtoUtils`] class; the idea
+being that subscribers on the ActiveMQ message queue can then query back for further information, for example using
+the xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer].
+
+[NOTE]
+====
+At the time of writing this implementation does not publish changed object events.
+====
 
 
 
@@ -131,15 +157,17 @@ public class ToDoItemChangedPayloadFactory implements PublishingPayloadFactoryFo
 
 == Registering the Services
 
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+There is no default implementation of this service provided by the core Apache Isis framework.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+Both the (non-ASF) Isis addons' http://github.com/isisaddons/isis-module-publishing[publishing] module and the
+http://github.com/isisaddons/isis-module-publishmq[publishmq] module provide implementations of this service.
+Assuming that an `AppManifest` is being used to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app])
+then this can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
+
+The modules also provide services that contribute to the UI.  If contributions are not required in the UI, these can be
+suppressed either using security or by implementing a
+xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
 
-then adding the (non-ASF) http://github.com/isisaddons/isis-module-publishing[Isis addons' publishing] module to the classpath will automatically register the `PublishingService` implementation (and also the module's `RestfulObjectsSpecEventSerializer` implementation).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-RepresentationService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-RepresentationService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-RepresentationService.adoc
index 7480586..889f7e7 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-RepresentationService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-RepresentationService.adoc
@@ -85,19 +85,15 @@ This is an "internal" SPI, meaning that it uses types that are not part of the I
 
 As discussed in the introduction, the framework provides a default implementation, `o.a.i.v.ro.rendering.service.RepresentationServiceForRestfulObjects`.   This delegates to xref:rg.adoc#_rg_services-spi_manpage-ContentNegotiationService[`ContentNegotiationService`] to generate an alternative representation; but if none is provided then it falls back on generating the representations as defined in the link:http://restfulobjects.org[Restful Objects spec] v1.0.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Isis' default implementation of `RepresentationService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default implementation of `RepresentationService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationService.adoc
index 2008ca0..636b2dd 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationService.adoc
@@ -61,14 +61,14 @@ For more details on the implementation, see xref:ug.adoc#_ug_more-advanced_i18n[
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `TranslationService` service (along with the supporting menu service) are automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+If the menu items are not required then these can be suppressed either using security or by implementing a xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
 
-then Apache Isis' core implementation of `TranslationService` service (along with the supporting menu service) are automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.  If the menu items are not required then these can be suppressed either using security or by implementing a xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationsResolver.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationsResolver.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationsResolver.adoc
index e263894..1a4a94f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationsResolver.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-TranslationsResolver.adoc
@@ -47,14 +47,13 @@ Currently there is no equivalent implementation for the xref:ug.adoc#_ug_restful
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]), _and_ that the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used, then an implementation of `TranslationsResolver` is
+automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
-and that the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used then an implementation of `TranslationsResolver` is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UrlEncodingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UrlEncodingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UrlEncodingService.adoc
new file mode 100644
index 0000000..1d21696
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UrlEncodingService.adoc
@@ -0,0 +1,37 @@
+[[_rg_services-spi_manpage-UrlEncodingService]]
+= `UrlEncodingService` (`1.11.0-SNAPSHOT`)
+: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 `UrlEncodingService` (`1.11.0-SNAPSHOT`) is used by the framework to map view model mementos (derived from the state
+of the view model itself) into a form that can be used as a view model.  When the framework needs to recreate the
+view model (for example to invoke an action on it), this URL is converted back into a view model memento, from which
+the view model can then be hydrated.
+
+The framework provides a default implementation of this service, `UrlEncodingServiceUsingBaseEncoding` (also in the
+applib) that uses `base-64` encoding to `UTF-8` charset.
+
+
+== SPI
+
+The SPI defined by the service is:
+
+[source,java]
+----
+public interface UrlEncodingService {
+    @Programmatic
+    public String encode(final String str);     // <1>
+    @Programmatic
+    public String decode(String str);           // <2>
+}
+----
+<1> convert the string (eg view model memento) into a string safe for use within an URL
+<2> unconvert the string from its URL form into its original form URL
+
+
+
+== Implementation
+

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserProfileService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserProfileService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserProfileService.adoc
index 00048c5..8f55eea 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserProfileService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserProfileService.adoc
@@ -33,7 +33,10 @@ In the future this API may be expanded; one obvious possibility is to return a p
 
 == Implementation
 
-The (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp] has a simple implementation of this service:
+There is no default implementation of this service provided by the core Apache Isis framework.
+
+An example implementation can be found in the (non-ASF)
+http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp]:
 
 image::{_imagesdir}reference-services-spi/UserProfileService/todoapp.png[width="800px",link="{_imagesdir}reference-services-spi/UserProfileService/todoapp.png"]
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserRegistrationService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserRegistrationService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserRegistrationService.adoc
index 745c241..25865f2 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserRegistrationService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-UserRegistrationService.adoc
@@ -58,16 +58,32 @@ This is needed so that the self-registered users are assigned automatically to y
 
 == Registering the Services
 
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+There is no default implementation of this service provided by the core Apache Isis framework.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+If using the (non-ASF) http://github.com/isisaddons/isis-module-security[Isis addons' security] module) for
+authentication and authorization, then note that it provides an adapter class,
+`SecurityModuleAppUserRegistrationServiceAbstract`, that provides most of the implementation.  You are still required
+to implement a subclass and register.
 
-then (if using the (non-ASF) http://github.com/isisaddons/isis-module-security[Isis addons' security] module) you will need to register your concrete implementation of `SecurityModuleAppUserRegistrationServiceAbstract`.
+For example:
 
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class AppUserRegistrationService extends SecurityModuleAppUserRegistrationServiceAbstract {
+    protected ApplicationRole getInitialRole() {
+    return findRole("regular-user");
+    }
+    protected Set<ApplicationRole> getAdditionalInitialRoles() {
+        return Collections.singleton(findRole("self-registered-user"));
+    }
+    private ApplicationRole findRole(final String roleName) {
+        return applicationRoles.findRoleByName(roleName);
+    }
+    @Inject
+    private ApplicationRoles applicationRoles;
+}
+----
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/rg.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rg.adoc b/adocs/documentation/src/main/asciidoc/guides/rg.adoc
index 670052f..d3c44f8 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rg.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rg.adoc
@@ -27,4 +27,5 @@ include::_rg_services-spi.adoc[leveloffset=+1]
 include::_rg_classes.adoc[leveloffset=+1]
 include::_rg_object-layout.adoc[leveloffset=+1]
 include::_rg_runtime.adoc[leveloffset=+1]
+include::_rg_schema.adoc[leveloffset=+1]
 include::_rg_web-xml.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/migration-notes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/migration-notes.adoc b/adocs/documentation/src/main/asciidoc/migration-notes.adoc
index eef8ed1..0506693 100644
--- a/adocs/documentation/src/main/asciidoc/migration-notes.adoc
+++ b/adocs/documentation/src/main/asciidoc/migration-notes.adoc
@@ -7,6 +7,7 @@
 
 
 
+include::_migration-notes_1.10.0-to-1.11.0.adoc[leveloffset=+1]
 include::_migration-notes_1.9.0-to-1.10.0.adoc[leveloffset=+1]
 include::_migration-notes_1.8.0-to-1.9.0.adoc[leveloffset=+1]
 include::_migration-notes_1.7.0-to-1.8.0.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/AppManifest.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/AppManifest.java b/core/applib/src/main/java/org/apache/isis/applib/AppManifest.java
index 515ea54..5ac3ef8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/AppManifest.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/AppManifest.java
@@ -170,6 +170,7 @@ public interface AppManifest {
                 "org.apache.isis.core.wrapper" ,
                 "org.apache.isis.core.metamodel.services" ,
                 "org.apache.isis.core.runtime.services" ,
+                "org.apache.isis.schema.services" ,
                 "org.apache.isis.objectstore.jdo.applib.service" ,
                 "org.apache.isis.viewer.restfulobjects.rendering.service" ,
                 "org.apache.isis.objectstore.jdo.datanucleus.service.support" ,

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto.java b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto.java
new file mode 100644
index 0000000..ca4d801
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto.java
@@ -0,0 +1,21 @@
+/**
+ *  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.services.dto;
+
+public interface Dto {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
new file mode 100644
index 0000000..b4360bf
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
@@ -0,0 +1,67 @@
+/**
+ *  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.services.dto;
+
+import java.io.IOException;
+
+import javax.inject.Inject;
+import javax.xml.bind.JAXBException;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Mixin;
+import org.apache.isis.applib.annotation.RestrictTo;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.value.Clob;
+
+@Mixin
+public class Dto_downloadXml {
+
+    private final Dto dto;
+
+    public Dto_downloadXml(final Dto dto) {
+        this.dto = dto;
+    }
+
+    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Dto> {}
+
+    @Action(
+            domainEvent = ActionDomainEvent.class,
+            semantics = SemanticsOf.SAFE,
+            restrictTo = RestrictTo.PROTOTYPING
+    )
+    @ActionLayout(
+            cssClassFa = "fa-download"
+    )
+    @MemberOrder(sequence = "500.1")
+    public Object $$(final String fileName) throws JAXBException, IOException {
+
+        final String xml = jaxbService.toXml(dto);
+        return new Clob(Util.withSuffix(fileName, "xml"), "text/xml", xml);
+    }
+
+    public String default0$$() {
+        return Util.withSuffix(dto.getClass().getName(), "xml");
+    }
+
+
+    @Inject
+    JaxbService jaxbService;
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
new file mode 100644
index 0000000..7d433e2
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
@@ -0,0 +1,119 @@
+/**
+ *  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.services.dto;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+import javax.inject.Inject;
+
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.FatalException;
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Mixin;
+import org.apache.isis.applib.annotation.RestrictTo;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.value.Blob;
+import org.apache.isis.applib.value.Clob;
+
+@Mixin
+public class Dto_downloadXsd {
+
+    private final Dto dto;
+
+    private final MimeType mimeTypeApplicationZip;
+
+    public Dto_downloadXsd(final Dto dto) {
+        this.dto = dto;
+        try {
+            mimeTypeApplicationZip = new MimeType("application", "zip");
+        } catch (final MimeTypeParseException ex) {
+            throw new FatalException(ex);
+        }
+    }
+
+    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Dto> {}
+
+    @Action(
+            domainEvent = ActionDomainEvent.class,
+            semantics = SemanticsOf.SAFE,
+            restrictTo = RestrictTo.PROTOTYPING
+    )
+    @ActionLayout(
+
+    )
+    @MemberOrder(sequence = "500.2")
+    public Object $$(final String fileName) {
+
+        final Map<String, String> map = jaxbService.toXsd(dto, JaxbService.IsisSchemas.IGNORE);
+
+        if(map.isEmpty()) {
+            container.warnUser("No schemas were generated for " + dto.getClass().getName() + "; programming error?");
+            return null;
+        }
+
+        if(map.size() == 1) {
+            final Map.Entry<String, String> entry = map.entrySet().iterator().next();
+            return new Clob(Util.withSuffix(fileName, "xsd"), "text/xml", entry.getValue());
+        }
+
+        try {
+            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            final ZipOutputStream zos = new ZipOutputStream(baos);
+            final OutputStreamWriter writer = new OutputStreamWriter(zos);
+
+            for (Map.Entry<String, String> entry : map.entrySet()) {
+                final String namespaceUri = entry.getKey();
+                final String schemaText = entry.getValue();
+                zos.putNextEntry(new ZipEntry(zipEntryNameFor(namespaceUri)));
+                writer.write(schemaText);
+                writer.flush();
+                zos.closeEntry();
+            }
+
+            writer.close();
+            return new Blob(Util.withSuffix(fileName, "zip"), mimeTypeApplicationZip, baos.toByteArray());
+        } catch (final IOException ex) {
+            throw new FatalException("Unable to create zip", ex);
+        }
+    }
+
+    public String default0$$() {
+        return Util.withSuffix(dto.getClass().getName(), "xsd");
+    }
+
+    private static String zipEntryNameFor(final String namespaceUri) {
+        return Util.withSuffix(namespaceUri, "xsd");
+    }
+
+
+    @Inject
+    DomainObjectContainer container;
+
+    @Inject
+    JaxbService jaxbService;
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/dto/Util.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Util.java b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Util.java
new file mode 100644
index 0000000..b87051b
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Util.java
@@ -0,0 +1,33 @@
+/**
+ *  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.services.dto;
+
+class Util {
+
+    private Util(){}
+
+    static String withSuffix(String fileName, String suffix) {
+        if(!suffix.startsWith(".")) {
+            suffix = "." + suffix;
+        }
+        if(!fileName.endsWith(suffix)) {
+            fileName += suffix;
+        }
+        return fileName;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto.java
deleted file mode 100644
index 84a6999..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- *  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.services.jaxb;
-
-public interface Dto {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXml.java
deleted file mode 100644
index 61f7fd0..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXml.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- *  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.services.jaxb;
-
-import java.io.IOException;
-
-import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
-import javax.inject.Inject;
-import javax.xml.bind.JAXBException;
-
-import org.apache.isis.applib.FatalException;
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Mixin;
-import org.apache.isis.applib.annotation.RestrictTo;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Clob;
-
-@Mixin
-public class Dto_downloadXml {
-
-    private final Dto dto;
-
-    public Dto_downloadXml(final Dto dto) {
-        this.dto = dto;
-    }
-
-    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Dto> {}
-
-    @Action(
-            domainEvent = ActionDomainEvent.class,
-            semantics = SemanticsOf.SAFE,
-            restrictTo = RestrictTo.PROTOTYPING
-    )
-    @ActionLayout(
-            cssClassFa = "fa-download"
-    )
-    @MemberOrder(sequence = "500.1")
-    public Object $$(final String fileName) throws JAXBException, IOException {
-
-        final String xml = jaxbService.toXml(dto);
-        return new Clob(Util.withSuffix(fileName, "xml"), "text/xml", xml);
-    }
-
-    public String default0$$() {
-        return Util.withSuffix(dto.getClass().getName(), "xml");
-    }
-
-
-    @Inject
-    JaxbService jaxbService;
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXsd.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXsd.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXsd.java
deleted file mode 100644
index 7213326..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXsd.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- *  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.services.jaxb;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
-import javax.inject.Inject;
-
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.applib.FatalException;
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Mixin;
-import org.apache.isis.applib.annotation.RestrictTo;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Blob;
-import org.apache.isis.applib.value.Clob;
-
-@Mixin
-public class Dto_downloadXsd {
-
-    private final Dto dto;
-
-    private final MimeType mimeTypeApplicationZip;
-
-    public Dto_downloadXsd(final Dto dto) {
-        this.dto = dto;
-        try {
-            mimeTypeApplicationZip = new MimeType("application", "zip");
-        } catch (final MimeTypeParseException ex) {
-            throw new FatalException(ex);
-        }
-    }
-
-    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Dto> {}
-
-    @Action(
-            domainEvent = ActionDomainEvent.class,
-            semantics = SemanticsOf.SAFE,
-            restrictTo = RestrictTo.PROTOTYPING
-    )
-    @ActionLayout(
-
-    )
-    @MemberOrder(sequence = "500.2")
-    public Object $$(final String fileName) {
-
-        final Map<String, String> map = jaxbService.toXsd(dto);
-
-        if(map.isEmpty()) {
-            container.warnUser("No schemas were generated for " + dto.getClass().getName() + "; programming error?");
-            return null;
-        }
-
-        if(map.size() == 1) {
-            final Map.Entry<String, String> entry = map.entrySet().iterator().next();
-            return new Clob(Util.withSuffix(fileName, "xsd"), "text/xml", entry.getValue());
-        }
-
-        try {
-            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            final ZipOutputStream zos = new ZipOutputStream(baos);
-            final OutputStreamWriter writer = new OutputStreamWriter(zos);
-
-            for (Map.Entry<String, String> entry : map.entrySet()) {
-                final String namespaceUri = entry.getKey();
-                final String schemaText = entry.getValue();
-                zos.putNextEntry(new ZipEntry(zipEntryNameFor(namespaceUri)));
-                writer.write(schemaText);
-                writer.flush();
-                zos.closeEntry();
-            }
-
-            writer.close();
-            return new Blob(Util.withSuffix(fileName, "zip"), mimeTypeApplicationZip, baos.toByteArray());
-        } catch (final IOException ex) {
-            throw new FatalException("Unable to create zip", ex);
-        }
-    }
-
-    public String default0$$() {
-        return Util.withSuffix(dto.getClass().getName(), "xsd");
-    }
-
-    private static String zipEntryNameFor(final String namespaceUri) {
-        return Util.withSuffix(namespaceUri, "xsd");
-    }
-
-
-    @Inject
-    DomainObjectContainer container;
-
-    @Inject
-    JaxbService jaxbService;
-}
-

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
index 0cdd9e5..3b623a4 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
@@ -19,6 +19,7 @@ package org.apache.isis.applib.services.jaxb;
 import java.util.Map;
 
 import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.dto.Dto_downloadXsd;
 
 public interface JaxbService {
 
@@ -28,6 +29,36 @@ public interface JaxbService {
     @Programmatic
     public String toXml(final Object domainObject);
 
+
+    /**
+     * Controls whether, when generating {@link #toXsd(Object, IsisSchemas) XML schemas},
+     * any of the common Isis schemas (in the namespace <code>http://org.apache.isis.schema</code>) should be included
+     * or just ignored (and therefore don't appear in the returned map).
+     *
+     * <p>
+     *     The practical benefit of this is that for many DTOs there will only be one other
+     *     schema, that of the DTO itself.  The {@link Dto_downloadXsd} mixin uses this to return that single XSD,
+     *     rather than generating a ZIP of two schemas (the Isis schema and the one for the DTO), as it would otherwise;
+     *     far more convenient when debugging and so on.  The Isis schemas can always be
+     *     <a href="http://isis.apache.org/schema">downloaded</a> from the Isis website.
+     * </p>
+     */
+    public enum IsisSchemas {
+        INCLUDE {
+            public boolean shouldIgnore(final String namespaceUri) {
+                return false;
+            }
+
+        },
+        IGNORE {
+            public boolean shouldIgnore(final String namespaceUri) {
+                return namespaceUri.matches(".*isis\\.apache\\.org.*");
+            }
+        };
+
+        public abstract boolean shouldIgnore(final String namespaceUri);
+    }
+
     @Programmatic
-    public Map<String, String> toXsd(final Object domainObject);
+    public Map<String, String> toXsd(final Object domainObject, final IsisSchemas isisSchemas);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Util.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Util.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Util.java
deleted file mode 100644
index 0859d07..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Util.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- *  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.services.jaxb;
-
-class Util {
-
-    private Util(){}
-
-    static String withSuffix(String fileName, String suffix) {
-        if(!suffix.startsWith(".")) {
-            suffix = "." + suffix;
-        }
-        if(!fileName.endsWith(suffix)) {
-            fileName += suffix;
-        }
-        return fileName;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java b/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java
index 9c8c25f..9f02e84 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java
@@ -16,29 +16,14 @@
  */
 package org.apache.isis.applib.services.urlencoding;
 
-import java.nio.charset.Charset;
-
-import com.google.common.io.BaseEncoding;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
 
-@DomainService(
-        nature = NatureOfService.DOMAIN
-)
-public class UrlEncodingService {
+public interface UrlEncodingService {
 
     @Programmatic
-    public String decode(String str) {
-        final byte[] bytes = BaseEncoding.base64Url().decode(str);
-        return new String(bytes, Charset.forName("UTF-8"));
-    }
+    public String encode(final String str);
 
     @Programmatic
-    public String encode(final String xmlStr) {
-        byte[] bytes = xmlStr.getBytes(Charset.forName("UTF-8"));
-        return BaseEncoding.base64Url().encode(bytes);
-    }
+    public String decode(String str);
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingServiceUsingBaseEncoding.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingServiceUsingBaseEncoding.java b/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingServiceUsingBaseEncoding.java
new file mode 100644
index 0000000..fdab8c3
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingServiceUsingBaseEncoding.java
@@ -0,0 +1,57 @@
+/**
+ *  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.services.urlencoding;
+
+import java.nio.charset.Charset;
+
+import com.google.common.io.BaseEncoding;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.NatureOfService;
+import org.apache.isis.applib.annotation.Programmatic;
+
+@DomainService(
+        nature = NatureOfService.DOMAIN
+)
+public class UrlEncodingServiceUsingBaseEncoding implements UrlEncodingService {
+
+    private final BaseEncoding baseEncoding;
+    private final Charset charset;
+
+    public UrlEncodingServiceUsingBaseEncoding(final BaseEncoding baseEncoding, final Charset charset) {
+        this.baseEncoding = baseEncoding;
+        this.charset = charset;
+    }
+
+    public UrlEncodingServiceUsingBaseEncoding() {
+        this(BaseEncoding.base64Url(), Charset.forName("UTF-8"));
+    }
+
+
+    @Programmatic
+    public String encode(final String str) {
+        byte[] bytes = str.getBytes(charset);
+        return baseEncoding.encode(bytes);
+    }
+
+    @Programmatic
+    public String decode(String str) {
+        final byte[] bytes = baseEncoding.decode(str);
+        return new String(bytes, Charset.forName("UTF-8"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/JaxbServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/JaxbServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/JaxbServiceDefault.java
deleted file mode 100644
index caeb11e..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/JaxbServiceDefault.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- *  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.core.runtime.services.jaxb;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.collect.Iterables;
-
-import org.apache.isis.applib.ApplicationException;
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.applib.NonRecoverableException;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.services.jaxb.JaxbService;
-import org.apache.isis.core.runtime.services.jaxb.util.CatalogingSchemaOutputResolver;
-import org.apache.isis.schema.utils.jaxbadapters.PersistentEntityAdapter;
-
-@DomainService(
-        nature = NatureOfService.DOMAIN
-)
-public class JaxbServiceDefault implements JaxbService {
-
-    /**
-     * This boolean flag controls whether, when generating {@link #toXsd(Object) XML schemas},
-     * any of the common Isis schemas (in the namespace <code>http://org.apache.isis.schema</code>) should be included or just ignored (and therefore don't appear in the ZIP file).
-     *
-     * <p>
-     *     The practical benefit of this is that for many DTOs there will only be one other
-     *     schema, that of the DTO itself.  Rather than generating a ZIP of two schemas (the Isis
-     *     schema and the one for the DTO), the {@link #toXsd(Object) toXsd} method will instead
-     *     return a single XSD file; far more convenient when debugging and so on.
-     *     The Isis schemas meanwhile can always be <a href="http://isis.apache.org/schema">downloaded from the website </a>.
-     * </p>
-     */
-    public static final String INCLUDE_ISIS_SCHEMA = "isis.services.jaxb.includeIsisSchema";
-
-    private boolean includeIsisSchema;
-
-    @PostConstruct
-    public void init(Map<String,String> props) {
-        final String prop = props.get(INCLUDE_ISIS_SCHEMA);
-        this.includeIsisSchema = prop != null && Boolean.parseBoolean(prop);
-
-    }
-
-    @Override
-    public <T> T fromXml(final Class<T> domainClass, final String xml) {
-        try {
-            final JAXBContext context = JAXBContext.newInstance(domainClass);
-
-            final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
-            container.injectServicesInto(adapter);
-
-            final Unmarshaller unmarshaller = context.createUnmarshaller();
-            unmarshaller.setAdapter(PersistentEntityAdapter.class, adapter);
-
-            final Object unmarshal = unmarshaller.unmarshal(new StringReader(xml));
-            return (T) unmarshal;
-
-        } catch (final JAXBException ex) {
-            throw new NonRecoverableException("Error unmarshalling domain object from XML; domain object class is '" + domainClass.getName() + "'", ex);
-        }
-    }
-
-    @Override
-    public String toXml(final Object domainObject)  {
-
-        final Class<?> domainClass = domainObject.getClass();
-        try {
-            final JAXBContext context = JAXBContext.newInstance(domainClass);
-
-            final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
-            container.injectServicesInto(adapter);
-
-            final Marshaller marshaller = context.createMarshaller();
-            marshaller.setAdapter(PersistentEntityAdapter.class, adapter);
-            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
-            final StringWriter sw = new StringWriter();
-            marshaller.marshal(domainObject, sw);
-            final String xml = sw.toString();
-
-            return xml;
-
-        } catch (final JAXBException ex) {
-            final Class<? extends JAXBException> exClass = ex.getClass();
-
-            final String name = exClass.getName();
-            if(name.equals("com.sun.xml.bind.v2.runtime.IllegalAnnotationsException")) {
-                // report a better error if possible
-                // this is done reflectively so as to not have to bring in a new Maven dependency
-                List<? extends Exception> errors = null;
-                String annotationExceptionMessages = null;
-                try {
-                    final Method getErrorsMethod = exClass.getMethod("getErrors");
-                    errors = (List<? extends Exception>) getErrorsMethod.invoke(ex);
-                    annotationExceptionMessages = ": " + Joiner.on("; ").join(
-                            Iterables.transform(errors, new Function<Exception, String>() {
-                                @Override public String apply(final Exception e) {
-                                    return e.getMessage();
-                                }
-                            }));
-                } catch (Exception e) {
-                    // fall through if we hit any snags, and instead throw the more generic error message.
-                }
-                if(errors != null) {
-                    throw new NonRecoverableException(
-                            "Error marshalling domain object to XML, due to illegal annotations on domain object class '"
-                                    + domainClass.getName() + "'; " + errors.size() + " error"
-                                    + (errors.size() == 1? "": "s")
-                                    + " reported" + (!errors
-                                    .isEmpty() ? annotationExceptionMessages : ""), ex);
-                }
-            }
-
-            throw new NonRecoverableException("Error marshalling domain object to XML; domain object class is '" + domainClass.getName() + "'", ex);
-        }
-    }
-
-    public Map<String,String> toXsd(final Object domainObject) {
-
-        try {
-            final Class<?> domainClass = domainObject.getClass();
-            final JAXBContext context = JAXBContext.newInstance(domainClass);
-
-            final CatalogingSchemaOutputResolver outputResolver = new CatalogingSchemaOutputResolver(includeIsisSchema);
-            context.generateSchema(outputResolver);
-
-            return outputResolver.asMap();
-        } catch (final JAXBException | IOException ex) {
-            throw new ApplicationException(ex);
-        }
-    }
-
-
-    @Inject
-    DomainObjectContainer container;
-}
-

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/CatalogingSchemaOutputResolver.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/CatalogingSchemaOutputResolver.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/CatalogingSchemaOutputResolver.java
deleted file mode 100644
index b267284..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/CatalogingSchemaOutputResolver.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- *  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.core.runtime.services.jaxb.util;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-/**
- * An implementation of {@link SchemaOutputResolver} that keeps track of all the schemas for which it has
- * {@link #createOutput(String, String) created} an output {@link StreamResult} containing the content of the schema.
- */
-public class CatalogingSchemaOutputResolver extends SchemaOutputResolver
-{
-    private final boolean includeIsisSchema;
-    private List<String> namespaceUris = Lists.newArrayList();
-
-    public CatalogingSchemaOutputResolver(final boolean includeIsisSchema) {
-        this.includeIsisSchema = includeIsisSchema;
-    }
-
-    public List<String> getNamespaceUris() {
-        return namespaceUris;
-    }
-
-    private Map<String, StreamResultWithWriter> schemaResultByNamespaceUri = Maps.newLinkedHashMap();
-
-    public String getSchemaTextFor(final String namespaceUri) {
-        final StreamResultWithWriter streamResult = schemaResultByNamespaceUri.get(namespaceUri);
-        return streamResult != null? streamResult.asString(): null;
-    }
-
-    @Override
-    public Result createOutput(
-            final String namespaceUri, final String suggestedFileName) throws IOException {
-
-        final StreamResultWithWriter result = new StreamResultWithWriter();
-
-        result.setSystemId(namespaceUri);
-
-        if (namespaceUri.matches(".*isis\\.apache\\.org.*") && !includeIsisSchema) {
-            // ignore
-        } else {
-            namespaceUris.add(namespaceUri);
-            schemaResultByNamespaceUri.put(namespaceUri, result);
-        }
-
-        return result;
-    }
-
-    public Map<String, String> asMap() {
-        final Map<String,String> map = Maps.newLinkedHashMap();
-        final List<String> namespaceUris = getNamespaceUris();
-
-        for (String namespaceUri : namespaceUris) {
-            map.put(namespaceUri, getSchemaTextFor(namespaceUri));
-        }
-
-        return Collections.unmodifiableMap(map);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/StreamResultWithWriter.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/StreamResultWithWriter.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/StreamResultWithWriter.java
deleted file mode 100644
index 99884be..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/jaxb/util/StreamResultWithWriter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- *  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.core.runtime.services.jaxb.util;
-
-import java.io.StringWriter;
-
-import javax.xml.transform.stream.StreamResult;
-
-/**
- * A {@link StreamResult} that contains its own writer.
- *
- * <p>
- *     The point is that the writer is only ever queried lazily AFTER the result has been generated.
- * </p>
- */
-public class StreamResultWithWriter extends StreamResult {
-    private final StringWriter writer;
-
-    public StreamResultWithWriter() {
-        this(new StringWriter());
-    }
-
-    private StreamResultWithWriter(StringWriter writer) {
-        super(writer);
-        this.writer = writer;
-    }
-
-    public String asString() {
-        return writer.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java
new file mode 100644
index 0000000..aac43d7
--- /dev/null
+++ b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java
@@ -0,0 +1,85 @@
+/**
+ *  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.schema.services.jaxb;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.transform.Result;
+import javax.xml.transform.stream.StreamResult;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+import org.apache.isis.applib.services.jaxb.JaxbService;
+
+/**
+ * An implementation of {@link SchemaOutputResolver} that keeps track of all the schemas for which it has
+ * {@link #createOutput(String, String) created} an output {@link StreamResult} containing the content of the schema.
+ */
+class CatalogingSchemaOutputResolver extends SchemaOutputResolver
+{
+    private final JaxbService.IsisSchemas isisSchemas;
+    private List<String> namespaceUris = Lists.newArrayList();
+
+    public CatalogingSchemaOutputResolver(final JaxbService.IsisSchemas isisSchemas) {
+        this.isisSchemas = isisSchemas;
+    }
+
+    public List<String> getNamespaceUris() {
+        return namespaceUris;
+    }
+
+    private Map<String, StreamResultWithWriter> schemaResultByNamespaceUri = Maps.newLinkedHashMap();
+
+    public String getSchemaTextFor(final String namespaceUri) {
+        final StreamResultWithWriter streamResult = schemaResultByNamespaceUri.get(namespaceUri);
+        return streamResult != null? streamResult.asString(): null;
+    }
+
+    @Override
+    public Result createOutput(
+            final String namespaceUri, final String suggestedFileName) throws IOException {
+
+        final StreamResultWithWriter result = new StreamResultWithWriter();
+
+        result.setSystemId(namespaceUri);
+
+        if (isisSchemas.shouldIgnore(namespaceUri)) {
+            // skip
+        } else {
+            namespaceUris.add(namespaceUri);
+            schemaResultByNamespaceUri.put(namespaceUri, result);
+        }
+
+        return result;
+    }
+
+    public Map<String, String> asMap() {
+        final Map<String,String> map = Maps.newLinkedHashMap();
+        final List<String> namespaceUris = getNamespaceUris();
+
+        for (String namespaceUri : namespaceUris) {
+            map.put(namespaceUri, getSchemaTextFor(namespaceUri));
+        }
+
+        return Collections.unmodifiableMap(map);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java
new file mode 100644
index 0000000..2d2bf79
--- /dev/null
+++ b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java
@@ -0,0 +1,142 @@
+/**
+ *  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.schema.services.jaxb;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.Inject;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Iterables;
+
+import org.apache.isis.applib.ApplicationException;
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.NonRecoverableException;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.NatureOfService;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.schema.utils.jaxbadapters.PersistentEntityAdapter;
+
+@DomainService(
+        nature = NatureOfService.DOMAIN
+)
+public class JaxbServiceDefault implements JaxbService {
+
+    @Override
+    public <T> T fromXml(final Class<T> domainClass, final String xml) {
+        try {
+            final JAXBContext context = JAXBContext.newInstance(domainClass);
+
+            final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
+            container.injectServicesInto(adapter);
+
+            final Unmarshaller unmarshaller = context.createUnmarshaller();
+            unmarshaller.setAdapter(PersistentEntityAdapter.class, adapter);
+
+            final Object unmarshal = unmarshaller.unmarshal(new StringReader(xml));
+            return (T) unmarshal;
+
+        } catch (final JAXBException ex) {
+            throw new NonRecoverableException("Error unmarshalling domain object from XML; domain object class is '" + domainClass.getName() + "'", ex);
+        }
+    }
+
+    @Override
+    public String toXml(final Object domainObject)  {
+
+        final Class<?> domainClass = domainObject.getClass();
+        try {
+            final JAXBContext context = JAXBContext.newInstance(domainClass);
+
+            final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
+            container.injectServicesInto(adapter);
+
+            final Marshaller marshaller = context.createMarshaller();
+            marshaller.setAdapter(PersistentEntityAdapter.class, adapter);
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            final StringWriter sw = new StringWriter();
+            marshaller.marshal(domainObject, sw);
+            final String xml = sw.toString();
+
+            return xml;
+
+        } catch (final JAXBException ex) {
+            final Class<? extends JAXBException> exClass = ex.getClass();
+
+            final String name = exClass.getName();
+            if(name.equals("com.sun.xml.bind.v2.runtime.IllegalAnnotationsException")) {
+                // report a better error if possible
+                // this is done reflectively so as to not have to bring in a new Maven dependency
+                List<? extends Exception> errors = null;
+                String annotationExceptionMessages = null;
+                try {
+                    final Method getErrorsMethod = exClass.getMethod("getErrors");
+                    errors = (List<? extends Exception>) getErrorsMethod.invoke(ex);
+                    annotationExceptionMessages = ": " + Joiner.on("; ").join(
+                            Iterables.transform(errors, new Function<Exception, String>() {
+                                @Override public String apply(final Exception e) {
+                                    return e.getMessage();
+                                }
+                            }));
+                } catch (Exception e) {
+                    // fall through if we hit any snags, and instead throw the more generic error message.
+                }
+                if(errors != null) {
+                    throw new NonRecoverableException(
+                            "Error marshalling domain object to XML, due to illegal annotations on domain object class '"
+                                    + domainClass.getName() + "'; " + errors.size() + " error"
+                                    + (errors.size() == 1? "": "s")
+                                    + " reported" + (!errors
+                                    .isEmpty() ? annotationExceptionMessages : ""), ex);
+                }
+            }
+
+            throw new NonRecoverableException("Error marshalling domain object to XML; domain object class is '" + domainClass.getName() + "'", ex);
+        }
+    }
+
+    public Map<String,String> toXsd(final Object domainObject, final IsisSchemas isisSchemas) {
+
+        try {
+            final Class<?> domainClass = domainObject.getClass();
+            final JAXBContext context = JAXBContext.newInstance(domainClass);
+
+            final CatalogingSchemaOutputResolver outputResolver = new CatalogingSchemaOutputResolver(isisSchemas);
+            context.generateSchema(outputResolver);
+
+            return outputResolver.asMap();
+        } catch (final JAXBException | IOException ex) {
+            throw new ApplicationException(ex);
+        }
+    }
+
+
+    @Inject
+    DomainObjectContainer container;
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java
new file mode 100644
index 0000000..c07b49b
--- /dev/null
+++ b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java
@@ -0,0 +1,45 @@
+/**
+ *  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.schema.services.jaxb;
+
+import java.io.StringWriter;
+
+import javax.xml.transform.stream.StreamResult;
+
+/**
+ * A {@link StreamResult} that contains its own writer.
+ *
+ * <p>
+ *     The point is that the writer is only ever queried lazily AFTER the result has been generated.
+ * </p>
+ */
+class StreamResultWithWriter extends StreamResult {
+    private final StringWriter writer;
+
+    public StreamResultWithWriter() {
+        this(new StringWriter());
+    }
+
+    private StreamResultWithWriter(StringWriter writer) {
+        super(writer);
+        this.writer = writer;
+    }
+
+    public String asString() {
+        return writer.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/schema/src/main/java/org/apache/isis/schema/utils/ActionInvocationMementoDtoUtils.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/utils/ActionInvocationMementoDtoUtils.java b/core/schema/src/main/java/org/apache/isis/schema/utils/ActionInvocationMementoDtoUtils.java
index 37ac6a1..1314b75 100644
--- a/core/schema/src/main/java/org/apache/isis/schema/utils/ActionInvocationMementoDtoUtils.java
+++ b/core/schema/src/main/java/org/apache/isis/schema/utils/ActionInvocationMementoDtoUtils.java
@@ -133,7 +133,11 @@ public class ActionInvocationMementoDtoUtils {
     //endregion
 
     //region > addArgValue, addArgReference
-    public static boolean addArgValue(final ActionInvocationMementoDto aim, final String parameterName, final Class<?> parameterType, final Object arg) {
+    public static boolean addArgValue(
+            final ActionInvocationMementoDto aim,
+            final String parameterName,
+            final Class<?> parameterType,
+            final Object arg) {
 
         ParamDto paramDto = null;
         if(parameterType == String.class) {
@@ -265,7 +269,9 @@ public class ActionInvocationMementoDtoUtils {
         return setValue(valueDto, returnType, returnVal);
     }
 
-    public static void addReturnReference(final ActionInvocationMementoDto aim, final Bookmark bookmark) {
+    public static void addReturnReference(
+            final ActionInvocationMementoDto aim,
+            final Bookmark bookmark) {
         final ValueDto valueDto = returnValueDtoFor(aim);
         OidDto argValue = asOidDto(bookmark);
         valueDto.setReference(argValue);

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/core/schema/src/main/java/org/apache/isis/schema/utils/jaxbadapters/PersistentEntityAdapter.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/utils/jaxbadapters/PersistentEntityAdapter.java b/core/schema/src/main/java/org/apache/isis/schema/utils/jaxbadapters/PersistentEntityAdapter.java
index 612205b..41d0125 100644
--- a/core/schema/src/main/java/org/apache/isis/schema/utils/jaxbadapters/PersistentEntityAdapter.java
+++ b/core/schema/src/main/java/org/apache/isis/schema/utils/jaxbadapters/PersistentEntityAdapter.java
@@ -41,7 +41,7 @@ public class PersistentEntityAdapter extends XmlAdapter<OidDto, Object> {
         if(domainObject == null) {
             return null;
         }
-        final Bookmark bookmark = bookmarkService.bookmarkFor(domainObject);
+        final Bookmark bookmark = getBookmarkService().bookmarkFor(domainObject);
         final OidDto oidDto = new OidDto();
         oidDto.setObjectIdentifier(bookmark.getIdentifier());
         oidDto.setObjectState(convert(bookmark.getObjectState()));
@@ -58,6 +58,10 @@ public class PersistentEntityAdapter extends XmlAdapter<OidDto, Object> {
         throw new IllegalArgumentException("Not recognized: " + objectState.name());
     }
 
+    protected BookmarkService getBookmarkService() {
+        return bookmarkService;
+    }
+
     @Inject
     BookmarkService bookmarkService;
 }


[3/4] isis git commit: ISIS-1250: custom MessageBodyWriter for x-ro-domain-type Accept requests; remove the configuration option for ignoring/including Isis common schemas; move Dto role interface to own package; updating docs

Posted by da...@apache.org.
ISIS-1250: custom MessageBodyWriter for x-ro-domain-type Accept requests; remove the configuration option for ignoring/including Isis common schemas; move Dto role interface to own package; updating docs


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/19cdaaba
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/19cdaaba
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/19cdaaba

Branch: refs/heads/master
Commit: 19cdaabaaee8baab203f49cdcf2d3cffe37f73f0
Parents: a8c48a2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Nov 15 21:37:23 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Nov 17 09:10:49 2015 +0000

----------------------------------------------------------------------
 adocs/documentation/Gemfile.lock                |   3 -
 .../_migration-notes_1.10.0-to-1.11.0.adoc      |  31 ++++
 .../main/asciidoc/guides/_rg_annotations.adoc   |   6 +-
 .../asciidoc/guides/_rg_annotations_aaa.adoc    |   1 +
 .../guides/_rg_annotations_aaa_jee.adoc         |  14 ++
 .../_rg_annotations_manpage-XmlRootElement.adoc |  89 ++++++++++
 ...annotations_manpage-XmlValueTypeAdapter.adoc |  10 ++
 .../main/asciidoc/guides/_rg_classes_roles.adoc |   1 +
 .../guides/_rg_classes_roles_manpage-Dto.adoc   |  58 +++++++
 .../main/asciidoc/guides/_rg_schema-aim.adoc    |   8 +
 .../main/asciidoc/guides/_rg_schema-common.adoc |   8 +
 ...ilities-ActionInvocationMementoDtoUtils.adoc |  47 ++++++
 .../asciidoc/guides/_rg_schema-utilities.adoc   |  14 ++
 .../src/main/asciidoc/guides/_rg_schema.adoc    |  12 ++
 .../main/asciidoc/guides/_rg_services-api.adoc  |  10 ++
 ...ces-api_manpage-ActionInvocationContext.adoc |  13 +-
 ..._services-api_manpage-BackgroundService.adoc |  13 +-
 ...rg_services-api_manpage-BookmarkService.adoc |  14 +-
 .../_rg_services-api_manpage-ClockService.adoc  |  14 +-
 ..._rg_services-api_manpage-CommandContext.adoc |  14 +-
 ...rg_services-api_manpage-DeepLinkService.adoc |  14 +-
 ...vices-api_manpage-DomainObjectContainer.adoc |  10 +-
 .../_rg_services-api_manpage-EmailService.adoc  |  16 +-
 ...rg_services-api_manpage-EventBusService.adoc |  14 +-
 ..._services-api_manpage-GuiceBeanProvider.adoc |  12 +-
 ..._rg_services-api_manpage-IsisJdoSupport.adoc |  13 +-
 .../_rg_services-api_manpage-JaxbService.adoc   |  67 ++++++++
 ..._rg_services-api_manpage-MementoService.adoc |  13 +-
 ...g_services-api_manpage-MetamodelService.adoc |  13 +-
 ..._services-api_manpage-QueryResultsCache.adoc |  14 +-
 .../_rg_services-api_manpage-Scratchpad.adoc    |  14 +-
 .../_rg_services-api_manpage-SudoService.adoc   |  18 +-
 ..._rg_services-api_manpage-WrapperFactory.adoc |  13 +-
 ...services-api_manpage-XmlSnapshotService.adoc |  17 +-
 .../main/asciidoc/guides/_rg_services-spi.adoc  |  11 ++
 ...rg_services-spi_manpage-AuditingService.adoc |  14 +-
 ...es-spi_manpage-BackgroundCommandService.adoc |  17 +-
 ...vices-spi_manpage-ClassDiscoveryService.adoc |  14 +-
 ..._rg_services-spi_manpage-CommandService.adoc |  18 +-
 ...vices-spi_manpage-ContentMappingService.adoc |   5 +-
 ...s-spi_manpage-ContentNegotiationService.adoc |  14 +-
 ...es-spi_manpage-EmailNotificationService.adoc |  16 +-
 ...vices-spi_manpage-ErrorReportingService.adoc |   7 +-
 ...rg_services-spi_manpage-EventSerializer.adoc |  19 ++-
 ...ervices-spi_manpage-ExceptionRecognizer.adoc |  13 +-
 ...age-FixtureScriptsSpecificationProvider.adoc |  12 +-
 ..._rg_services-spi_manpage-LocaleProvider.adoc |  14 +-
 ..._services-spi_manpage-PublishingService.adoc |  46 ++++-
 ...vices-spi_manpage-RepresentationService.adoc |  12 +-
 ...services-spi_manpage-TranslationService.adoc |  12 +-
 ...rvices-spi_manpage-TranslationsResolver.adoc |  11 +-
 ...services-spi_manpage-UrlEncodingService.adoc |  37 ++++
 ...services-spi_manpage-UserProfileService.adoc |   5 +-
 ...ces-spi_manpage-UserRegistrationService.adoc |  30 +++-
 .../src/main/asciidoc/guides/rg.adoc            |   1 +
 .../src/main/asciidoc/migration-notes.adoc      |   1 +
 .../org/apache/isis/applib/AppManifest.java     |   1 +
 .../apache/isis/applib/services/dto/Dto.java    |  21 +++
 .../applib/services/dto/Dto_downloadXml.java    |  67 ++++++++
 .../applib/services/dto/Dto_downloadXsd.java    | 119 +++++++++++++
 .../apache/isis/applib/services/dto/Util.java   |  33 ++++
 .../apache/isis/applib/services/jaxb/Dto.java   |  21 ---
 .../applib/services/jaxb/Dto_downloadXml.java   |  69 --------
 .../applib/services/jaxb/Dto_downloadXsd.java   | 118 -------------
 .../isis/applib/services/jaxb/JaxbService.java  |  33 +++-
 .../apache/isis/applib/services/jaxb/Util.java  |  33 ----
 .../urlencoding/UrlEncodingService.java         |  21 +--
 .../UrlEncodingServiceUsingBaseEncoding.java    |  57 +++++++
 .../services/jaxb/JaxbServiceDefault.java       | 167 -------------------
 .../util/CatalogingSchemaOutputResolver.java    |  83 ---------
 .../jaxb/util/StreamResultWithWriter.java       |  45 -----
 .../jaxb/CatalogingSchemaOutputResolver.java    |  85 ++++++++++
 .../services/jaxb/JaxbServiceDefault.java       | 142 ++++++++++++++++
 .../services/jaxb/StreamResultWithWriter.java   |  45 +++++
 .../utils/ActionInvocationMementoDtoUtils.java  |  10 +-
 .../jaxbadapters/PersistentEntityAdapter.java   |   6 +-
 .../server/RestfulObjectsApplication.java       |   3 +
 .../conneg/RestfulObjectsMessageBodyWriter.java |  68 ++++++++
 78 files changed, 1384 insertions(+), 820 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/Gemfile.lock
----------------------------------------------------------------------
diff --git a/adocs/documentation/Gemfile.lock b/adocs/documentation/Gemfile.lock
index 808cd9a..6a495d9 100644
--- a/adocs/documentation/Gemfile.lock
+++ b/adocs/documentation/Gemfile.lock
@@ -43,6 +43,3 @@ DEPENDENCIES
   tilt
   wdm (>= 0.1.0)
   webrick
-
-BUNDLED WITH
-   1.10.6

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/_migration-notes_1.10.0-to-1.11.0.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/_migration-notes_1.10.0-to-1.11.0.adoc b/adocs/documentation/src/main/asciidoc/_migration-notes_1.10.0-to-1.11.0.adoc
new file mode 100644
index 0000000..1df35a8
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/_migration-notes_1.10.0-to-1.11.0.adoc
@@ -0,0 +1,31 @@
+[[_migration-notes_1.10.0-to-1.11.0]]
+= From v1.10.0 to 1.11.0
+: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/
+
+
+Existing projects written against v1.10.0 should run against v1.11.0 with few if any changes.  If you *do* encounter
+any difficulties then let us know via the link:support.html[users mailing list], so we can support you and document
+issues here.
+
+
+[NOTE]
+====
+At the time of writing `1.11.0` has not been released; these notes relate to `1.11.0-SNAPSHOT`.
+====
+
+
+== JAXB view models
+
+This version recognizes classes annotated with xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]
+as view models.  These are serialized out into XML and converted into URL.
+
+The xref:rg.adoc#_rg_services-api_manpage-JaxbService[`JaxbService`] is responsible for performing the XML conversion.
+The default implementation is located in the `org.apache.isis.core:isis-core-schema` module, specifically under the
+`org.apache.isis.core.schema.services` package.
+
+If your application is bootstrapped using an `AppManifest` (recommended; ee
+xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[here]) then the `JaxbService` will automatically be discovered and
+ registered.  However, if you are still using the older `isis.properties` configuration file to explicitly register
+ services then you will need to add in this service.

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_annotations.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations.adoc
index 213df78..f25d39d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations.adoc
@@ -55,8 +55,10 @@ include::_rg_annotations_manpage-Property.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-PropertyLayout.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-RequestScoped.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-Title.adoc[leveloffset=+1]
-include::_rg_annotations_manpage-Viewmodel.adoc[leveloffset=+1]
-include::_rg_annotations_manpage-ViewmodelLayout.adoc[leveloffset=+1]
+include::_rg_annotations_manpage-ViewModel.adoc[leveloffset=+1]
+include::_rg_annotations_manpage-ViewModelLayout.adoc[leveloffset=+1]
+include::_rg_annotations_manpage-XmlRootElement.adoc[leveloffset=+1]
+include::_rg_annotations_manpage-XmlValueTypeAdapter.adoc[leveloffset=+1]
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa.adoc
index dda6a8a..4ef658d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa.adoc
@@ -11,6 +11,7 @@ include::_rg_annotations_aaa_main.adoc[leveloffset=+1]
 include::_rg_annotations_aaa_other.adoc[leveloffset=+1]
 include::_rg_annotations_aaa_jdo.adoc[leveloffset=+1]
 include::_rg_annotations_aaa_jee.adoc[leveloffset=+1]
+include::_rg_annotations_aaa_jaxb.adoc[leveloffset=+1]
 include::_rg_annotations_aaa_deprecated.adoc[leveloffset=+1]
 include::_rg_annotations_aaa_partial.adoc[leveloffset=+1]
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa_jee.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa_jee.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa_jee.adoc
index 646079d..7753e93 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa_jee.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa_jee.adoc
@@ -52,6 +52,20 @@ The table below lists the JEE annotations currently recognized.  Expect to see m
 |Domain
 |
 
+|xref:rg.adoc#_rg_annotations_manpage-RequestScoped[`javax.xml.bind` +
+`.annotation` +
+`XmlRootElement`]
+|JAXB annotation indicating the XML root element when serialized to XML; also used by the framework for view models (whose memento is the XML), often also acting as a DTO.
+|Application
+|
+
+|xref:rg.adoc#_rg_annotations_manpage-XmlValueTypeAdapter[`javax.xml.bind` +
+`.annotation` +
+`XmlValueTypeAdapter`]
+|JAXB annotation defining how to serialize an entity.  Used in conjunction with the (framework provided) `PersientEntityAdapter` class to serialize persistent entities into a canonical OID (equivalent to the `Bookmark` provided by the xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`]).
+|Domain
+|
+
 
 |===
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
new file mode 100644
index 0000000..241b419
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
@@ -0,0 +1,89 @@
+[[_rg_annotations_manpage-XmlRootElement]]
+= `@XmlRootElement` (`jaxb`) (`1.11.0-SNAPSHOT`)
+: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 `@XmlRootElement` annotation (`1.11.0-SNAPSHOT`) provides an alternative way to define a view model, in particular
+one intended to act as a DTO for use within xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer], or which
+contains arbitrarily complex state.
+
+A view model is a non-persisted domain object whose state is converted to/from a string memento.  In the case of a
+JAXB-annotated object this memento is its XML representation.  JAXB generally requires that the root element of the
+XML representation is annotated with `@XmlRootElement`.  Apache Isis makes this a mandatory requirement.
+
+In comparison to using either the xref:rg.adoc#_rg_classes_super_manpage-ViewModel[`ViewModel`] interface or the
+xref:rg.adoc#_rg_annotations_manpage-ViewModel[`@ViewModel`] annotation, using `@XmlRootElement` has a couple of
+significant advantages:
+
+* the view model can be used as a "canonical" DTO, for example when accessing data using the
+xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer] in combination with the
+xref:rg.adoc#_rg_services-spi_manpage-ContentMappingService[`ContentMappingService`]. +
++
+This provides a stable and
+versioned API to access data in XML format using whatever client-side technology may be appropriate.
+
+* the XML graph can be as deep as required, in particular it can contain collections of other objects. +
++
+In contrast, if the `@ViewModel` annotation is used then only the state of the properties (not collections) is captured.
+If using `ViewModel` interface then arbitrary state (including that of collections), however the programmer must write
+all the code by hand
+
+The main disadvantages of using JAXB-annotated view models is that any referenced persistent entity must be annotated
+with the xref:rg.adoc#_rg_annotations_manpage-XmlValueTypeAdapter[`@XmlValueTypeAdapter`], using the
+framework-provided `PersistentEntityAdapter`.  This adapter converts any references to such domain entities into the
+`<oid-dto>` element as defined by the Apache Isis xref:rg.adoc#_rg_schema-common[common schema].
+
+[TIP]
+====
+The memento string for view models is converted into a form compatible with use within a URL.  This is performed by the
+xref:rg.adoc#_rg_services-spi_manpage-UrlEncodingService[`UrlEncodingService`], the default implementation of which
+simply encodes to base 64.  If the view model XML graph is too large to be serialized to a string, then an alternative
+implementation (eg which maps XML strings to a GUID, say) can be configured using the technique described in
+xref:rg.adoc#_ug_how-tos_replacing-default-service-implementations[here] in the user guide.
+====
+
+
+== Example
+
+This example is taken from the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp]:
+
+[source,java]
+----
+@XmlAccessorType(XmlAccessType.FIELD)                               // <1>
+@XmlType(
+        namespace = "http://viewmodels.app.todoapp/v1/todoitem",    // <2>
+        propOrder = {                                               // <3>
+            "toDoItem",
+            "description",
+            "cost",
+            "similarItems"
+        }
+)
+@XmlRootElement(name = "toDoItemDto")                               // <4>
+public class ToDoItemDto implements Dto {
+
+    @XmlElement(required = true)                                    // <5>
+    protected ToDoItem toDoItem;                                    // <6>
+
+    @XmlElement(required = true)
+    protected String description;
+
+    protected BigDecimal cost;
+
+    @XmlElementWrapper                                              // <7>
+    @XmlElement(name = "todoItem")                                  // <8>
+    protected List<ToDoItem> similarItems = Lists.newArrayList();
+
+    // getters and setters omitted
+}
+----
+<1> optional; whether JAXB-serialization reads fields directly (as here) else uses getters/setters
+<2> specify the XML schema namespace to which this element type belongs
+<3> all properties in the class must be listed; (they can be ignored using `@XmlTransient`)
+<4> mandatory, identifies this class as a view model and defines the root element for JAXB serialization
+<5> optional; JAXB metadata can specify such attributes as required/optional
+<6> reference to a persistent entity (`ToDoItem`).  Further discussion below.
+<7> collections must be wrapped in `XmlElementWraper`.
+<8> collections should specify the name of the elements within the collection
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlValueTypeAdapter.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlValueTypeAdapter.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlValueTypeAdapter.adoc
new file mode 100644
index 0000000..69709df
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlValueTypeAdapter.adoc
@@ -0,0 +1,10 @@
+[[_rg_annotations_manpage-XmlRootElement]]
+= `@XmlValueTypeAdapter` (`jaxb`) (`1.11.0-SNAPSHOT`)
+: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 `@XmlValueTypeAdapter` annotation (`1.11.0-SNAPSHOT`) is not recognized directly by the framework, but should be used to annotate any persistent domain entities that are referenced from view models annotated with xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`].
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles.adoc
index b90cd7b..138c3d2 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles.adoc
@@ -12,4 +12,5 @@ The interfaces listed in this chapter are role interfaces; they define a contrac
 include::_rg_classes_roles_manpage-HoldsUpdatedAt.adoc[leveloffset=+1]
 include::_rg_classes_roles_manpage-HoldsUpdatedBy.adoc[leveloffset=+1]
 include::_rg_classes_roles_manpage-Timestampable.adoc[leveloffset=+1]
+include::_rg_classes_roles_manpage-Dto.adoc[leveloffset=+1]
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-Dto.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-Dto.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-Dto.adoc
new file mode 100644
index 0000000..bd62e5c
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-Dto.adoc
@@ -0,0 +1,58 @@
+[[_rg_classes_mixins_Dto]]
+= `Dto` (`1.11.0-SNAPSHOT`)
+: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 `Dto` role interface (`1.11.0-SNAPSHOT`) is intended to be implemented by JAXB-annotated view models, that is, annotated using
+xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`].  It enables the ability to download the XML and
+XSD schema of those objects using two mixins, `Dto_downloadXml` and `Dto_downloadXsd`.
+
+The interface is just a marker interface (with no members), and is defined as:
+
+[source,java]
+----
+public interface Dto {
+}
+----
+
+The `Dto_downloadXml` mixin defines the following action:
+
+[source,java]
+----
+@Mixin
+public class Dto_downloadXml {
+    public Dto_downloadXml(final Dto dto) { ... }               // <1>
+    public Object downloadXml(final String fileName) { ... }    // <2>
+    ...
+}
+----
+<1> provided as an action to any class that (trivially) implements the `Dto` interface
+<2> in fact, the method is called "$$".  This is converted to "download Xml", based on the mixin's name
+
+This will return the XML text wrapped up in a xref:rg.adoc#_rg_classes_value-types_manpage-Clob[`Clob`].
+
+The `Dto_downloadXsd` mixin is similar:
+
+[source,java]
+----
+@Mixin
+public class Dto_downloadXsd {
+    public Dto_downloadXsd(final Dto dto) { ... }               // <1>
+    public Object downloadXsd(final String fileName) { ... }    // <2>
+}
+----
+<1> provided as an action to any class that (trivially) implements the `Dto` interface
+<2> in fact, the method is called "$$".  This is converted to "download Xsd", based on the mixin's name
+
+If the domain object's JAXB annotations reference only a single XSD schema then this will return that XML text as
+a xref:rg.adoc#_rg_classes_value-types_manpage-Clob[`Clob`] of that XSD.  If there are multiple XSD schemas referenced
+then the action will return a zip of those schemas, wrapped up in a
+xref:rg.adoc#_rg_classes_value-types_manpage-Blob[`Blob`].
+
+
+== Related Services
+
+The `Dto_downloadXml` and `Dto_downloadXsd` delegate to the
+xref:rg.adoc#_rg_services-api_manpage-JaxbService[`JaxbService`] to actually generate the XML/XSD.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc
new file mode 100644
index 0000000..d898b7e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc
@@ -0,0 +1,8 @@
+[[_rg_schema-aim]]
+= Action Invocation Memento
+: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/
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
new file mode 100644
index 0000000..4e6d6cd
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
@@ -0,0 +1,8 @@
+[[_rg_schema-common]]
+= Common Schema
+: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/
+
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc
new file mode 100644
index 0000000..a9d2609
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc
@@ -0,0 +1,47 @@
+[[_rg_schema-utilities-ActionInvocationMementoDtoUtils]]
+= `ActionInvocationMementoDtoUtils`
+: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/
+
+
+NOTE: TODO
+
+`ActionInvocationMementoDtoUtils`
+
+
+[source,java]
+----
+public class ActionInvocationMementoDtoUtils {
+    public static ActionInvocationMementoDto newDto() { ... }                                                   // <1>
+    public static void setMetadata( ... ) { ... }
+    public static boolean addArgValue( ... ) { ... }
+    public static void addArgReference( ... ) { ... }
+    public static boolean addReturnValue( ... ) { ... }
+    public static void addReturnReference( ... ) { ... }
+
+    public static int getNumberOfParameters(final ActionInvocationMementoDto aim) { ... }                       // <2>
+    public static List<ParamDto> getParameters(final ActionInvocationMementoDto aim) { ... }
+    public static List<String> getParameterNames(final ActionInvocationMementoDto aim) { ... }
+    public static List<ValueType> getParameterTypes(final ActionInvocationMementoDto aim) { ... }
+    public static ParamDto getParameter(final ActionInvocationMementoDto aim, final int paramNum) { ... }       // <3>
+    public static ValueDto getParameterValue(final ActionInvocationMementoDto aim, final int paramNum) { ... }
+    public static String getParameterName(final ActionInvocationMementoDto aim, final int paramNum) { ... }
+    public static ValueType getParameterType(final ActionInvocationMementoDto aim, final int paramNum) { ... }
+    public static boolean isNull(final ActionInvocationMementoDto aim, int paramNum) { ... }
+
+    public static <T> T getArg(final ActionInvocationMementoDto aim, int paramNum, Class<T> cls) { ... }        // <3>
+
+    public static ActionInvocationMementoDto fromXml(Reader reader) { ... }                                     // <4>
+    public static ActionInvocationMementoDto fromXml(
+            final Class<?> contextClass,
+            final String resourceName,
+            final Charset charset) throws IOException { ... }
+    public static String toXml(final ActionInvocationMementoDto aim) { ... }
+    public static void toXml(final ActionInvocationMementoDto aim, final Writer writer) { ... }
+}
+----
+<1> not API; for the Apache Isis framework itself to create and initialize DTOs representing action invocations
+<2> API, obtaining metadata about the action invocation
+<3> API, obtaining the argument value for a particular parameter of the action invocation
+<4> marshall the DTO to/from XML

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities.adoc
new file mode 100644
index 0000000..a696fbf
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities.adoc
@@ -0,0 +1,14 @@
+[[_rg_schema-utilities]]
+= Utilities
+: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/
+
+
+NOTE: TODO
+
+In addition to defining the schemas themselves, Apache Isis also provides some simple helper classes, under the
+`org.apache.isis.schema.utils` package.
+
+
+include::_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc[leveloffset=+1]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc
new file mode 100644
index 0000000..e8ce6c2
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc
@@ -0,0 +1,12 @@
+[[_rg_schema]]
+= Schema
+: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/
+
+
+NOTE: TODO
+
+include::_rg_schema-common.adoc[leveloffset=+1]
+include::_rg_schema-aim.adoc[leveloffset=+1]
+include::_rg_schema-utilities.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api.adoc
index ae95d98..f496223 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api.adoc
@@ -160,6 +160,16 @@ SpecificationProvider`].
 |
 
 
+|xref:rg.adoc#_rg_services-api_manpage-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``
+|`1.11.0-SNAPSHOT`.
+
+
 |xref:rg.adoc#_rg_services-api_manpage-MementoService[`o.a.i.applib.` +
 `services.memento` +
 `MementoService`]

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ActionInvocationContext.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ActionInvocationContext.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ActionInvocationContext.adoc
index 55fab20..c52348d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ActionInvocationContext.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ActionInvocationContext.adoc
@@ -65,14 +65,13 @@ public class ToDoItem ... {
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default
+implementation of `ActionInvocationContext` class is automatically registered (it is annotated with `@DomainService`)
+so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Isis' default implementation of `ActionInvocationContext` class is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BackgroundService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BackgroundService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BackgroundService.adoc
index ddcbea6..c59ef95 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BackgroundService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BackgroundService.adoc
@@ -94,14 +94,13 @@ The user would be returned a domain object representing their action invocation.
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `BackgroundService` is automatically registered (it is annotated with `@DomainService`) so no
+further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `BackgroundService` is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BookmarkService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BookmarkService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BookmarkService.adoc
index 0db6e9d..87305af 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BookmarkService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-BookmarkService.adoc
@@ -105,14 +105,12 @@ Bookmarks are also used by the (non-ASF) http://github.com/isisaddons/isis-modul
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `BookmarkService` is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `BookmarkService` is automatically registered (it is annotated with `@DomainService`) so no further
+configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ClockService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ClockService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ClockService.adoc
index 8582730..5bd309d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ClockService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-ClockService.adoc
@@ -93,13 +93,9 @@ public class NntpClockServiceInitializer  {
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `ClockService` is automatically registered (it is annotated with `@DomainService`) so no further
+configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `ClockService` is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
-
-If you want to use a different implementation of `Clock`, eg delegating to NNTP, then do _not_ register directly, but instead subclass from `o.a.i.applib.clock.Clock` singleton (as described in the section above).
+If you want to use a different implementation of `Clock`, eg delegating to NNTP, then do _not_ register directly, but
+instead subclass from `o.a.i.applib.clock.Clock` singleton (as described in the section above).

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-CommandContext.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-CommandContext.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-CommandContext.adoc
index cc770e1..c9008f0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-CommandContext.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-CommandContext.adoc
@@ -197,15 +197,13 @@ String user = commandContext.getCommand().getUser();
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `CommandContext` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `CommandContext` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DeepLinkService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DeepLinkService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DeepLinkService.adoc
index 651b89e..1dd9f89 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DeepLinkService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DeepLinkService.adoc
@@ -47,12 +47,10 @@ The Wicket viewer core framework provides a default implementation of this API:
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-and that the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used then an implementation of `DeepLinkService` is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]), _and_ that the
+xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used, then an implementation of `DeepLinkService` is
+automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DomainObjectContainer.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DomainObjectContainer.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DomainObjectContainer.adoc
index c0820de..f75f72e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DomainObjectContainer.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-DomainObjectContainer.adoc
@@ -34,11 +34,7 @@ include::_rg_services-api_manpage-DomainObjectContainer_services-api.adoc[levelo
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `DomainObjectContainer` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `DomainObjectContainer` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EmailService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EmailService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EmailService.adoc
index d714628..cd1b9ea 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EmailService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EmailService.adoc
@@ -81,17 +81,13 @@ To ensure that your alternative implementation takes the place of the default im
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `EmailService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
-
-If you have written an alternative implementation, then register your implementation in `isis.properties` under the "isis.services" key and it will be used instead.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `EmailService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 == Related Services

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EventBusService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EventBusService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EventBusService.adoc
index 3639e9b..e62aa1d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EventBusService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-EventBusService.adoc
@@ -387,15 +387,13 @@ Late registration refers to the idea that a domain service can register itself w
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `EventBusService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `EventBusService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-GuiceBeanProvider.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-GuiceBeanProvider.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-GuiceBeanProvider.adoc
index 1cf5e47..729588c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-GuiceBeanProvider.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-GuiceBeanProvider.adoc
@@ -80,12 +80,12 @@ should return "ToDo App".
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]), _and_ that the
+xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used, then an implementation of `GuiceBeanProvider` is
+automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
-and that the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] is being used then an implementation of `GuiceBeanProvider` is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-IsisJdoSupport.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-IsisJdoSupport.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-IsisJdoSupport.adoc
index d2ef76c..74056d4 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-IsisJdoSupport.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-IsisJdoSupport.adoc
@@ -267,11 +267,10 @@ public List<Order> findOrders(...) {
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `IsisJdoSupport` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `IsisJdoSupport` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-JaxbService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-JaxbService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-JaxbService.adoc
new file mode 100644
index 0000000..61f0d3a
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-JaxbService.adoc
@@ -0,0 +1,67 @@
+[[_rg_services-api_manpage-JaxbService]]
+= `JaxbService` (`1.11.0-SNAPSHOT`)
+: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 `JaxbService` (`1.11.0-SNAPSHOT`) allows instances of JAXB-annotated classes to be marshalled to XML and
+unmarshalled from XML back into domain objects.
+
+
+
+
+
+[[_rg_services-api_manpage-JaxbService_api-and-implementation]]
+== API & Implementation
+
+The API defined by `JaxbService` is:
+
+[source,java]
+----
+public interface JaxbService {
+    @Programmatic
+    <T> T fromXml(Class<T> domainClass, String xml);                                            // <1>
+    @Programmatic
+    public String toXml(final Object domainObject);                                             // <2>
+    public enum IsisSchemas {                                                                   // <3>
+        INCLUDE, IGNORE
+    }
+    @Programmatic
+    public Map<String, String> toXsd(final Object domainObject, final IsisSchemas isSchemas);} // <4>
+----
+<1> unmarshalls the XML into an instance of the class.
+<2> marshalls the domain object into XML
+<3> whether to include or exclude the Isis schemas in the generated map of XSDs.  Discussed further below.
+<4> generates a map of each of the schemas referenced; the key is the schema namespace, the value is the XML of the schema itself.
+
+With respect to the `IsisSchemas` enum: a JAXB-annotated domain object will live in its own XSD namespace and may
+reference multiple other XSD schemas.  In particular, many JAXB domain objects will reference the
+link:http://isis.apache.org/schema[common Isis schemas] (for example the `OidDto` class that represents a reference to
+a persistent entity).  The enum indicates whether these schemas should be included or excluded from the map.
+
+Isis provides a default implementation of the service, `o.a.i.schema.services.jaxb.JaxbServiceDefault`.
+
+
+
+== Usage within the framework
+
+This service is provided as a convenience for applications, but is also used internally by the framework to
+xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]-annotated
+xref:ug.adoc#_ug_more-advanced_view-models[view models].  The functionality to download XML and XSD schemas is also
+exposed in the UI through mixins to xref:rg.adoc#_rg_classes_roles_manpage-Dto[`Dto`] interface.
+
+
+
+== Registering the Service
+
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `JaxbService` service is automatically registered and injected (it is annotated with `@DomainService`)
+so no further configuration is required.
+
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
+

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MementoService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MementoService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MementoService.adoc
index 21c35ed..ab06525 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MementoService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MementoService.adoc
@@ -122,11 +122,10 @@ The memento service is used by the xref:rg.adoc#_rg_services-api_manpage-Command
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `MementoService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `MementoService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MetamodelService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MetamodelService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MetamodelService.adoc
index 82984ac..b65e42e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MetamodelService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-MetamodelService.adoc
@@ -33,11 +33,10 @@ public interface MetaModelService {
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `MetamodelService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `MetamodelService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-QueryResultsCache.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-QueryResultsCache.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-QueryResultsCache.adoc
index d4ab535..0e698da 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-QueryResultsCache.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-QueryResultsCache.adoc
@@ -111,15 +111,13 @@ This refactoring will be worthwhile provided that enough of the orders being pro
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `QueryResultsCache` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `QueryResultsCache` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
index d108fe1..5906cd0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
@@ -109,15 +109,13 @@ If using the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer], the `ToDoItemBulkUpd
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `Scratchpad` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `Scratchpad` service is automatically registered and injected (it is annotated with `@DomainService`)
+so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-SudoService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-SudoService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-SudoService.adoc
index 31ef7b4..79c39c9 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-SudoService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-SudoService.adoc
@@ -28,9 +28,10 @@ public interface SudoService {
 }
 ----
 
-which will run the provided block of code (a `Runnable` or a `Callable`) in a way such that calls to `DomainObjectContainer#getUser()` will return the specified user (and roles, if specified)
+which will run the provided block of code (a `Runnable` or a `Callable`) in a way such that calls to
+`DomainObjectContainer#getUser()` will return the specified user (and roles, if specified)
 
-The core framework provides a default implementation of this service (`o.a.i.core.runtime.services.sudo.SudoServiceDefault`)
+The core framework provides a default implementation of this service (`o.a.i.core.runtime.services.sudo.SudoServiceDefault`).
 
 
 
@@ -59,11 +60,10 @@ protected void execute(final ExecutionContext ec) {
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `SudoService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `SudoService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-WrapperFactory.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-WrapperFactory.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-WrapperFactory.adoc
index be30257..bd1cf7c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-WrapperFactory.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-WrapperFactory.adoc
@@ -153,11 +153,10 @@ The original intent of this API was to enable test transcripts to be captured (i
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `WrapperFactory` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `WrapperFactory` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-XmlSnapshotService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-XmlSnapshotService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-XmlSnapshotService.adoc
index 79fe2f8..a8e0da1 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-XmlSnapshotService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-XmlSnapshotService.adoc
@@ -194,14 +194,14 @@ public interface XmlSnapshotService {
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `XmlSnapshotService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
-then Apache Isis' core implementation of `XmlSnapshotService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
 
 == Related Services
@@ -210,6 +210,11 @@ The xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`] pro
 
 The xref:rg.adoc#_rg_services-api_manpage-MementoService[`MementoService`] also provides a mechanism for generating string representations of domain objects.
 
+The xref:rg.adoc#_rg_services-api_manpage-JaxbService[`JaxbService`] (`1.11.0-SNAPSHOT`) is a simple wrapper around
+standard JAXB functionality for generating both XMLs and XSDs from JAXB-annotated classes.  Note that (as of
+`1.11.0-SNAPSHOT`) there is built-in support for JAXB classes (ie annotated with
+xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]) to be used as view models.
+
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi.adoc
index b0575ec..76c89a6 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi.adoc
@@ -178,6 +178,17 @@ depends on: +
 |
 
 
+|xref:rg.adoc#_rg_services-spi_manpage-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.
+
+|`UrlEncodingServiceUsingBaseEncoding` +
+``o.a.i.applib`` +
+``isis-core-applib``
+|
+
+
 |xref:rg.adoc#_rg_services-spi_manpage-UserProfileService[`o.a.i.applib.` +
 `services.userprof` +
 `UserProfileService`]

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-AuditingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-AuditingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-AuditingService.adoc
index 5956bc0..464c25b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-AuditingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-AuditingService.adoc
@@ -63,15 +63,15 @@ The typical way to indicate that an object should be audited is to annotate it w
 
 == Registering the Services
 
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+The (non-ASF) http://github.com/isisaddons/isis-module-audit[Isis addons' audit] module provides an implementation of
+this service (`AuditingService`), and also provides a number of related domain services (`AuditingServiceMenu`,
+`AuditingServiceRepository` and `AuditingServiceContributions`).
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+Assuming that an `AppManifest` is being used to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app])
+then this can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
 
-then adding the (non-ASF) http://github.com/isisaddons/isis-module-audit[Isis addons' audit] module to the classpath will automatically register the `AuditingService`, `AuditingServiceMenu`, `AuditingServiceRepository` and `AuditingServiceContributions` services.  If menu items or contributions are not required in the UI, these can be suppressed either using security or by implementing a xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
+If menu items or contributions are not required in the UI, these can be suppressed either using security or by
+implementing a xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-BackgroundCommandService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-BackgroundCommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-BackgroundCommandService.adoc
index a69b540..b759fc9 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-BackgroundCommandService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-BackgroundCommandService.adoc
@@ -103,17 +103,18 @@ The imperative approach involves explicitly calling the xref:rg.adoc#_rg_service
 
 == Registering the Services
 
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module provides an implementation
+of this service (`BackgroundCommandService`), and also provides a number of related domain services
+(`BackgroundCommandServiceJdo`, `BackgroundCommandJdoRepository` and `BackgroundCommandServiceJdoContributions`).  This
+module also provides service implementations of the
+xref:rg.adoc#_rg_services-spi_manpage-CommandService[`CommandService`].
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+Assuming that an `AppManifest` is being used to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app])
+then this can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
 
-then adding the (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module to the classpath will automatically register the `BackgroundCommandServiceJdo`, `BackgroundCommandJdoRepository` and `BackgroundCommandServiceJdoContributions` services.  If contributions are not required in the UI, these can be suppressed either using security or by implementing a xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
+If contributions are not required in the UI, these can be suppressed either using security or by implementing a
+xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
 
-Note that this module also provides service implementations of the xref:rg.adoc#_rg_services-spi_manpage-CommandService[`CommandService`].
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ClassDiscoveryService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ClassDiscoveryService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ClassDiscoveryService.adoc
index b7330ba..2aea1ea 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ClassDiscoveryService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ClassDiscoveryService.adoc
@@ -71,14 +71,12 @@ Other usages of the `ClassDiscoveryService` are likely to work in a similar way,
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Apache Isis' core implementation of `ClassDiscoveryService2` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
+implementation of `ClassDiscoveryService2` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-CommandService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-CommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-CommandService.adoc
index 4551a2e..fd07d4d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-CommandService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-CommandService.adoc
@@ -70,18 +70,18 @@ The typical way to indicate that an action should be reified into a `Command` is
 
 == Registering the Services
 
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
+The (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module provides an implementation
+of this service (`CommandService`), and also provides a number of related domain services
+(`CommandJdoRepository` and `CommandServiceJdoContributions`).  This
+module also provides service implementations of the
+xref:rg.adoc#_rg_services-spi_manpage-CommandService[`BackgroundCommandService`].
 
+Assuming that an `AppManifest` is being used to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app])
+then this can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
 
-then adding the (non-ASF) http://github.com/isisaddons/isis-module-command[Isis addons' command] module to the classpath will automatically register the `CommandServiceJdo`, `CommandJdoRepository` and `CommandServiceJdoContributions` services.  If contributions are not required in the UI, these can be suppressed either using security or by implementing a xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
+If contributions are not required in the UI, these can be suppressed either using security or by implementing a
+xref:ug.adoc#_ug_more-advanced_decoupling_vetoing-visibility[vetoing subscriber].
 
-Note that this module also provides service implementations of the xref:rg.adoc#_rg_services-spi_manpage-BackgroundCommandService[`BackgroundCommandService`].
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentMappingService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentMappingService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentMappingService.adoc
index 86d3229..ad38b2f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentMappingService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentMappingService.adoc
@@ -41,7 +41,9 @@ This is an "internal" SPI, meaning that it uses types that are not part of the I
 
 == 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 a `ToDoItemDto` (JAXB annotated and derived from an XSD).  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.  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.
 
 The source code is:
 
@@ -81,7 +83,6 @@ public class CustomContentMappingService implements ContentMappingService {
         }
         return null;
     }
-
     @javax.inject.Inject
     private BookmarkService bookmarkService;
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentNegotiationService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentNegotiationService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentNegotiationService.adoc
index 7d6dd49..17972e8 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentNegotiationService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-ContentNegotiationService.adoc
@@ -187,15 +187,13 @@ If the property is not set, then the default depends on the xref:rg.adoc#_rg_run
 == Registering the Services
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
-
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Isis' default implementation of `ContentNegotiationService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default
+implementation of `ContentNegotiationService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/19cdaaba/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EmailNotificationService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EmailNotificationService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EmailNotificationService.adoc
index 7de4c70..ba199b0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EmailNotificationService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi_manpage-EmailNotificationService.adoc
@@ -39,7 +39,8 @@ If `isConfigured()` returns false then it is _not_ valid to call `send(...)` (an
 
 == Implementation
 
-The framework provides a default implementation, `o.a.i.core.runtime.services.userreg.EmailNotificationServiceDefault` that constructs the emails to send.
+The framework provides a default implementation, `o.a.i.core.runtime.services.userreg.EmailNotificationServiceDefault`
+that constructs the emails to send.
 
 
 
@@ -63,14 +64,13 @@ To ensure that your alternative implementation takes the place of the default im
 == Registering the Service
 
 Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]):
+`AppManifest` to xref:rg.adoc#_rg_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' default
+implementation of `EmailNotificationService` service is automatically registered and injected (it is annotated with
+`@DomainService`) so no further configuration is required.
 
-[source,ini]
-----
-isis.services-installer=configuration-and-annotation
-----
-
-then Isis' default implementation of `EmailNotificationService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
+To use an alternative implementation, use
+xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
+further in this xref:ug.adoc#_ug_how-tos_replacing-default-service-implementations["how to"] tip).
 
 
 == Related Services


[4/4] isis git commit: ISIS-1250: expose IsisSchemas (ignore/include) in the downloadXsd UI.

Posted by da...@apache.org.
ISIS-1250: expose IsisSchemas (ignore/include) in the downloadXsd UI.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/e0de7da8
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/e0de7da8
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/e0de7da8

Branch: refs/heads/master
Commit: e0de7da8131b1ffaa9c0f0be2adc6fe880eba8bf
Parents: 19cdaab
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Nov 17 09:14:33 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Nov 17 09:14:33 2015 +0000

----------------------------------------------------------------------
 .../org/apache/isis/applib/services/dto/Dto_downloadXsd.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e0de7da8/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
index 7d433e2..af17f30 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
@@ -66,9 +66,9 @@ public class Dto_downloadXsd {
 
     )
     @MemberOrder(sequence = "500.2")
-    public Object $$(final String fileName) {
+    public Object $$(final String fileName, final JaxbService.IsisSchemas isisSchemas) {
 
-        final Map<String, String> map = jaxbService.toXsd(dto, JaxbService.IsisSchemas.IGNORE);
+        final Map<String, String> map = jaxbService.toXsd(dto, isisSchemas);
 
         if(map.isEmpty()) {
             container.warnUser("No schemas were generated for " + dto.getClass().getName() + "; programming error?");
@@ -105,6 +105,10 @@ public class Dto_downloadXsd {
         return Util.withSuffix(dto.getClass().getName(), "xsd");
     }
 
+    public JaxbService.IsisSchemas default1$$() {
+        return JaxbService.IsisSchemas.IGNORE;
+    }
+
     private static String zipEntryNameFor(final String namespaceUri) {
         return Util.withSuffix(namespaceUri, "xsd");
     }