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/19 23:42:42 UTC

[1/6] isis git commit: ISIS-1255, ISIS-1250, ISIS-1252: docs for 1250 (JaxbService) and UI events (1252); implementation of config properties to suppress broadcast of events for default (1255)

Repository: isis
Updated Branches:
  refs/heads/master a1c7e2690 -> 4bf7ee1a4


http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java
index bd78959..0663c89 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java
@@ -33,6 +33,8 @@ public abstract class CollectionInteractionEvent<S,T> extends CollectionDomainEv
     @Deprecated
     public static class Default extends CollectionDomainEvent.Default {
         private static final long serialVersionUID = 1L;
+        public Default(){}
+        @Deprecated
         public Default(
                 final Object source,
                 final Identifier identifier,
@@ -44,6 +46,10 @@ public abstract class CollectionInteractionEvent<S,T> extends CollectionDomainEv
     //endregion
 
     //region > constructors
+    public CollectionInteractionEvent() {
+    }
+
+    @Deprecated
     public CollectionInteractionEvent(
             final S source,
             final Identifier identifier,
@@ -51,6 +57,7 @@ public abstract class CollectionInteractionEvent<S,T> extends CollectionDomainEv
         super(source, identifier, of);
     }
 
+    @Deprecated
     public CollectionInteractionEvent(
             final S source,
             final Identifier identifier,

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
index 49c41ec..b347b49 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
@@ -48,9 +48,11 @@ public abstract class CssClassUiEvent<S> extends AbstractUiEvent<S> {
     //endregion
 
     //region > Default class
-
     /**
-     * Implementation provided as a convenience for domain objects that have no custom subclass.
+     * This class is the default for the
+     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#cssClassUiEvent()} annotation attribute.  Whether this
+     * raises an event or not depends upon the "isis.services.eventbus.cssClassUiEvent.postForDefault"
+     * configuration property.
      */
     public static class Default extends CssClassUiEvent<Object> {
         private static final long serialVersionUID = 1L;
@@ -60,15 +62,25 @@ public abstract class CssClassUiEvent<S> extends AbstractUiEvent<S> {
     //region > Noop class
 
     /**
-     * Marker class that is the default for
-     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#cssClassUiEvent()} annotation attribute, meaning that
-     * an event should <i>not</i> be emitted by default.
+     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event.
      */
     public static class Noop extends CssClassUiEvent<Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
 
+    //region > Doop class
+
+    /**
+     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event..
+     */
+    public static class Doop extends CssClassUiEvent<Object> {
+        private static final long serialVersionUID = 1L;
+    }
+    //endregion
+
     //region > cssClass
     private String cssClass;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
index 2a777e2..2ed9ed8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
@@ -46,9 +46,11 @@ public abstract class IconUiEvent<S> extends AbstractUiEvent<S> {
     //endregion
 
     //region > Default class
-
     /**
-     * Implementation provided as a convenience for domain objects that have no custom subclass.
+     * This class is the default for the
+     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#iconUiEvent()} annotation attribute.  Whether this
+     * raises an event or not depends upon the "isis.services.eventbus.iconUiEvent.postForDefault"
+     * configuration property.
      */
     public static class Default extends IconUiEvent<Object> {
         private static final long serialVersionUID = 1L;
@@ -58,15 +60,26 @@ public abstract class IconUiEvent<S> extends AbstractUiEvent<S> {
     //region > Noop class
 
     /**
-     * Marker class that is the default for
-     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#iconUiEvent()} annotation attribute, meaning that
-     * an event should <i>not</i> be emitted by default.
+     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event.
      */
     public static class Noop extends IconUiEvent<Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
 
+    //region > Doop class
+
+    /**
+     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event..
+     */
+    public static class Doop extends IconUiEvent<Object> {
+        private static final long serialVersionUID = 1L;
+    }
+    //endregion
+
+
     //region > iconName
     private String iconName;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
index 1114f34..bc90b2c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
@@ -27,12 +27,15 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractInteractionEvent<
 
     //region > Default class
     /**
-     * The default for {@link org.apache.isis.applib.annotation.Property#domainEvent()} annotation attribute, will be
-     * used as the event class to be posted if some other subclass wasn't specified (though setting to
-     * {@link org.apache.isis.applib.services.eventbus.PropertyDomainEvent.Noop} will disable).
+     * This class is the default for the
+     * {@link org.apache.isis.applib.annotation.Property#domainEvent()} annotation attribute.  Whether this
+     * raises an event or not depends upon the "isis.services.eventbus.propertyDomainEvent.postForDefault"
+     * configuration property.
      */
     public static class Default extends PropertyInteractionEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
+        public Default(){}
+        @Deprecated
         public Default(Object source, Identifier identifier, Object oldValue, Object newValue) {
             super(source, identifier, oldValue, newValue);
         }
@@ -42,10 +45,21 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractInteractionEvent<
     //region > Noop class
 
     /**
-     * Disables event propogation if explicitly set as the value of
-     * {@link org.apache.isis.applib.annotation.Property#domainEvent()} annotation attribute.
+     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event.
      */
-    public static class Noop extends PropertyDomainEvent<Object,Object> {
+    public static class Noop extends PropertyInteractionEvent<Object, Object> {
+        private static final long serialVersionUID = 1L;
+    }
+    //endregion
+
+    //region > Doop class
+
+    /**
+     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event..
+     */
+    public static class Doop extends PropertyInteractionEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.java
index 9afedaa..29bb13f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyInteractionEvent.java
@@ -33,6 +33,7 @@ public abstract class PropertyInteractionEvent<S,T> extends PropertyDomainEvent<
     @Deprecated
     public static class Default extends PropertyDomainEvent.Default {
         private static final long serialVersionUID = 1L;
+        public Default(){}
         public Default(Object source, Identifier identifier, Object oldValue, Object newValue) {
             super(source, identifier, oldValue, newValue);
         }
@@ -40,12 +41,16 @@ public abstract class PropertyInteractionEvent<S,T> extends PropertyDomainEvent<
     //endregion
 
     //region > constructors
+    public PropertyInteractionEvent() {}
+
+    @Deprecated
     public PropertyInteractionEvent(
             final S source,
             final Identifier identifier) {
         super(source, identifier);
     }
 
+    @Deprecated
     public PropertyInteractionEvent(
             final S source,
             final Identifier identifier,

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
index 0bb9b91..86b584b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
@@ -30,9 +30,11 @@ public abstract class TitleUiEvent<S> extends AbstractUiEvent<S> {
     private static final long serialVersionUID = 1L;
 
     //region > Default class
-
     /**
-     * Implementation provided as a convenience for domain objects that have no custom subclass.
+     * This class is the default for the
+     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#titleUiEvent()} annotation attribute.  Whether this
+     * raises an event or not depends upon the "isis.services.eventbus.titleUiEvent.postForDefault"
+     * configuration property.
      */
     public static class Default extends TitleUiEvent<Object> {
         private static final long serialVersionUID = 1L;
@@ -42,15 +44,25 @@ public abstract class TitleUiEvent<S> extends AbstractUiEvent<S> {
     //region > Noop class
 
     /**
-     * Marker class that is the default for
-     * {@link org.apache.isis.applib.annotation.DomainObjectLayout#titleUiEvent()} annotation attribute, meaning that
-     * an event should <i>not</i> be emitted by default.
+     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
+     * property seting for the {@link Default} event.
      */
     public static class Noop extends TitleUiEvent<Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
 
+    //region > Doop class
+
+    /**
+     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event..
+     */
+    public static class Doop extends TitleUiEvent<Object> {
+        private static final long serialVersionUID = 1L;
+    }
+    //endregion
+
     //region > constructors
     /**
      * If used then the framework will set state via (non-API) setters.

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
index cca21b9..c6374f2 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
@@ -97,6 +97,7 @@ import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorCom
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
 import org.apache.isis.core.metamodel.transactions.TransactionStateProvider;
 import org.apache.isis.core.metamodel.transactions.TransactionStateProviderAware;
+import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class ActionAnnotationFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware, IsisConfigurationAware, AdapterManagerAware, MetaModelValidatorRefiner,
         TransactionStateProviderAware {
@@ -199,11 +200,14 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract implement
                 actionDomainEventFacet = new ActionDomainEventFacetDefault(
                         actionDomainEventType, servicesInjector, getSpecificationLoader(), holder);
             }
-            if(!ActionDomainEvent.Noop.class.isAssignableFrom(actionDomainEventFacet.getEventType())) {
+            if(EventUtil.eventTypeIsPostable(
+                    actionDomainEventFacet.getEventType(),
+                    ActionDomainEvent.Noop.class,
+                    ActionDomainEvent.Default.class,
+                    "isis.services.eventbus.actionDomainEvent.postForDefault", this.configuration)) {
                 FacetUtil.addFacet(actionDomainEventFacet);
             }
 
-
             // replace the current actionInvocationFacet with one that will
             // emit the appropriate domain event and then delegate onto the underlying
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
index ef1022b..cc35eb6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
@@ -23,6 +23,7 @@ import java.lang.reflect.Method;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
+
 import org.apache.isis.applib.annotation.Collection;
 import org.apache.isis.applib.annotation.CollectionInteraction;
 import org.apache.isis.applib.annotation.Disabled;
@@ -77,6 +78,7 @@ import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
 import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
+import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware, MetaModelValidatorRefiner, IsisConfigurationAware {
 
@@ -91,6 +93,7 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
     private final CollectionTypeRegistry collectionTypeRegistry = new CollectionTypeRegistry();
 
     private ServicesInjector servicesInjector;
+    private IsisConfiguration configuration;
 
     public CollectionAnnotationFacetFactory() {
         super(FeatureType.COLLECTIONS_AND_ACTIONS);
@@ -169,6 +172,13 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
         if(!CollectionDomainEvent.Noop.class.isAssignableFrom(collectionDomainEventFacet.getEventType())) {
             FacetUtil.addFacet(collectionDomainEventFacet);
         }
+        if(EventUtil.eventTypeIsPostable(
+                collectionDomainEventFacet.getEventType(),
+                CollectionDomainEvent.Noop.class,
+                CollectionDomainEvent.Default.class,
+                "isis.services.eventbus.collectionDomainEvent.postForDefault", this.configuration)) {
+            FacetUtil.addFacet(collectionDomainEventFacet);
+        }
 
 
         //
@@ -377,6 +387,7 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
 
     @Override
     public void setConfiguration(final IsisConfiguration configuration) {
+        this.configuration = configuration;
         postsCollectionAddedToEventValidator.setConfiguration(configuration);
         postsCollectionRemovedFromEventValidator.setConfiguration(configuration);
         collectionInteractionValidator.setConfiguration(configuration);

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
index 9f21e51..abcfe04 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
@@ -26,6 +26,7 @@ import org.apache.isis.applib.NonRecoverableException;
 import org.apache.isis.applib.annotation.DomainObjectLayout;
 import org.apache.isis.applib.services.eventbus.CssClassUiEvent;
 import org.apache.isis.applib.services.eventbus.EventBusService;
+import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
@@ -33,7 +34,7 @@ import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacetAbstract;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent extends FacetAbstract implements
         CssClassFacet {
@@ -43,12 +44,18 @@ public class CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent ex
     public static Facet create(
             final DomainObjectLayout domainObjectLayout,
             final ServicesInjector servicesInjector,
-            final FacetHolder facetHolder) {
+            final IsisConfiguration configuration, final FacetHolder facetHolder) {
         if(domainObjectLayout == null) {
             return null;
         }
         final Class<? extends CssClassUiEvent<?>> cssClassUiEventClass = domainObjectLayout.cssClassUiEvent();
-        if(CssClassUiEvent.Noop.class.isAssignableFrom(cssClassUiEventClass)) {
+
+        if(!EventUtil.eventTypeIsPostable(
+                cssClassUiEventClass,
+                CssClassUiEvent.Noop.class,
+                CssClassUiEvent.Default.class,
+                "isis.services.eventbus.cssClassUiEvent.postForDefault",
+                configuration)) {
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/DomainObjectLayoutFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/DomainObjectLayoutFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/DomainObjectLayoutFacetFactory.java
index 51e952d..2c3b375 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/DomainObjectLayoutFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/DomainObjectLayoutFacetFactory.java
@@ -18,6 +18,8 @@ package org.apache.isis.core.metamodel.facets.object.domainobjectlayout;
 
 import org.apache.isis.applib.annotation.DomainObjectLayout;
 import org.apache.isis.applib.annotation.ViewModelLayout;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.config.IsisConfigurationAware;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
@@ -26,7 +28,8 @@ import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
 
-public class DomainObjectLayoutFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware {
+public class DomainObjectLayoutFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware,
+        IsisConfigurationAware {
 
 
     public DomainObjectLayoutFacetFactory() {
@@ -44,13 +47,13 @@ public class DomainObjectLayoutFacetFactory extends FacetFactoryAbstract impleme
 
         FacetUtil.addFacet(
                 TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.create(
-                        domainObjectLayout, servicesInjector, facetHolder));
+                        domainObjectLayout, servicesInjector, configuration, facetHolder));
         FacetUtil.addFacet(
                 IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.create(
-                        domainObjectLayout, servicesInjector, facetHolder));
+                        domainObjectLayout, servicesInjector, configuration, facetHolder));
         FacetUtil.addFacet(
                 CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.create(
-                        domainObjectLayout, servicesInjector, facetHolder));
+                        domainObjectLayout, servicesInjector, configuration, facetHolder));
 
         FacetUtil.addFacet(
                 CssClassFacetForDomainObjectLayoutAnnotation.create(domainObjectLayout, facetHolder));
@@ -92,9 +95,15 @@ public class DomainObjectLayoutFacetFactory extends FacetFactoryAbstract impleme
 
 
     private ServicesInjector servicesInjector;
+    private IsisConfiguration configuration;
 
     @Override
     public void setServicesInjector(final ServicesInjector servicesInjector) {
         this.servicesInjector = servicesInjector;
     }
+
+    @Override
+    public void setConfiguration(final IsisConfiguration configuration) {
+        this.configuration = configuration;
+    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
index 4036892..c53a711 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
@@ -26,11 +26,13 @@ import org.apache.isis.applib.NonRecoverableException;
 import org.apache.isis.applib.annotation.DomainObjectLayout;
 import org.apache.isis.applib.services.eventbus.EventBusService;
 import org.apache.isis.applib.services.eventbus.IconUiEvent;
+import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.icon.IconFacetAbstract;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
+import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent extends IconFacetAbstract {
 
@@ -39,12 +41,18 @@ public class IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent extends Ic
     public static Facet create(
             final DomainObjectLayout domainObjectLayout,
             final ServicesInjector servicesInjector,
-            final FacetHolder facetHolder) {
+            final IsisConfiguration configuration, final FacetHolder facetHolder) {
         if(domainObjectLayout == null) {
             return null;
         }
         final Class<? extends IconUiEvent<?>> iconUiEventClass = domainObjectLayout.iconUiEvent();
-        if(IconUiEvent.Noop.class.isAssignableFrom(iconUiEventClass)) {
+
+        if(!EventUtil.eventTypeIsPostable(
+                iconUiEventClass,
+                IconUiEvent.Noop.class,
+                IconUiEvent.Default.class,
+                "isis.services.eventbus.iconUiEvent.postForDefault",
+                configuration)) {
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
index dd8c457..e9810c3 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
@@ -29,12 +29,14 @@ import org.apache.isis.applib.services.eventbus.EventBusService;
 import org.apache.isis.applib.services.eventbus.TitleUiEvent;
 import org.apache.isis.applib.services.i18n.TranslatableString;
 import org.apache.isis.applib.services.i18n.TranslationService;
+import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.title.TitleFacetAbstract;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent extends TitleFacetAbstract {
 
@@ -43,15 +45,21 @@ public class TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent extends
     public static Facet create(
             final DomainObjectLayout domainObjectLayout,
             final ServicesInjector servicesInjector,
-            final FacetHolder facetHolder) {
+            final IsisConfiguration configuration, final FacetHolder facetHolder) {
         if(domainObjectLayout == null) {
             return null;
         }
         final Class<? extends TitleUiEvent<?>> titleUiEventClass = domainObjectLayout.titleUiEvent();
 
-        if(TitleUiEvent.Noop.class.isAssignableFrom(titleUiEventClass)) {
+        if(!EventUtil.eventTypeIsPostable(
+                titleUiEventClass,
+                TitleUiEvent.Noop.class,
+                TitleUiEvent.Default.class,
+                "isis.services.eventbus.titleUiEvent.postForDefault",
+                configuration)) {
             return null;
         }
+
         final TranslationService translationService = servicesInjector.lookupService(TranslationService.class);
         final ObjectSpecification facetHolderAsSpec = (ObjectSpecification) facetHolder; // bit naughty...
         final String translationContext = facetHolderAsSpec.getCorrespondingClass().getCanonicalName();

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index 7dfb0d5..8b07630 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@ -86,6 +86,7 @@ import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
+import org.apache.isis.core.metamodel.util.EventUtil;
 
 public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware, MetaModelValidatorRefiner, IsisConfigurationAware {
 
@@ -101,6 +102,7 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
     private final MetaModelValidatorForDeprecatedAnnotation notPersistedValidator = new MetaModelValidatorForDeprecatedAnnotation(NotPersisted.class);
 
     private ServicesInjector servicesInjector;
+    private IsisConfiguration configuration;
 
     public PropertyAnnotationFacetFactory() {
         super(FeatureType.PROPERTIES_AND_ACTIONS);
@@ -167,12 +169,17 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
             propertyDomainEventFacet = new PropertyDomainEventFacetDefault(
                     propertyDomainEventType, getterFacet, servicesInjector, getSpecificationLoader(), holder);
         }
-        if(!PropertyDomainEvent.Noop.class.isAssignableFrom(propertyDomainEventFacet.getEventType())) {
+
+        if(EventUtil.eventTypeIsPostable(
+                propertyDomainEventFacet.getEventType(),
+                PropertyDomainEvent.Noop.class,
+                PropertyDomainEvent.Default.class,
+                "isis.services.eventbus.propertyDomainEvent.postForDefault",
+                this.configuration)) {
             FacetUtil.addFacet(propertyDomainEventFacet);
         }
 
 
-
         //
         // if the property is mutable, then replace the current setter and clear facets with equivalents that
         // emit the appropriate domain event and then delegate onto the underlying
@@ -235,6 +242,7 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         }
     }
 
+
     void processHidden(final ProcessMethodContext processMethodContext) {
         final Method method = processMethodContext.getMethod();
         final FacetHolder holder = processMethodContext.getFacetHolder();
@@ -392,6 +400,7 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
 
     @Override
     public void setConfiguration(final IsisConfiguration configuration) {
+        this.configuration = configuration;
         postsPropertyChangedEventValidator.setConfiguration(configuration);
         propertyInteractionValidator.setConfiguration(configuration);
         regexValidator.setConfiguration(configuration);

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/EventUtil.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/EventUtil.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/EventUtil.java
new file mode 100644
index 0000000..9e9f73f
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/EventUtil.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.core.metamodel.util;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+
+public final class EventUtil {
+
+    private EventUtil() {
+    }
+
+    public static <T> boolean eventTypeIsPostable(
+            final Class<? extends T> eventType,
+            final Class<? extends T> noopClass,
+            final Class<? extends T> defaultClass,
+            final String configProp,
+            final IsisConfiguration configuration) {
+        if (noopClass.isAssignableFrom(eventType)) {
+            return false;
+        }
+        if (defaultClass.isAssignableFrom(eventType)) {
+            return configuration.getBoolean(configProp, true);
+        }
+        return true;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/example/application/simpleapp/integtests/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/integtests/pom.xml b/example/application/simpleapp/integtests/pom.xml
index 0569a13..d9bd076 100644
--- a/example/application/simpleapp/integtests/pom.xml
+++ b/example/application/simpleapp/integtests/pom.xml
@@ -47,39 +47,6 @@
                 </excludes>
             </testResource>
         </testResources>
-        <plugins>
-            <!-- 
-            uncomment for enhanced cucumber-jvm reporting
-            http://www.masterthought.net/section/cucumber-reporting
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <testfailureignore>true</testfailureignore>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>net.masterthought</groupId>
-                <artifactId>maven-cucumber-reporting</artifactId>
-                <version>0.0.3</version>
-                <executions>
-                    <execution>
-                        <id>execution</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                        <configuration>
-                            <projectname>cucumber-jvm-example</projectname>
-                            <outputdirectory>${project.build.directory}/cucumber-reports</outputdirectory>
-                            <cucumberoutput>${project.build.directory}/cucumber.json</cucumberoutput>
-                            <enableflashcharts>false</enableflashcharts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>  
-            -->
-        </plugins>
     </build>
     <dependencies>
 
@@ -118,38 +85,75 @@
             <artifactId>hsqldb</artifactId>
         </dependency>
 
-        <!-- 
-        uncomment to enable enhanced cucumber-jvm reporting
-        http://www.masterthought.net/section/cucumber-reporting
-        <dependency>  
-            <groupId>com.googlecode.totallylazy</groupId>  
-            <artifactId>totallylazy</artifactId>  
-            <version>991</version>  
-        </dependency>
-
-        <dependency>
-            <groupId>net.masterthought</groupId>
-            <artifactId>cucumber-reporting</artifactId>
-            <version>0.0.21</version>
-        </dependency>
-        <dependency>
-            <groupId>net.masterthought</groupId>
-            <artifactId>maven-cucumber-reporting</artifactId>
-            <version>0.0.4</version>
-        </dependency>  
-        -->
     </dependencies>
 
-    <!-- 
-    uncomment for enhanced cucumber-jvm reporting
-    http://www.masterthought.net/section/cucumber-reporting
-    <repositories>  
-        <repository>  
-            <id>repo.bodar.com</id>  
-            <url>http://repo.bodar.com</url>  
-        </repository>  
-    </repositories>  
-     -->
+    <profiles>
+        <profile>
+            <!--
+            enhanced cucumber reporting per http://www.masterthought.net/section/cucumber-reporting
+            -->
+            <id>cucumber-reporting</id>
+            <activation>
+                <property>
+                    <name>cucumber-reporting</name>
+                </property>
+            </activation>
+            <repositories>
+                <repository>
+                    <id>repo.bodar.com</id>
+                    <url>http://repo.bodar.com</url>
+                </repository>
+            </repositories>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <testFailureIgnore>true</testFailureIgnore>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>net.masterthought</groupId>
+                        <artifactId>maven-cucumber-reporting</artifactId>
+                        <version>0.0.4</version>
+                        <executions>
+                            <execution>
+                                <id>execution</id>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>generate</goal>
+                                </goals>
+                                <configuration>
+                                    <projectName>cucumber-jvm-example</projectName>
+                                    <outputDirectory>${project.build.directory}/cucumber-reports</outputDirectory>
+                                    <cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput>
+                                    <enableFlashCharts>false</enableFlashCharts>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+            <dependencies>
+                <dependency>
+                    <groupId>com.googlecode.totallylazy</groupId>
+                    <artifactId>totallylazy</artifactId>
+                    <version>991</version>
+                </dependency>
 
+                <dependency>
+                    <groupId>net.masterthought</groupId>
+                    <artifactId>cucumber-reporting</artifactId>
+                    <version>0.0.21</version>
+                </dependency>
+                <dependency>
+                    <groupId>net.masterthought</groupId>
+                    <artifactId>maven-cucumber-reporting</artifactId>
+                    <version>0.0.4</version>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
 
 </project>


[3/6] isis git commit: ISIS-915, ISIS-1250, ISIS-1251, ISIS-1252, ISIS-1254, ISIS-1255: documentation and minor code updates.

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/resources/templates/asciidoc-templates-idea.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/asciidoc-templates-idea.xml b/adocs/documentation/src/main/asciidoc/resources/templates/asciidoc-templates-idea.xml
deleted file mode 100644
index 6e9c8d3..0000000
--- a/adocs/documentation/src/main/asciidoc/resources/templates/asciidoc-templates-idea.xml
+++ /dev/null
@@ -1,365 +0,0 @@
-<templateSet group="AsciiDoc">
-  <template name="adtbl3" value=".$tableCaption$&#10;[cols=&quot;1a,1a,1a&quot;, options=&quot;header&quot;]&#10;|===&#10;&#10;| $cell1header$ &#10;| $cell2header$&#10;| $cell3header$&#10;&#10;&#10;| $cell1row1$&#10;| $cell2row1$&#10;| $cell3row1$&#10;&#10;&#10;|&#10;|&#10;|&#10;&#10;|===" description="Table with three columns" toReformat="false" toShortenFQNames="true">
-    <variable name="tableCaption" expression="" defaultValue="&quot;Table caption&quot;" alwaysStopAt="true" />
-    <variable name="cell1header" expression="" defaultValue="&quot;Header Cell 1&quot;" alwaysStopAt="true" />
-    <variable name="cell2header" expression="" defaultValue="&quot;Header Cell 2&quot;" alwaysStopAt="true" />
-    <variable name="cell3header" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="cell1row1" expression="" defaultValue="&quot;Row 1 Cell 1&quot;" alwaysStopAt="true" />
-    <variable name="cell2row1" expression="" defaultValue="&quot;Row 1 Cell 2&quot;" alwaysStopAt="true" />
-    <variable name="cell3row1" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adadmtip" value="[TIP]&#10;====&#10;$END$&#10;====&#10;" description="Tip admonition" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adadmnote" value="[NOTE]&#10;====&#10;$END$&#10;====&#10;" description="Note admonition" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adadmimportant" value="[IMPORTANT]&#10;====&#10;$END$&#10;====&#10;" description="Important admonition" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adadmwarning" value="[WARNING]&#10;====&#10;$END$&#10;====&#10;" description="Warning admonition" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adimgfile" value="image::{_imagesdir}$INCLUDED$/$FILE$.png[width=&quot;$END$$WIDTH$px&quot;,link=&quot;{_imagesdir}$INCLUDED$/$FILE$.png&quot;]" description="Image link to file" toReformat="false" toShortenFQNames="true">
-    <variable name="INCLUDED" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adimgurl" value="image::$URL$[width=&quot;$END$$WIDTH$px&quot;,link=&quot;$URL$&quot;]" description="Image link to URL" toReformat="false" toShortenFQNames="true">
-    <variable name="URL" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adlink" value="link:$URL$[$TEXT$]" description="Link to URL" toReformat="false" toShortenFQNames="true">
-    <variable name="URL" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="TEXT" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcjava" value="[source,java]&#10;----&#10;$END$&#10;----&#10;" description="Source code (java)" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcxml" value="[source,xml]&#10;----&#10;$END$&#10;----&#10;" description="Source code (XML)" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcother" value="[source,$LANG$]&#10;----&#10;$END$&#10;----&#10;" description="Source code (None)" toReformat="false" toShortenFQNames="true">
-    <variable name="LANG" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adinclude" value="include::$INCLUDED$.adoc[leveloffset=+1]&#10;" description="Include" toReformat="false" toShortenFQNames="true">
-    <variable name="INCLUDED" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adlinkaddons" value="(non-ASF) link:http://isisaddons.org[Isis Addons]" description="Link to Isis Addons" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adlinkaddonsmodule" value="(non-ASF) http://github.com/isisaddons/isis-module-$MODULE$[Isis addons' $MODULE$] module" description="Link to specific Isis Addons module" toReformat="false" toShortenFQNames="true">
-    <variable name="MODULE" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adtodo" value="NOTE: TODO" description="TODO note" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adfootnote" value=".footnote:[$END$]" description="Footnote" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adlinkaddonswicket" value="(non-ASF) http://github.com/isisaddons/isis-wicket-$WICKET$[Isis addons' $WICKET$ ] wicket extension" description="Link to specific Isis Addons wicket cpt" toReformat="false" toShortenFQNames="true">
-    <variable name="WICKET" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adlinkaddonsapp" value="(non-ASF) http://github.com/isisaddons/isis-app-$APP$[Isis addons' $APP$]" description="Link to specific Isis Addons app" toReformat="false" toShortenFQNames="true" deactivated="true">
-    <variable name="APP" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adugsimpleapp" value="xref:ug.adoc#_ug_getting-started_simpleapp-archetype[SimpleApp archetype]" description="xref to the user guide simpleapp archetype" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adyoutube" value="video::$REFERENCE$[youtube,width=&quot;$WIDTH$px&quot;,height=&quot;$END$$HEIGHT$px&quot;]" description="Link to youtube" toReformat="false" toShortenFQNames="true">
-    <variable name="REFERENCE" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="HEIGHT" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adimgfilec" value=".$CAPTION$&#10;image::{_imagesdir}$INCLUDED$/$FILE$.png[width=&quot;$END$$WIDTH$px&quot;,link=&quot;{_imagesdir}$INCLUDED$/$FILE$.png&quot;]" description="Image link to file with caption" toReformat="false" toShortenFQNames="true">
-    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="INCLUDED" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adimgurlc" value=".$CAPTION$&#10;image::$URL$[width=&quot;$END$$WIDTH$px&quot;,link=&quot;$URL$&quot;]" description="Image link to URL with caption" toReformat="false" toShortenFQNames="true">
-    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="URL" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcjavac" value="[source,java]&#10;.$CAPTION$&#10;----&#10;$END$&#10;----&#10;" description="Source code (java) with caption" toReformat="false" toShortenFQNames="true">
-    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcotherc" value="[source,$LANG$]&#10;----&#10;$END$&#10;----&#10;" description="Source code (None) with caption" toReformat="false" toShortenFQNames="true">
-    <variable name="LANG" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcxmlc" value="[source,xml]&#10;.$CAPTION$&#10;----&#10;$END$&#10;----&#10;" description="Source code (XML) with caption" toReformat="false" toShortenFQNames="true">
-    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcjavascript" value="[source,javascript]&#10;----&#10;$END$&#10;----&#10;" description="Source code (Javascript)" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adsrcjavascriptc" value="[source,javascript]&#10;.$CAPTION$&#10;----&#10;$END$&#10;----&#10;" description="Source code (javascript) with caption" toReformat="false" toShortenFQNames="true">
-    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgmp" value="xref:rg.adoc#_rg_methods_prefixes_manpage-$methodName$[`$methodName$...()`]" description="x-ref to ref guide manpage for method prefix" toReformat="false" toShortenFQNames="true">
-    <variable name="methodName" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adug1" value="xref:ug.adoc#$chapter$[$DisplayText$]" description="x-ref to user guide level 1 (chapter)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="_ug_" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgsa" value="xref:rg.adoc#_rg_services-api_manpage-$ServiceType$[`$ServiceType$`]" description="x-ref to ref guide manpage for service api" toReformat="false" toShortenFQNames="true">
-    <variable name="ServiceType" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgmr" value="xref:rg.adoc#_rg_methods_reserved_manpage-$methodName$[`$methodName$()`]" description="x-ref to ref guide manpage for reserved method" toReformat="false" toShortenFQNames="true">
-    <variable name="methodName" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgss" value="xref:rg.adoc#_rg_services-spi_manpage-$ServiceType$[`$ServiceType$`]" description="x-ref to ref guide manpage for service spi" toReformat="false" toShortenFQNames="true">
-    <variable name="ServiceType" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgcv" value="xref:rg.adoc#_rg_classes_value-types_manpage-$Type$[`$Type$`]" description="x-ref to ref guide manpage for class value type" toReformat="false" toShortenFQNames="true">
-    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgcs" value="xref:rg.adoc#_rg_classes_super_manpage-$Type$[`$Type$`]" description="x-ref to ref guide manpage for class superclass" toReformat="false" toShortenFQNames="true">
-    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgcu" value="xref:rg.adoc#_rg_classes_utility_manpage-$Type$[`$Type$`]" description="x-ref to ref guide manpage for class utility" toReformat="false" toShortenFQNames="true">
-    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adanchany" value="= anchor:$prefix$[]" description="anchor to any" toReformat="false" toShortenFQNames="true">
-    <variable name="prefix" expression="" defaultValue="chapter" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgna" value="xref:rg.adoc#_rg_annotations_manpage-$Type$[`@$Type$`]" description="x-ref to ref guide manpage for annotation" toReformat="false" toShortenFQNames="true">
-    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adug2" value="xref:ug.adoc#$chapter$_$section$[$DisplayText$]" description="x-ref to user guide level 2 (chapter section)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="_ug_" alwaysStopAt="true" />
-    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adug3" value="xref:ug.adoc#$chapter$_$section$_$subsection$[$DisplayText$]" description="x-ref to user guide level 3 (chapter section subsection)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="_ug_" alwaysStopAt="true" />
-    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="subsection" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adxrefany" value="xref:$chapter$[$DisplayText$]" description="x-ref to any" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgnt" value="xref:rg.adoc#_rg_annotations_manpage-$Type$_$attribute$[`@$Type$#$attribute$()`]" description="x-ref to ref guide manpage for annotation's attribute" toReformat="false" toShortenFQNames="true">
-    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="attribute" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adugvw" value="xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]" description="x-ref to user guide wicket viewer" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adugvro" value="xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer]" description="x-ref to user guide restfulobjects viewer" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgntx" value="xref:rg.adoc#_rg_annotations_manpage-$Type$_$attribute$[$linkText$]" description="x-ref to ref guide manpage for annotation's attribute, overriding the link text" toReformat="false" toShortenFQNames="true">
-    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="attribute" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="linkText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adwip" value="NOTE: WIP - " description="WIP note" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adyoutubec" value=".$CAPTION$&#10;video::$REFERENCE$[youtube,width=&quot;$WIDTH$px&quot;,height=&quot;$END$$HEIGHT$px&quot;]" description="Link to youtube with caption" toReformat="false" toShortenFQNames="true">
-    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="REFERENCE" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="HEIGHT" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrg1" value="xref:rg.adoc#$chapter$[$DisplayText$]" description="x-ref to ref guide level 1 (chapter)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="_rg_" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrg2" value="xref:rg.adoc#$chapter$_$section$[$DisplayText$]" description="x-ref to ref guide level 2 (chapter section)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="_rg_" alwaysStopAt="true" />
-    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrg3" value="xref:rg.adoc#$chapter$_$section$_$subsection$[$DisplayText$]" description="x-ref to ref guide level 3 (chapter section subsection)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="_rg_" alwaysStopAt="true" />
-    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="subsection" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrgcfg" value="xref:rg.adoc#_rg_runtime_configuring-core[configuration property]" description="x-ref to ref guide configuration properties section" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adcg" value="xref:cg.adoc#_cg[Contributors' Guide]" description="xref to contributors guide" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adrg" value="xref:rg.adoc#_rg[Reference Guide]" description="xref to reference guide" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adug" value="xref:ug.adoc#_ug[Users' Guide]" description="xref to user' guide" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adai" value="Apache Isis " description="Apache Isis" toReformat="false" toShortenFQNames="true">
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adcg1" value="xref:cg.adoc#_cg_$chapter$[$DisplayText$]" description="x-ref to contributors guide level 1 (chapter)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adcg2" value="xref:cg.adoc#_cg_$chapter$_$section$[$DisplayText$]" description="x-ref to contributors guide level 2 (chapter section)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-  <template name="adtg1" value="xref:tg.adoc#$chapter$[$DisplayText$]" description="x-ref to tutorials level 1 (chapter)" toReformat="false" toShortenFQNames="true">
-    <variable name="chapter" expression="" defaultValue="_tg_" alwaysStopAt="true" />
-    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
-    <context>
-      <option name="AsciiDoc" value="true" />
-    </context>
-  </template>
-</templateSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/resources/templates/isis-asciidoc-templates-idea.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/isis-asciidoc-templates-idea.xml b/adocs/documentation/src/main/asciidoc/resources/templates/isis-asciidoc-templates-idea.xml
new file mode 100644
index 0000000..2c0e28b
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/resources/templates/isis-asciidoc-templates-idea.xml
@@ -0,0 +1,365 @@
+<templateSet group="Isis-AsciiDoc">
+  <template name="adtbl3" value=".$tableCaption$&#10;[cols=&quot;1a,1a,1a&quot;, options=&quot;header&quot;]&#10;|===&#10;&#10;| $cell1header$ &#10;| $cell2header$&#10;| $cell3header$&#10;&#10;&#10;| $cell1row1$&#10;| $cell2row1$&#10;| $cell3row1$&#10;&#10;&#10;|&#10;|&#10;|&#10;&#10;|===" description="Table with three columns" toReformat="false" toShortenFQNames="true">
+    <variable name="tableCaption" expression="" defaultValue="&quot;Table caption&quot;" alwaysStopAt="true" />
+    <variable name="cell1header" expression="" defaultValue="&quot;Header Cell 1&quot;" alwaysStopAt="true" />
+    <variable name="cell2header" expression="" defaultValue="&quot;Header Cell 2&quot;" alwaysStopAt="true" />
+    <variable name="cell3header" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="cell1row1" expression="" defaultValue="&quot;Row 1 Cell 1&quot;" alwaysStopAt="true" />
+    <variable name="cell2row1" expression="" defaultValue="&quot;Row 1 Cell 2&quot;" alwaysStopAt="true" />
+    <variable name="cell3row1" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adadmtip" value="[TIP]&#10;====&#10;$END$&#10;====&#10;" description="Tip admonition" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adadmnote" value="[NOTE]&#10;====&#10;$END$&#10;====&#10;" description="Note admonition" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adadmimportant" value="[IMPORTANT]&#10;====&#10;$END$&#10;====&#10;" description="Important admonition" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adadmwarning" value="[WARNING]&#10;====&#10;$END$&#10;====&#10;" description="Warning admonition" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adimgfile" value="image::{_imagesdir}$INCLUDED$/$FILE$.png[width=&quot;$END$$WIDTH$px&quot;,link=&quot;{_imagesdir}$INCLUDED$/$FILE$.png&quot;]" description="Image link to file" toReformat="false" toShortenFQNames="true">
+    <variable name="INCLUDED" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adimgurl" value="image::$URL$[width=&quot;$END$$WIDTH$px&quot;,link=&quot;$URL$&quot;]" description="Image link to URL" toReformat="false" toShortenFQNames="true">
+    <variable name="URL" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adlink" value="link:$URL$[$TEXT$]" description="Link to URL" toReformat="false" toShortenFQNames="true">
+    <variable name="URL" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="TEXT" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcjava" value="[source,java]&#10;----&#10;$END$&#10;----&#10;" description="Source code (java)" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcxml" value="[source,xml]&#10;----&#10;$END$&#10;----&#10;" description="Source code (XML)" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcother" value="[source,$LANG$]&#10;----&#10;$END$&#10;----&#10;" description="Source code (None)" toReformat="false" toShortenFQNames="true">
+    <variable name="LANG" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adinclude" value="include::$INCLUDED$.adoc[leveloffset=+1]&#10;" description="Include" toReformat="false" toShortenFQNames="true">
+    <variable name="INCLUDED" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adlinkaddons" value="(non-ASF) link:http://isisaddons.org[Isis Addons]" description="Link to Isis Addons" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adlinkaddonsmodule" value="(non-ASF) http://github.com/isisaddons/isis-module-$MODULE$[Isis addons' $MODULE$] module" description="Link to specific Isis Addons module" toReformat="false" toShortenFQNames="true">
+    <variable name="MODULE" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adtodo" value="NOTE: TODO" description="TODO note" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adfootnote" value=".footnote:[$END$]" description="Footnote" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adlinkaddonswicket" value="(non-ASF) http://github.com/isisaddons/isis-wicket-$WICKET$[Isis addons' $WICKET$ ] wicket extension" description="Link to specific Isis Addons wicket cpt" toReformat="false" toShortenFQNames="true">
+    <variable name="WICKET" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adlinkaddonsapp" value="(non-ASF) http://github.com/isisaddons/isis-app-$APP$[Isis addons' $APP$]" description="Link to specific Isis Addons app" toReformat="false" toShortenFQNames="true" deactivated="true">
+    <variable name="APP" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adugsimpleapp" value="xref:ug.adoc#_ug_getting-started_simpleapp-archetype[SimpleApp archetype]" description="xref to the user guide simpleapp archetype" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adyoutube" value="video::$REFERENCE$[youtube,width=&quot;$WIDTH$px&quot;,height=&quot;$END$$HEIGHT$px&quot;]" description="Link to youtube" toReformat="false" toShortenFQNames="true">
+    <variable name="REFERENCE" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="HEIGHT" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adimgfilec" value=".$CAPTION$&#10;image::{_imagesdir}$INCLUDED$/$FILE$.png[width=&quot;$END$$WIDTH$px&quot;,link=&quot;{_imagesdir}$INCLUDED$/$FILE$.png&quot;]" description="Image link to file with caption" toReformat="false" toShortenFQNames="true">
+    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="INCLUDED" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adimgurlc" value=".$CAPTION$&#10;image::$URL$[width=&quot;$END$$WIDTH$px&quot;,link=&quot;$URL$&quot;]" description="Image link to URL with caption" toReformat="false" toShortenFQNames="true">
+    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="URL" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcjavac" value="[source,java]&#10;.$CAPTION$&#10;----&#10;$END$&#10;----&#10;" description="Source code (java) with caption" toReformat="false" toShortenFQNames="true">
+    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcotherc" value="[source,$LANG$]&#10;----&#10;$END$&#10;----&#10;" description="Source code (None) with caption" toReformat="false" toShortenFQNames="true">
+    <variable name="LANG" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcxmlc" value="[source,xml]&#10;.$CAPTION$&#10;----&#10;$END$&#10;----&#10;" description="Source code (XML) with caption" toReformat="false" toShortenFQNames="true">
+    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcjavascript" value="[source,javascript]&#10;----&#10;$END$&#10;----&#10;" description="Source code (Javascript)" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adsrcjavascriptc" value="[source,javascript]&#10;.$CAPTION$&#10;----&#10;$END$&#10;----&#10;" description="Source code (javascript) with caption" toReformat="false" toShortenFQNames="true">
+    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgmp" value="xref:rg.adoc#_rg_methods_prefixes_manpage-$methodName$[`$methodName$...()`]" description="x-ref to ref guide manpage for method prefix" toReformat="false" toShortenFQNames="true">
+    <variable name="methodName" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adug1" value="xref:ug.adoc#$chapter$[$DisplayText$]" description="x-ref to user guide level 1 (chapter)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="_ug_" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgsa" value="xref:rg.adoc#_rg_services-api_manpage-$ServiceType$[`$ServiceType$`]" description="x-ref to ref guide manpage for service api" toReformat="false" toShortenFQNames="true">
+    <variable name="ServiceType" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgmr" value="xref:rg.adoc#_rg_methods_reserved_manpage-$methodName$[`$methodName$()`]" description="x-ref to ref guide manpage for reserved method" toReformat="false" toShortenFQNames="true">
+    <variable name="methodName" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgss" value="xref:rg.adoc#_rg_services-spi_manpage-$ServiceType$[`$ServiceType$`]" description="x-ref to ref guide manpage for service spi" toReformat="false" toShortenFQNames="true">
+    <variable name="ServiceType" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgcv" value="xref:rg.adoc#_rg_classes_value-types_manpage-$Type$[`$Type$`]" description="x-ref to ref guide manpage for class value type" toReformat="false" toShortenFQNames="true">
+    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgcs" value="xref:rg.adoc#_rg_classes_super_manpage-$Type$[`$Type$`]" description="x-ref to ref guide manpage for class superclass" toReformat="false" toShortenFQNames="true">
+    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgcu" value="xref:rg.adoc#_rg_classes_utility_manpage-$Type$[`$Type$`]" description="x-ref to ref guide manpage for class utility" toReformat="false" toShortenFQNames="true">
+    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adanchany" value="= anchor:$prefix$[]" description="anchor to any" toReformat="false" toShortenFQNames="true">
+    <variable name="prefix" expression="" defaultValue="chapter" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgna" value="xref:rg.adoc#_rg_annotations_manpage-$Type$[`@$Type$`]" description="x-ref to ref guide manpage for annotation" toReformat="false" toShortenFQNames="true">
+    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adug2" value="xref:ug.adoc#$chapter$_$section$[$DisplayText$]" description="x-ref to user guide level 2 (chapter section)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="_ug_" alwaysStopAt="true" />
+    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adug3" value="xref:ug.adoc#$chapter$_$section$_$subsection$[$DisplayText$]" description="x-ref to user guide level 3 (chapter section subsection)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="_ug_" alwaysStopAt="true" />
+    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="subsection" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adxrefany" value="xref:$chapter$[$DisplayText$]" description="x-ref to any" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgnt" value="xref:rg.adoc#_rg_annotations_manpage-$Type$_$attribute$[`@$Type$#$attribute$()`]" description="x-ref to ref guide manpage for annotation's attribute" toReformat="false" toShortenFQNames="true">
+    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="attribute" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adugvw" value="xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]" description="x-ref to user guide wicket viewer" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adugvro" value="xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer]" description="x-ref to user guide restfulobjects viewer" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgntx" value="xref:rg.adoc#_rg_annotations_manpage-$Type$_$attribute$[$linkText$]" description="x-ref to ref guide manpage for annotation's attribute, overriding the link text" toReformat="false" toShortenFQNames="true">
+    <variable name="Type" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="attribute" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="linkText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adwip" value="NOTE: WIP - " description="WIP note" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adyoutubec" value=".$CAPTION$&#10;video::$REFERENCE$[youtube,width=&quot;$WIDTH$px&quot;,height=&quot;$END$$HEIGHT$px&quot;]" description="Link to youtube with caption" toReformat="false" toShortenFQNames="true">
+    <variable name="CAPTION" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="REFERENCE" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="WIDTH" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="HEIGHT" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrg1" value="xref:rg.adoc#$chapter$[$DisplayText$]" description="x-ref to ref guide level 1 (chapter)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="_rg_" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrg2" value="xref:rg.adoc#$chapter$_$section$[$DisplayText$]" description="x-ref to ref guide level 2 (chapter section)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="_rg_" alwaysStopAt="true" />
+    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrg3" value="xref:rg.adoc#$chapter$_$section$_$subsection$[$DisplayText$]" description="x-ref to ref guide level 3 (chapter section subsection)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="_rg_" alwaysStopAt="true" />
+    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="subsection" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrgcfg" value="xref:rg.adoc#_rg_runtime_configuring-core[configuration property]" description="x-ref to ref guide configuration properties section" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adcg" value="xref:cg.adoc#_cg[Contributors' Guide]" description="xref to contributors guide" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adrg" value="xref:rg.adoc#_rg[Reference Guide]" description="xref to reference guide" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adug" value="xref:ug.adoc#_ug[Users' Guide]" description="xref to user' guide" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adai" value="Apache Isis " description="Apache Isis" toReformat="false" toShortenFQNames="true">
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adcg1" value="xref:cg.adoc#_cg_$chapter$[$DisplayText$]" description="x-ref to contributors guide level 1 (chapter)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adcg2" value="xref:cg.adoc#_cg_$chapter$_$section$[$DisplayText$]" description="x-ref to contributors guide level 2 (chapter section)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="section" expression="" defaultValue="" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+  <template name="adtg1" value="xref:tg.adoc#$chapter$[$DisplayText$]" description="x-ref to tutorials level 1 (chapter)" toReformat="false" toShortenFQNames="true">
+    <variable name="chapter" expression="" defaultValue="_tg_" alwaysStopAt="true" />
+    <variable name="DisplayText" expression="" defaultValue="" alwaysStopAt="true" />
+    <context>
+      <option name="AsciiDoc" value="true" />
+    </context>
+  </template>
+</templateSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/template/document.html.erb
----------------------------------------------------------------------
diff --git a/adocs/template/document.html.erb b/adocs/template/document.html.erb
index b9685f9..3d0ba31 100644
--- a/adocs/template/document.html.erb
+++ b/adocs/template/document.html.erb
@@ -170,7 +170,7 @@
         }
 
         div#doc-content a.header-link {
-            margin-left: -90px;
+            margin-left: -75px;
         }
 
         div#doc-content div.sect1 h2 {

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
index 2b2b81f..d2d0f1c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
@@ -35,7 +35,7 @@ public abstract class ActionDomainEvent<S> extends AbstractInteractionEvent<S> {
     /**
      * This class is the default for the
      * {@link org.apache.isis.applib.annotation.Action#domainEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the "isis.services.eventbus.actionDomainEvent.postForDefault"
+     * raises an event or not depends upon the "isis.reflector.facet.actionAnnotation.domainEvent.postForDefault"
      * configuration property.
      */
     public static class Default extends ActionInteractionEvent<Object> {

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
index c431483..3820112 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
@@ -29,7 +29,7 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractInteractionEven
     /**
      * This class is the default for the
      * {@link org.apache.isis.applib.annotation.Collection#domainEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the "isis.services.eventbus.collectionDomainEvent.postForDefault"
+     * raises an event or not depends upon the "isis.reflector.facet.collectionAnnotation.domainEvent.postForDefault"
      * configuration property.
      */
     public static class Default extends CollectionInteractionEvent<Object, Object> {

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
index b347b49..6b7cf3b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CssClassUiEvent.java
@@ -51,7 +51,7 @@ public abstract class CssClassUiEvent<S> extends AbstractUiEvent<S> {
     /**
      * This class is the default for the
      * {@link org.apache.isis.applib.annotation.DomainObjectLayout#cssClassUiEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the "isis.services.eventbus.cssClassUiEvent.postForDefault"
+     * raises an event or not depends upon the "isis.reflector.facet.domainObjectLayoutAnnotation.cssClassUiEvent.postForDefault"
      * configuration property.
      */
     public static class Default extends CssClassUiEvent<Object> {

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
index 2ed9ed8..0bdee8b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/IconUiEvent.java
@@ -49,7 +49,7 @@ public abstract class IconUiEvent<S> extends AbstractUiEvent<S> {
     /**
      * This class is the default for the
      * {@link org.apache.isis.applib.annotation.DomainObjectLayout#iconUiEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the "isis.services.eventbus.iconUiEvent.postForDefault"
+     * raises an event or not depends upon the "isis.reflector.facet.domainObjectLayoutAnnotation.iconUiEvent.postForDefault"
      * configuration property.
      */
     public static class Default extends IconUiEvent<Object> {

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
index bc90b2c..a42226f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/PropertyDomainEvent.java
@@ -29,7 +29,7 @@ public abstract class PropertyDomainEvent<S,T> extends AbstractInteractionEvent<
     /**
      * This class is the default for the
      * {@link org.apache.isis.applib.annotation.Property#domainEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the "isis.services.eventbus.propertyDomainEvent.postForDefault"
+     * raises an event or not depends upon the "isis.reflector.facet.propertyAnnotation.domainEvent.postForDefault"
      * configuration property.
      */
     public static class Default extends PropertyInteractionEvent<Object, Object> {

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
index 86b584b..e170077 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/TitleUiEvent.java
@@ -33,7 +33,7 @@ public abstract class TitleUiEvent<S> extends AbstractUiEvent<S> {
     /**
      * This class is the default for the
      * {@link org.apache.isis.applib.annotation.DomainObjectLayout#titleUiEvent()} annotation attribute.  Whether this
-     * raises an event or not depends upon the "isis.services.eventbus.titleUiEvent.postForDefault"
+     * raises an event or not depends upon the "isis.reflector.facet.domainObjectLayoutAnnotation.titleUiEvent.postForDefault"
      * configuration property.
      */
     public static class Default extends TitleUiEvent<Object> {
@@ -88,7 +88,7 @@ public abstract class TitleUiEvent<S> extends AbstractUiEvent<S> {
      * The title as provided by a subscriber using {@link #setTitle(String)}.
      *
      * <p>
-     *     Note that a {@link #getTranslatedTitle()} will be used in preference, if available.
+     *     Note that a {@link #getTranslatableTitle()} will be used in preference, if available.
      * </p>
      */
     public String getTitle() {
@@ -103,26 +103,26 @@ public abstract class TitleUiEvent<S> extends AbstractUiEvent<S> {
     }
     //endregion
 
-    //region > translatedTitle
-    private TranslatableString translatedTitle;
+    //region > translatableTitle
+    private TranslatableString translatableTitle;
 
     /**
-     * The translatable (i18n) title as provided by a subscriber using {@link #setTranslatedTitle(TranslatableString)}.
+     * The translatable (i18n) title as provided by a subscriber using {@link #setTranslatableTitle(TranslatableString)}.
      *
      * <p>
      *     If a translatable title has been provided then this will be used in preference to any
      *     {@link #getTitle() non-translatable title}.
      * </p>
      */
-    public TranslatableString getTranslatedTitle() {
-        return translatedTitle;
+    public TranslatableString getTranslatableTitle() {
+        return translatableTitle;
     }
 
     /**
      * For subscribers to call to provide a translatable (i18n) title for this object.
      */
-    public void setTranslatedTitle(final TranslatableString translatedTitle) {
-        this.translatedTitle = translatedTitle;
+    public void setTranslatableTitle(final TranslatableString translatableTitle) {
+        this.translatableTitle = translatableTitle;
     }
     //endregion
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
index c6374f2..51aaffb 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
@@ -204,7 +204,7 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract implement
                     actionDomainEventFacet.getEventType(),
                     ActionDomainEvent.Noop.class,
                     ActionDomainEvent.Default.class,
-                    "isis.services.eventbus.actionDomainEvent.postForDefault", this.configuration)) {
+                    "isis.reflector.facet.actionAnnotation.domainEvent.postForDefault", this.configuration)) {
                 FacetUtil.addFacet(actionDomainEventFacet);
             }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
index cc35eb6..433e208 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/CollectionAnnotationFacetFactory.java
@@ -176,7 +176,7 @@ public class CollectionAnnotationFacetFactory extends FacetFactoryAbstract imple
                 collectionDomainEventFacet.getEventType(),
                 CollectionDomainEvent.Noop.class,
                 CollectionDomainEvent.Default.class,
-                "isis.services.eventbus.collectionDomainEvent.postForDefault", this.configuration)) {
+                "isis.reflector.facet.collectionAnnotation.domainEvent.postForDefault", this.configuration)) {
             FacetUtil.addFacet(collectionDomainEventFacet);
         }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
index abcfe04..165c1d3 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent.java
@@ -54,7 +54,7 @@ public class CssClassFacetViaDomainObjectLayoutAnnotationUsingCssClassUiEvent ex
                 cssClassUiEventClass,
                 CssClassUiEvent.Noop.class,
                 CssClassUiEvent.Default.class,
-                "isis.services.eventbus.cssClassUiEvent.postForDefault",
+                "isis.reflector.facet.domainObjectLayoutAnnotation.cssClassUiEvent.postForDefault",
                 configuration)) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
index c53a711..cccd692 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent.java
@@ -51,7 +51,7 @@ public class IconFacetViaDomainObjectLayoutAnnotationUsingIconUiEvent extends Ic
                 iconUiEventClass,
                 IconUiEvent.Noop.class,
                 IconUiEvent.Default.class,
-                "isis.services.eventbus.iconUiEvent.postForDefault",
+                "isis.reflector.facet.domainObjectLayoutAnnotation.iconUiEvent.postForDefault",
                 configuration)) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
index e9810c3..cbdf706 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobjectlayout/TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent.java
@@ -55,7 +55,7 @@ public class TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent extends
                 titleUiEventClass,
                 TitleUiEvent.Noop.class,
                 TitleUiEvent.Default.class,
-                "isis.services.eventbus.titleUiEvent.postForDefault",
+                "isis.reflector.facet.domainObjectLayoutAnnotation.titleEvent.postForDefault",
                 configuration)) {
             return null;
         }
@@ -94,7 +94,7 @@ public class TitleFacetViaDomainObjectLayoutAnnotationUsingTitleUiEvent extends
 
         eventBusService.post(titleUiEvent);
 
-        final TranslatableString translatedTitle = titleUiEvent.getTranslatedTitle();
+        final TranslatableString translatedTitle = titleUiEvent.getTranslatableTitle();
         if(translatedTitle != null) {
             return translatedTitle.translate(translationService, translationContext);
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index 8b07630..a1d7c16 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@ -174,7 +174,7 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
                 propertyDomainEventFacet.getEventType(),
                 PropertyDomainEvent.Noop.class,
                 PropertyDomainEvent.Default.class,
-                "isis.services.eventbus.propertyDomainEvent.postForDefault",
+                "isis.reflector.facet.propertyAnnotation.domainEvent.postForDefault",
                 this.configuration)) {
             FacetUtil.addFacet(propertyDomainEventFacet);
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
index eb801bd..debeaeb 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -114,6 +114,16 @@ isis.reflector.facet.cssClass.patterns=\
                         delete.*:btn-warning
 
 
+#
+# whether to suppress posting of events if not specified (left as Xxx.Default); defaults to true
+#
+#isis.reflector.facet.actionAnnotation.domainEvent.postForDefault=false
+#isis.reflector.facet.collectionAnnotation.domainEvent.postForDefault=false
+#isis.reflector.facet.propertyAnnotation.domainEvent.postForDefault=false
+#isis.reflector.facet.domainObjectLayoutAnnotation.cssClassUiEvent.postForDefault=false
+#isis.reflector.facet.domainObjectLayoutAnnotation.iconUiEvent.postForDefault=false
+#isis.reflector.facet.domainObjectLayoutAnnotation.titleUiEvent.postForDefault=false
+
 #################################################################################
 #
 # Domain Service configuration


[6/6] isis git commit: ISIS-1250: more docs

Posted by da...@apache.org.
ISIS-1250: more docs


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

Branch: refs/heads/master
Commit: 4bf7ee1a46be874329101f7030bd992eea2cce76
Parents: d409a71
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Nov 19 22:41:59 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Nov 19 22:41:59 2015 +0000

----------------------------------------------------------------------
 .../main/asciidoc/guides/_rg_schema-aim.adoc    | 65 +++++++++++-----
 .../main/asciidoc/guides/_rg_schema-common.adoc | 79 +++++++++-----------
 ...ilities-ActionInvocationMementoDtoUtils.adoc | 47 ------------
 .../asciidoc/guides/_rg_schema-utilities.adoc   | 18 -----
 .../src/main/asciidoc/guides/_rg_schema.adoc    |  1 -
 ..._services-spi_manpage-PublishingService.adoc |  2 +-
 .../src/main/asciidoc/guides/_rg_web-xml.adoc   | 59 +++++++++------
 .../_ug_core-concepts_building-blocks.adoc      |  2 +-
 .../utils/ActionInvocationMementoDtoUtils.java  |  2 +-
 9 files changed, 123 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4bf7ee1a/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
index 5a3c528..e9903da 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc
@@ -5,42 +5,47 @@
 :_imagesdir: images/
 
 
-NOTE: TODO
+The "aim" schema defines the serialized form (or memento) of an action invocation.
 
+Action invocations are captured (in memory rather than in serialized form) when the end-user invokes the action
+"through" the UI, by way of the xref:rg.adoc#_rg_services-api_manpage-CommandContext[CommandContext] service. Using the
+`ActionInvocationMementoDtoUtils` utility class, a service can instantiate `ActionInvocationMementoDto` which can then
+be serialized to/from using the same `ActionInvocationMementoDtoUtils` class.
 
 [source,xml]
 ----
 <?xml version="1.0" encoding="UTF-8"?>
-<xs:schema targetNamespace="http://isis.apache.org/schema/aim"
+<xs:schema targetNamespace="http://isis.apache.org/schema/aim"                              <!--1-->
            elementFormDefault="qualified"
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns="http://isis.apache.org/schema/aim"
            xmlns:common="http://isis.apache.org/schema/common">
 
-    <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="http://isis.apache.org/schema/common/common-1.0.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/common"                             <!--2-->
+               schemaLocation="http://isis.apache.org/schema/common/common-1.0.xsd"/>
 
-    <xs:element name="actionInvocationMementoDto">
+    <xs:element name="actionInvocationMementoDto">                                          <!--3-->
         <xs:complexType>
             <xs:sequence>
                 <xs:element name="metadata">
                     <xs:complexType>
                         <xs:sequence>
-                            <xs:element name="transactionId" type="xs:string"/>
-                            <xs:element name="sequence" type="xs:int"/>
-                            <xs:element name="timestamp" type="xs:dateTime"/>
-                            <xs:element name="target" type="common:oidDto"/>
-                            <xs:element name="targetClass" type="xs:string"/>
-                            <xs:element name="targetAction" type="xs:string"/>
-                            <xs:element name="actionIdentifier" type="xs:string"/>
-                            <xs:element name="user" type="xs:string"/>
-                            <xs:element name="title" type="xs:string"/>
+                            <xs:element name="transactionId" type="xs:string"/>             <!--4-->
+                            <xs:element name="sequence" type="xs:int"/>                     <!--5-->
+                            <xs:element name="timestamp" type="xs:dateTime"/>               <!--6-->
+                            <xs:element name="target" type="common:oidDto"/>                <!--7-->
+                            <xs:element name="targetClass" type="xs:string"/>               <!--8-->
+                            <xs:element name="targetAction" type="xs:string"/>              <!--9-->
+                            <xs:element name="actionIdentifier" type="xs:string"/>          <!--10-->
+                            <xs:element name="user" type="xs:string"/>                      <!--11-->
+                            <xs:element name="title" type="xs:string"/>                     <!--12-->
                         </xs:sequence>
                     </xs:complexType>
                 </xs:element>
                 <xs:element name="payload">
                     <xs:complexType>
                         <xs:sequence>
-                            <xs:element name="parameters">
+                            <xs:element name="parameters">                                  <!--13-->
                                 <xs:complexType>
                                     <xs:sequence maxOccurs="unbounded">
                                         <xs:element name="param" type="paramDto"/>
@@ -48,7 +53,8 @@ NOTE: TODO
                                     <xs:attribute name="num" use="required" type="xs:int"/>
                                 </xs:complexType>
                             </xs:element>
-                            <xs:element name="return" type="common:valueDto" minOccurs="0" maxOccurs="1"/>
+                            <xs:element name="return" type="common:valueDto"                <!--14-->
+                                        minOccurs="0" maxOccurs="1"/>
                         </xs:sequence>
                     </xs:complexType>
                 </xs:element>
@@ -56,13 +62,36 @@ NOTE: TODO
         </xs:complexType>
     </xs:element>
 
-    <xs:complexType name="paramDto">
+    <xs:complexType name="paramDto">                                                        <!--15-->
         <xs:sequence>
-            <xs:element name="value" type="common:valueDto"/>
+            <xs:element name="value" type="common:valueDto"/>                               <!--16-->
         </xs:sequence>
-        <xs:attribute name="parameterName" use="required" type="xs:string"/>
+        <xs:attribute name="parameterName" use="required" type="xs:string"/>                <!--17-->
         <xs:attribute name="parameterType" use="required" type="common:valueType"/>
         <xs:attribute name="null" use="optional" type="xs:boolean"/>
     </xs:complexType>
 </xs:schema>
 ----
+<1> the aim schema has a namespace URI of "http://isis.apache.org/schema/aim".  Although URIs are not the same as URLs, you will find that the schemas are also downloadable from this location.
+<2> reuses the xref:rg.adoc#_rg_schema-common[common] schema
+<3> definition of the `actionInvocationMementoDto` complex type. This consists of metadata (the transaction identifier, the target object, the initiating user) and the payload (the action parameter/arguments, the return value if known).
+<4> the unique transaction Id (a guid) allocated by the framework for each and every transaction
+<5> a sequence number within the transaction.  It is possible for there to be more than one action invocation to be
+<6> when the action was invoked
+<7> target object, as an OID (using `oidDto` from the xref:rg.adoc#_rg_schema-common[common] schema)
+<8> fully qualified class name of the target object, for information only
+<9> name of the action, for information only
+<10> Javadoc style unique identifier for the action.
+<11> User that invoked the action
+<12> title of the target object, for information only
+<13> Collection of parameter/arguments, defined in terms of the `paramDto` complex type (discussed just below)
+<14> The return value of the action, if known (and not void)
+<15> The `paramDto` defines both an action parameter and its corresponding argument values
+<16> The value of the parameter, in other words an argument value
+<17> Metadata about the parameter itself: its name, type, optionality.
+
+[NOTE]
+====
+As of `1.11.0` this schema is not used directly by the framework; in particular `Command#setMemento(...)` sets a similar
+but less formal XML structure.  This may change in the future.
+====

http://git-wip-us.apache.org/repos/asf/isis/blob/4bf7ee1a/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
index aedf188..2582fa4 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
@@ -6,8 +6,6 @@
 
 
 
-== `oidDto`
-
 The main purpose of the common schema is to define the `oidDto` complex type: the object's type and its identifier.
 This is basically a formal XML equivalent to the `Bookmark` object obtained from the
 xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
@@ -17,22 +15,22 @@ a given Apache Isis application.  With it, we have the ability to lookup any arb
 examples can be found xref:ug.adoc#_ug_core-concepts_building-blocks_oid[here].
 
 
-
-
 [source,xml]
 ----
 <xs:schema targetNamespace="http://isis.apache.org/schema/common"                           <!--1-->
            elementFormDefault="qualified"
            xmlns="http://isis.apache.org/schema/common"
            xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
     <xs:complexType name="oidDto">                                                          <!--2-->
         <xs:sequence>
-            <xs:element name="objectType" type="xs:string"/>
-            <xs:element name="objectIdentifier" type="xs:string"/>
+            <xs:element name="objectType" type="xs:string"/>                                <!--3-->
+            <xs:element name="objectIdentifier" type="xs:string"/>                          <!--4-->
         </xs:sequence>
         <xs:attribute name="objectState" type="bookmarkObjectState" default="persistent"/>
     </xs:complexType>
-    <xs:simpleType name="bookmarkObjectState">
+
+    <xs:simpleType name="bookmarkObjectState">                                              <!--5-->
         <xs:restriction base="xs:string">
             <xs:enumeration value="persistent"/>
             <xs:enumeration value="transient"/>
@@ -42,12 +40,31 @@ examples can be found xref:ug.adoc#_ug_core-concepts_building-blocks_oid[here].
     ...
 </xs:schema>
 ----
+<1> the common schema has a namespace URI of "http://isis.apache.org/schema/common".  Although URIs are not the same as URLs, you will find that the schemas are also downloadable from this location.
+<2> the `oidDto` complex type defines the unique identifier for any domain object: its type, and an identifier.  The `objectState` attribute is of type `bookmarkObjectState` and will typically be "transient" or "viewModel"
+<3> the object type, corresponding to either the
+xref:rg.adoc#_rg_annotations_manpage-DomainObject_objectType[`@DomainObject#objectType()`] attribute, or to the (JDO)
+xref:rg.adoc#_rg_annotations_manpage-PersistenceCapable[`@PersistenceCapable`] annotation (`schema` and/or `table`
+attributes), or to the (JDO) xref:rg.adoc#_rg_annotations_manpage-Discriminator[`@Discriminator`] annotation.  If none
+is specified, then the fully
+qualified class name will be used.
+<4> the object identifier (aka primary key), converted to string form.
+<5> the `bookmarkObjectState` enumerates the possible persistence states of the referenced object.  Although "transient" is shown,
+in practice the only types of objects will be "persistent" (entities) or "viewModel".
+
+The `oidDto` complex type is used in two specific places by the framework:
 
-This
+* first, as a means of serializing JAXB view model/DTOs (annotated with
+xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]), that reference domain entities. +
++
+These references are serialized instead into OIDs
 
-== `valueDto` and `valueType`
+* second, as references to the target of action invocations, as described by the
+xref:rg.adoc#_rg_schema-aim[action invocation memento] schema. +
++
+They are also used to represent references to any action arguments that take domain object entities.
 
-The common schema defines two further types: the `valueDto` complex type and the `valueType` simple type:
+The common schema also defines two further types: the `valueDto` complex type and the `valueType` simple type:
 
 [source,xml]
 ----
@@ -56,48 +73,23 @@ The common schema defines two further types: the `valueDto` complex type and the
            xmlns="http://isis.apache.org/schema/common"
            xmlns:xs="http://www.w3.org/2001/XMLSchema">
     ...
-    <xs:complexType name="valueDto">                                    <!--1-->
+    <xs:complexType name="valueDto">                              <!--1-->
         <xs:choice minOccurs="0" maxOccurs="1">
             <xs:element name="string" type="xs:string"/>
             <xs:element name="byte" type="xs:byte"/>
             <xs:element name="short" type="xs:short"/>
-            <xs:element name="int" type="xs:int"/>
-            <xs:element name="long" type="xs:long"/>
-            <xs:element name="float" type="xs:float"/>
-            <xs:element name="double" type="xs:double"/>
-            <xs:element name="boolean" type="xs:boolean"/>
-            <xs:element name="char" type="xs:string"/>
-            <xs:element name="bigDecimal" type="xs:decimal"/>
-            <xs:element name="bigInteger" type="xs:integer"/>
-            <xs:element name="dateTime" type="xs:dateTime"/>
-            <xs:element name="localDate" type="xs:date"/>
-            <xs:element name="localDateTime" type="xs:dateTime"/>
+            ...
             <xs:element name="localTime" type="xs:time"/>
             <xs:element name="reference" type="oidDto"/>
         </xs:choice>
     </xs:complexType>
-    <xs:simpleType name="valueType">                                  <!--2-->
+
+    <xs:simpleType name="valueType">                              <!--2-->
         <xs:restriction base="xs:string">
             <xs:enumeration value="string"/>
             <xs:enumeration value="byte"/>
             <xs:enumeration value="short"/>
-            <xs:enumeration value="int"/>
-            <xs:enumeration value="long"/>
-            <xs:enumeration value="float"/>
-            <xs:enumeration value="double"/>
-            <xs:enumeration value="boolean"/>
-            <xs:enumeration value="char"/>
-            <xs:enumeration value="bigInteger"/>
-            <xs:enumeration value="bigDecimal"/>
-            <xs:enumeration value="javaUtilDate"/>
-            <xs:enumeration value="javaSqlDate"/>
-            <xs:enumeration value="javaSqlTime"/>
-            <xs:enumeration value="javaSqlTimestamp"/>
-            <xs:enumeration value="jodaDateTime"/>
-            <xs:enumeration value="jodaLocalDate"/>
-            <xs:enumeration value="jodaLocalTime"/>
-            <xs:enumeration value="jodaLocalDateTime"/>
-            <xs:enumeration value="isisApplibBlob"/>
+            ...
             <xs:enumeration value="isisApplibClob"/>
             <xs:enumeration value="reference"/>
         </xs:restriction>
@@ -105,6 +97,7 @@ The common schema defines two further types: the `valueDto` complex type and the
 </xs:schema>
 ----
 
-These two definitions are just building blocks, both used within the xref:rg.adoc#_rg_schema-aim[Action Invocation Memento]
-schema.  The first, `valueDto` is intended to hold any valid value, eg of an argument to an action.  The second,
-`valueType`, enumerates the different types of vales, eg of a formal parameter to an action.
+These two type definitions are just building blocks, also used within the
+xref:rg.adoc#_rg_schema-aim[action iInvocation memento] schema.  The first, `valueDto` is intended to hold any valid
+value, eg of an argument to an action.  The second, `valueType`, enumerates the different types of vales, eg of a
+formal parameter to an action.

http://git-wip-us.apache.org/repos/asf/isis/blob/4bf7ee1a/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
deleted file mode 100644
index a9d2609..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc
+++ /dev/null
@@ -1,47 +0,0 @@
-[[_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/4bf7ee1a/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
deleted file mode 100644
index d5130e1..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities.adoc
+++ /dev/null
@@ -1,18 +0,0 @@
-[[_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]
-
-
-
-PersistentEntityAdapter.class

http://git-wip-us.apache.org/repos/asf/isis/blob/4bf7ee1a/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
index c05e127..b7e97ee 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc
@@ -22,4 +22,3 @@ The sections below discuss these schemas in more detail.
 
 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/4bf7ee1a/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 2af475b..a46a39e 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
@@ -67,7 +67,7 @@ The (non-ASF) http://github.com/isisaddons/isis-module-publishmq[Isis addons' pu
 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
+`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].
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4bf7ee1a/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
index b32535a..70b1b40 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
@@ -153,7 +153,10 @@ Its mapping is:
 
 === `ResourceServlet`
 
-NOTE: WIP
+The `ResourceServlet` loads and services static content either from the filesystem or from the classpath, each with an appropriate mime type.
+
+Static content here means request paths ending in `.js`, `.css`, `.html`, `.png`, `.jpg`, `.jpeg` and `gif`.
+
 
 Its definition is:
 
@@ -205,11 +208,14 @@ Its mapping is:
 [[_rg_web-xml_filters]]
 == Filters
 
-The order in which filters appear in `web.xml` matters: first to last they define a pipeline.  This is shown in the above diagrams, and the subsections also list the in the same order that they should appear in your `web.xml`.
+The order in which filters appear in `web.xml` matters: first to last they define a pipeline.  This is shown in the
+above diagrams, and the subsections also list the in the same order that they should appear in your `web.xml`.
+
 
 === `ShiroFilter` (Shiro)
 
-NOTE: WIP
+Shiro filter that sets up a Shiro security manager for the request, obtained from the Shiro `WebEnvironment` set up
+by the Shiro `EnvironmentLoaderListener` (discussed above).
 
 Its definition is:
 
@@ -234,7 +240,9 @@ Its mapping is:
 
 === `IsisLogOnExceptionFilter`
 
-NOTE: WIP
+The `IsisLogOnExceptionFilter` filter simply logs the URL of any request that causes an exception to be thrown, then
+re-propagates the exception. The use case is simply to ensure that all exceptions are logged (against the
+`IsisLogOnExceptionFilter` slf4j appender).
 
 Its definition is:
 
@@ -265,7 +273,7 @@ Its mapping is:
 
 === `ResourceCachingFilter`
 
-NOTE: WIP
+The `ResourceCachingFilter` adds HTTP cache headers to specified resources, based on their pattern.
 
 Its definition is:
 
@@ -319,8 +327,7 @@ Its mapping is:
 
 === `WicketFilter`
 
-NOTE: WIP
-
+The `WicketFilter` is responsible for initiating the handling of Wicket requests.
 
 Its definition is:
 
@@ -410,7 +417,8 @@ This filter should be mapped to the `servlet-name` for the RestEasy `HttpServlet
 
 === `IsisTransactionFilterForRestfulObjects`
 
-NOTE: WIP
+The `IsisTransactionFilterForRestfulObjects` filter simply ensures that a transaction is in progress for all
+calls routed to the xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer].
 
 Its definition is:
 
@@ -437,22 +445,29 @@ This filter should be mapped to the `servlet-name` for the RestEasy `HttpServlet
 [[_rg_web-xml_context-parameters]]
 == Configuration Files
 
-However Apache Isis is bootstrapped (using the `IsisWicketApplication` or using `IsisWebAppBootstrapper`), it will read a number of configuration files, such as `isis.properties`.
+However Apache Isis is bootstrapped (using the `IsisWicketApplication` or using `IsisWebAppBootstrapper`), it will
+read a number of configuration files, such as `isis.properties`.
 
-By default these are read from `WEB-INF` directory.
+By default these are read from `WEB-INF` directory.  This can be overriden using the `isis.config.dir` context parameter:
 
-    <context-param>
-      <param-name>isis.config.dir</param-name>
-      <param-value>location of your config directory if fixed</param-value>
-    </context-param>
-    -->
+[source,xml]
+----
+<context-param>
+  <param-name>isis.config.dir</param-name>
+  <param-value>location of your config directory if fixed</param-value>
+</context-param>
+----
 
+Another context parameter, `isis.viewres` specifies which additional configuration files to search for (over and above
+the default ones of `isis.properties` et al):
 
-    <!--
-    determines which additional configuration files to search for
-     -->
-    <context-param>
-        <param-name>isis.viewers</param-name>
-        <param-value>wicket,restfulobjects</param-value>
-    </context-param>
+[source,xml]
+----
+<context-param>
+    <param-name>isis.viewers</param-name>
+    <param-value>wicket,restfulobjects</param-value>
+</context-param>
+----
+
+For example, this will cause `viewer_wicket.properties` and `viewer_restfulobjects.properties` to also be loaded.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4bf7ee1a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
index 90e0977..e6163d0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
@@ -208,7 +208,7 @@ in Apache Isis, and do _not_ correspond to actions even though they have public
 
 
 
-== Domain Entities vs View Models
+== Entities vs View Models
 
 When developing an Apache Isis application you will most likely start off with the persistent domain entities:
 `Customer`, `Order`, `Product`, and so on.  For some applications this may well suffice.  However, if the application

http://git-wip-us.apache.org/repos/asf/isis/blob/4bf7ee1a/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 1314b75..30128b2 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
@@ -62,7 +62,7 @@ import org.apache.isis.schema.utils.jaxbadapters.JodaLocalDateTimeXMLGregorianCa
 import org.apache.isis.schema.utils.jaxbadapters.JodaLocalDateXMLGregorianCalendarAdapter;
 import org.apache.isis.schema.utils.jaxbadapters.JodaLocalTimeXMLGregorianCalendarAdapter;
 
-public class ActionInvocationMementoDtoUtils {
+public final class ActionInvocationMementoDtoUtils {
 
     //region > static
     private static final Function<ParamDto, String> PARAM_DTO_TO_NAME = new Function<ParamDto, String>() {


[2/6] isis git commit: ISIS-1255, ISIS-1250, ISIS-1252: docs for 1250 (JaxbService) and UI events (1252); implementation of config properties to suppress broadcast of events for default (1255)

Posted by da...@apache.org.
ISIS-1255, ISIS-1250, ISIS-1252: docs for 1250 (JaxbService) and UI events (1252); implementation of config properties to suppress broadcast of events for default (1255)


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

Branch: refs/heads/master
Commit: 48102a0db859f139fba4688c1bdef20daeb2fdca
Parents: a1c7e26
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Nov 19 07:39:10 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Nov 19 07:39:10 2015 +0000

----------------------------------------------------------------------
 adocs/documentation/Gemfile                     |   3 +
 adocs/documentation/Gemfile.lock                |   2 +
 adocs/documentation/monitor.rb                  |  72 ++--
 adocs/documentation/pom.xml                     |   2 +-
 .../asciidoc/guides/_rg_annotations_aaa.adoc    |   1 -
 .../guides/_rg_annotations_aaa_jee.adoc         |   4 +-
 .../_rg_annotations_manpage-XmlRootElement.adoc |  28 +-
 ...annotations_manpage-XmlValueTypeAdapter.adoc |  19 +-
 .../guides/_rg_classes_roles_manpage-Dto.adoc   |  14 +-
 ...rg_classes_roles_manpage-HoldsUpdatedAt.adoc |   1 -
 .../asciidoc/guides/_rg_classes_uievent.adoc    |  62 +++
 ...classes_uievent_manpage-CssClassUiEvent.adoc |  22 +
 ..._rg_classes_uievent_manpage-IconUiEvent.adoc |  23 ++
 ...rg_classes_uievent_manpage-TitleUiEvent.adoc |  22 +
 .../main/asciidoc/guides/_rg_services-spi.adoc  |   1 +
 ...services-spi_manpage-UrlEncodingService.adoc |   8 +
 ...oncepts_philosophy_domain-driven-design.adoc |   1 +
 .../src/main/asciidoc/guides/_ug_how-tos.adoc   |   3 +-
 .../guides/_ug_how-tos_bulk-actions.adoc        |   8 +
 ...aged-1-to-m-bidirectional-relationships.adoc |   5 +-
 ...placing-default-service-implementations.adoc |  64 ---
 .../main/asciidoc/guides/_ug_more-advanced.adoc |   3 +-
 .../guides/_ug_more-advanced_bulk-actions.adoc  |   8 -
 ...placing-default-service-implementations.adoc |  64 +++
 .../guides/_ug_more-advanced_view-models.adoc   | 404 ++++++++++++++++++-
 .../src/main/asciidoc/guides/cg.adoc            |   2 +-
 .../src/main/asciidoc/guides/ug.adoc            |   2 +-
 .../documentation/src/main/asciidoc/index.html  |   2 +-
 adocs/template/document.html.erb                |  31 ++
 .../applib/annotation/DomainObjectLayout.java   |   6 +-
 .../apache/isis/applib/annotation/Nature.java   |  30 +-
 .../isis/applib/annotation/ViewModel.java       |  22 +
 .../services/eventbus/ActionDomainEvent.java    |  28 +-
 .../eventbus/ActionInteractionEvent.java        |   8 +
 .../eventbus/CollectionDomainEvent.java         |  27 +-
 .../eventbus/CollectionInteractionEvent.java    |   7 +
 .../services/eventbus/CssClassUiEvent.java      |  22 +-
 .../applib/services/eventbus/IconUiEvent.java   |  23 +-
 .../services/eventbus/PropertyDomainEvent.java  |  26 +-
 .../eventbus/PropertyInteractionEvent.java      |   5 +
 .../applib/services/eventbus/TitleUiEvent.java  |  22 +-
 .../action/ActionAnnotationFacetFactory.java    |   8 +-
 .../CollectionAnnotationFacetFactory.java       |  11 +
 ...ectLayoutAnnotationUsingCssClassUiEvent.java |  13 +-
 .../DomainObjectLayoutFacetFactory.java         |  17 +-
 ...nObjectLayoutAnnotationUsingIconUiEvent.java |  12 +-
 ...ObjectLayoutAnnotationUsingTitleUiEvent.java |  12 +-
 .../PropertyAnnotationFacetFactory.java         |  13 +-
 .../isis/core/metamodel/util/EventUtil.java     |  45 +++
 .../application/simpleapp/integtests/pom.xml    | 130 +++---
 50 files changed, 1090 insertions(+), 278 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/Gemfile
----------------------------------------------------------------------
diff --git a/adocs/documentation/Gemfile b/adocs/documentation/Gemfile
index 5ea2ea7..abaaafd 100644
--- a/adocs/documentation/Gemfile
+++ b/adocs/documentation/Gemfile
@@ -15,6 +15,9 @@ gem 'asciidoctor-diagram', '~> 1.2.1'
 gem 'tilt'
 gem 'thread_safe'
 gem 'coderay'
+
+#gem 'pygments'
+gem 'rouge'
 gem 'webrick'
 
 gem 'launchy', '~> 2.4.3'

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/Gemfile.lock
----------------------------------------------------------------------
diff --git a/adocs/documentation/Gemfile.lock b/adocs/documentation/Gemfile.lock
index 6a495d9..0d4f467 100644
--- a/adocs/documentation/Gemfile.lock
+++ b/adocs/documentation/Gemfile.lock
@@ -21,6 +21,7 @@ GEM
     rb-inotify (0.9.5)
       ffi (>= 0.5.0)
     rjb (1.4.9)
+    rouge (1.8.0)
     slop (4.1.0)
     thread_safe (0.3.5)
     tilt (2.0.1)
@@ -38,6 +39,7 @@ DEPENDENCIES
   coderay
   launchy (~> 2.4.3)
   listen (~> 2.7)
+  rouge
   slop (~> 4.1.0)
   thread_safe
   tilt

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/monitor.rb
----------------------------------------------------------------------
diff --git a/adocs/documentation/monitor.rb b/adocs/documentation/monitor.rb
index 389bf12..f1a9f6b 100644
--- a/adocs/documentation/monitor.rb
+++ b/adocs/documentation/monitor.rb
@@ -21,6 +21,7 @@ $CELLULOID_TEST=false
 #
 opts = Slop.parse do |o|
   o.int '-p', '--port', 'port (default: 4000)', default: 4000
+  o.bool '-x', '--suppress', 'suppress monitoring'
   o.bool '-b', '--browser', 'launch browser'
   o.bool '-h', '--help', 'help'
 end
@@ -84,7 +85,7 @@ def process(file,srcBasePath,targetBasePath,templateDir,i,lastTimeGenerated,prim
                timeUntilNext > 0 then
                 puts "skipping before regenerating (3 seconds not yet elapsed)"
             else
-                    cmd = "asciidoctor #{regenerate} --require asciidoctor-diagram --backend html --eruby erb --template-dir '#{templateDir}' --destination-dir='#{targetRelDir}' -a imagesdir='' -a toc=right -a icons=font -a source-highlighter=coderay"
+                    cmd = "asciidoctor #{regenerate} --require asciidoctor-diagram --backend html --eruby erb --template-dir '#{templateDir}' --destination-dir='#{targetRelDir}' -a imagesdir='' -a toc=right -a icons=font -a source-highlighter=rouge"
 
                     unless priming then
                         puts ""
@@ -120,45 +121,48 @@ def process(file,srcBasePath,targetBasePath,templateDir,i,lastTimeGenerated,prim
 end
 
 
-i=0
-lastTimeGenerated = Time.now - 10
+if not opts.suppress? then
 
+    i=0
+    lastTimeGenerated = Time.now - 10
 
 
-puts ""
-puts ""
-puts ""
-puts "monitoring..."
-puts ""
 
-
-#
-# then continue monitoring all directories
-#
-adocFiles = Dir.glob("src/main/asciidoc/**/*.adoc")
-directories = adocFiles.each{ |f| File.new(f) }.uniq{ |f| File.dirname(f) }.map{ |f| File.dirname(f) }
-
-puts "listening to: #{directories}"
-
-fileListener = Listen.to(directories) do |modified, added, removed|
-    unless modified.length==0
-        modified.each { |file|
-            i,lastTimeGenerated = process file, srcBasePath, targetBasePath, templateDir, i, lastTimeGenerated, false
-        }
-    end
-    unless added.length==0
-        added.each { |file|
-            i,lastTimeGenerated = process file, srcBasePath, targetBasePath, templateDir, i, lastTimeGenerated, false
-        }
-    end
-    unless removed.length==0
-        removed.each { |file|
-            #puts "removed #{file}"
-        }
+    puts ""
+    puts ""
+    puts ""
+    puts "monitoring..."
+    puts ""
+    
+    
+    #
+    # then continue monitoring all directories
+    #
+    adocFiles = Dir.glob("src/main/asciidoc/**/*.adoc")
+    directories = adocFiles.each{ |f| File.new(f) }.uniq{ |f| File.dirname(f) }.map{ |f| File.dirname(f) }
+    
+    puts "listening to: #{directories}"
+    
+    fileListener = Listen.to(directories) do |modified, added, removed|
+        unless modified.length==0
+            modified.each { |file|
+                i,lastTimeGenerated = process file, srcBasePath, targetBasePath, templateDir, i, lastTimeGenerated, false
+            }
+        end
+        unless added.length==0
+            added.each { |file|
+                i,lastTimeGenerated = process file, srcBasePath, targetBasePath, templateDir, i, lastTimeGenerated, false
+            }
+        end
+        unless removed.length==0
+            removed.each { |file|
+                #puts "removed #{file}"
+            }
+        end
     end
+    fileListener.start
 end
-fileListener.start
-
+    
 httpServer = HTTPServer.new(
     :Port => port,
     :DocumentRoot => 'target/site',

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/pom.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/pom.xml b/adocs/documentation/pom.xml
index 6a86dce..5c83079 100644
--- a/adocs/documentation/pom.xml
+++ b/adocs/documentation/pom.xml
@@ -116,7 +116,7 @@
                                     </requires>
                         -->
 
-                        <sourceHighlighter>coderay</sourceHighlighter>
+                        <sourceHighlighter>rouge</sourceHighlighter>
                         <backend>html5</backend>
                         <templateDir>../template</templateDir>
                         <eruby>erb</eruby>

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/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 4ef658d..dda6a8a 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_aaa.adoc
@@ -11,7 +11,6 @@ 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/48102a0d/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 7753e93..ade88cf 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,7 +52,7 @@ The table below lists the JEE annotations currently recognized.  Expect to see m
 |Domain
 |
 
-|xref:rg.adoc#_rg_annotations_manpage-RequestScoped[`javax.xml.bind` +
+|xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`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.
@@ -62,7 +62,7 @@ The table below lists the JEE annotations currently recognized.  Expect to see m
 |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`]).
+|JAXB annotation defining how to serialize an entity.  Used in conjunction with the (framework provided) `PersistentEntityAdapter` 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/48102a0d/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
index 66682b9..3fad258 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
@@ -51,38 +51,22 @@ This example is taken from the (non-ASF) http://github.com/isisaddons/isis-app-t
 
 [source,java]
 ----
-@XmlAccessorType(XmlAccessType.FIELD)                               // <1>
-@XmlType(
-        namespace = "http://viewmodels.app.todoapp/v1/todoitem",    // <2>
-        propOrder = {                                               // <3>
-            "description",
-            "category",
-            "subcategory",
-            "cost"
-        }
-)
-@XmlRootElement(name = "toDoItemDto")                               // <4>
+@XmlRootElement(name = "toDoItemDto")                               // <1>
 public class ToDoItemDto implements Dto {
 
-    @XmlElement(required = true)                                    // <5>
-    @Getter @Setter
     protected String description;
 
-    @XmlElement(required = true)
-    @Getter @Setter
     protected String category;
 
-    @Getter @Setter
     protected String subcategory;
 
-    @Getter @Setter
     protected BigDecimal cost;
 
     // 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
+<1> identifies this class as a view model and defines the root element for JAXB serialization
+
+
+For a more complete discussion of writing JAXB view models/DTOs, see xref:ug.adoc#_ug_more-advanced_view-models[this topic]
+in the user guide.

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/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
index 69709df..36609e7 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlValueTypeAdapter.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlValueTypeAdapter.adoc
@@ -5,6 +5,21 @@
 :_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`].
+The JAXB `@XmlValueTypeAdapter` annotation (`1.11.0-SNAPSHOT`) influences the serialization of objects into XML.
+While not recognized directly by the framework, the framework _does_ provide the `PersistentEntityAdapter` class,
+which causes JAXB to serialize references to persistent entities into a canonical `<oid-dto>` element: equivalent to the `Bookmark` provided by the xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
+
+For example:
+
+[source,java]
+----
+@XmlJavaTypeAdapter(PersistentEntityAdapter.class)
+public class ToDoItem ...  {
+    ...
+}
+----
+
+This annotation therefore allows view models/DTOs to have references to persistent entities; a common idiom.  For a
+more complete discussion of writing JAXB view models/DTOs, see xref:ug.adoc#_ug_more-advanced_view-models[this topic]
+in the user guide.
 
-NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/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
index bd62e5c..b2fb865 100644
--- 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
@@ -23,13 +23,12 @@ The `Dto_downloadXml` mixin defines the following action:
 ----
 @Mixin
 public class Dto_downloadXml {
-    public Dto_downloadXml(final Dto dto) { ... }               // <1>
-    public Object downloadXml(final String fileName) { ... }    // <2>
+    public Dto_downloadXml(final Dto dto) { ... }     // <1>
+    public Object $$(final String fileName) { ... }
     ...
 }
 ----
 <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`].
 
@@ -39,17 +38,18 @@ The `Dto_downloadXsd` mixin is similar:
 ----
 @Mixin
 public class Dto_downloadXsd {
-    public Dto_downloadXsd(final Dto dto) { ... }               // <1>
-    public Object downloadXsd(final String fileName) { ... }    // <2>
+    public Dto_downloadXsd(final Dto dto) { ... }                                       // <1>
+    public Object $$(final String fileName, final IsisSchemes isisSchemas) { ... }     // <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`].
+xref:rg.adoc#_rg_classes_value-types_manpage-Blob[`Blob`].  The `IsisSchemas` parameter to the action can be used to
+optionally ignore the common Apache Isis schemas (useful if there is only one other XSD schema referenced by the DTO).
+
 
 
 == Related Services

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-HoldsUpdatedAt.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-HoldsUpdatedAt.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-HoldsUpdatedAt.adoc
index a9558d1..e63c4ac 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-HoldsUpdatedAt.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_roles_manpage-HoldsUpdatedAt.adoc
@@ -39,7 +39,6 @@ public class Customer {
     public java.sql.Timestamp getVersionSequence() {
         return (java.sql.Timestamp) JDOHelper.getVersion(this);
     }
-    }
 }
 ----
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent.adoc
new file mode 100644
index 0000000..0c5f927
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent.adoc
@@ -0,0 +1,62 @@
+[[_rg_classes_uievent]]
+= UI Event Classes (`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/
+
+
+This section catalogues the various UI event classes defined by Apache Isis.
+
+These events are broadcast on the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`].  The domain
+events are broadcast as a result of being specified in the xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_titleUiEvent[`@DomainObjectLayout#titleUiEvent()`],  xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_iconUiEvent[`@DomainObjectLayout#iconUiEvent()`] or xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent[`@DomainObjectLayout#cssClassUiEvent()`] attributes.
+
+They are listed in the table below.
+
+.UI Event Classes
+[cols="2,4a,1,1", options="header"]
+|===
+
+|API
+|Maven Module +
+Impl'n (g: a:)
+|Implementation
+|Notes
+
+
+|xref:rg.adoc#_rg_classes_uievent_manpage-TitleUiEvent[`o.a.i.applib.` +
+`TitleUiEvent`]
+|``o.a.i.core`` +
+``services.eventbus`` +
+``isis-core-applib``
+|(abstract class). +
+`TitleUiEvent.Default` is the concrete implementation used if no `@DomainObjectLayout#titleUiEvent` attribute is specified
+|Broadcast whenever there is a requirement to obtain a title for a domain object.  Note that if the domain object defines its own xref:rg.adoc#_rg_methods_reserved_manpage-title[`title()`] supporting method, or has xref:rg.adoc#_rg_annotations_manpage-Title[`@Title`] annotation(s) on its properties, then these will take precedence.
+
+|xref:rg.adoc#_rg_classes_uievent_manpage-IconUiEvent[`o.a.i.applib.` +
+`IconUiEvent`]
+|``o.a.i.core`` +
+``services.eventbus`` +
+``isis-core-applib``
+|(abstract class). +
+`IconUiEvent.Default` is the concrete implementation used if no `@DomainObjectLayout#iconUiEvent` attribute is specified
+|Broadcast whenever there is a requirement to obtain an icon (or rather, the name of an icon) for a domain object.  Note that if the domain object defines its own xref:rg.adoc#_rg_methods_reserved_manpage-iconName[`iconName()`] supporting method, or if it has the xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout#cssClassFa[`@DomainObjectLayout#cssClassFa()`] attribute, then these will take precedence.
+
+|xref:rg.adoc#_rg_classes_uievent_manpage-CssClassUiEvent[`o.a.i.applib.` +
+`CssClassUiEvent`]
+|``o.a.i.core`` +
+``services.eventbus`` +
+``isis-core-applib``
+|(abstract class). +
+`CssClassUiEvent.Default` is the concrete implementation used if no `@DomainObjectLayout#cssClassUiEvent` attribute is specified
+|Broadcast whenever there is a requirement to obtain a CSS class hint for a domain object.  Note that if the domain object defines its own xref:rg.adoc#_rg_methods_reserved_manpage-cssClass[`cssClass()`] supporting method then this
+will take precedence.
+
+|===
+
+
+
+
+include::_rg_classes_uievent_manpage-TitleUiEvent.adoc[leveloffset=+1]
+include::_rg_classes_uievent_manpage-IconUiEvent.adoc[leveloffset=+1]
+include::_rg_classes_uievent_manpage-CssClassUiEvent.adoc[leveloffset=+1]
+

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-CssClassUiEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-CssClassUiEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-CssClassUiEvent.adoc
new file mode 100644
index 0000000..ca0987e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-CssClassUiEvent.adoc
@@ -0,0 +1,22 @@
+[[_rg_classes_uievent_manpage-CssClassUiEvent]]
+= `CssClassUiEvent`  (`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/
+
+
+This event class represents a request to obtain the a CSS class hint of a domain object.  The class has a number of
+responsibilities:
+
+* capture the target object being interacted with
+
+* capture the CSS class, if any, as specified to one of the subscribers
+
+The class itself is instantiated automatically by the framework whenever interacting with a rendered object's action.
+
+
+[NOTE]
+====
+if the domain object defines its own xref:rg.adoc#_rg_methods_reserved_manpage-cssClass[`cssClass()`] supporting
+method then this will take precedence.
+====

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-IconUiEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-IconUiEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-IconUiEvent.adoc
new file mode 100644
index 0000000..7fd97a6
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-IconUiEvent.adoc
@@ -0,0 +1,23 @@
+[[_rg_classes_uievent_manpage-IconUiEvent]]
+= `TitleUiEvent` (`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/
+
+
+This event class represents a request to obtain the icon (or rather, name of icon) of a domain object.  The class has a number of responsibilities:
+
+* capture the target object being interacted with
+
+* capture the icon (name), if any, as specified to one of the subscribers
+
+The class itself is instantiated automatically by the framework whenever interacting with a rendered object's action.
+
+
+[NOTE]
+====
+If the domain object defines its own xref:rg.adoc#_rg_methods_reserved_manpage-iconName[`iconName()`] supporting method,
+or if it has the
+xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout#cssClassFa[`@DomainObjectLayout#cssClassFa()`] attribute, then
+these will take precedence.
+====

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-TitleUiEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-TitleUiEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-TitleUiEvent.adoc
new file mode 100644
index 0000000..2fd0bca
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_uievent_manpage-TitleUiEvent.adoc
@@ -0,0 +1,22 @@
+[[_rg_classes_uievent_manpage-TitleUiEvent]]
+= `TitleUiEvent`  (`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/
+
+
+This event class represents a request to obtain the title of a domain object.  The class has a number of responsibilities:
+
+* capture the target object being interacted with
+
+* capture the title, if any, as specified to one of the subscribers
+
+The class itself is instantiated automatically by the framework whenever interacting with a rendered object's action.
+
+
+[NOTE]
+====
+If the domain object defines its own xref:rg.adoc#_rg_methods_reserved_manpage-title[`title()`] supporting method, or
+has xref:rg.adoc#_rg_annotations_manpage-Title[`@Title`] annotation(s) on its properties, then these will take
+precedence.
+====

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/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 76c89a6..554d883 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-spi.adoc
@@ -294,5 +294,6 @@ include::_rg_services-spi_manpage-PublishingService.adoc[leveloffset=+1]
 include::_rg_services-spi_manpage-RepresentationService.adoc[leveloffset=+1]
 include::_rg_services-spi_manpage-TranslationService.adoc[leveloffset=+1]
 include::_rg_services-spi_manpage-TranslationsResolver.adoc[leveloffset=+1]
+include::_rg_services-spi_manpage-UrlEncodingService.adoc[leveloffset=+1]
 include::_rg_services-spi_manpage-UserProfileService.adoc[leveloffset=+1]
 include::_rg_services-spi_manpage-UserRegistrationService.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/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
index 1d21696..c7ef7ee 100644
--- 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
@@ -35,3 +35,11 @@ public interface UrlEncodingService {
 
 == Implementation
 
+The framework provides a default implementation (`UrlEncodingServiceUsingBaseEncoding`) that uses converts the string
+using base-64 encoding and UTF-8 character set.  Note that although the maximum length of a URL should not exceed
+2083 characters.  For large DTOs (capturing a lot of state), you may therefore wish to register an alternative
+implementation.
+
+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/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_philosophy_domain-driven-design.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_philosophy_domain-driven-design.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_philosophy_domain-driven-design.adoc
index c2c0146..f3994c5 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_philosophy_domain-driven-design.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_philosophy_domain-driven-design.adoc
@@ -16,6 +16,7 @@ There are two central ideas at the heart of domain-driven design.
 
 Let's look at each in turn.
 
+[[_ug_core-concepts_philosophy_domain-driven-design_ubiquitous-language]]
 == Ubiquitous Language
 
 It's no secret that the IT industry is plagued by project failures. Too often systems take longer than intended to implement, and when finally implemented, they don't address the real requirements anyway.

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
index 823e24b..3ea387f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
@@ -17,5 +17,6 @@ include::_ug_how-tos_business-rules.adoc[leveloffset=+1]
 include::_ug_how-tos_derived-members.adoc[leveloffset=+1]
 include::_ug_how-tos_drop-downs-and-defaults.adoc[leveloffset=+1]
 include::_ug_how-tos_persisted-title.adoc[leveloffset=+1]
-include::_ug_how-tos_replacing-default-service-implementations.adoc[leveloffset=+1]
+include::_ug_how-tos_bulk-actions.adoc[leveloffset=+1]
+
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_bulk-actions.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_bulk-actions.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_bulk-actions.adoc
new file mode 100644
index 0000000..a03cba7
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_bulk-actions.adoc
@@ -0,0 +1,8 @@
+[[_ug_how-tos_bulk-actions]]
+= Bulk Actions
+: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 - xref:rg.adoc#_rg_annotations_manpage-Action_invokeOn[`@Action#invokeOn()`]
+

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_entity-relationships_managed-1-to-m-bidirectional-relationships.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_entity-relationships_managed-1-to-m-bidirectional-relationships.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_entity-relationships_managed-1-to-m-bidirectional-relationships.adoc
index cbb9135..f94cfab 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_entity-relationships_managed-1-to-m-bidirectional-relationships.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_entity-relationships_managed-1-to-m-bidirectional-relationships.adoc
@@ -40,9 +40,10 @@ Moreover, when maintaining a bidirectional 1-n relationship that is automaticall
 
 [WARNING]
 ====
-If you don't do this then you may (as of Apache Isis 1.4.1) hit an NullPointerException. This may be a bug in DataNucleus, we are not completely sure, but the above idiom seems to fix the issue.
+If you don't do this then you may hit a `NullPointerException`. The above idiom fixes the issue.
 
-For more information, see http://isis.markmail.org/thread/ipu2lzqqikqdglox[this thread] on the Apache Isis users mailing list, including this http://markmail.org/message/hblptpw675mlw723[message] with the above recommendation.
+For more information, see http://isis.markmail.org/thread/ipu2lzqqikqdglox[this thread] on the Apache Isis users
+mailing list, including this http://markmail.org/message/hblptpw675mlw723[message] with the above recommendation.
 ====
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc
deleted file mode 100644
index 1acde98..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc
+++ /dev/null
@@ -1,64 +0,0 @@
-[[_ug_how-tos_replacing-default-service-implementations]]
-= Replacing Service Implns
-: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 framework provides default implementations for many of the xref:rg.adoc#_rg_services-api[API Services].  This is convenient, but sometimes you will want to replace the default implementation with your own service implementation.
-
-The trick is to use the xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] attribute, specifying a low number (typically `"1"`).
-
-For example, suppose you wanted to provide your own implementation of xref:rg.adoc#_rg_services-api_manpage-LocaleProvider[`LocaleProvider`].  Here's how:
-
-[source,java]
-----
-@DomainService(
-        nature = NatureOfService.DOMAIN
-)
-@DomainServiceLayout(
-        menuOrder = "1"                             // <1>
-)
-public class MyLocaleProvider implements LocaleProvider {
-    @Override
-    public Locale getLocale() {
-        return ...
-    }
-}
-----
-<1> takes precedence over the default implementation.
-
-
-It's also quite common to want to decorate the existing implementation (ie have your own implementation delegate to the default); this is also possible and quite easy if using `1.10.0` or later:
-
-[source,java]
-----
-@DomainService(
-        nature = NatureOfService.DOMAIN
-)
-@DomainServiceLayout(
-        menuOrder = "1"                                                                             // <1>
-)
-public class MyLocaleProvider implements LocaleProvider {
-    @Override
-    public Locale getLocale() {
-        return getDelegateLocaleProvider().getLocale();                                             // <2>
-    }
-    Optional<LocaleProvider> delegateLocaleProvider;                                                // <3>
-    private LocaleProvider getDelegateLocaleProvider() {
-        if(delegateLocaleProvider == null) {
-            delegateLocaleProvider = Iterables.tryFind(localeProviders, input -> input != this);    // <4>
-        }
-        return delegateLocaleProvider.orNull();
-    }
-    @Inject
-    List<LocaleProvider> localeProviders;                                                           // <5>
-}
-----
-<1> takes precedence over the default implementation when injected elsewhere.
-<2> this implementation merely delegates to the default implementation
-<3> lazily populated
-<4> delegate to the first implementation that isn't _this_ implementation (else infinite loop!)
-<5> Injects all implementations, including this implemenation
-

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced.adoc
index 4b61cb2..1f4264d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced.adoc
@@ -11,14 +11,13 @@ This chapter pulls together a number of more advanced techniques that we've disc
 
 include::_ug_more-advanced_decoupling.adoc[leveloffset=+1]
 include::_ug_more-advanced_overriding-jdo-annotations.adoc[leveloffset=+1]
-include::_ug_more-advanced_bulk-actions.adoc[leveloffset=+1]
 include::_ug_more-advanced_view-models.adoc[leveloffset=+1]
 include::_ug_more-advanced_mapping-rdbms-views.adoc[leveloffset=+1]
 include::_ug_more-advanced_transactions-and-errors.adoc[leveloffset=+1]
 include::_ug_more-advanced_i18n.adoc[leveloffset=+1]
 include::_ug_more-advanced_multi-tenancy.adoc[leveloffset=+1]
 include::_ug_more-advanced_persistence-lifecycle.adoc[leveloffset=+1]
-include::_ug_more-advanced_tips-n-tricks.adoc[leveloffset=+1]
+include::_ug_more-advanced_replacing-default-service-implementations.adoc[leveloffset=+1]include::_ug_more-advanced_tips-n-tricks.adoc[leveloffset=+1]
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_bulk-actions.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_bulk-actions.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_bulk-actions.adoc
deleted file mode 100644
index 4ea1738..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_bulk-actions.adoc
+++ /dev/null
@@ -1,8 +0,0 @@
-[[_ug_more-advanced_bulk-actions]]
-= Bulk Actions
-: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 - xref:rg.adoc#_rg_annotations_manpage-Action_invokeOn[`@Action#invokeOn()`]
-

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_replacing-default-service-implementations.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_replacing-default-service-implementations.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_replacing-default-service-implementations.adoc
new file mode 100644
index 0000000..b99abae
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_replacing-default-service-implementations.adoc
@@ -0,0 +1,64 @@
+[[_ug_more-advanced_replacing-default-service-implementations]]
+= Replacing Service Implns
+: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 framework provides default implementations for many of the xref:rg.adoc#_rg_services-api[API Services].  This is convenient, but sometimes you will want to replace the default implementation with your own service implementation.
+
+The trick is to use the xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] attribute, specifying a low number (typically `"1"`).
+
+For example, suppose you wanted to provide your own implementation of xref:rg.adoc#_rg_services-api_manpage-LocaleProvider[`LocaleProvider`].  Here's how:
+
+[source,java]
+----
+@DomainService(
+        nature = NatureOfService.DOMAIN
+)
+@DomainServiceLayout(
+        menuOrder = "1"                             // <1>
+)
+public class MyLocaleProvider implements LocaleProvider {
+    @Override
+    public Locale getLocale() {
+        return ...
+    }
+}
+----
+<1> takes precedence over the default implementation.
+
+
+It's also quite common to want to decorate the existing implementation (ie have your own implementation delegate to the default); this is also possible and quite easy if using `1.10.0` or later:
+
+[source,java]
+----
+@DomainService(
+        nature = NatureOfService.DOMAIN
+)
+@DomainServiceLayout(
+        menuOrder = "1"                                                                             // <1>
+)
+public class MyLocaleProvider implements LocaleProvider {
+    @Override
+    public Locale getLocale() {
+        return getDelegateLocaleProvider().getLocale();                                             // <2>
+    }
+    Optional<LocaleProvider> delegateLocaleProvider;                                                // <3>
+    private LocaleProvider getDelegateLocaleProvider() {
+        if(delegateLocaleProvider == null) {
+            delegateLocaleProvider = Iterables.tryFind(localeProviders, input -> input != this);    // <4>
+        }
+        return delegateLocaleProvider.orNull();
+    }
+    @Inject
+    List<LocaleProvider> localeProviders;                                                           // <5>
+}
+----
+<1> takes precedence over the default implementation when injected elsewhere.
+<2> this implementation merely delegates to the default implementation
+<3> lazily populated
+<4> delegate to the first implementation that isn't _this_ implementation (else infinite loop!)
+<5> Injects all implementations, including this implemenation
+

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
index 50272fd..bbf5f64 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
@@ -4,19 +4,405 @@
 :_basedir: ../
 :_imagesdir: images/
 
-NOTE: TODO - xref:rg.adoc#_rg_annotations_manpage-ViewModel[`@ViewModel`], xref:rg.adoc#_rg_classes_super_manpage-AbstractViewModel[`AbstractViewModel`], xref:rg.adoc#_rg_annotations_manpage-DomainObject_nature[`@DomainObject#nature()`]
 
+View models are a type of domain objects (with state, behaviour etc) but where the state is _not_ persisted into the
+ JDO/DataNucleus-managed database, but is instead converted to/from a string memento, and held by the calling client.
+This opens up a number of more advanced use cases.
 
-Nature of view models
+In this topic we'll explore those use cases, and learn the programming model and conventions to use view models in your application.
 
-* inmemory-entity
-* external_entity
-* application layer
 
-Consumers of view models
 
-* within the Wicket viewer
-* within the REST viewer, as an external client consuming a stable API
+[[_ug_more-advanced_view-models_use-cases]]
+== Use Cases
 
-An alternative to using view models is to map the domain object using the xref:rg.adoc#_rg_services-spi_manpage-ContentMappingService[`ContentMappingService`].
+When developing an Apache Isis application you will most likely start off with the persistent domain entities:
+`Customer`, `Order`, `Product`, and so on.  For some applications this may well suffice.  However, if the application
+needs to integrate with other systems, or if the application needs to support reasonably complex business processes, then you may need to look beyond just domain entities.  This section explores these use cases.
 
+=== Externally-managed entities
+
+Sometimes the entities that make up your application are persisted not in the local JDO/DataNucleus database
+but reside in some other system, for example accessible only through a SOAP web service.  Logically that data
+might still be considered a domain entity and we might want to associate behaviour with it, however it cannot be
+modelled as a domain entity if only because JDO/DataNucleus doesn't know about the entity nor how to retrieve or
+update it.
+
+There are a couple of ways around this: we could either replicate the data somehow from the external system into the
+ Isis-managed database (in which case it is once again just another domain entity), or we could set up a stub/proxy for
+ the externally managed entity.  This proxy would hold the reference to the externally-managed domain entity (eg an
+ external id), as well as the "smarts" to know how to interact with that entity (by making SOAP web service calls etc).
+
+The stub/proxy is a type of view model: a view - if you like - onto the domain entity managed by the external system.
+
+[NOTE]
+====
+DataNucleus does in fact define its own link:http://www.datanucleus.org/documentation/extensions/store_manager.html[Store Manager] extension point, so an alternative architecture would be to implement this interface such that DataNucleus
+could make the calls to the external system; these externally-persisted domain entities would therefore be modelled as regular `@PersistenceCapable` entities after all.  For entities not persisted externally the implementation would delegate down to the default RDBMS-specific `StoreManager` provided by DataNucleus itself.
+
+An implementation that supported only reading from an external entity ought to be comparatively straight-forward, but
+implementing one that also supported updating external entities would need to carefully consider error conditions if the
+external system is unavailable; distributed transactions are most likely difficult/impossible to implement (and not
+desirable in any case).
+====
+
+
+=== In-memory entities
+
+As a variation on the above, sometimes there are domain objects that are, conceptually at least entities, but whose
+state is not actually persisted anywhere, merely held in-memory (eg in a hash).
+
+A simple example might be read-only configuration data that is read from a config file (eg log4j appender
+definitions) but thereafter is presented in the UI just like any other entity.
+
+
+=== Application-layer view models
+
+Domain entities (whether locally persisted using JDO/DataNucleus or managed externally) are the bread-and-butter of Apache Isis applications: the focus after all, should be on the business domain concepts and ensuring that they are
+solid.  Generally those domain entities will make sense to the business domain experts: they form the _ubiquitous language_ of the domain.  These domain entities are part of the domain layer.
+
+That said, it may not always be practical to expect end-users of the application to interact solely with those domain
+entities.  For example, it may be useful to show a dashboard of the most significant data in the system to a user,
+often pulling in and aggregating information from multiple points of the app.  Obtaining this information by hand (by
+ querying the respective services/repositories) would be tedious and slow; far better to have a dashboard do the job for
+ the end user.
+
+A dashboard object is a model of the most relevant state to the end-user, in other words it is (quite literally) a view
+ model.  It is not a persisted entity, instead it belongs to the application layer.
+
+A view model need not merely aggregate data; it could also provide actions of its own.  Most likely these actions will
+be queries and will always ultimately just delegate down to the appropriate domain-layer service/repository.  But in
+some cases such view model actions might also modify state of underlying domain entities.
+
+Another common use for view models is to help co-ordinate complex business processes; for example to perform a
+quarterly invoicing run, or to upload annual interest rates from an Excel spreadsheet.  In these cases the view model
+might have some state of its own, but in most cases that state does not need to be persisted per se.
+
+.Desire Lines
+****
+One way to think of application view models is as modelling the "desire line": the commonly-trod path
+that end-users must follow to get from point A to point B as quickly as possible.
+
+To explain: there are link:http://ask.metafilter.com/62599/Where-the-sidewalk-ends[documented]
+link:https://sivers.org/walkways[examples]
+link:http://www.softpanorama.org/People/Wall/larry_wall_articles_and_interviews.shtml[that] architects of university
+campus will only add in paths some while after the campus buildings are complete: let the pedestrians figure out the
+routes they want to take.  The name we like best for this idea is "desire lines", though it has also been called
+a "desire path", "paving the path" or "paving the sidewalk".
+
+What that means is you should add view models _after_ having built up the domain layer, rather than before.  These view
+models pave that commonly-trod path, automating the steps that the end-user would otherwise have to do by hand.
+
+It takes a little practice though, because even when building the domain layer "first", you should still bear in mind
+what the use cases are that those domain entities are trying to support.  You certainly _shouldn't_ try to build out a
+domain layer that could support every conceivable use case before starting to think about view models.
+
+Instead, you should iterate.  Identify the use case/story/end-user objective that you will deliver value to the
+business.  Then build out the minimum domain entities to support that use case (refining the xref:ug.adoc#_ug_core-concepts_philosophy_domain-driven-design_ubiquitous-language[ubiquitous language] as you
+go).  Then, identify if there any view models that could be introduced which would simplify the end-user interactions
+with the system (perhaps automating several related use cases together).
+****
+
+=== DTOs (`1.11.0-SNAPSHOT`)
+
+DTOs (data transfer objects) are simple classes that (according to link:https://en.wikipedia.org/wiki/Data_transfer_object[wikipedia]) "carries data between processes".
+
+If those two processes are parts of the same overall application (the same team builds and deploys both server and
+client) then there's generally no need to define a DTO; just access the entities using Apache Isis'
+xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer].
+
+On the other hand, if the client consuming the DTO is a different application -- by which we mean developed/deployed by
+a different (possible third-party) team -- then the DTOs act as a formal contract between the provider and the consumer.
+In such cases, exposing domain entities over xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects] would be
+"A Bad Thing"(TM) because the consumer would in effect have access to implementation details that could then not be
+easily changed by the producer.
+
+Instead, a view model can be defined to act as a DTO.  To put this formal contract onto a solid footing, this view
+model can (as of `1.11.0-SNAPSHOT`) simply be defined as a JAXB-annotated entity; this allows the consumer to obtain
+the DTO in XML format along with a corresponding XSD schema describing the structure of that XML.  These XML
+representations can be surfaced by the xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer] (by implementing
+the xref:rg.adoc#_rg_services-spi_manpage-ContentMappingService[`ContentMappingService`]); the XSD can be obtained
+using the xref:rg.adoc#_rg_services-api_manpage-JaxbService[`JaxbService`].  Using the formalism of XML also allows
+DTOs to be carefully and properly versioned using XML namespaces.
+
+[TIP]
+====
+If the view model DTO implements the xref:rg.adoc#_rg_classes_mixins_Dto[`Dto`] marker interface, then the framework
+will also provide the ability to download the XML or its XSD directly from the UI.
+====
+
+In case it's not clear, these DTOs are still usable as "regular" view models; they will render in the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer] just like any other.  Indeed (as the xref:ug.adoc#_ug_more-advanced_view-models_programming-model[programming model] section below makes clear), these
+JAXB-annotated view models are in many regards the most powerful of all the view model alternatives.
+
+
+=== ESB Subscribers
+
+One important variation of the DTO use case concerns subscribers on an enterprise event bus such as
+link:http://camel.apache.org[Apache Camel(TM)] and similar.
+
+A xref:rg.adoc#_rg_services-spi_manpage-PublishingService[`PublishingService`] implementation (eg that provided by
+(non-ASF) http://github.com/isisaddons/isis-module-publishmq[Isis addons' publishmq] module) can publish XML events
+onto a message queue, typically representing action invocations within the originating Isis application.  The ESB
+(Apache Camel) then dispatches this event to all interested subscribers.  These subscribers represent external systems
+in the enterprise, managed by other teams, and so act as the third-party consumers of the data.
+
+Rather than try to anticipate their requirements and push the data that these subscribers might need into the original
+XML event (a hopeless task), DTO objects can be defined to allow these consumers to call back to the publishing Isis
+application to obtain the data they need.
+
+
+[[_ug_more-advanced_view-models_programming-model]]
+== Programming Model
+
+So much for the theory; how should view models be implemented?  Fundamentally all view models' state is serialized into
+a string memento; this memento is then held by the client (browser) in the form of a URL.  As you might imagine, this
+URL can become quite long, but Apache Isis offers a mechanism (the xref:rg.adoc#_rg_services-spi_manpage-UrlEncodingService[`UrlEncodingService`]) if it exceeds the maximum length for a URL
+(2083 characters).  Also, of course, this string memento must only contain characters that it is valid for use within
+a URL.
+
+While the underlying technique is the same irrespective of use case, the programming model provides various ways of
+defining a view model so that the original intent is not lost.  They are:
+
+.View model programming model
+[cols="1a,4a,4a", options="header"]
+|===
+
+| Use case
+| Code
+| Description
+
+
+| External entity
+|[source,java]
+----
+@DomainObject(nature=Nature.EXTERNAL_ENTITY)
+public class CustomerRecordOnSAP { ... }
+----
+|Annotated with xref:rg.adoc#_rg_annotations_manpage-DomainObject_nature[`@DomainObject#nature()`] and a nature of `EXTERNAL_ENTITY`, with memento derived automatically from the properties of the domain object.  Collections are ignored, as are any properties annotated as xref:rg.adoc#_rg_annotations_manpage-Property_notPersisted[not persisted].
+
+| In-memory entity
+|[source,java]
+----
+@DomainObject(nature=Nature.INMEMORY_ENTITY)
+public class Log4JAppender { ... }
+----
+|As preceding, but using a nature of `INMEMORY_ENTITY`.
+
+|Application view model
+|[source,java]
+----
+@DomainObject(nature=Nature.VIEW_MODEL)
+public class Dashboard { ... }
+----
+|As preceding, but using a nature of `VIEW_MODEL`.
+
+|Application view model
+|
+[source,java]
+----
+@ViewModel
+public class Dashboard { ... }
+----
+
+|Annotated with xref:rg.adoc#_rg_annotations_manpage-ViewModel[`@ViewModel`] annotation (effectively just an alias)' memento is as preceding: from "persisted" properties, collections ignored
+
+|Application view model
+|
+[source,java]
+----
+public class ExcelUploadManager implements ViewModel {
+    public String viewModelMemento() { ... }
+    public void viewModelInit(String memento) { ... }
+}
+|Implement xref:rg.adoc#_rg_classes_super_manpage-ViewModel[`ViewModel`] interface.  The memento is as defined by the
+interface's methods: the programmer has full control (but also full responsibility) for the string memento.
+
+|DTO (`1.11.0-SNAPSHOT`)
+|
+[source,java]
+----
+@XmlRootElement("customer")
+public class CustomerDto { ... }
+----
+|Annotate using JAXB xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`] annotation.  Memento
+derived automatically by serializing the XML graph as implied by the JAXB annotations.  Note that (unlike `@ViewModel`
+et al) this state _can_ include collections.
+|===
+
+
+
+[[_ug_more-advanced_view-models_jaxb]]
+== JAXB-annotated DTOs (`1.11.0-SNAPSHOT`)
+
+This section provides some recommended practices if using JAXB and `@XmlRootElement` to define domain models.  The
+examples are taken from the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp].
+
+=== Use packages to version DTOs
+
+The whole point of using DTOs (in Apache Isis, at least) is to define a formal contact between two interoperating but
+independent applications.  Since the only thing we can predicate about the future with any certainty is that it one or
+both of these applications will change, we should version DTOs from the get-go.
+
+With XML every element may be defined as belonging to a particular namespace; in JAXB this translates to Java packages.
+We therefore should place each DTO within its own package, and that package should include a version identifier.
+
+For example, the http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp] defines this DTO (as a versioned
+representation of its underlying `ToDoItem` entity):
+
+[source,java]
+----
+@XmlRootElement(name = "toDoItemDto")                               // <1>
+@XmlType(
+        namespace = "http://viewmodels.app.todoapp/v1/todoitem",    // <2>
+        propOrder = {                                               // <3>
+            "description",
+            "category",
+            "subcategory",
+            "cost"
+        }
+)
+@DomainObjectLayout(
+        titleUiEvent = TitleUiEvent.Default.class                   // <4>
+)
+public class ToDoItemDto implements Dto {
+
+    @XmlElement(required = true)
+    @Getter @Setter                                                 // <5>
+    protected String description;
+
+    @XmlElement(required = true)
+    @Getter @Setter
+    protected String category;
+
+    @Getter @Setter
+    protected String subcategory;
+
+    @Getter @Setter
+    protected BigDecimal cost;
+}
+----
+<1> identifies this class as a view model and defines the root element for JAXB serialization
+<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> optional but recommended: using xref:rg.adoc#_rg_classes_uievent_manpage-TitleUiEvent[`TitleUiEvent`] to obtain
+<5> optional; JAXB metadata can specify such attributes as required/optional
+
+
+
+[source,java]
+----
+@javax.xml.bind.annotation.XmlSchema(
+        xmlns = {
+                @XmlNs(
+                        namespaceURI = "http://isis.apache.org/schema/common",
+                        prefix = "common"
+                )
+        },
+        namespace = "http://viewmodels.app.todoapp/v1/todoitem",
+        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
+)
+package todoapp.app.viewmodels.todoitem.v1;
+
+import javax.xml.bind.annotation.XmlNs;
+----
+
+
+
+This annotation therefore allows view models/DTOs to have references to persistent entities.  It is a common
+
+
+
+[source,java]
+----
+package todoapp.app.viewmodels.todoitem.v2;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.annotation.DomainObjectLayout;
+import org.apache.isis.applib.services.eventbus.TitleUiEvent;
+
+import lombok.Getter;
+import lombok.Setter;
+import todoapp.dom.todoitem.ToDoItem;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(
+        namespace = "http://viewmodels.app.todoapp/v2/todoitem",
+        propOrder = {
+                "toDoItem",
+                "similarItems"
+        }
+)
+@XmlRootElement(name = "toDoItemDto")
+@DomainObjectLayout(
+        titleUiEvent = TitleUiEvent.Default.class
+)
+public class ToDoItemDto extends todoapp.app.viewmodels.todoitem.v1.ToDoItemDto {
+
+    @XmlElement(required = true)
+    @Getter @Setter
+    protected ToDoItem toDoItem;
+
+    @XmlElementWrapper
+    @XmlElement(name = "todoItem")
+    @Getter @Setter
+    protected List<ToDoItem> similarItems = Lists.newArrayList();
+
+}
+----
+
+
+
+[source,java]
+----
+@javax.xml.bind.annotation.XmlSchema(
+        xmlns = {
+                @XmlNs(
+                        namespaceURI = "http://isis.apache.org/schema/common",
+                        prefix = "common"
+                ),
+                @XmlNs(
+                        namespaceURI = "http://viewmodels.app.todoapp/v1/todoitem",
+                        prefix = "todoitem-v1"
+                ),
+                @XmlNs(
+                        namespaceURI = "http://viewmodels.app.todoapp/v2/todoitem",
+                        prefix = "todoitem-v2"
+                )
+        },
+        namespace = "http://viewmodels.app.todoapp/v2/todoitem",
+        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
+)
+package todoapp.app.viewmodels.todoitem.v2;
+
+import javax.xml.bind.annotation.XmlNs;
+----
+
+
+
+
+[source,java]
+----
+@XmlJavaTypeAdapter(PersistentEntityAdapter.class)
+public class ToDoItem ...  {
+    ...
+}
+----
+
+
+
+
+
+
+== `UrlEncodingService`
+
+NOTE: TODO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/cg.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/cg.adoc b/adocs/documentation/src/main/asciidoc/guides/cg.adoc
index 0821616..233d347 100644
--- a/adocs/documentation/src/main/asciidoc/guides/cg.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/cg.adoc
@@ -17,7 +17,7 @@ This contributors' guide has three related audiences:
 
 * committers of Apache Isis itself who want guidance on release process, publishing documents and other related procedures.
 
-The developer' guide is _not_ intended as a reference manual; for that see the *xref:rg.adoc#_rg[Reference Guide]*.  This guide also doesn't describe how to actually build an Apache Isis application; for that see the *xref:ug.adoc#_ug[Users' Guide]*.
+This contributors' guide is _not_ intended as a reference manual; for that see the *xref:rg.adoc#_rg[Reference Guide]*.  This guide also doesn't describe how to actually build an Apache Isis application; for that see the *xref:ug.adoc#_ug[Users' Guide]*.
 
 
 include::_cg_ide.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/guides/ug.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ug.adoc b/adocs/documentation/src/main/asciidoc/guides/ug.adoc
index b597529..155b507 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ug.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ug.adoc
@@ -15,7 +15,7 @@ It goes on to discuss the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer], both fr
 
 Later chapters discuss essential topics such as xref:ug.adoc#_ug_testing[testing] and how to xref:ug.adoc#_ug_deployment[deploy] your app, and discuss other ways in which you can xref:ug.adoc#_ug_extending[extend] or adapt the framework itself to your particular needs.
 
-The users' guide is _not_ intended as a reference manual; for that see the *xref:rg.adoc#_rg[Reference Guide]*.  The users' guide also doesn't explain how to setup your development environment; for that see the *xref:cg.adoc#_cg[Contributors' Guide]*.
+This users' guide is _not_ intended as a reference manual; for that see the *xref:rg.adoc#_rg[Reference Guide]*.  This guide also doesn't explain how to setup your development environment; for that see the *xref:cg.adoc#_cg[Contributors' Guide]*.
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/documentation/src/main/asciidoc/index.html
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/index.html b/adocs/documentation/src/main/asciidoc/index.html
index 04ab1be..b720f4f 100644
--- a/adocs/documentation/src/main/asciidoc/index.html
+++ b/adocs/documentation/src/main/asciidoc/index.html
@@ -710,7 +710,7 @@ mvn archetype:generate  \
                             </div>
                         </div>
                         <div>
-                            <p align="center"><i>hover to stop scrolling</i></p>
+                            <p align="center"><i>hover to stop scrolling; click arrows to resume</i></p>
                         </div>
                     </div>
                     <div class="large-1 medium-1 columns">

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/adocs/template/document.html.erb
----------------------------------------------------------------------
diff --git a/adocs/template/document.html.erb b/adocs/template/document.html.erb
index 86aa8cc..b9685f9 100644
--- a/adocs/template/document.html.erb
+++ b/adocs/template/document.html.erb
@@ -46,6 +46,20 @@
     <![endif]-->
 
 
+
+    <style type="text/css">
+        pre code {
+            background-color: inherit;
+            border-style: none;
+        }
+
+        pre code > span:first-child {
+            margin-left: -5px;
+        }
+
+    <style>
+
+    <!--
     <style type="text/css">
         <%= ::Asciidoctor::Stylesheets.instance.coderay_stylesheet_data %>
 
@@ -76,6 +90,7 @@
          }
 
     <style>
+    -->
 
     <style>
     .github-fork-ribbon-wrapper.right {
@@ -154,6 +169,22 @@
             margin-top: 30px;
         }
 
+        div#doc-content a.header-link {
+            margin-left: -90px;
+        }
+
+        div#doc-content div.sect1 h2 {
+            margin-left: -60px;
+        }
+
+        div#doc-content div.sect3 h4 {
+            margin-left: -60px;
+        }
+
+        div#doc-content div.sect2 h3 {
+            margin-left: -60px;
+        }
+
         div.documentation-page table.frame-all {
             border-left: none;
             border-right: none;

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java
index d65dc2f..0499cf3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java
@@ -45,7 +45,7 @@ public @interface DomainObjectLayout {
      * This subclass must provide a no-arg constructor; the fields are set reflectively.
      * </p>
      */
-    Class<? extends TitleUiEvent<?>> titleUiEvent() default TitleUiEvent.Noop.class;
+    Class<? extends TitleUiEvent<?>> titleUiEvent() default TitleUiEvent.Default.class;
 
     // //////////////////////////////////////
 
@@ -56,7 +56,7 @@ public @interface DomainObjectLayout {
      * This subclass must provide a no-arg constructor; the fields are set reflectively.
      * </p>
      */
-    Class<? extends IconUiEvent<?>> iconUiEvent() default IconUiEvent.Noop.class;
+    Class<? extends IconUiEvent<?>> iconUiEvent() default IconUiEvent.Default.class;
 
     // //////////////////////////////////////
 
@@ -67,7 +67,7 @@ public @interface DomainObjectLayout {
      * This subclass must provide a no-arg constructor; the fields are set reflectively.
      * </p>
      */
-    Class<? extends CssClassUiEvent<?>> cssClassUiEvent() default CssClassUiEvent.Noop.class;
+    Class<? extends CssClassUiEvent<?>> cssClassUiEvent() default CssClassUiEvent.Default.class;
 
     /**
      * Indicates the css class that a domain class (type) should have.

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/annotation/Nature.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Nature.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Nature.java
index e941e2a..4ffa704 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Nature.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Nature.java
@@ -18,6 +18,8 @@
  */
 package org.apache.isis.applib.annotation;
 
+import javax.xml.bind.annotation.XmlRootElement;
+
 /**
  * The different sorts of domain objects recognized by Isis.
  *
@@ -30,7 +32,8 @@ public enum Nature {
 
     /**
      * The default; allows the programmer to combine <tt>@DomainObject</tt> annotation with the
-     * <tt>@ViewModel</tt> annotation or implementing the <tt>ViewModel</tt> interface.
+     * {@link ViewModel} annotation, or the {@link XmlRootElement} annotation, or by implementing the
+     * {@link org.apache.isis.applib.ViewModel} interface.
      */
     NOT_SPECIFIED,
 
@@ -52,8 +55,13 @@ public enum Nature {
      * considered to be part of the domain model layer.
      *
      * <p>
-     *     The identity of an external entity is determined solely by the state of entity's properties (that have
-     *     not been set to be ignored using {@link org.apache.isis.applib.annotation.Property#notPersisted()}).
+     *     The identity of an external entity is determined solely by the state of object's properties (that have not
+     *     been set to be ignored using {@link org.apache.isis.applib.annotation.Property#notPersisted()}).
+     * </p>
+     *
+     * <p>
+     *     Note that collections are ignored; if their state is required to fully identify the view model, use
+     *     {@link XmlRootElement} annotation instead.
      * </p>
      */
     EXTERNAL_ENTITY,
@@ -63,7 +71,13 @@ public enum Nature {
      *
      * <p>
      *     As for a {@link #EXTERNAL_ENTITY}, the identity of a synthetic entity is determined solely by the state of
-     *     entity's properties (that have not been set to be ignored using {@link org.apache.isis.applib.annotation.Property#notPersisted()}).
+     *     object's properties (that have not been set to be ignored using
+     *     {@link org.apache.isis.applib.annotation.Property#notPersisted()}).
+     * </p>
+     *
+     * <p>
+     *     Note that collections are ignored; if their state is required to fully identify the view model, use
+     *     {@link XmlRootElement} annotation instead.
      * </p>
      */
     INMEMORY_ENTITY,
@@ -74,6 +88,14 @@ public enum Nature {
      * <p>
      *     The identity of a view model is determined solely by the state of object's properties (that have
      *     not been set to be ignored using {@link org.apache.isis.applib.annotation.Property#notPersisted()}).
+     *     Using this nature should be considered exactly equivalent to annotating with {@link ViewModel}.
+     * </p>
+     *
+     * <p>
+     *     Note that collections are ignored; if their state is required to fully identify the view model, define the
+     *     view model using the JAXB {@link XmlRootElement} annotation instead (where the object's state is serialized
+     *     to an arbitrarily deep graph of data, with references to persistent entities transparently resolved to
+     *     <code>&lt;oid-dto&gt;</code> elements).
      * </p>
      *
      * @see ViewModel

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
index 6b18150..f27c4df 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
@@ -21,6 +21,28 @@ package org.apache.isis.applib.annotation;
 
 import java.lang.annotation.*;
 
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * An object that is conceptually part of the application layer, and which surfaces behaviour and/or state that
+ * is aggregate of one or more domain entity.
+ *
+ * <p>
+ *     The identity of a view model is determined solely by the state of object's properties (that have
+ *     not been set to be ignored using {@link org.apache.isis.applib.annotation.Property#notPersisted()}).
+ *     Using this nature should be considered exactly equivalent to annotating with {@link DomainObject#nature()} with
+ *     a nature of {@link Nature#VIEW_MODEL}.
+ * </p>
+ *
+ * <p>
+ *     Note that collections are ignored; if their state is required to fully identify the view model, define the view
+ *     model using the JAXB {@link XmlRootElement} annotation instead (where the object's state is serialized
+ *     to an arbitrarily deep graph of data, with references to persistent entities transparently resolved to
+ *     <code>&lt;oid-dto&gt;</code> elements).
+ * </p>
+ *
+ * @see ViewModel
+ */
 @Inherited
 @Target({ ElementType.TYPE })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
index 93ca053..2b2b81f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java
@@ -32,14 +32,16 @@ public abstract class ActionDomainEvent<S> extends AbstractInteractionEvent<S> {
     private static final long serialVersionUID = 1L;
 
     //region > Default class
-
     /**
-     * The default for {@link org.apache.isis.applib.annotation.Action#domainEvent()} annotation attribute, will be
-     * used as the event class to be posted if some other subclass wasn't specified (though setting to
-     * {@link org.apache.isis.applib.services.eventbus.ActionDomainEvent.Noop} will disable).
+     * This class is the default for the
+     * {@link org.apache.isis.applib.annotation.Action#domainEvent()} annotation attribute.  Whether this
+     * raises an event or not depends upon the "isis.services.eventbus.actionDomainEvent.postForDefault"
+     * configuration property.
      */
     public static class Default extends ActionInteractionEvent<Object> {
         private static final long serialVersionUID = 1L;
+        public Default(){}
+        @Deprecated
         public Default(Object source, Identifier identifier, Object... arguments) {
             super(source, identifier, arguments);
         }
@@ -49,14 +51,26 @@ public abstract class ActionDomainEvent<S> extends AbstractInteractionEvent<S> {
     //region > Noop class
 
     /**
-     * Disables event propogation if explicitly set as the value of
-     * {@link org.apache.isis.applib.annotation.Action#domainEvent()} annotation attribute.
+     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event.
      */
-    public static class Noop extends ActionDomainEvent<Object> {
+    public static class Noop extends ActionInteractionEvent<Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
 
+    //region > Doop class
+
+    /**
+     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event..
+     */
+    public static class Doop extends ActionInteractionEvent<Object> {
+        private static final long serialVersionUID = 1L;
+    }
+    //endregion
+
+
     //region > constructors
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java
index 7afb412..05d6621 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionInteractionEvent.java
@@ -37,6 +37,8 @@ public abstract class ActionInteractionEvent<S> extends ActionDomainEvent<S> {
     @Deprecated
     public static class Default extends ActionDomainEvent.Default {
         private static final long serialVersionUID = 1L;
+        public Default() {}
+        @Deprecated
         public Default(Object source, Identifier identifier, Object... arguments) {
             super(source, identifier, arguments);
         }
@@ -44,12 +46,17 @@ public abstract class ActionInteractionEvent<S> extends ActionDomainEvent<S> {
     //endregion
 
     //region > constructors
+
+    public ActionInteractionEvent(){}
+
+    @Deprecated
     public ActionInteractionEvent(
             final S source,
             final Identifier identifier) {
         super(source, identifier);
     }
 
+    @Deprecated
     public ActionInteractionEvent(
             final S source,
             final Identifier identifier,
@@ -57,6 +64,7 @@ public abstract class ActionInteractionEvent<S> extends ActionDomainEvent<S> {
         super(source, identifier, arguments);
     }
 
+    @Deprecated
     public ActionInteractionEvent(
             final S source,
             final Identifier identifier,

http://git-wip-us.apache.org/repos/asf/isis/blob/48102a0d/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
index 2fef767..c431483 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionDomainEvent.java
@@ -27,12 +27,15 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractInteractionEven
 
     //region > Default class
     /**
-     * The default for {@link org.apache.isis.applib.annotation.Collection#domainEvent()} annotation attribute, will be
-     * used as the event class to be posted if some other subclass wasn't specified (though setting to
-     * {@link org.apache.isis.applib.services.eventbus.CollectionDomainEvent.Noop} will disable).
+     * This class is the default for the
+     * {@link org.apache.isis.applib.annotation.Collection#domainEvent()} annotation attribute.  Whether this
+     * raises an event or not depends upon the "isis.services.eventbus.collectionDomainEvent.postForDefault"
+     * configuration property.
      */
     public static class Default extends CollectionInteractionEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
+        public Default(){}
+        @Deprecated
         public Default(
                 final Object source,
                 final Identifier identifier,
@@ -46,14 +49,26 @@ public abstract class CollectionDomainEvent<S,T> extends AbstractInteractionEven
     //region > Noop class
 
     /**
-     * Disables event propogation if explicitly set as the value of
-     * {@link org.apache.isis.applib.annotation.Collection#domainEvent()} annotation attribute.
+     * Convenience class to use indicating that an event should <i>not</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event.
      */
-    public static class Noop extends CollectionDomainEvent<Object,Object> {
+    public static class Noop extends CollectionInteractionEvent<Object, Object> {
         private static final long serialVersionUID = 1L;
     }
     //endregion
 
+    //region > Doop class
+
+    /**
+     * Convenience class meaning that an event <i>should</i> be posted (irrespective of the configuration
+     * property setting for the {@link Default} event..
+     */
+    public static class Doop extends CollectionInteractionEvent<Object, Object> {
+        private static final long serialVersionUID = 1L;
+    }
+    //endregion
+
+
     //region > constructors
 
     /**


[4/6] isis git commit: ISIS-915, ISIS-1250, ISIS-1251, ISIS-1252, ISIS-1254, ISIS-1255: documentation and minor code updates.

Posted by da...@apache.org.
ISIS-915, ISIS-1250, ISIS-1251, ISIS-1252, ISIS-1254, ISIS-1255: documentation and minor code updates.


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

Branch: refs/heads/master
Commit: 4b891285bc69f1e295c268175b32fb4b7bb3adf6
Parents: 48102a0
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Nov 19 18:12:11 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Nov 19 18:12:11 2015 +0000

----------------------------------------------------------------------
 adocs/documentation/Gemfile.lock                |   3 +
 adocs/documentation/monitor.rb                  |   2 +-
 adocs/documentation/pom.xml                     |   2 +-
 .../main/asciidoc/guides/_cg_ide-templates.adoc |   8 +-
 .../main/asciidoc/guides/_rg_annotations.adoc   |   2 +-
 .../guides/_rg_annotations_aaa_jee.adoc         |   4 +-
 .../guides/_rg_annotations_manpage-Action.adoc  |   4 +-
 ..._annotations_manpage-Action_domainEvent.adoc |  41 ++-
 ...otations_manpage-Collection_domainEvent.adoc |  36 +-
 ..._annotations_manpage-DomainObjectLayout.adoc |  19 +-
 ...page-DomainObjectLayout_cssClassUiEvent.adoc | 125 +++++++
 ..._manpage-DomainObjectLayout_iconUiEvent.adoc | 120 ++++++
 ...manpage-DomainObjectLayout_titleUiEvent.adoc | 119 ++++++
 ...nnotations_manpage-Property_domainEvent.adoc |  42 ++-
 ..._annotations_manpage-XmlJavaTypeAdapter.adoc |  27 ++
 .../_rg_annotations_manpage-XmlRootElement.adoc |  34 +-
 ...annotations_manpage-XmlValueTypeAdapter.adoc |  25 --
 .../src/main/asciidoc/guides/_rg_classes.adoc   |   1 +
 .../guides/_rg_classes_roles_manpage-Dto.adoc   |  17 +-
 .../guides/_rg_runtime_configuring-core.adoc    |  55 ++-
 .../_rg_runtime_specifying-components.adoc      |   4 +-
 .../main/asciidoc/guides/_rg_schema-common.adoc |  11 +-
 .../main/asciidoc/guides/_rg_services-api.adoc  |   1 +
 .../_rg_services-api_manpage-JaxbService.adoc   |   2 +-
 ...services-spi_manpage-UrlEncodingService.adoc |  30 +-
 .../guides/_ug_how-tos_class-structure.adoc     |   2 +-
 .../guides/_ug_more-advanced_view-models.adoc   | 174 +++++----
 .../templates/asciidoc-templates-idea.xml       | 365 -------------------
 .../templates/isis-asciidoc-templates-idea.xml  | 365 +++++++++++++++++++
 adocs/template/document.html.erb                |   2 +-
 .../services/eventbus/ActionDomainEvent.java    |   2 +-
 .../eventbus/CollectionDomainEvent.java         |   2 +-
 .../services/eventbus/CssClassUiEvent.java      |   2 +-
 .../applib/services/eventbus/IconUiEvent.java   |   2 +-
 .../services/eventbus/PropertyDomainEvent.java  |   2 +-
 .../applib/services/eventbus/TitleUiEvent.java  |  18 +-
 .../action/ActionAnnotationFacetFactory.java    |   2 +-
 .../CollectionAnnotationFacetFactory.java       |   2 +-
 ...ectLayoutAnnotationUsingCssClassUiEvent.java |   2 +-
 ...nObjectLayoutAnnotationUsingIconUiEvent.java |   2 +-
 ...ObjectLayoutAnnotationUsingTitleUiEvent.java |   4 +-
 .../PropertyAnnotationFacetFactory.java         |   2 +-
 .../src/main/webapp/WEB-INF/isis.properties     |  10 +
 43 files changed, 1136 insertions(+), 558 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/Gemfile.lock
----------------------------------------------------------------------
diff --git a/adocs/documentation/Gemfile.lock b/adocs/documentation/Gemfile.lock
index 0d4f467..9b483db 100644
--- a/adocs/documentation/Gemfile.lock
+++ b/adocs/documentation/Gemfile.lock
@@ -45,3 +45,6 @@ DEPENDENCIES
   tilt
   wdm (>= 0.1.0)
   webrick
+
+BUNDLED WITH
+   1.10.6

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/monitor.rb
----------------------------------------------------------------------
diff --git a/adocs/documentation/monitor.rb b/adocs/documentation/monitor.rb
index f1a9f6b..ddda73e 100644
--- a/adocs/documentation/monitor.rb
+++ b/adocs/documentation/monitor.rb
@@ -85,7 +85,7 @@ def process(file,srcBasePath,targetBasePath,templateDir,i,lastTimeGenerated,prim
                timeUntilNext > 0 then
                 puts "skipping before regenerating (3 seconds not yet elapsed)"
             else
-                    cmd = "asciidoctor #{regenerate} --require asciidoctor-diagram --backend html --eruby erb --template-dir '#{templateDir}' --destination-dir='#{targetRelDir}' -a imagesdir='' -a toc=right -a icons=font -a source-highlighter=rouge"
+                    cmd = "asciidoctor #{regenerate} --require asciidoctor-diagram --backend html --eruby erb --template-dir '#{templateDir}' --destination-dir='#{targetRelDir}' -a imagesdir='' -a toc=right -a icons=font -a source-highlighter=coderay"
 
                     unless priming then
                         puts ""

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/pom.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/pom.xml b/adocs/documentation/pom.xml
index 5c83079..6a86dce 100644
--- a/adocs/documentation/pom.xml
+++ b/adocs/documentation/pom.xml
@@ -116,7 +116,7 @@
                                     </requires>
                         -->
 
-                        <sourceHighlighter>rouge</sourceHighlighter>
+                        <sourceHighlighter>coderay</sourceHighlighter>
                         <backend>html5</backend>
                         <templateDir>../template</templateDir>
                         <eruby>erb</eruby>

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_cg_ide-templates.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cg_ide-templates.adoc b/adocs/documentation/src/main/asciidoc/guides/_cg_ide-templates.adoc
index afdf0dd..8cd0784 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cg_ide-templates.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cg_ide-templates.adoc
@@ -7,7 +7,7 @@
 
 
 
-We provide IDE templates (for IntelliJ and Eclipse) for writing Apache Isis domain objects, and also for unit tests (JUnit and JMock).  We also provide them for IntelliJ for writing Asciidoc documentation (see also the xref:cg.adoc#_cg__cg_asciidoc-templates[appendix]).
+We provide IDE templates (for IntelliJ and Eclipse) for writing Apache Isis domain objects, and also for unit tests (JUnit and JMock).  We also provide them for IntelliJ for writing Asciidoc documentation (see also the xref:cg.adoc#_cg_asciidoc-templates[appendix]).
 
 
 == Download
@@ -42,7 +42,7 @@ The following table lists the templates available to download:
 
 |Asciidoc
 |ad
-|link:../resources/templates/asciidoc-templates-idea.xml[Download]
+|link:../resources/templates/isis-asciidoc-templates-idea.xml[Download]
 |(none )
 
 |===
@@ -56,13 +56,13 @@ The most commonly used Apache Isis domain objects templates are also listed on t
 
 === IntelliJ
 
-To install in IntelliJ (Community edition 14), copy to the relevant `config/templates` directory, eg:
+To install in IntelliJ (Community edition 15), copy to the relevant `config/templates` directory, eg:
 
 * Windows `<User home>\.IdeaIC14\config\templates`
 * Linux `~/.IdeaIC14/config/templates`
 * Mac OS `~/Library/Preferences/IdeaIC14/templates`
 
-If using the Ultimate edition, the directory is `.IntelliJIdea14` rather than `IdeaIC14`.
+If using the Ultimate edition, the directory is `.IntelliJIdea15` rather than `IdeaIC15`.
 
 
 === Eclipse

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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 f25d39d..11f2daa 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations.adoc
@@ -57,8 +57,8 @@ 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-XmlJavaTypeAdapter.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/4b891285/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 ade88cf..d74b07f 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
@@ -59,9 +59,9 @@ The table below lists the JEE annotations currently recognized.  Expect to see m
 |Application
 |
 
-|xref:rg.adoc#_rg_annotations_manpage-XmlValueTypeAdapter[`javax.xml.bind` +
+|xref:rg.adoc#_rg_annotations_manpage-XmlJavaTypeAdapter[`javax.xml.bind` +
 `.annotation` +
-`XmlValueTypeAdapter`]
+`XmlJavaTypeAdapter`]
 |JAXB annotation defining how to serialize an entity.  Used in conjunction with the (framework provided) `PersistentEntityAdapter` 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/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
index 9c68b4e..2e31de6 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
@@ -40,7 +40,9 @@ The table below summarizes the annotation's attributes.
 |xref:rg.adoc#_rg_annotations_manpage-Action_domainEvent[`domainEvent()`]
 |subtype of `ActionDomainEvent` +
 (`ActionDomainEvent.Default`)
-|the event type to be posted to the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] to broadcast the action's business rule checking (hide, disable, validate) and its invocation (pre-execute and post-execution).
+|the event type to be posted to the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] to
+broadcast the action's business rule checking (hide, disable, validate) and its invocation (pre-execute and
+post-execute).
 
 
 |xref:rg.adoc#_rg_annotations_manpage-Action_hidden[`hidden()`]

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action_domainEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action_domainEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action_domainEvent.adoc
index 8bce8b1..1f7f5a7 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action_domainEvent.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action_domainEvent.adoc
@@ -26,7 +26,11 @@ public class ToDoItem {
 }
 ----
 
-The purpose of the `domainEvent()` attribute is to allows a custom subclass to be emitted instead.  This attribute is also supported for xref:rg.adoc#_rg_annotations_manpage-Collection_domainEvent[collections] and xref:rg.adoc#_rg_annotations_manpage-Property_domainEvent[properties].
+
+The `domainEvent()` attribute allows a custom subclass to be emitted allowing more precise subscriptions (to those
+subclasses) to be defined instead.  This attribute is also supported for
+xref:rg.adoc#_rg_annotations_manpage-Collection_domainEvent[collections] and
+xref:rg.adoc#_rg_annotations_manpage-Property_domainEvent[properties].
 
 For example:
 
@@ -54,9 +58,6 @@ rather than through the constructor.  This substantially reduces the boilerplate
 
 
 
-
-
-
 == Subscribers
 
 Subscribers (which must be domain services) subscribe using either the link:https://github.com/google/guava[Guava] API or (if the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] has been appropriately configured) using the link:http://www.axonframework.org/[Axon Framework] API.  The examples below use the Guava API.
@@ -65,11 +66,10 @@ Subscribers can be either coarse-grained (if they subscribe to the top-level eve
 
 [source,java]
 ----
-@DomainService
-public class SomeSubscriber {
-    @Programmatic
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
     @com.google.common.eventbus.Subscribe
-    public void on(ActionInteractionEvent ev) {
+    public void on(ActionDomainEvent ev) {
         ...
     }
 }
@@ -79,9 +79,8 @@ or can be fine-grained (by subscribing to specific event subtypes):
 
 [source,java]
 ----
-@DomainService
-public class SomeSubscriber {
-    @Programmatic
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
     @com.google.common.eventbus.Subscribe
     public void on(ToDoItem.CompletedEvent ev) {
         ...
@@ -134,6 +133,26 @@ It is also possible to abort the transaction during the executing or executed ph
 
 
 
+== Default, Doop and Noop events (`1.11.0-SNAPSHOT`)
+
+If the `domainEvent` attribute is not explicitly specified (is left as its default value, `ActionDomainEvent.Default`),
+then the framework will, by default, post an event.
+
+If this is not required, then the `isis.reflector.facet.actionAnnotation.domainEvent.postForDefault`
+configuration property can be set to "false"; this will disable posting.
+
+On the other hand, if the `domainEvent` has been explicitly specified to some subclass, then an event will be posted.
+The framework provides `ActionDomainEvent.Doop` as such a subclass, so setting the `domainEvent` attribute to this class
+will ensure that the event to be posted, irrespective of the configuration property setting.
+
+And, conversely, the framework also provides `ActionDomainEvent.Noop`; if `domainEvent` attribute is set to this class,
+then no event will be posted.
+
+
+
+
+
+
 == Raising events programmatically
 
 Normally events are only raised for interactions through the UI. However, events can be raised programmatically either by calling the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] API directly, or by emulating the UI by

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Collection_domainEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Collection_domainEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Collection_domainEvent.adoc
index 3950861..7846ccd 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Collection_domainEvent.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Collection_domainEvent.adoc
@@ -34,7 +34,10 @@ public class ToDoItem {
 }
 ----
 
-The purpose of the `domainEvent()` attribute is to allows a custom subclass to be emitted instead.  This attribute is also supported for xref:rg.adoc#_rg_annotations_manpage-Action_domainEvent[actions] and xref:rg.adoc#_rg_annotations_manpage-Property_domainEvent[properties].
+The `domainEvent()` attribute allows a custom subclass to be emitted allowing more precise subscriptions (to those
+subclasses) to be defined instead.  This attribute is also supported for
+xref:rg.adoc#_rg_annotations_manpage-Action_domainEvent[actions] and
+xref:rg.adoc#_rg_annotations_manpage-Property_domainEvent[properties].
 
 
 For example:
@@ -76,11 +79,10 @@ Subscribers can be either coarse-grained (if they subscribe to the top-level eve
 
 [source,java]
 ----
-@DomainService
-public class SomeSubscriber {
-    @Programmatic
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
     @com.google.common.eventbus.Subscribe
-    public void on(CollectionInteractionEvent ev) {
+    public void on(CollectionDomainEvent ev) {
         ...
     }
 }
@@ -90,9 +92,8 @@ or can be fine-grained (by subscribing to specific event subtypes):
 
 [source,java]
 ----
-@DomainService
-public class SomeSubscriber {
-    @Programmatic
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
     @com.google.common.eventbus.Subscribe
     public void on(ToDoItem.DependenciesChangedEvent ev) {
         ...
@@ -144,6 +145,25 @@ It is also possible to abort the transaction during the executing or executed ph
 
 
 
+== Default, Doop and Noop events (`1.11.0-SNAPSHOT`)
+
+If the `domainEvent` attribute is not explicitly specified (is left as its default value, `CollectionDomainEvent.Default`),
+then the framework will, by default, post an event.
+
+If this is not required, then the `isis.reflector.facet.collectionAnnotation.domainEvent.postForDefault`
+configuration collection can be set to "false"; this will disable posting.
+
+On the other hand, if the `domainEvent` has been explicitly specified to some subclass, then an event will be posted.
+The framework provides `CollectionDomainEvent.Doop` as such a subclass, so setting the `domainEvent` attribute to this class
+will ensure that the event to be posted, irrespective of the configuration collection setting.
+
+And, conversely, the framework also provides `CollectionDomainEvent.Noop`; if `domainEvent` attribute is set to this class,
+then no event will be posted.
+
+
+
+
+
 == Raising events programmatically
 
 Normally events are only raised for interactions through the UI. However, events can be raised programmatically either by calling the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] API directly, or by emulating the UI by

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout.adoc
index e9cd15d..e9a8985 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout.adoc
@@ -48,11 +48,19 @@ The table below summarizes the annotation's attributes.
 |Currently unused.
 
 
+|xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent[`cssClassUiEvent()`]
+|subtype of `CssClassUiEvent` +
+(`CssClassUiEvent.Default`)
+|the event type to be posted (`1.11.0-SNAPSHOT`) to the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] to obtain a CSS class for the domain object.
+
 |xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_describedAs[`describedAs()`]
 |String.
 |description of this class, eg to be rendered in a tooltip.
 
-
+|xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_iconUiEvent[`iconUiEvent()`]
+|subtype of `IconUiEvent` +
+(`IconUiEvent.Default`)
+|the event type to be posted (`1.11.0-SNAPSHOT`) to the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] to obtain the icon (name) for the domain object.
 
 |xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_named[`named()`]
 |String.
@@ -70,6 +78,12 @@ A typical use case is if the desired name is a reserved Java keyword, such as `d
 |String.
 |the plural name of the class
 
+
+|xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_titleUiEvent[`titleUiEvent()`]
+|subtype of `TitleUiEvent` +
+(`TitleUiEvent.Default`)
+|the event type to be posted (`1.11.0-SNAPSHOT`) to the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] to obtain the title for the domain object.
+
 |===
 
 
@@ -107,9 +121,12 @@ Note that there is (currently) no support for specifying UI hints for domain obj
 include::_rg_annotations_manpage-DomainObjectLayout_bookmarking.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-DomainObjectLayout_cssClass.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-DomainObjectLayout_cssClassFa.adoc[leveloffset=+1]
+include::_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-DomainObjectLayout_describedAs.adoc[leveloffset=+1]
+include::_rg_annotations_manpage-DomainObjectLayout_iconUiEvent.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-DomainObjectLayout_named.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-DomainObjectLayout_paged.adoc[leveloffset=+1]
 include::_rg_annotations_manpage-DomainObjectLayout_plural.adoc[leveloffset=+1]
+include::_rg_annotations_manpage-DomainObjectLayout_titleUiEvent.adoc[leveloffset=+1]
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent.adoc
new file mode 100644
index 0000000..c79e7a3
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent.adoc
@@ -0,0 +1,125 @@
+[[_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent]]
+= cssClassUiEvent() (`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/
+
+
+Whenever a domain object is to be rendered, the framework fires off an CSS class UI event to obtain a CSS class to use
+in any wrapping ``<div>``s and ``<span>``s that render the domain object.  This is as an alternative to implementing
+xref:rg.adoc#_rg_methods_reserved_manpage-cssClass[`cssClass()`] reserved method.  (If `cssClass()` is present, then
+it will take precedence).
+
+Subscribers subscribe through the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] using either link:https://github.com/google/guava[Guava] or link:http://www.axonframework.org/[Axon Framework] annotations and can
+optionally specify a title.
+
+[NOTE]
+====
+The feature was originally introduced so that xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]-annotated
+xref:ug.adoc#_ug_more-advanced_view-models[view model]s could be kept as minimal as possible, just defining the data.
+UI events allow subscribers to provide UI hints, while xref:ug.adoc#_ug_more-advanced_decoupling_mixins[mixin]s can be used to provide the behaviour.
+====
+
+By default the event raised is `CssClassUiEvent.Default`. For example:
+
+[source,java]
+----
+@DomainObjectLayout
+public class ToDoItemDto {
+    ...
+}
+----
+
+The purpose of the `cssClassUiEvent()` attribute is to allows a custom subclass to be emitted instead.  A similar
+attribute is available for titles and icons.
+
+For example:
+
+[source,java]
+----
+@DomainObjectLayout(
+    iconUiEvent=ToDoItemDto.CssClassUiEvent.class
+)
+public class ToDoItemDto {
+    public static class CssClassUiEvent
+        extends org.apache.isis.applib.services.eventbus.CssClassUiEvent<ToDoItemDto> { }
+    ...
+}
+----
+
+The benefit is that subscribers can be more targeted as to the events that they subscribe to.
+
+
+
+
+== Subscribers
+
+Subscribers (which must be domain services) subscribe using either the link:https://github.com/google/guava[Guava] API
+or (if the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] has been appropriately configured)
+using the link:http://www.axonframework.org/[Axon Framework] API.  The examples below use the Guava API.
+
+Subscribers can be either coarse-grained (if they subscribe to the top-level event type):
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
+    @com.google.common.eventbus.Subscribe
+    public void on(CssClassUiEvent ev) {
+        if(ev.getSource() instanceof ToDoItemDto) { ... }
+    }
+}
+----
+
+or can be fine-grained (by subscribing to specific event subtypes):
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
+    @com.google.common.eventbus.Subscribe
+    public void on(ToDoItemDto.CssClassUiEvent ev) {
+        ...
+    }
+}
+----
+
+The subscriber should then use `CssClassUiEvent#setCssClass(...)` to actually specify the CSS class to be used.
+
+[TIP]
+====
+If the AxonFramework is being used, replace `@com.google.common.eventbus.Subscribe` with `@org.axonframework.eventhandling.annotation.EventHandler`.
+====
+
+
+
+
+
+== Default, Doop and Noop events
+
+If the `cssClassUiEvent` attribute is not explicitly specified (is left as its default value, `CssClassUiEvent.Default`),
+then the framework will, by default, post an event.
+
+If this is not required, then the `isis.reflector.facet.domainObjectLayoutAnnotation.cssClassUiEvent.postForDefault`
+configuration property can be set to "false"; this will disable posting.
+
+On the other hand, if the `cssClassUiEvent` has been explicitly specified to some subclass, then an event will be posted.
+The framework provides `CssClassUiEvent.Doop` as such a subclass, so setting the `cssClassUiEvent` attribute to this class
+will ensure that the event to be posted, irrespective of the configuration property setting.
+
+And, conversely, the framework also provides `CssClassUiEvent.Noop`; if `cssClassUiEvent` attribute is set to this class,
+thn no event will be posted.
+
+
+
+
+
+
+== Raising events programmatically
+
+Normally events are only raised for interactions through the UI. However, events can be raised programmatically either
+by calling the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] API directly, or as a result
+of calling the xref:rg.adoc#_rg_services-api_manpage-DomainObjectContainer[`DomainObjectContainer`]'s
+`cssClassOf(...)` method.
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_iconUiEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_iconUiEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_iconUiEvent.adoc
new file mode 100644
index 0000000..600d3da
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_iconUiEvent.adoc
@@ -0,0 +1,120 @@
+[[_rg_annotations_manpage-DomainObjectLayout_iconUiEvent]]
+= iconUiEvent() (`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/
+
+
+Whenever a domain object is to be rendered, the framework fires off an icon UI event to obtain an icon (name) for the
+object (if possible). This is as an alternative to implementing
+xref:rg.adoc#_rg_methods_reserved_manpage-iconName[`iconName()`] reserved method.  (If `iconName()` is present, then
+it will take precedence).
+
+Subscribers subscribe through the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] using either link:https://github.com/google/guava[Guava] or link:http://www.axonframework.org/[Axon Framework] annotations and can
+optionally specify a title.
+
+[NOTE]
+====
+The feature was originally introduced so that xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]-annotated
+xref:ug.adoc#_ug_more-advanced_view-models[view model]s could be kept as minimal as possible, just defining the data.
+UI events allow subscribers to provide UI hints, while xref:ug.adoc#_ug_more-advanced_decoupling_mixins[mixin]s can be used to provide the behaviour.
+====
+
+By default the event raised is `IconUiEvent.Default`. For example:
+
+[source,java]
+----
+@DomainObjectLayout
+public class ToDoItemDto {
+    ...
+}
+----
+
+The purpose of the `iconUiEvent()` attribute is to allows a custom subclass to be emitted instead.  A similar
+attribute is available for titles and CSS classes.
+
+For example:
+
+[source,java]
+----
+@DomainObjectLayout(
+    iconUiEvent=ToDoItemDto.IconUiEvent.class
+)
+public class ToDoItemDto {
+    public static class IconUiEvent
+        extends org.apache.isis.applib.services.eventbus.IconUiEvent<ToDoItemDto> { }
+    ...
+}
+----
+
+The benefit is that subscribers can be more targeted as to the events that they subscribe to.
+
+
+
+
+== Subscribers
+
+Subscribers (which must be domain services) subscribe using either the link:https://github.com/google/guava[Guava] API
+or (if the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] has been appropriately configured)
+using the link:http://www.axonframework.org/[Axon Framework] API.  The examples below use the Guava API.
+
+Subscribers can be either coarse-grained (if they subscribe to the top-level event type):
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
+    @com.google.common.eventbus.Subscribe
+    public void on(IconUiEvent ev) {
+        if(ev.getSource() instanceof ToDoItemDto) { ... }
+    }
+}
+----
+
+or can be fine-grained (by subscribing to specific event subtypes):
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
+    @com.google.common.eventbus.Subscribe
+    public void on(ToDoItemDto.IconUiEvent ev) {
+        ...
+    }
+}
+----
+
+The subscriber should then use `IconUiEvent#setIconName(...)` to actually specify the icon name to be used.
+
+[TIP]
+====
+If the AxonFramework is being used, replace `@com.google.common.eventbus.Subscribe` with `@org.axonframework.eventhandling.annotation.EventHandler`.
+====
+
+
+
+== Default, Doop and Noop events
+
+If the `iconUiEvent` attribute is not explicitly specified (is left as its default value, `IconUiEvent.Default`),
+then the framework will, by default, post an event.
+
+If this is not required, then the `isis.reflector.facet.domainObjectLayoutAnnotation.iconUiEvent.postForDefault`
+configuration property can be set to "false"; this will disable posting.
+
+On the other hand, if the `iconUiEvent` has been explicitly specified to some subclass, then an event will be posted.
+The framework provides `IconUiEvent.Doop` as such a subclass, so setting the `iconUiEvent` attribute to this class
+will ensure that the event to be posted, irrespective of the configuration property setting.
+
+And, conversely, the framework also provides `IconUiEvent.Noop`; if `iconUiEvent` attribute is set to this class,
+then no event will be posted.
+
+
+
+== Raising events programmatically
+
+Normally events are only raised for interactions through the UI. However, events can be raised programmatically either
+by calling the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] API directly, or as a result
+of calling the xref:rg.adoc#_rg_services-api_manpage-DomainObjectContainer[`DomainObjectContainer`]'s
+`iconNameOf(...)` method.
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_titleUiEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_titleUiEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_titleUiEvent.adoc
new file mode 100644
index 0000000..6404f3e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-DomainObjectLayout_titleUiEvent.adoc
@@ -0,0 +1,119 @@
+[[_rg_annotations_manpage-DomainObjectLayout_titleUiEvent]]
+= titleUiEvent() (`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/
+
+
+Whenever a domain object is to be rendered, the framework fires off a title UI event to obtain a title for the object.
+This is as an alternative to implementing xref:rg.adoc#_rg_methods_reserved_manpage-title[`title()`] reserved method, or
+using the xref:rg.adoc#_rg_annotations_manpage-Title[`@Title`] annotation, within the class itself.  (If either
+`title()` or `@Title` are present, then they will take precedence).
+
+Subscribers subscribe through the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] using either link:https://github.com/google/guava[Guava] or link:http://www.axonframework.org/[Axon Framework] annotations and can
+optionally specify a title.
+
+[NOTE]
+====
+The feature was originally introduced so that xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]-annotated
+xref:ug.adoc#_ug_more-advanced_view-models[view model]s could be kept as minimal as possible, just defining the data.
+UI events allow subscribers to provide UI hints, while xref:ug.adoc#_ug_more-advanced_decoupling_mixins[mixin]s can be used to provide the behaviour.
+====
+
+By default the event raised is `TitleUiEvent.Default`. For example:
+
+[source,java]
+----
+@DomainObjectLayout
+public class ToDoItemDto {
+    ...
+}
+----
+
+The purpose of the `titleUiEvent()` attribute is to allows a custom subclass to be emitted instead.  A similar
+attribute is available for icon names and CSS classes.
+
+For example:
+
+[source,java]
+----
+@DomainObjectLayout(
+    titleUiEvent=ToDoItemDto.TitleUiEvent.class
+)
+public class ToDoItemDto {
+    public static class TitleUiEvent
+        extends org.apache.isis.applib.services.eventbus.TitleUiEvent<ToDoItemDto> { }
+    ...
+}
+----
+
+The benefit is that subscribers can be more targeted as to the events that they subscribe to.
+
+
+
+
+== Subscribers
+
+Subscribers (which must be domain services) subscribe using either the link:https://github.com/google/guava[Guava] API
+or (if the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] has been appropriately configured)
+using the link:http://www.axonframework.org/[Axon Framework] API.  The examples below use the Guava API.
+
+Subscribers can be either coarse-grained (if they subscribe to the top-level event type):
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
+    @com.google.common.eventbus.Subscribe
+    public void on(TitleUiEvent ev) {
+        if(ev.getSource() instanceof ToDoItemDto) { ... }
+    }
+}
+----
+
+or can be fine-grained (by subscribing to specific event subtypes):
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
+    @com.google.common.eventbus.Subscribe
+    public void on(ToDoItemDto.TitleUiEvent ev) {
+        ...
+    }
+}
+----
+
+The subscriber should then use either `TitleUiEvent#setTranslatableTitle(...)` or `TitleUiEvent#setTitle(...)` to
+actually specify the title to be used.
+
+
+[TIP]
+====
+If the AxonFramework is being used, replace `@com.google.common.eventbus.Subscribe` with `@org.axonframework.eventhandling.annotation.EventHandler`.
+====
+
+
+
+== Default, Doop and Noop events
+
+If the `titleUiEvent` attribute is not explicitly specified (is left as its default value, `TitleUiEvent.Default`),
+then the framework will, by default, post an event.
+
+If this is not required, then the `isis.reflector.facet.domainObjectLayoutAnnotation.titleUiEvent.postForDefault`
+configuration property can be set to "false"; this will disable posting.
+
+On the other hand, if the `titleUiEvent` has been explicitly specified to some subclass, then an event will be posted.
+The framework provides `TitleUiEvent.Doop` as such a subclass, so setting the `titleUiEvent` attribute to this class
+will ensure that the event to be posted, irrespective of the configuration property setting.
+
+And, conversely, the framework also provides `TitleUiEvent.Noop`; if `titleUiEvent` attribute is set to this class,
+thn no event will be posted.
+
+
+== Raising events programmatically
+
+Normally events are only raised for interactions through the UI. However, events can be raised programmatically either
+by calling the xref:rg.adoc#_rg_services-api_manpage-EventBusService[`EventBusService`] API directly, or as a result
+of calling the xref:rg.adoc#_rg_services-api_manpage-DomainObjectContainer[`DomainObjectContainer`]'s
+`titleOf(...)` method.

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Property_domainEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Property_domainEvent.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Property_domainEvent.adoc
index 080b235..9787f56 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Property_domainEvent.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Property_domainEvent.adoc
@@ -26,7 +26,10 @@ public class ToDoItem {
 }
 ----
 
-The purpose of the `domainEvent()` attribute is to allows a custom subclass to be emitted instead. This attribute is also supported for xref:rg.adoc#_rg_annotations_manpage-Action_domainEvent[actions] and xref:rg.adoc#_rg_annotations_manpage-Property_domainEvent[properties].
+The `domainEvent()` attribute allows a custom subclass to be emitted allowing more precise subscriptions (to those
+subclasses) to be defined instead.  This attribute is also supported for
+ xref:rg.adoc#_rg_annotations_manpage-Action_domainEvent[actions] and
+ xref:rg.adoc#_rg_annotations_manpage-Property_domainEvent[properties].
 
 
 For example:
@@ -59,16 +62,12 @@ Subscribers can be either coarse-grained (if they subscribe to the top-level eve
 
 [source,java]
 ----
-@DomainService
-public class SomeSubscriber {
-
-    @Programmatic
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
     @com.google.common.eventbus.Subscribe
-    public void on(PropertyInteractionEvent ev) {
-
+    public void on(PropertyDomainEvent ev) {
         ...
     }
-
 }
 ----
 
@@ -76,16 +75,12 @@ or can be fine-grained (by subscribing to specific event subtypes):
 
 [source,java]
 ----
-@DomainService
-public class SomeSubscriber {
-
-    @Programmatic
+@DomainService(nature=NatureOfService.DOMAIN)
+public class SomeSubscriber extends AbstractSubscriber {
     @com.google.common.eventbus.Subscribe
     public void on(ToDoItem.DueByChangedEvent ev) {
-
         ...
     }
-
 }
 ----
 
@@ -133,6 +128,25 @@ It is also possible to abort the transaction during the executing or executed ph
 
 
 
+== Default, Doop and Noop events (`1.11.0-SNAPSHOT`)
+
+If the `domainEvent` attribute is not explicitly specified (is left as its default value, `PropertyDomainEvent.Default`),
+then the framework will, by default, post an event.
+
+If this is not required, then the `isis.reflector.facet.propertyAnnotation.domainEvent.postForDefault`
+configuration property can be set to "false"; this will disable posting.
+
+On the other hand, if the `domainEvent` has been explicitly specified to some subclass, then an event will be posted.
+The framework provides `PropertyDomainEvent.Doop` as such a subclass, so setting the `domainEvent` attribute to this class
+will ensure that the event to be posted, irrespective of the configuration property setting.
+
+And, conversely, the framework also provides `PropertyDomainEvent.Noop`; if `domainEvent` attribute is set to this class,
+then no event will be posted.
+
+
+
+
+
 == Raising events programmatically
 
 Normally events are only raised for interactions through the UI. However, events can be raised programmatically by

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc
new file mode 100644
index 0000000..91c2ee9
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc
@@ -0,0 +1,27 @@
+[[_rg_annotations_manpage-XmlJavaTypeAdapter]]
+= `@XmlJavaTypeAdapter` (`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 JAXB `@XmlJavaTypeAdapter` annotation (`1.11.0-SNAPSHOT`) is used with the framework-provided
+`PersistentEntityAdapter` to instruct JAXB to serialize references to persistent entities into a canonical `<oid-dto>`
+element: basically a formal XML equivalent to the `Bookmark` provided by the
+xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
+
+For example:
+
+[source,java]
+----
+@XmlJavaTypeAdapter(PersistentEntityAdapter.class)
+public class ToDoItem ...  {
+    ...
+}
+----
+
+This annotation therefore allows view models/DTOs to have references to persistent entities; a common idiom.
+
+For a more complete discussion of writing JAXB view models/DTOs, see xref:ug.adoc#_ug_more-advanced_view-models[this topic]
+in the user guide.
+

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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
index 3fad258..604c034 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
@@ -5,9 +5,9 @@
 :_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.
+The `@XmlRootElement` annotation (`1.11.0-SNAPSHOT`) provides an alternative way to define a
+xref:rg.adoc#_ug_more-advanced_view-models[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
@@ -24,14 +24,14 @@ xref:rg.adoc#_rg_services-spi_manpage-ContentMappingService[`ContentMappingServi
 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. +
+* 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
+with the xref:rg.adoc#_rg_annotations_manpage-XmlJavaTypeAdapter[`@XmlJavaTypeAdapter`], 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].
 
@@ -51,22 +51,32 @@ This example is taken from the (non-ASF) http://github.com/isisaddons/isis-app-t
 
 [source,java]
 ----
-@XmlRootElement(name = "toDoItemDto")                               // <1>
+@XmlRootElement(name = "toDoItemDto")           // <1>
 public class ToDoItemDto implements Dto {
-
+    @Getter @Setter                             // <2>
     protected String description;
-
+    @Getter @Setter
     protected String category;
-
+    @Getter @Setter
     protected String subcategory;
-
+    @Getter @Setter
     protected BigDecimal cost;
-
-    // getters and setters omitted
 }
 ----
 <1> identifies this class as a view model and defines the root element for JAXB serialization
+<2> using Project Lombok for getters and setters
 
 
+
+== See also
+
+Although (like any other viewmodel) a JAXB-annotated can have behaviour (actions) and UI hints, you may wish to keep
+the DTO "clean", just focused on specifying the data contract.
+
+Behaviour can therefore be provided using xref:ug.adoc#_ug_more-advanced_decoupling_mixins[mixins] (annotated with
+xref:rg.adoc#_rg_annotations_manpage-Mixin[`@Mixin`]), while xref:rg.adoc#_rg_classes_uievent[UI events] can be used
+to obtain title, icons and so on.
+
 For a more complete discussion of writing JAXB view models/DTOs, see xref:ug.adoc#_ug_more-advanced_view-models[this topic]
 in the user guide.
+

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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
deleted file mode 100644
index 36609e7..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlValueTypeAdapter.adoc
+++ /dev/null
@@ -1,25 +0,0 @@
-[[_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 JAXB `@XmlValueTypeAdapter` annotation (`1.11.0-SNAPSHOT`) influences the serialization of objects into XML.
-While not recognized directly by the framework, the framework _does_ provide the `PersistentEntityAdapter` class,
-which causes JAXB to serialize references to persistent entities into a canonical `<oid-dto>` element: equivalent to the `Bookmark` provided by the xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
-
-For example:
-
-[source,java]
-----
-@XmlJavaTypeAdapter(PersistentEntityAdapter.class)
-public class ToDoItem ...  {
-    ...
-}
-----
-
-This annotation therefore allows view models/DTOs to have references to persistent entities; a common idiom.  For a
-more complete discussion of writing JAXB view models/DTOs, see xref:ug.adoc#_ug_more-advanced_view-models[this topic]
-in the user guide.
-

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_classes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes.adoc
index 7155f67..475004e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_classes.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes.adoc
@@ -11,6 +11,7 @@ This chapter describes the usage of various classes and interfaces that are not
 include::_rg_classes_AppManifest-bootstrapping.adoc[leveloffset=+1]
 include::_rg_classes_super.adoc[leveloffset=+1]
 include::_rg_classes_domainevent.adoc[leveloffset=+1]
+include::_rg_classes_uievent.adoc[leveloffset=+1]
 include::_rg_classes_lifecycleevent.adoc[leveloffset=+1]
 include::_rg_classes_value-types.adoc[leveloffset=+1]
 include::_rg_classes_utility.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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
index b2fb865..b7d5f22 100644
--- 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
@@ -7,14 +7,14 @@
 
 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`.
+XSD schema of those objects using two xref:ug.adoc#_ug_more-advanced_decoupling_mixins[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 {
-}
+public interface Dto { }
 ----
 
 The `Dto_downloadXml` mixin defines the following action:
@@ -24,11 +24,12 @@ The `Dto_downloadXml` mixin defines the following action:
 @Mixin
 public class Dto_downloadXml {
     public Dto_downloadXml(final Dto dto) { ... }     // <1>
-    public Object $$(final String fileName) { ... }
+    public Object downloadXml(final String fileName) { ... }   // <2>
     ...
 }
 ----
 <1> provided as an action to any class that (trivially) implements the `Dto` interface
+<2> actually this is '$$' in the code, a "special case" that means to use the derive the action name from the class name.
 
 This will return the XML text wrapped up in a xref:rg.adoc#_rg_classes_value-types_manpage-Clob[`Clob`].
 
@@ -38,17 +39,19 @@ The `Dto_downloadXsd` mixin is similar:
 ----
 @Mixin
 public class Dto_downloadXsd {
-    public Dto_downloadXsd(final Dto dto) { ... }                                       // <1>
-    public Object $$(final String fileName, final IsisSchemes isisSchemas) { ... }     // <2>
+    public Dto_downloadXsd(final Dto dto) { ... }                                             // <1>
+    public Object downloadXsd(final String fileName, final IsisSchemes isisSchemas) { ... }   // <2>
 }
 ----
 <1> provided as an action to any class that (trivially) implements the `Dto` interface
+<2> actually this is '$$' in the code, a "special case" that means to use the derive the action name from the class 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`].  The `IsisSchemas` parameter to the action can be used to
-optionally ignore the common Apache Isis schemas (useful if there is only one other XSD schema referenced by the DTO).
+optionally ignore the common xref:rg.adoc#_rg_schema[Apache Isis schemas] (useful if there is only one other XSD schema
+referenced by the DTO).
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_configuring-core.adoc
index 6faf78e..28d83ee 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_configuring-core.adoc
@@ -35,6 +35,18 @@ Configuration properties for the JDO/DataNucleus objectstore can be found in the
 Only intended for "emergency use" as a workaround while pending fix/patch to Apache Isis itself.  (Note that there is no "datanucleus" in the property).
 
 |`isis.reflector.facet.` +
+`actionAnnotation.` +
+`domainEvent.postForDefault`
+|`true`,`false` (`true`)
+|Whether an event should be posted if xref:rg.adoc#_rg_annotations_manpage-Action_domainEvent[`@Action#domainEvent()`] is not specified (is set to `ActionDomainEvent.Default`).
+
+|`isis.reflector.facet.` +
+`collectionAnnotation.` +
+`domainEvent.postForDefault`
+|`true`,`false` (`true`)
+|Whether an event should be posted if xref:rg.adoc#_rg_annotations_manpage-Collection_domainEvent[`@Collection#domainEvent()`] is not specified (is set to `CollectionDomainEvent.Default`).
+
+|`isis.reflector.facet.` +
 `cssClass.patterns`
 |regex:css1,regex2:css2,...
 |Comma separated list of key:value pairs, where the key is a regex matching action names (eg `delete.*`) and the value is a link:http://getbootstrap.com/css/[Bootstrap] CSS button class (eg `btn-warning) to be applied (as per `@CssClass()`) to all action members matching the regex. +
@@ -49,12 +61,36 @@ See xref:ug.adoc#_ug_how-tos_ui-hints_action-icons-and-css[UI hints] for more de
 See xref:ug.adoc#_ug_how-tos_ui-hints_action-icons-and-css[UI hints] for more details.
 
 |`isis.reflector.facet.` +
+`domainObjectLayoutAnnotation.` +
+`cssClassUiEvent.postForDefault`
+|`true`,`false` (`true`)
+|Whether an event should be posted if xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_cssClassUiEvent[`@DomainObjectLayout#cssClassUiEvent()`] is not specified (is set to `CssClassUiEvent.Default`).
+
+|`isis.reflector.facet.` +
+`domainObjectLayoutAnnotation.` +
+`iconUiEvent.postForDefault`
+|`true`,`false` (`true`)
+|Whether an event should be posted if xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_iconUiEvent[`@DomainObjectLayout#iconUiEvent()`] is not specified (is set to `IconUiEvent.Default`).
+
+|`isis.reflector.facet.` +
+`domainObjectLayoutAnnotation.` +
+`titleUiEvent.postForDefault`
+|`true`,`false` (`true`)
+|Whether an event should be posted if xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_titleUiEvent[`@DomainObjectLayout#titleUiEvent()`] is not specified (is set to `TitleUiEvent.Default`).
+
+|`isis.reflector.facet.` +
 `filterVisibility`
 | `true`,`false` (`true`)
 |Whether objects should be filtered for visibility. +
 
 See xref:rg.adoc#_rg_runtime_configuring-core_filterVisibility[section below] for further discussion.
 
+|`isis.reflector.facet.` +
+`propertyAnnotation.` +
+`domainEvent.postForDefault`
+|`true`,`false` (`true`)
+|Whether an event should be posted if xref:rg.adoc#_rg_annotations_manpage-Property_domainEvent[`@Property#domainEvent()`] is not specified (is set to `PropertyDomainEvent.Default`).
+
 |`isis.reflector.facets`
 |`FQCN`
 |Fully qualified class names of a custom implementation of `ProgrammingModel` interface. +
@@ -96,15 +132,6 @@ See xref:ug.adoc#_ug_extending_programming-model_custom-validator[Custom Validat
 | Whether deprecated annotations or naming conventions are tolerated or not.  If not, then a metamodel validation error will be triggered, meaning the app won't boot (fail-fast).
 
 
-|`isis.services.` +
-`ServicesInstallerFromAnnotation.` +
-`packagePrefix`
-|fully qualified package names (CSV)
-|to search for domain services (including all subpackages).
-
-This property is IGNORED if the xref:rg.adoc#_rg_runtime_configuring-components[`isis.appManifest`] configuration property is specified, or if an xref:rg.adoc#_rg_classes_super_manpage-AppManifest[`AppManifest`] is provided programmatically.
-
-
 |`isis.services`
 |`FQCN`,`FQCN2`,...
 |Fully qualified class names of classes to be instantiated as domain services.  +
@@ -227,6 +254,16 @@ This implementation provides a default set of recognizers to convert RDBMS const
 | `all`, `ignoreSafe`, `none` (`all`)
 |Whether actions should be automatically published (for actions annotated with xref:rg.adoc#_rg_annotations_manpage-Action_publishing[`@Action(publishing=Publishing.AS_CONFIGURED)`]. +
 
+
+|`isis.services.` +
+`ServicesInstallerFromAnnotation.` +
+`packagePrefix`
+|fully qualified package names (CSV)
+|to search for domain services (including all subpackages).
+
+This property is IGNORED if the xref:rg.adoc#_rg_runtime_configuring-components[`isis.appManifest`] configuration property is specified, or if an xref:rg.adoc#_rg_classes_super_manpage-AppManifest[`AppManifest`] is provided programmatically.
+
+
 |`isis.services.` +
 `translation.po.mode`
 | `read`,`write`

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_specifying-components.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_specifying-components.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_specifying-components.adoc
index 13cb02d..e8f5531 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_specifying-components.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_runtime_specifying-components.adoc
@@ -60,11 +60,11 @@ This property is IGNORED if the `isis.appManifest` configuration property is spe
 This property is IGNORED if the `isis.appManifest` configuration property is specified, or if an xref:rg.adoc#_rg_classes_super_manpage-AppManifest[`AppManifest`] is provided programmatically.
 
 |`isis.persistor`
-|`datanucleus`, `inmemory`, `FQCN` +
+|`datanucleus`
 (`_datanucleus_`)
 |`o.a.i.core.runtime.installerregistry.installerapi.` `PersistenceMechanismInstaller`
 
-This property is IGNORED completely in 1.9.0.
+This property is IGNORED completely in 1.9.0+; the `datanucleus` implementation is always used.
 
 
 |`isis.services-installer`

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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
index 4e6d6cd..086c397 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
@@ -5,4 +5,13 @@
 :_imagesdir: images/
 
 
-NOTE: TODO
\ No newline at end of file
+NOTE: TODO
+
+
+
+
+
+However, the identity of the underlying entity can be well defined; Apache Isis defines the
+xref:rg.adoc#_rg_schema-common[Common schema] which defines the `<oid-dto>` element (and corresponding `OidDto` class):
+the object's type and its identifier.  This is basically a formal XML equivalent to the `Bookmark` object obtained
+from the xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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 f496223..fb063b6 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api.adoc
@@ -294,6 +294,7 @@ include::_rg_services-api_manpage-EventBusService.adoc[leveloffset=+1]
 include::_rg_services-api_manpage-FixtureScriptsDefault.adoc[leveloffset=+1]
 include::_rg_services-api_manpage-GuiceBeanProvider.adoc[leveloffset=+1]
 include::_rg_services-api_manpage-IsisJdoSupport.adoc[leveloffset=+1]
+include::_rg_services-api_manpage-JaxbService.adoc[leveloffset=+1]
 include::_rg_services-api_manpage-MementoService.adoc[leveloffset=+1]
 include::_rg_services-api_manpage-MetamodelService.adoc[leveloffset=+1]
 include::_rg_services-api_manpage-QueryResultsCache.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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
index 61f0d3a..6c3647f 100644
--- 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
@@ -38,7 +38,7 @@ public interface JaxbService {
 
 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
+xref:rg.adoc#_rg_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`.

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/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
index c7ef7ee..aec2971 100644
--- 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
@@ -6,10 +6,23 @@
 
 
 
-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 `UrlEncodingService` (`1.11.0-SNAPSHOT`) defines a consistent way to convert strings to/from a form safe for use
+within a URL.  The service is used by the framework to map xref:ug.adoc#_ug_more-advanced_view-models[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.
+
+Defining this functionality as an SPI has two use cases:
+
+* first, (though some browsers support longer strings), there is a limit of 2083 characters for URLs.  For view model
+mementos that correspond to large strings (as might occur when serializing a JAXB
+xref:rg.adoc#_rg_annotations_manpage-XmlRootElement[`@XmlRootElement`]-annotated view model), the service provides a
+hook.  +
++
+For example, each memento string could be mapped to a GUID held in some cluster-aware cache.
+
+* the service provides the ability, to encrypt the string in order to avoid leakage of potentially sensitive
+state within the URL.
 
 The framework provides a default implementation of this service, `UrlEncodingServiceUsingBaseEncoding` (also in the
 applib) that uses `base-64` encoding to `UTF-8` charset.
@@ -35,11 +48,12 @@ public interface UrlEncodingService {
 
 == Implementation
 
-The framework provides a default implementation (`UrlEncodingServiceUsingBaseEncoding`) that uses converts the string
-using base-64 encoding and UTF-8 character set.  Note that although the maximum length of a URL should not exceed
-2083 characters.  For large DTOs (capturing a lot of state), you may therefore wish to register an alternative
-implementation.
+The framework provides a default implementation (`UrlEncodingServiceUsingBaseEncoding`) that simply converts the string
+using base-64 encoding and UTF-8 character set.  As already noted, be aware that the maximum length of a URL should not
+exceed 2083 characters.  For large view models, there's the possibility that this limit could be exceeded; in such
+cases register an alternative implementation of this service.
 
 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/4b891285/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_class-structure.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_class-structure.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_class-structure.adoc
index 550a170..8cc7ea0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_class-structure.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_class-structure.adoc
@@ -5,7 +5,7 @@
 :_imagesdir: images/
 
 
-Apache Isis works by building a metamodel of the domain objects: entities, view models and services.  The class members of both entities and view models represent both state -- (single-valued) properties and (multi-valued) collections -- and behaviour -- actions.  The class members of domain services is simpler: just behaviour, ie actions.
+Apache Isis works by building a metamodel of the domain objects: entities, xref:ug.adoc#_ug_more-advanced_view-models[view model]s and services.  The class members of both entities and view models represent both state -- (single-valued) properties and (multi-valued) collections -- and behaviour -- actions.  The class members of domain services is simpler: just behaviour, ie actions.
 
 In the automatically generated UI a property is rendered as a field.  This can be either of a value type (a string, number, date, boolean etc) or can be a reference to another entity.  A collection is generally rendered as a table.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4b891285/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
index bbf5f64..2f84f8d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_more-advanced_view-models.adoc
@@ -5,7 +5,7 @@
 :_imagesdir: images/
 
 
-View models are a type of domain objects (with state, behaviour etc) but where the state is _not_ persisted into the
+View models are a type of domain object (with state, behaviour etc) but where the state is _not_ persisted into the
  JDO/DataNucleus-managed database, but is instead converted to/from a string memento, and held by the calling client.
 This opens up a number of more advanced use cases.
 
@@ -164,7 +164,7 @@ While the underlying technique is the same irrespective of use case, the program
 defining a view model so that the original intent is not lost.  They are:
 
 .View model programming model
-[cols="1a,4a,4a", options="header"]
+[cols="1a,4a,2a", options="header"]
 |===
 
 | Use case
@@ -211,8 +211,8 @@ public class Dashboard { ... }
 [source,java]
 ----
 public class ExcelUploadManager implements ViewModel {
-    public String viewModelMemento() { ... }
-    public void viewModelInit(String memento) { ... }
+  public String viewModelMemento() { ... }
+  public void viewModelInit(String memento) { ... }
 }
 |Implement xref:rg.adoc#_rg_classes_super_manpage-ViewModel[`ViewModel`] interface.  The memento is as defined by the
 interface's methods: the programmer has full control (but also full responsibility) for the string memento.
@@ -229,6 +229,7 @@ derived automatically by serializing the XML graph as implied by the JAXB annota
 et al) this state _can_ include collections.
 |===
 
+JAXB-annotated DTOs are discussed in more detail immediately xref:rg.adoc#_ug_more-advanced_view-models_jaxb[below].
 
 
 [[_ug_more-advanced_view-models_jaxb]]
@@ -262,10 +263,9 @@ representation of its underlying `ToDoItem` entity):
         }
 )
 @DomainObjectLayout(
-        titleUiEvent = TitleUiEvent.Default.class                   // <4>
+        titleUiEvent = TitleUiEvent.Doop.class                      // <4>
 )
 public class ToDoItemDto implements Dto {
-
     @XmlElement(required = true)
     @Getter @Setter                                                 // <5>
     protected String description;
@@ -284,111 +284,135 @@ public class ToDoItemDto implements Dto {
 <1> identifies this class as a view model and defines the root element for JAXB serialization
 <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> optional but recommended: using xref:rg.adoc#_rg_classes_uievent_manpage-TitleUiEvent[`TitleUiEvent`] to obtain
+<4> demonstrating use of UI events for a subscriber to provide the DTO's title; see xref:rg.adoc#_rg_annotations_manpage-DomainObjectLayout_titleUiEvent[`@DomainObjectLayout#titleUiEvent()`].
 <5> optional; JAXB metadata can specify such attributes as required/optional
 
 
+For the package in which the DTO class resides, we define a corresponding namespace.  This goes in `package-info.java`:
 
 [source,java]
 ----
 @javax.xml.bind.annotation.XmlSchema(
+        namespace = "http://viewmodels.app.todoapp/v1/todoitem",                // <1>
         xmlns = {
-                @XmlNs(
-                        namespaceURI = "http://isis.apache.org/schema/common",
+                @javax.xml.bind.annotation.XmlNs(
+                        namespaceURI = "http://isis.apache.org/schema/common",  // <2>
                         prefix = "common"
                 )
         },
-        namespace = "http://viewmodels.app.todoapp/v1/todoitem",
         elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
 )
-package todoapp.app.viewmodels.todoitem.v1;
-
-import javax.xml.bind.annotation.XmlNs;
+package todoapp.app.viewmodels.todoitem.v1_0;                                     // <3>
 ----
+<1> the namespace URI.  There is no requirement for this to correspond to a physical URL, but it should be unique (this
+usually implies the usage of a company domain name)
+<2> define an alias for all of other Java types used within the DTO class.  It's recommended that the Apache Isis xref:rg.adoc#_rg_schema-common[common schema] is always be defined; any references to persistent entities will resultin usage
+of this schema.
+<3> the package in which the DTO resides.
 
+Note how both the XML namespace and package are broadly equivalent to each other; in particular note that they both
+also include a version "v1".
 
 
-This annotation therefore allows view models/DTOs to have references to persistent entities.  It is a common
 
+=== Versioning
 
+Versioning DTOs enables us to make changes without breaking existing consumers of the data.  We can distinguish two
+types of changes:
 
-[source,java]
-----
-package todoapp.app.viewmodels.todoitem.v2;
-
-import java.util.List;
+* backwardly compatible changes
+* breaking changes.
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
+Following link:http://semver.org[semantic versioning] approach, we suggest using `v1_0`, `v1_1`, `v1_2` etc as the
+package version for a sequence of backwardly compatible changes, then bump up to `v2_0` for a breaking change.
 
-import com.google.common.collect.Lists;
+Backwardly compatible changes can generally (always?) be modelled using class inheritance.  Thus, `v1_1.ToDoItemDto`
+is a subclass of `v1_0.ToDoItemDto`.  This makes sense too: OO inheritance means "is-substitutable-for", so what is
+true in an OO context is true when processing XML documents.
 
-import org.apache.isis.applib.annotation.DomainObjectLayout;
-import org.apache.isis.applib.services.eventbus.TitleUiEvent;
+On the other hand, breaking changes probably (always?) imply that the next version of the DTO does not use inheritance.
+Thus `v2_0.ToDoItemDto` might share many of the same properties as the `v1_1.ToDoItemDto`, but any reuse would be
+copy-n-paste rather than through inheritance.
 
-import lombok.Getter;
-import lombok.Setter;
-import todoapp.dom.todoitem.ToDoItem;
+To see this in practice, here's (the outline of) v1.1 of `ToDoItemDto`:
 
-@XmlAccessorType(XmlAccessType.FIELD)
+[source,java]
+----
+package todoapp.app.viewmodels.todoitem.v1_1;
+...
+@XmlRootElement(name = "toDoItemDto")
 @XmlType(
-        namespace = "http://viewmodels.app.todoapp/v2/todoitem",
+        namespace = "http://viewmodels.app.todoapp/v1_1/todoitem",
         propOrder = {
                 "toDoItem",
                 "similarItems"
         }
 )
-@XmlRootElement(name = "toDoItemDto")
-@DomainObjectLayout(
-        titleUiEvent = TitleUiEvent.Default.class
-)
-public class ToDoItemDto extends todoapp.app.viewmodels.todoitem.v1.ToDoItemDto {
-
-    @XmlElement(required = true)
-    @Getter @Setter
-    protected ToDoItem toDoItem;
-
-    @XmlElementWrapper
-    @XmlElement(name = "todoItem")
-    @Getter @Setter
-    protected List<ToDoItem> similarItems = Lists.newArrayList();
-
+public class ToDoItemDto extends todoapp.app.viewmodels.todoitem.v1_0.ToDoItemDto {
+    ...
 }
 ----
 
 
+The corresponding `package-info.java` is similar to that for `v1_0`, though note how it also defines a namespace prefix
+for `v1_0`:
 
 [source,java]
 ----
 @javax.xml.bind.annotation.XmlSchema(
+        namespace = "http://viewmodels.app.todoapp/v1_1/todoitem",
         xmlns = {
-                @XmlNs(
+                @javax.xml.bind.annotation.XmlNs(
                         namespaceURI = "http://isis.apache.org/schema/common",
                         prefix = "common"
                 ),
-                @XmlNs(
-                        namespaceURI = "http://viewmodels.app.todoapp/v1/todoitem",
-                        prefix = "todoitem-v1"
+                @javax.xml.bind.annotation.XmlNs(
+                        namespaceURI = "http://viewmodels.app.todoapp/v1_0/todoitem",
+                        prefix = "todoitem-v1_0"
                 ),
-                @XmlNs(
-                        namespaceURI = "http://viewmodels.app.todoapp/v2/todoitem",
-                        prefix = "todoitem-v2"
+                @javax.xml.bind.annotation.XmlNs(
+                        namespaceURI = "http://viewmodels.app.todoapp/v1_1/todoitem",
+                        prefix = "todoitem-v1_1"
                 )
         },
-        namespace = "http://viewmodels.app.todoapp/v2/todoitem",
         elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
 )
-package todoapp.app.viewmodels.todoitem.v2;
-
-import javax.xml.bind.annotation.XmlNs;
+package todoapp.app.viewmodels.todoitem.v1_1;
 ----
 
 
 
+=== Referencing Domain Entities
+
+It's quite common for view models to be "backed by" (be projections of) some underlying domain entity.  The
+`ToDoItemDto` we've been using as the example in this section is an example: there is an underlying `ToDoItem` entity.
+
+It wouldn't make sense to serialize out the state of a persistent entity: the point of a DTO is to act as a facade
+on top of the entity so that the implementation details (of the entity's structure) don't leak out to the consumer.
+However, the identity of the underlying entity can be well defined; Apache Isis defines the
+xref:rg.adoc#_rg_schema-common[Common schema] which defines the `<oid-dto>` element (and corresponding `OidDto` class):
+the object's type and its identifier.  This is basically a formal XML equivalent to the `Bookmark` object obtained
+from the xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
+
+There is only one requirement to make this work: every referenced domain entity must be annotated with
+xref:rg.adoc#_rg_annotations_manpage-XmlJavaTypeAdapter[`@XmlJavaTypeAdapter`], specifying the framework-provided
+`PersistentEntityAdapter.class`.  This class is similar to the `BookmarkService`: it knows how to create an `OidDto`
+from an object reference.
+
+Thus, in our view model we can legitimately write:
+
+[source,java]
+----
+package todoapp.app.viewmodels.todoitem.v1_1;
+...
+public class ToDoItemDto extends todoapp.app.viewmodels.todoitem.v1_0.ToDoItemDto {
+    ...
+    @Getter @Setter
+    protected ToDoItem toDoItem;
+}
+----
+
+All we need to do is remember to add that `@XmlJavaTypeAdapter` annotation to the referenced entity:
 
 [source,java]
 ----
@@ -400,9 +424,37 @@ public class ToDoItem ...  {
 
 
 
+=== Collections
+
+It's also possible for a DTO to hold collections of objects.  These can be of any type, either simple properties, or
+references to other objects.
+
+The only bit of boilerplate that is required is the `@XmlElementWrapper` annotation.  This instructs JAXB to create
+an XML element (based on the field name) to contain each of the elements.  (If this is omitted then the contents of
+the collection are at the same level as the properties; almost certainly not what is required).
+
+For example, the v1.1 of the `ToDoItemDto` could also contain:
+
+[source,java]
+----
+package todoapp.app.viewmodels.todoitem.v1_1;
+...
+public class ToDoItemDto extends todoapp.app.viewmodels.todoitem.v1_0.ToDoItemDto {
+    ...
+    @XmlElementWrapper
+    @XmlElement(name = "todoItem")
+    @Getter @Setter
+    protected List<ToDoItem> similarItems = Lists.newArrayList();
+}
+----
 
 
+There's nothing to prevent a JAXB DTO from containing rich graphs of data, parent containing children containing
+children.  Be aware though that all of this state will become the DTO's memento, ultimately converted into a URL-safe
+form, by way of the xref:rg.adoc#_rg_services-spi_manpage-UrlEncodingService[`UrlEncodingService`].
 
-== `UrlEncodingService`
+There are limits to the lengths of URLs, however.  Therefore the DTO should not include state that can easily be
+derived from other information.  If the URL does exceed limits, then provide a custom implementation of `UrlEncodingService`
+to handle the memento string in some other fashion (eg substituting it with a GUID, with the memento cached somehow
+on the server).
 
-NOTE: TODO
\ No newline at end of file


[5/6] isis git commit: ISIS-1250: more docs, this time on schemas

Posted by da...@apache.org.
ISIS-1250: more docs, this time on schemas


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

Branch: refs/heads/master
Commit: d409a71adef0e6b6868ae516108533214889925c
Parents: 4b89128
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Nov 19 19:18:23 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Nov 19 19:18:23 2015 +0000

----------------------------------------------------------------------
 ..._annotations_manpage-XmlJavaTypeAdapter.adoc |   6 +-
 .../_rg_annotations_manpage-XmlRootElement.adoc |   5 +-
 .../main/asciidoc/guides/_rg_schema-aim.adoc    |  62 ++++++++++-
 .../main/asciidoc/guides/_rg_schema-common.adoc | 103 ++++++++++++++++++-
 .../asciidoc/guides/_rg_schema-utilities.adoc   |   6 +-
 .../src/main/asciidoc/guides/_rg_schema.adoc    |  15 ++-
 .../_ug_core-concepts_building-blocks.adoc      | 100 +++++++++++++++---
 7 files changed, 268 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/d409a71a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc
index 91c2ee9..4e16c5f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlJavaTypeAdapter.adoc
@@ -6,9 +6,9 @@
 
 
 The JAXB `@XmlJavaTypeAdapter` annotation (`1.11.0-SNAPSHOT`) is used with the framework-provided
-`PersistentEntityAdapter` to instruct JAXB to serialize references to persistent entities into a canonical `<oid-dto>`
-element: basically a formal XML equivalent to the `Bookmark` provided by the
-xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
+`PersistentEntityAdapter` to instruct JAXB to serialize references to persistent entities using the canonical
+`OidDto` complex type: the object's type and its identifier.  This is the formal XML equivalent to the `Bookmark`
+provided by the xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
 
 For example:
 

http://git-wip-us.apache.org/repos/asf/isis/blob/d409a71a/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
index 604c034..06e8799 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-XmlRootElement.adoc
@@ -32,8 +32,9 @@ 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-XmlJavaTypeAdapter[`@XmlJavaTypeAdapter`], 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].
+framework-provided `PersistentEntityAdapter`.  This adapter converts any references to such domain entities using the
+`oidDto` complex type (as defined by the Apache Isis xref:rg.adoc#_rg_schema-common[common schema]):
+the object's type and its identifier.
 
 [TIP]
 ====

http://git-wip-us.apache.org/repos/asf/isis/blob/d409a71a/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
index d898b7e..5a3c528 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-aim.adoc
@@ -5,4 +5,64 @@
 :_imagesdir: images/
 
 
-NOTE: TODO
\ No newline at end of file
+NOTE: TODO
+
+
+[source,xml]
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://isis.apache.org/schema/aim"
+           elementFormDefault="qualified"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns="http://isis.apache.org/schema/aim"
+           xmlns:common="http://isis.apache.org/schema/common">
+
+    <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="http://isis.apache.org/schema/common/common-1.0.xsd"/>
+
+    <xs:element name="actionInvocationMementoDto">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="metadata">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="transactionId" type="xs:string"/>
+                            <xs:element name="sequence" type="xs:int"/>
+                            <xs:element name="timestamp" type="xs:dateTime"/>
+                            <xs:element name="target" type="common:oidDto"/>
+                            <xs:element name="targetClass" type="xs:string"/>
+                            <xs:element name="targetAction" type="xs:string"/>
+                            <xs:element name="actionIdentifier" type="xs:string"/>
+                            <xs:element name="user" type="xs:string"/>
+                            <xs:element name="title" type="xs:string"/>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="payload">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="parameters">
+                                <xs:complexType>
+                                    <xs:sequence maxOccurs="unbounded">
+                                        <xs:element name="param" type="paramDto"/>
+                                    </xs:sequence>
+                                    <xs:attribute name="num" use="required" type="xs:int"/>
+                                </xs:complexType>
+                            </xs:element>
+                            <xs:element name="return" type="common:valueDto" minOccurs="0" maxOccurs="1"/>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:complexType name="paramDto">
+        <xs:sequence>
+            <xs:element name="value" type="common:valueDto"/>
+        </xs:sequence>
+        <xs:attribute name="parameterName" use="required" type="xs:string"/>
+        <xs:attribute name="parameterType" use="required" type="common:valueType"/>
+        <xs:attribute name="null" use="optional" type="xs:boolean"/>
+    </xs:complexType>
+</xs:schema>
+----

http://git-wip-us.apache.org/repos/asf/isis/blob/d409a71a/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
index 086c397..aedf188 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-common.adoc
@@ -5,13 +5,106 @@
 :_imagesdir: images/
 
 
-NOTE: TODO
 
+== `oidDto`
 
+The main purpose of the common schema is to define the `oidDto` complex type: the object's type and its identifier.
+This is basically a formal XML equivalent to the `Bookmark` object obtained from the
+xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
 
+Although simple, this is an enormously powerful concept, in that it represents a URI to any domain object managed by
+a given Apache Isis application.  With it, we have the ability to lookup any arbitrary object.  Further discussion and
+examples can be found xref:ug.adoc#_ug_core-concepts_building-blocks_oid[here].
 
 
-However, the identity of the underlying entity can be well defined; Apache Isis defines the
-xref:rg.adoc#_rg_schema-common[Common schema] which defines the `<oid-dto>` element (and corresponding `OidDto` class):
-the object's type and its identifier.  This is basically a formal XML equivalent to the `Bookmark` object obtained
-from the xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].
+
+
+[source,xml]
+----
+<xs:schema targetNamespace="http://isis.apache.org/schema/common"                           <!--1-->
+           elementFormDefault="qualified"
+           xmlns="http://isis.apache.org/schema/common"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:complexType name="oidDto">                                                          <!--2-->
+        <xs:sequence>
+            <xs:element name="objectType" type="xs:string"/>
+            <xs:element name="objectIdentifier" type="xs:string"/>
+        </xs:sequence>
+        <xs:attribute name="objectState" type="bookmarkObjectState" default="persistent"/>
+    </xs:complexType>
+    <xs:simpleType name="bookmarkObjectState">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="persistent"/>
+            <xs:enumeration value="transient"/>
+            <xs:enumeration value="viewModel"/>
+        </xs:restriction>
+    </xs:simpleType>
+    ...
+</xs:schema>
+----
+
+This
+
+== `valueDto` and `valueType`
+
+The common schema defines two further types: the `valueDto` complex type and the `valueType` simple type:
+
+[source,xml]
+----
+<xs:schema targetNamespace="http://isis.apache.org/schema/common"
+           elementFormDefault="qualified"
+           xmlns="http://isis.apache.org/schema/common"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    ...
+    <xs:complexType name="valueDto">                                    <!--1-->
+        <xs:choice minOccurs="0" maxOccurs="1">
+            <xs:element name="string" type="xs:string"/>
+            <xs:element name="byte" type="xs:byte"/>
+            <xs:element name="short" type="xs:short"/>
+            <xs:element name="int" type="xs:int"/>
+            <xs:element name="long" type="xs:long"/>
+            <xs:element name="float" type="xs:float"/>
+            <xs:element name="double" type="xs:double"/>
+            <xs:element name="boolean" type="xs:boolean"/>
+            <xs:element name="char" type="xs:string"/>
+            <xs:element name="bigDecimal" type="xs:decimal"/>
+            <xs:element name="bigInteger" type="xs:integer"/>
+            <xs:element name="dateTime" type="xs:dateTime"/>
+            <xs:element name="localDate" type="xs:date"/>
+            <xs:element name="localDateTime" type="xs:dateTime"/>
+            <xs:element name="localTime" type="xs:time"/>
+            <xs:element name="reference" type="oidDto"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="valueType">                                  <!--2-->
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="string"/>
+            <xs:enumeration value="byte"/>
+            <xs:enumeration value="short"/>
+            <xs:enumeration value="int"/>
+            <xs:enumeration value="long"/>
+            <xs:enumeration value="float"/>
+            <xs:enumeration value="double"/>
+            <xs:enumeration value="boolean"/>
+            <xs:enumeration value="char"/>
+            <xs:enumeration value="bigInteger"/>
+            <xs:enumeration value="bigDecimal"/>
+            <xs:enumeration value="javaUtilDate"/>
+            <xs:enumeration value="javaSqlDate"/>
+            <xs:enumeration value="javaSqlTime"/>
+            <xs:enumeration value="javaSqlTimestamp"/>
+            <xs:enumeration value="jodaDateTime"/>
+            <xs:enumeration value="jodaLocalDate"/>
+            <xs:enumeration value="jodaLocalTime"/>
+            <xs:enumeration value="jodaLocalDateTime"/>
+            <xs:enumeration value="isisApplibBlob"/>
+            <xs:enumeration value="isisApplibClob"/>
+            <xs:enumeration value="reference"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>
+----
+
+These two definitions are just building blocks, both used within the xref:rg.adoc#_rg_schema-aim[Action Invocation Memento]
+schema.  The first, `valueDto` is intended to hold any valid value, eg of an argument to an action.  The second,
+`valueType`, enumerates the different types of vales, eg of a formal parameter to an action.

http://git-wip-us.apache.org/repos/asf/isis/blob/d409a71a/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
index a696fbf..d5130e1 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema-utilities.adoc
@@ -11,4 +11,8 @@ In addition to defining the schemas themselves, Apache Isis also provides some s
 `org.apache.isis.schema.utils` package.
 
 
-include::_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc[leveloffset=+1]
\ No newline at end of file
+include::_rg_schema-utilities-ActionInvocationMementoDtoUtils.adoc[leveloffset=+1]
+
+
+
+PersistentEntityAdapter.class

http://git-wip-us.apache.org/repos/asf/isis/blob/d409a71a/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
index e8ce6c2..c05e127 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_schema.adoc
@@ -5,7 +5,20 @@
 :_imagesdir: images/
 
 
-NOTE: TODO
+Most applications need to integrate with other apps in the enterprise.  To facilitate such integration scenarios,
+Apache Isis defines two standard XSD schemas:
+
+* the xref:rg.adoc#_rg_schema-common[common schema], which defines the `oidDto` complex type: the object's type and its identifier. +
++
+It also defines some two further XSD types, which are building blocks used in...
+
+* the xref:rg.adoc#_rg_schema-aim[action memento invocation] schema, which allows action invocations to be captured
+and reified. +
++
+The (non-ASF) http://github.com/isisaddons/isis-module-publishmq[Isis addons' publishmq] module uses this XML format
+to publish messages onto an link:http://activemq.apache.org[Apache ActiveMQ] message queue.
+
+The sections below discuss these schemas in more detail.
 
 include::_rg_schema-common.adoc[leveloffset=+1]
 include::_rg_schema-aim.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/d409a71a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
index d7c95d0..90e0977 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_core-concepts_building-blocks.adoc
@@ -7,7 +7,7 @@
 In this section we run through the main building blocks that make up an Apache Isis application.
 
 [[_ug_core-concepts_building-blocks_metamodel]]
-## A MetaModel
+== A MetaModel
 
 At its core, Apache Isis is a metamodel that is built at runtime from the domain classes (eg `Customer.java`), along
 with optional supporting metadata (eg `Customer.layout.json`).
@@ -41,7 +41,7 @@ sources.
 
 
 [[_ug_core-concepts_building-blocks_types-of-domain-objects]]
-## Type of Domain Objects
+== Type of Domain Objects
 
 Most domain objects that the end-user interacts with are *domain entities*, such as `Customer`, `Order`, `Product` and
 so on.  These are persistent objects and which are mapped to a database (usually relational), using JDO/DataNucleus
@@ -208,16 +208,34 @@ in Apache Isis, and do _not_ correspond to actions even though they have public
 
 
 
-## Domain Entities vs View Models
+== Domain Entities vs View Models
 
-NOTE: TODO
+When developing an Apache Isis application you will most likely start off with the persistent domain entities:
+`Customer`, `Order`, `Product`, and so on.  For some applications this may well suffice.  However, if the application
+needs to integrate with other systems, or if the application needs to support reasonably complex business processes,
+then you may need to look beyond just domain entities.
+
+To support these use cases we support view models.  In the same way that an (RDBMS) database view can aggregate and
+abstract from multiple underlying database tables, so a view model sits on top of one or many underlying entities.
+
+View models are not persisted, but nevertheless they can have behaviour (and titles, and icons) just like domain
+entities.  Indeed, to a user of the system there is no particular distinction (again, in the same way that when using
+an RDBMS one can use database views and database tables pretty much interchangeably).
+
+View models generally tend to be associated with supporting a particular use case; logically they are part of the
+application layer, not part of the domain layer (where entities live).
+
+We introduce view models here because they do get mentioned quite often within the users and reference guide.  However,
+we do consider them a more advanced topic; we generally recommend that you build your applications from the domain
+layer up, rather than from the view model down.
+
+For further discussion on view models, see xref:ug.adoc#_ug_more-advanced_view-models[this topic].
 
-`@DomainObject(nature=...)`
 
 
 
 [[_ug_core-concepts_building-blocks_domain-services]]
-## Domain Services
+== Domain Services
 
 Domain services consist of a set of logically grouped actions, and as such follow the same conventions as for entities. However, a service cannot have (persisted) properties, nor can it have (persisted) collections.
 
@@ -226,7 +244,7 @@ Domain services are instantiated once and once only by the framework, and are us
 For convenience you can inherit from AbstractService or one of its subclasses, but this is not mandatory.
 
 
-### Domain Services vs View Services
+=== Domain Services vs View Services
 
 NOTE: TODO
 
@@ -241,27 +259,77 @@ In Apache Isis these are all implemented as domain services.  Indeed, it is quit
 
 
 
-
-[[_ug_core-concepts_building-blocks_value-objects]]
-## Value Objects (Primitives)
+[[_ug_core-concepts_building-blocks_mixins-and-contributions]]
+== Mixins & Contributions
 
 NOTE: TODO
 
 
+For more information, see xref:ug.adoc#_ug_more-advanced_decoupling_contributions[this topic on contribution]s, and
+xref:ug.adoc#_ug_more-advanced_decoupling_mixins[this topic on mixin]s.
 
-[[_ug_core-concepts_building-blocks_mixins-and-contributions]]
-## Mixins & Contributions
 
-NOTE: TODO
 
+[[_ug_core-concepts_building-blocks_domain-events]]
+== Domain Events
 
+NOTE: TODO; see xref:rg.adoc#_rg_classes_domainevent[domain event] classes.
+
+
+
+=== UI Events (`1.11.0-SNAPSHOT`)
+
+NOTE: TODO; see xref:rg.adoc#_rg_classes_uievent[UI event] classes.
 
-[[_ug_core-concepts_building-blocks_domain-events]]
-## Domain Events
 
-NOTE: TODO
 
 
+[[_ug_core-concepts_building-blocks_oid]]
+== OIDs
+
+As well as defining a xref:ug.adoc#_ug_core-concepts_building-blocks_metamodel[metamodel] of the structure (domain
+classes) of its domain objects, Apache Isis also manages the runtime instances of said domain objects.
+
+When a domain entity is recreated from the database, the framework keeps track of its identity through an "OID": an
+object identifier.  Fundamentally this is a combination of its type (domain class), along with an identifier.  You can think
+of it as its "primary key", except across all domain entity types.
+
+For portability and resilience, though, the object type is generally an alias for the actual domain class: thus
+"customers.CUS", say, rather than "com.mycompany.myapp.customers.Customer".  This is derived from an annotation.  The
+identifier meanwhile is always converted to a string.
+
+Although simple, the OID is an enormously powerful concept: it represents a URI to any domain object managed by
+a given Apache Isis application.  With it, we have the ability to lookup any arbitrary domain objects.
+
+Some examples:
+
+* an OID allows sharing of information between users, eg as a deep link to be pasted into an email.
+
+* the information within an OID could be converted into a barcode, and stamped onto a PDF form.  When the PDF is
+scanned by the mail room, the barcode could be read to attach the correspondence to the relevant domain object.
+
+* as a handle to any object in an audit record (as used by the
+xref:rg.adoc#_rg_services-spi_manpage-AuditingService[`AuditingService`], in fact).
+
+* and of course both the xref:ug.adoc#_ug_restfulobjects-viewer[RestfulObjects viewer] and
+xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]
+use the oid tuple to look up, render and allow the user to interact with domain objects.
+
+Although the exact content of an OID should be considered opaque by domain objects, it is possible for domain objects
+to obtain OIDs.  These are represented as `Bookmark`s, obtained from the
+xref:rg.adoc#_rg_services-api_manpage-BookmarkService[`BookmarkService`].  Deep links meanwhile can be obtained from
+the xref:rg.adoc#_rg_annotations_manpage-DeepLinkService[`@DeepLinkService`].
+
+OIDs can also be converted into XML format, useful for integration scenarios.  The
+xref:rg.adoc#_rg_schema-common[common schema] XSD defines the `oidDto` complex type for precisely this purpose.
+
+
+
+[[_ug_core-concepts_building-blocks_value-objects]]
+== Value Objects (Primitives)
+
+NOTE: TODO
+