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/01/15 11:28:16 UTC

[36/49] isis git commit: ISIS-970: completed the ActionAnnotationFacetFactory, with additional refactoring for DomainObjectFacetFactory

ISIS-970: completed the ActionAnnotationFacetFactory, with additional refactoring for DomainObjectFacetFactory

... so that these do all the processing of auditing, commands, publishing.
ActionAnnotationFacetFactory also does all the processing of @Bulk

In addition:
- gone through the todoapp and simpleapp, updated annotations.


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

Branch: refs/heads/ISIS-970
Commit: 62ebe98d223d2cdc77c0fb34cde316ec109c5bc9
Parents: c420f43
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Dec 30 13:57:16 2014 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Jan 15 10:16:13 2015 +0000

----------------------------------------------------------------------
 .../collection/bulk/BulkActionsLinkFactory.java |   3 +-
 .../apache/isis/applib/annotation/Action.java   | 164 ++--------------
 .../isis/applib/annotation/ActionLayout.java    |  20 ++
 .../isis/applib/annotation/ActionSemantics.java |  24 +--
 .../apache/isis/applib/annotation/Auditing.java |  41 ++++
 .../org/apache/isis/applib/annotation/Bulk.java |  18 +-
 .../annotation/BulkInteractionContext.java      |  63 ++-----
 .../isis/applib/annotation/Collection.java      |  10 +-
 .../applib/annotation/CollectionLayout.java     |  23 ---
 .../isis/applib/annotation/CommandPolicy.java   |  51 -----
 .../applib/annotation/CommandReification.java   |  51 +++++
 .../isis/applib/annotation/DomainObject.java    |  92 +--------
 .../isis/applib/annotation/EditPolicy.java      |  45 -----
 .../apache/isis/applib/annotation/Editing.java  |  45 +++++
 .../apache/isis/applib/annotation/InvokeOn.java |  64 +++++++
 .../isis/applib/annotation/InvokedOn.java       |  50 +++++
 .../isis/applib/annotation/Optionality.java     |   2 +-
 .../isis/applib/annotation/Parameter.java       |   4 +-
 .../apache/isis/applib/annotation/Property.java |  10 +-
 .../isis/applib/annotation/PublishedAction.java |   4 +-
 .../isis/applib/annotation/PublishedObject.java |  12 +-
 .../isis/applib/annotation/Publishing.java      |  41 ++++
 .../applib/annotation/PublishingChangeKind.java |  44 +++++
 .../PublishingPayloadFactoryForAction.java      |  51 +++++
 .../PublishingPayloadFactoryForObject.java      |  49 +++++
 .../applib/annotation/PublishingPolicy.java     |  41 ----
 .../apache/isis/applib/annotation/Render.java   |   6 +-
 .../isis/applib/annotation/RenderType.java      |  42 +++++
 .../apache/isis/applib/annotation/Resolve.java  |   6 +-
 .../isis/applib/annotation/SemanticsOf.java     |  85 +++++++++
 .../apache/isis/applib/annotation/TypeOf.java   |   4 +-
 .../action/ActionAnnotationFacetFactory.java    | 148 ++++++++++++++-
 ...ActionSemanticsFacetForActionAnnotation.java |  54 ++++++
 .../action/BulkFacetForActionAnnotation.java    |  59 ++++++
 .../action/CommandFacetForActionAnnotation.java |  98 ++++++++++
 .../action/HiddenFacetForActionAnnotation.java  |  14 +-
 .../action/PublishActionsConfiguration.java     |  42 +++++
 ...PublishedActionFacetForActionAnnotation.java | 110 +++++++++++
 .../bulk/annotation/BulkFacetAnnotation.java    |  15 +-
 .../annotation/BulkFacetAnnotationFactory.java  |  16 +-
 .../annotation/CommandFacetAnnotation.java      |  14 +-
 .../CommandFacetAnnotationFactory.java          |  16 +-
 .../configuration/ActionConfiguration.java      |  43 +++++
 .../CommandFacetFromConfiguration.java          |   7 +-
 .../CommandFacetFromConfigurationFactory.java   |  30 +--
 ...onInvocationFacetForInteractionAbstract.java |   3 +-
 .../layout/ActionLayoutFacetFactory.java        | 168 +++++++++++++++++
 .../actions/layout/ActionLayoutFactory.java     | 168 -----------------
 .../PublishedActionFacetAnnotation.java         |  35 +++-
 .../PublishedActionFacetAnnotationFactory.java  |  26 +--
 .../ActionSemanticsFacetAnnotation.java         |  14 ++
 .../ActionSemanticsFacetAnnotationFactory.java  |  14 +-
 ...ticsFacetFallbackToNonIdempotentFactory.java |   5 +
 .../TypeOfFacetOnActionAnnotationFactory.java   |  13 +-
 .../CollectionAnnotationFacetFactory.java       |   8 +-
 .../DisabledFacetForCollectionAnnotation.java   |  15 +-
 .../HiddenFacetForCollectionAnnotation.java     |  15 +-
 .../layout/CollectionLayoutFacetFactory.java    | 165 ++++++++++++++++
 .../layout/CollectionLayoutFactory.java         | 165 ----------------
 ...enderFacetForCollectionLayoutAnnotation.java |   7 +-
 ...erFacetOnCollectionFromLayoutProperties.java |  12 +-
 ...ypeOfFacetOnCollectionAnnotationFactory.java |  12 +-
 .../AuditableFacetAuditedAnnotation.java        |  10 +
 ...itableFacetFromAuditedAnnotationFactory.java |  18 +-
 ...etForDomainObjectAnnotationAsConfigured.java |  32 ++++
 .../AuditableFacetFromConfiguration.java        |  32 ----
 .../AuditableFacetFromConfigurationFactory.java |  28 +--
 ...AuditableFacetForDomainObjectAnnotation.java |  32 ++--
 ...oCompleteFacetForDomainObjectAnnotation.java |   6 +-
 .../ChoicesFacetForDomainObjectAnnotation.java  |   5 +
 .../DomainObjectAnnotationFacetFactory.java     |  73 ++++++--
 ...ImmutableFacetForDomainObjectAnnotation.java |  10 +-
 ...ectSpecIdFacetForDomainObjectAnnotation.java |   4 +
 .../PublishObjectsConfiguration.java            |  18 ++
 ...hedObjectFacetForDomainObjectAnnotation.java |  48 +++--
 ...etForDomainObjectAnnotationAsConfigured.java |  31 +++
 ...ViewModelFacetForDomainObjectAnnotation.java |   4 +
 .../DomainObjectLayoutFacetFactory.java         |  59 ++++++
 .../DomainObjectLayoutFactory.java              |  54 ------
 .../PublishedObjectFacetAnnotation.java         |  28 ++-
 .../PublishedObjectFacetAnnotationFactory.java  |  28 +--
 .../layout/ParameterLayoutFacetFactory.java     |  67 +++++++
 .../param/layout/ParameterLayoutFactory.java    |  67 -------
 .../MandatoryFacetForParameterAnnotation.java   |  11 +-
 .../MaxLengthFacetForParameterAnnotation.java   |   9 +-
 ...pecificationFacetForParameterAnnotation.java |   5 +
 .../ParameterAnnotationFacetFactory.java        |  12 +-
 .../RegExFacetForParameterAnnotation.java       |   8 +-
 .../DisabledFacetForPropertyAnnotation.java     |  11 +-
 .../HiddenFacetForPropertyAnnotation.java       |  11 +-
 .../MandatoryFacetForPropertyAnnotation.java    |  11 +-
 .../MaxLengthFacetForPropertyAnnotation.java    |   8 +-
 ...SpecificationFacetForPropertyAnnotation.java |   9 +-
 .../NotPersistedFacetForPropertyAnnotation.java |   9 +-
 .../PropertyAnnotationFacetFactory.java         |  12 +-
 .../RegExFacetForPropertyAnnotation.java        |   8 +-
 .../PropertyLayoutFacetFactory.java             | 175 +++++++++++++++++
 .../propertylayout/PropertyLayoutFactory.java   | 175 -----------------
 .../CollectionLayoutFacetRepr.java              |   4 +-
 .../specimpl/ObjectActionContributee.java       |   3 +-
 .../dflt/ProgrammingModelFacetsJava5.java       |  20 +-
 .../ActionLayoutAnnotationFacetFactoryTest.java |   8 +-
 ...itableFacetFromConfigurationFactoryTest.java |   4 +-
 ...ForParameterLayoutAnnotationFactoryTest.java |   4 +-
 ...tForPropertyLayoutAnnotationFactoryTest.java |   4 +-
 .../src/main/java/dom/simple/SimpleObject.java  |  14 +-
 .../src/main/java/dom/simple/SimpleObjects.java |  12 +-
 .../simple/SimpleObjectsFixturesService.java    |  11 +-
 .../dom/src/main/java/app/ToDoAppDashboard.java |  18 +-
 .../main/java/app/ToDoAppDashboardService.java  |   2 -
 .../dom/src/main/java/app/ToDoItemAnalysis.java |  28 +--
 .../java/app/ToDoItemAnalysisContributions.java |   9 +-
 .../java/app/ToDoItemsByCategoryViewModel.java  |  32 ++--
 .../java/app/ToDoItemsByDateRangeViewModel.java |  26 +--
 .../dom/src/main/java/dom/todo/ToDoItem.java    | 187 +++++++++++--------
 .../dom/todo/ToDoItemChangedPayloadFactory.java |   8 +-
 .../java/dom/todo/ToDoItemContributions.java    |  51 ++---
 .../dom/src/main/java/dom/todo/ToDoItems.java   |  60 +++---
 .../fixture/todo/ToDoItemsFixturesService.java  |  14 +-
 .../src/main/java/webapp/ToDoApplication.java   |  17 +-
 .../prototyping/ExternalLinksService.java       |  11 +-
 .../prototyping/WicketDeveloperUtilities.java   |   7 +-
 122 files changed, 2704 insertions(+), 1654 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java
index f4382bb..d3ce9b2 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java
@@ -28,6 +28,7 @@ import org.apache.wicket.markup.html.link.Link;
 import org.apache.isis.applib.RecoverableException;
 import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.BulkInteractionContext;
+import org.apache.isis.applib.annotation.InvokedOn;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.Command.Executor;
 import org.apache.isis.applib.services.command.CommandContext;
@@ -94,7 +95,7 @@ public final class BulkActionsLinkFactory implements ActionLinkFactory {
                     
                     final BulkInteractionContext bulkInteractionContext = BulkInteractionContext.current.get();
                     if (bulkInteractionContext != null) {
-                        bulkInteractionContext.setActionInvokedAs(BulkInteractionContext.InvokedAs.BULK);
+                        bulkInteractionContext.setActionInvokedOn(InvokedOn.COLLECTION);
                         bulkInteractionContext.setDomainObjects(domainObjects);
                     }
                     

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
index 87a1642..e2627de 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
@@ -24,17 +24,13 @@ import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
-import java.util.List;
-import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
-import org.apache.isis.applib.services.publish.EventPayload;
-import org.apache.isis.applib.util.Enums;
 
 /**
  * Domain semantics for domain object collection.
  */
 @Inherited
-@Target({ ElementType.TYPE })
+@Target({ ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Action {
 
@@ -89,77 +85,13 @@ public @interface Action {
 
     // //////////////////////////////////////
 
-    enum Semantics {
-
-        /**
-         * Safe, with no side-effects.
-         *
-         * <p>
-         * In other words, a query-only action.  By definition, is also idempotent.
-         */
-        SAFE,
-        /**
-         * Post-conditions are always the same, irrespective as to how many times called.
-         *
-         * <p>
-         * An example might be <tt>placeOrder()</tt>, that is a no-op if the order has already been placed.
-         */
-        IDEMPOTENT,
-        /**
-         * Neither safe nor idempotent; every invocation is likely to change the state of the object.
-         *
-         * <p>
-         * An example is increasing the quantity of a line item in an Order by 1.
-         */
-        NON_IDEMPOTENT;
-
-        public String getFriendlyName() {
-            return Enums.getFriendlyNameOf(this);
-        }
-
-        public String getCamelCaseName() {
-            return Enums.enumToCamelCase(this);
-        }
-
-        /**
-         * {@link #SAFE} is idempotent in nature, as well as, obviously, {@link #IDEMPOTENT}.
-         */
-        public boolean isIdempotentInNature() {
-            return this == SAFE || this == IDEMPOTENT;
-        }
-
-        public boolean isSafe() {
-            return this == SAFE;
-        }
-
-        @Deprecated
-        public static ActionSemantics.Of from(final Semantics semantics) {
-            if(semantics == null) return null;
-            if(semantics == SAFE) return ActionSemantics.Of.SAFE;
-            if(semantics == IDEMPOTENT) return ActionSemantics.Of.IDEMPOTENT;
-            if(semantics == NON_IDEMPOTENT) return ActionSemantics.Of.NON_IDEMPOTENT;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized of: " + semantics);
-        }
-
-        @Deprecated
-        public static Semantics from(final ActionSemantics.Of semantics) {
-            if(semantics == null) return null;
-            if(semantics == ActionSemantics.Of.SAFE) return SAFE;
-            if(semantics == ActionSemantics.Of.IDEMPOTENT) return IDEMPOTENT;
-            if(semantics == ActionSemantics.Of.NON_IDEMPOTENT) return NON_IDEMPOTENT;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized semantics: " + semantics);
-        }
-    }
-
 
     /**
-     * The action semantics, either {@link org.apache.isis.applib.annotation.Action.Semantics#SAFE safe} (query-only),
-     * {@link org.apache.isis.applib.annotation.Action.Semantics#IDEMPOTENT idempotent} or
-     * {@link org.apache.isis.applib.annotation.Action.Semantics#NON_IDEMPOTENT non-idempotent}.
+     * The action semantics, either {@link SemanticsOf#SAFE safe} (query-only),
+     * {@link SemanticsOf#IDEMPOTENT idempotent} or
+     * {@link SemanticsOf#NON_IDEMPOTENT non-idempotent}.
      */
-    Semantics semantics() default Semantics.NON_IDEMPOTENT;
+    SemanticsOf semantics() default SemanticsOf.NON_IDEMPOTENT;
 
 
     // //////////////////////////////////////
@@ -167,51 +99,6 @@ public @interface Action {
 
     /**
      * Whether an action can be invoked on a single object and/or on many objects in a collection.
-     */
-    enum AppliesToPolicy {
-        /**
-         * The action can only be invoked on a single object.  This is the default.
-         */
-        OBJECT_ONLY,
-        /**
-         * The action can be invoked either on a single object or on a collection of objects (each in turn).
-         *
-         * <p>
-         *     Corresponds to (the deprecated) <code>@Bulk(appliesTo=BULK_AND_REGULAR)</code> annotation.
-         * </p>
-         */
-        OBJECT_AND_COLLECTION,
-        /**
-         * The action is intended to be invoked only on a collection of objects (each in turn).
-         *
-         * <p>
-         *     Corresponds to (the deprecated) <code>@Bulk(appliesTo=BULK_ONLY)</code> annotation.
-         * </p>
-         */
-        COLLECTION_ONLY;
-
-        @Deprecated
-        public static Bulk.AppliesTo from(final AppliesToPolicy appliesToPolicy) {
-            if(appliesToPolicy == null) return null;
-            if(appliesToPolicy == OBJECT_AND_COLLECTION) return Bulk.AppliesTo.BULK_AND_REGULAR;
-            if(appliesToPolicy == COLLECTION_ONLY) return Bulk.AppliesTo.BULK_ONLY;
-            if(appliesToPolicy == OBJECT_ONLY) throw new IllegalArgumentException("No corresponding Bulk.AppliesTo enum for " + appliesToPolicy);
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized appliesTo: " + appliesToPolicy);
-        }
-
-        @Deprecated
-        public static AppliesToPolicy from(final Bulk.AppliesTo appliesTo) {
-            if(appliesTo == null) return null;
-            if(appliesTo == Bulk.AppliesTo.BULK_AND_REGULAR) return OBJECT_AND_COLLECTION;
-            if(appliesTo == Bulk.AppliesTo.BULK_ONLY) return COLLECTION_ONLY;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized appliesTo: " + appliesTo);
-        }
-    }
-
-    /**
-     * Whether an action can be invoked on a single object and/or on many objects in a collection.
      *
      * <p>
      * Actions to be invoked on collection (currently) have a number of constraints:
@@ -227,7 +114,7 @@ public @interface Action {
      * Has no meaning if annotated on an action of a domain service.
      * </p>
      */
-    AppliesToPolicy appliesTo() default AppliesToPolicy.OBJECT_ONLY;
+    InvokeOn invokeOn() default InvokeOn.OBJECT_ONLY;
 
     // //////////////////////////////////////
 
@@ -235,7 +122,7 @@ public @interface Action {
     /**
      * Whether the action invocation should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
      */
-    CommandPolicy command() default CommandPolicy.AS_CONFIGURED;
+    CommandReification command() default CommandReification.AS_CONFIGURED;
 
     /**
      * How the {@link org.apache.isis.applib.services.command.Command Command} object provided by the
@@ -257,30 +144,6 @@ public @interface Action {
 
     // //////////////////////////////////////
 
-    interface PublishingPayloadFactory {
-
-        @Programmatic
-        public EventPayload payloadFor(Identifier actionIdentifier, Object target, List<Object> arguments, Object result);
-
-        /**
-         * Adapter to subclass if have an existing {@link org.apache.isis.applib.annotation.PublishedObject.PayloadFactory}.
-         */
-        @Deprecated
-        public abstract class Adapter implements PublishingPayloadFactory {
-
-            private final PublishedAction.PayloadFactory payloadFactory;
-
-            public Adapter(final PublishedAction.PayloadFactory payloadFactory) {
-                this.payloadFactory = payloadFactory;
-            }
-
-            @Override
-            public EventPayload payloadFor(Identifier actionIdentifier, Object target, List<Object> arguments, Object result) {
-                return payloadFactory.payloadFor(actionIdentifier, target, arguments, result);
-            }
-        }
-    }
-
 
     /**
      * Whether changes to the object should be published.
@@ -290,10 +153,19 @@ public @interface Action {
      * registered with the framework.
      * </p>
      */
-    PublishingPolicy publishing() default PublishingPolicy.AS_CONFIGURED;
+    Publishing publishing() default Publishing.AS_CONFIGURED;
 
 
     // TODO: factor out PayloadFactory.Default so similar to interaction
-    Class<? extends PublishingPayloadFactory> publishingPayloadFactory() default PublishingPayloadFactory.class;
+    Class<? extends PublishingPayloadFactoryForAction> publishingPayloadFactory() default PublishingPayloadFactoryForAction.class;
+
+
+    // //////////////////////////////////////
+
+    /**
+     * The type-of the elements returned by the action.
+     * @return
+     */
+    Class<?> typeOf() default Object.class;
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
index 47bf4a0..7d896db 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
@@ -42,12 +42,16 @@ public @interface ActionLayout {
      */
     String cssClass() default "";
 
+    // //////////////////////////////////////
+
     /**
      * Indicates the <a href="http://fortawesome.github.io/Font-Awesome/">Font Awesome</a> CSS class to decorate an
      * action (button or menu item).
      */
     String cssClassFa() default "";
 
+    // //////////////////////////////////////
+
     /**
      * Indicates the position of the <a href="http://fortawesome.github.io/Font-Awesome/">Font Awesome</a>
      * icon. The icon could be rendered on the left or the right of the action button
@@ -58,21 +62,29 @@ public @interface ActionLayout {
         LEFT, RIGHT
     }
 
+    // //////////////////////////////////////
+
     /**
      * Description of this action, eg to be rendered in a tooltip.
      */
     String describedAs() default "";
 
+    // //////////////////////////////////////
+
     /**
      * Indicates where in the UI the action should <i>not</i>not be visible.
      */
     Where hidden() default Where.NOT_SPECIFIED;
 
+    // //////////////////////////////////////
+
     /**
      * Name of this action (overriding the name derived from its name in code).
      */
     String named() default "";
 
+    // //////////////////////////////////////
+
     /**
      * For actions that are associated with a property, indicates the positioning of the
      * action's button relative to the property.
@@ -95,4 +107,12 @@ public @interface ActionLayout {
      */
     boolean prototype() default false;
 
+
+    // //////////////////////////////////////
+
+    /**
+     * Whether (and how) this domain object can be bookmarked in the UI.
+     */
+    BookmarkPolicy bookmarking() default BookmarkPolicy.NEVER;
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionSemantics.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionSemantics.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionSemantics.java
index 6b4c982..c3782f7 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionSemantics.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionSemantics.java
@@ -35,59 +35,59 @@ import java.lang.annotation.Target;
 public @interface ActionSemantics {
 
     /**
-     * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics}
+     * @deprecated - see {@link SemanticsOf}
      */
     @Deprecated
     public enum Of {
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics#SAFE}
+         * @deprecated - see {@link SemanticsOf#SAFE}
          */
         @Deprecated
         SAFE, 
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics#IDEMPOTENT}
+         * @deprecated - see {@link SemanticsOf#IDEMPOTENT}
          */
         @Deprecated
         IDEMPOTENT,
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics#IDEMPOTENT}
+         * @deprecated - see {@link SemanticsOf#IDEMPOTENT}
          */
         @Deprecated
         NON_IDEMPOTENT;
 
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics#getFriendlyName()}
+         * @deprecated - see {@link SemanticsOf#getFriendlyName()}
          */
         @Deprecated
         public String getFriendlyName() {
-            return Action.Semantics.from(this).getFriendlyName();
+            return SemanticsOf.from(this).getFriendlyName();
             //return Enums.getFriendlyNameOf(this);
         }
 
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics#getCamelCaseName()}
+         * @deprecated - see {@link SemanticsOf#getCamelCaseName()}
          */
         @Deprecated
         public String getCamelCaseName() {
-            return Action.Semantics.from(this).getCamelCaseName();
+            return SemanticsOf.from(this).getCamelCaseName();
         }
 
         /**
          * {@link #SAFE} is idempotent in nature, as well as, obviously, {@link #IDEMPOTENT}.
          *
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics#isIdempotentInNature()}
+         * @deprecated - see {@link SemanticsOf#isIdempotentInNature()}
          */
         @Deprecated
         public boolean isIdempotentInNature() {
-            return Action.Semantics.from(this).isIdempotentInNature();
+            return SemanticsOf.from(this).isIdempotentInNature();
         }
 
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.Semantics#isSafe()}.
+         * @deprecated - see {@link SemanticsOf#isSafe()}.
          */
         @Deprecated
         public boolean isSafe() {
-            return Action.Semantics.from(this).isSafe();
+            return SemanticsOf.from(this).isSafe();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Auditing.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Auditing.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Auditing.java
new file mode 100644
index 0000000..145cba0
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Auditing.java
@@ -0,0 +1,41 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+/**
+ * The available policies for auditing changes to the properties of the object.
+ */
+public enum Auditing {
+    /**
+     * The auditing of the object should be as per the default auditing policy configured in <tt>isis.properties</tt>.
+     *
+     * <p>
+     *     If no auditing policy is configured, then the auditing is disabled.
+     * </p>
+     */
+    AS_CONFIGURED,
+    /**
+     * Audit changes to this object.
+     */
+    ENABLED,
+    /**
+     * Do not audit changes to this object (even if otherwise configured to enable auditing).
+     */
+    DISABLED
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Bulk.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Bulk.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Bulk.java
index 945ea46..cefd1f1 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Bulk.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Bulk.java
@@ -26,7 +26,7 @@ import java.util.List;
 import javax.enterprise.context.RequestScoped;
 
 /**
- * @deprecated - use {@link Action#appliesTo()} instead.
+ * @deprecated - use {@link Action#invokeOn()} instead.
  */
 @Inherited
 @Target({ ElementType.METHOD })
@@ -35,24 +35,24 @@ import javax.enterprise.context.RequestScoped;
 public @interface Bulk {
 
     /**
-     * @deprecated - see {@link org.apache.isis.applib.annotation.Action.AppliesToPolicy}
+     * @deprecated - see {@link InvokeOn}
      */
     @Deprecated
     public static enum AppliesTo {
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.AppliesToPolicy#OBJECT_AND_COLLECTION}
+         * @deprecated - see {@link InvokeOn#OBJECT_AND_COLLECTION}
          */
         @Deprecated
         BULK_AND_REGULAR,
         /**
-         * @deprecated - see {@link org.apache.isis.applib.annotation.Action.AppliesToPolicy#COLLECTION_ONLY}
+         * @deprecated - see {@link InvokeOn#COLLECTION_ONLY}
          */
         @Deprecated
         BULK_ONLY
     }
 
     /**
-     * @deprecated - see {@link Action#appliesTo()}.
+     * @deprecated - see {@link Action#invokeOn()}.
      */
     @Deprecated
     AppliesTo value() default AppliesTo.BULK_AND_REGULAR;
@@ -70,17 +70,17 @@ public @interface Bulk {
 
 
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.BulkInteractionContext.InvokedAs} instead.
+         * @deprecated - use {@link InvokedOn} instead.
          */
         @Deprecated
         public static enum InvokedAs {
             /**
-             * @deprecated - use {@link org.apache.isis.applib.annotation.BulkInteractionContext.InvokedAs#BULK} instead.
+             * @deprecated - use {@link InvokedOn#COLLECTION} instead.
              */
             @Deprecated
             BULK,
             /**
-             * @deprecated - use {@link org.apache.isis.applib.annotation.BulkInteractionContext.InvokedAs#REGULAR} instead.
+             * @deprecated - use {@link InvokedOn#OBJECT} instead.
              */
             @Deprecated
             REGULAR;
@@ -149,7 +149,7 @@ public @interface Bulk {
          */
         @Deprecated
         public InteractionContext(final InvokedAs invokedAs, final List<Object> domainObjects) {
-            super(BulkInteractionContext.InvokedAs.from(invokedAs), domainObjects);
+            super(InvokedOn.from(invokedAs), domainObjects);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/BulkInteractionContext.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/BulkInteractionContext.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/BulkInteractionContext.java
index 47c866e..be0a555 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/BulkInteractionContext.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/BulkInteractionContext.java
@@ -39,33 +39,6 @@ import java.util.List;
  */
 public abstract class BulkInteractionContext {
 
-    public static enum InvokedAs {
-        BULK,
-        REGULAR;
-        public boolean isRegular() { return this == REGULAR; }
-        public boolean isBulk() { return this == BULK; }
-
-        @Deprecated
-        public static InvokedAs from(final Bulk.InteractionContext.InvokedAs invokedAs) {
-            if (invokedAs == null) return null;
-            if (invokedAs == Bulk.InteractionContext.InvokedAs.REGULAR) return REGULAR;
-            if (invokedAs == Bulk.InteractionContext.InvokedAs.BULK) return BULK;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized bulk interactionContext invokedAs: " + invokedAs);
-        }
-
-        @Deprecated
-        public static Bulk.InteractionContext.InvokedAs from(final BulkInteractionContext.InvokedAs invokedAs) {
-            if (invokedAs == null) return null;
-            if (invokedAs == REGULAR) return Bulk.InteractionContext.InvokedAs.REGULAR;
-            if (invokedAs == BULK) return Bulk.InteractionContext.InvokedAs.BULK;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized bulk interactionContext invokedAs: " + invokedAs);
-        }
-
-
-    }
-
     /**
      * Intended only to be set only by the framework.
      *
@@ -89,13 +62,13 @@ public abstract class BulkInteractionContext {
      * @deprecated - now a {@link javax.enterprise.context.RequestScoped} service
      */
     @Deprecated
-    public static void with(final Runnable runnable, final InvokedAs invokedAs, final Object... domainObjects) {
+    public static void with(final Runnable runnable, final InvokedOn invokedOn, final Object... domainObjects) {
         throw new RuntimeException("No longer supported - instead inject Bulk.InteractionContext as service");
     }
 
     // //////////////////////////////////////
 
-    private InvokedAs actionInvokedAs;
+    private InvokedOn actionInvokedOn;
     private List<Object> domainObjects;
 
     private int index;
@@ -110,16 +83,16 @@ public abstract class BulkInteractionContext {
      * @deprecated - now a {@link javax.enterprise.context.RequestScoped} service
      */
     @Deprecated
-    public BulkInteractionContext(final InvokedAs actionInvokedAs, final Object... domainObjects) {
-        this(actionInvokedAs, Arrays.asList(domainObjects));
+    public BulkInteractionContext(final InvokedOn actionInvokedOn, final Object... domainObjects) {
+        this(actionInvokedOn, Arrays.asList(domainObjects));
     }
 
     /**
      * @deprecated - now a {@link javax.enterprise.context.RequestScoped} service
      */
     @Deprecated
-    public BulkInteractionContext(final InvokedAs actionInvokedAs, final List<Object> domainObjects) {
-        this.actionInvokedAs = actionInvokedAs;
+    public BulkInteractionContext(final InvokedOn actionInvokedOn, final List<Object> domainObjects) {
+        this.actionInvokedOn = actionInvokedOn;
         this.domainObjects = domainObjects;
     }
 
@@ -129,7 +102,7 @@ public abstract class BulkInteractionContext {
      * Intended only to support unit testing.
      */
     public static BulkInteractionContext regularAction(Object domainObject) {
-        return new BulkInteractionContext(InvokedAs.REGULAR, Collections.singletonList(domainObject)){};
+        return new BulkInteractionContext(InvokedOn.OBJECT, Collections.singletonList(domainObject)){};
     }
 
     /**
@@ -143,7 +116,7 @@ public abstract class BulkInteractionContext {
      * Intended only to support unit testing.
      */
     public static BulkInteractionContext bulkAction(List<Object> domainObjects) {
-        return new BulkInteractionContext(InvokedAs.BULK, domainObjects){};
+        return new BulkInteractionContext(InvokedOn.COLLECTION, domainObjects){};
     }
 
 
@@ -153,8 +126,8 @@ public abstract class BulkInteractionContext {
      * <b>NOT API</b>: intended to be called only by the framework.
      */
     @Programmatic
-    public void setActionInvokedAs(InvokedAs actionInvokedAs) {
-        this.actionInvokedAs = actionInvokedAs;
+    public void setActionInvokedOn(InvokedOn actionInvokedOn) {
+        this.actionInvokedOn = actionInvokedOn;
     }
 
     /**
@@ -177,26 +150,26 @@ public abstract class BulkInteractionContext {
 
 
     /**
-     * Whether this particular {@link org.apache.isis.applib.annotation.BulkInteractionContext} was applied as a {@link InvokedAs#BULK bulk} action
-     * (against each domain object in a list of domain objects) or as a {@link InvokedAs#REGULAR regular}
+     * Whether this particular {@link org.apache.isis.applib.annotation.BulkInteractionContext} was applied as a {@link InvokedOn#COLLECTION bulk} action
+     * (against each domain object in a list of domain objects) or as a {@link InvokedOn#OBJECT regular}
      * action (against a single domain object).
      */
     @Programmatic
-    public BulkInteractionContext.InvokedAs getActionInvokedAs() {
-        return actionInvokedAs;
+    public InvokedOn getInvokedOn() {
+        return actionInvokedOn;
     }
 
     /**
-     * Whether this particular {@link org.apache.isis.applib.annotation.Bulk.InteractionContext} was applied as a {@link InvokedAs#BULK bulk} action
-     * (against each domain object in a list of domain objects) or as a {@link InvokedAs#REGULAR regular}
+     * Whether this particular {@link org.apache.isis.applib.annotation.Bulk.InteractionContext} was applied as a {@link InvokedOn#COLLECTION bulk} action
+     * (against each domain object in a list of domain objects) or as a {@link InvokedOn#OBJECT regular}
      * action (against a single domain object).
      *
-     * @deprecated - use {@link #getActionInvokedAs()} instead.
+     * @deprecated - use {@link #getInvokedOn()} instead.
      */
     @Deprecated
     @Programmatic
     public Bulk.InteractionContext.InvokedAs getInvokedAs() {
-        return BulkInteractionContext.InvokedAs.from(actionInvokedAs);
+        return InvokedOn.from(actionInvokedOn);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
index 3afe14b..f18288b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
@@ -30,7 +30,7 @@ import org.apache.isis.applib.services.eventbus.CollectionInteractionEvent;
  * Domain semantics for domain object collection.
  */
 @Inherited
-@Target({ ElementType.TYPE })
+@Target({ ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Collection {
 
@@ -79,13 +79,13 @@ public @interface Collection {
      *     Note that non-editable objects can nevertheless have actions invoked upon them.
      * </p>
      */
-    EditPolicy editing() default EditPolicy.AS_CONFIGURED;
+    Editing editing() default Editing.AS_CONFIGURED;
 
     /**
-     * If {@link #editing()} is set to {@link EditPolicy#DISABLED},
+     * If {@link #editing()} is set to {@link Editing#DISABLED},
      * then the reason to provide to the user as to why this property cannot be edited.
      */
-    String editingDisabledReason();
+    String editingDisabledReason() default "";
 
 
     // //////////////////////////////////////
@@ -94,6 +94,6 @@ public @interface Collection {
      * The type-of the elements held within the collection.
      * @return
      */
-    Class<?> typeOf();
+    Class<?> typeOf() default Object.class;
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
index 3d14dde..056dc5c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
@@ -94,29 +94,6 @@ public @interface CollectionLayout {
 
     // //////////////////////////////////////
 
-    enum RenderType {
-        EAGERLY,
-        LAZILY;
-
-        @Deprecated
-        public static Render.Type typeOf(final RenderType renderType) {
-            if(renderType == null) return null;
-            if(renderType == EAGERLY) return Render.Type.EAGERLY;
-            if(renderType == LAZILY) return Render.Type.LAZILY;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized renderType: " + renderType);
-        }
-
-        @Deprecated
-        public static RenderType typeOf(final Render.Type renderType) {
-            if(renderType == null) return null;
-            if (renderType == Render.Type.EAGERLY) return RenderType.EAGERLY;
-            if (renderType == Render.Type.LAZILY) return RenderType.LAZILY;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized renderType: " + renderType);
-        }
-    }
-
     /**
      * Indicates that the rendering of a collection should be performed lazily or eagerly.
      *

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandPolicy.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandPolicy.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandPolicy.java
deleted file mode 100644
index 9edf998..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandPolicy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.applib.annotation;
-
-/**
- * The available policies as to whether action invocations are reified into commands.
- *
- * <p>
- *     Note: this enum is <i>not</i> an inner class of the {@link org.apache.isis.applib.annotation.Action} annotation
- *     because in the future we may also support commands for {@link org.apache.isis.applib.annotation.Property} and
- *     {@link org.apache.isis.applib.annotation.Collection}.
- * </p>
- */
-public enum CommandPolicy {
-    /**
-     * Whether the action should be handled as a command is per the default editing policy configured in <tt>isis.properties</tt>.
-     *
-     * <p>
-     *     If no command policy is configured, then the action is <i>not</i> treated as a command.
-     * </p>
-     */
-    AS_CONFIGURED,
-    /**
-     * Audit changes to this object.
-     */
-    ENABLED,
-    /**
-     * Do not allow the properties to be edited, or the collections to be added to/removed from.
-     *
-     * <p>
-     *     Corresponds to the {@link Immutable} annotation).
-     * </p>
-     */
-    DISABLED
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java
new file mode 100644
index 0000000..11d1734
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java
@@ -0,0 +1,51 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+/**
+ * The available policies as to whether action invocations are reified into commands.
+ *
+ * <p>
+ *     Note: this enum is <i>not</i> an inner class of the {@link org.apache.isis.applib.annotation.Action} annotation
+ *     because in the future we may also support commands for {@link org.apache.isis.applib.annotation.Property} and
+ *     {@link org.apache.isis.applib.annotation.Collection}.
+ * </p>
+ */
+public enum CommandReification {
+    /**
+     * Whether the action should be handled as a command is per the default editing policy configured in <tt>isis.properties</tt>.
+     *
+     * <p>
+     *     If no command policy is configured, then the action is <i>not</i> treated as a command.
+     * </p>
+     */
+    AS_CONFIGURED,
+    /**
+     * Audit changes to this object.
+     */
+    ENABLED,
+    /**
+     * Do not allow the properties to be edited, or the collections to be added to/removed from.
+     *
+     * <p>
+     *     Corresponds to the {@link Immutable} annotation).
+     * </p>
+     */
+    DISABLED
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
index 0140a10..f8c8390 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
@@ -23,7 +23,6 @@ import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
-import org.apache.isis.applib.services.publish.EventPayload;
 
 /**
  * Domain semantics for domain objects (entities and view models; for services see {@link org.apache.isis.applib.annotation.DomainService}).
@@ -34,28 +33,6 @@ import org.apache.isis.applib.services.publish.EventPayload;
 public @interface DomainObject {
 
     /**
-     * The available policies for auditing changes to the properties of the object.
-     */
-    public enum AuditingPolicy {
-        /**
-         * The auditing of the object should be as per the default auditing policy configured in <tt>isis.properties</tt>.
-         *
-         * <p>
-         *     If no auditing policy is configured, then the auditing is disabled.
-         * </p>
-         */
-        AS_CONFIGURED,
-        /**
-         * Audit changes to this object.
-         */
-        ENABLED,
-        /**
-         * Do not audit changes to this object (even if otherwise configured to enable auditing).
-         */
-        DISABLED
-    }
-
-    /**
      * Whether the entity should be audited (note: does not apply to {@link #viewModel() view model}s.
      *
      * <p>
@@ -63,65 +40,12 @@ public @interface DomainObject {
      * registered with the framework.
      * </p>
      */
-    AuditingPolicy auditing() default AuditingPolicy.AS_CONFIGURED;
+    Auditing auditing() default Auditing.AS_CONFIGURED;
 
 
     // //////////////////////////////////////
 
 
-    public enum PublishingChangeKind {
-        CREATE,
-        UPDATE,
-        DELETE;
-
-        @Deprecated
-        public static PublishedObject.ChangeKind from(final PublishingChangeKind publishingChangeKind) {
-            if(publishingChangeKind == null) return null;
-            if(publishingChangeKind == CREATE) return PublishedObject.ChangeKind.CREATE;
-            if(publishingChangeKind == UPDATE) return PublishedObject.ChangeKind.UPDATE;
-            if(publishingChangeKind == DELETE) return PublishedObject.ChangeKind.DELETE;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized changeKind: " + publishingChangeKind);
-        }
-        @Deprecated
-        public static PublishingChangeKind from(final PublishedObject.ChangeKind  publishingChangeKind) {
-            if(publishingChangeKind == null) return null;
-            if(publishingChangeKind == PublishedObject.ChangeKind.CREATE) return CREATE;
-            if(publishingChangeKind == PublishedObject.ChangeKind.UPDATE) return UPDATE;
-            if(publishingChangeKind == PublishedObject.ChangeKind.DELETE) return DELETE;
-            // shouldn't happen
-            throw new IllegalArgumentException("Unrecognized changeKind: " + publishingChangeKind);
-        }
-    }
-
-    public interface PublishingPayloadFactory {
-
-        @Programmatic
-        public EventPayload payloadFor(Object changedObject, PublishingChangeKind publishingChangeKind);
-
-        /**
-         * Adapter to subclass if have an existing {@link org.apache.isis.applib.annotation.PublishedObject.PayloadFactory}.
-         */
-        @Deprecated
-        public static class Adapter implements PublishingPayloadFactory {
-
-            private final PublishedObject.PayloadFactory payloadFactory;
-
-            public Adapter(final PublishedObject.PayloadFactory payloadFactory) {
-                this.payloadFactory = payloadFactory;
-            }
-
-            @Override
-            public EventPayload payloadFor(Object changedObject, PublishingChangeKind publishingChangeKind) {
-                return payloadFactory.payloadFor(changedObject, PublishingChangeKind.from(publishingChangeKind));
-            }
-
-            public PublishedObject.PayloadFactory getPayloadFactory() {
-                return payloadFactory;
-            }
-        }
-    }
-
     /**
      * Whether changes to the object should be published.
      *
@@ -130,10 +54,10 @@ public @interface DomainObject {
      * registered with the framework.
      * </p>
      */
-    PublishingPolicy publishing() default PublishingPolicy.AS_CONFIGURED;
+    Publishing publishing() default Publishing.AS_CONFIGURED;
 
     // TODO: factor out PayloadFactory.Default so similar to interaction
-    Class<? extends PublishingPayloadFactory> publishingPayloadFactory() default PublishingPayloadFactory.class;
+    Class<? extends PublishingPayloadFactoryForObject> publishingPayloadFactory() default PublishingPayloadFactoryForObject.class;
 
 
     // //////////////////////////////////////
@@ -145,7 +69,7 @@ public @interface DomainObject {
      * <p>
      * It is sufficient to specify an interface rather than a concrete type.
      */
-    Class<?> autoCompleteRepository();
+    Class<?> autoCompleteRepository() default Object.class;
 
 
     /**
@@ -181,14 +105,14 @@ public @interface DomainObject {
      *     Note that non-editable objects can nevertheless have actions invoked upon them.
      * </p>
      */
-    EditPolicy editing() default EditPolicy.AS_CONFIGURED;
+    Editing editing() default Editing.AS_CONFIGURED;
 
 
     /**
-     * If {@link #editing()} is set to {@link EditPolicy#DISABLED},
+     * If {@link #editing()} is set to {@link Editing#DISABLED},
      * then the reason to provide to the user as to why the object's properties cannot be edited/collections modified.
      */
-    String editingDisabledReason();
+    String editingDisabledReason() default "";
 
 
     // //////////////////////////////////////
@@ -202,7 +126,7 @@ public @interface DomainObject {
      * used by the framework to unique identify an object over time (same concept as a URN).
      * </p>
      */
-    String objectType();
+    String objectType() default "";
 
 
     // //////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/EditPolicy.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/EditPolicy.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/EditPolicy.java
deleted file mode 100644
index 23fe17c..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/EditPolicy.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.applib.annotation;
-
-/**
- * The available policies for editing properties and collections.
- */
-public enum EditPolicy {
-    /**
-     * The editing of the object should be as per the default editing policy configured in <tt>isis.properties</tt>.
-     *
-     * <p>
-     *     If no editing policy is configured, then the editing is enabled.
-     * </p>
-     */
-    AS_CONFIGURED,
-    /**
-     * Audit changes to this object.
-     */
-    ENABLED,
-    /**
-     * Do not allow the properties to be edited, or the collections to be added to/removed from.
-     *
-     * <p>
-     *     Corresponds to the {@link Immutable} annotation).
-     * </p>
-     */
-    DISABLED
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Editing.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Editing.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Editing.java
new file mode 100644
index 0000000..b452397
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Editing.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.applib.annotation;
+
+/**
+ * The available policies for editing properties and collections.
+ */
+public enum Editing {
+    /**
+     * The editing of the object should be as per the default editing policy configured in <tt>isis.properties</tt>.
+     *
+     * <p>
+     *     If no editing policy is configured, then the editing is enabled.
+     * </p>
+     */
+    AS_CONFIGURED,
+    /**
+     * Audit changes to this object.
+     */
+    ENABLED,
+    /**
+     * Do not allow the properties to be edited, or the collections to be added to/removed from.
+     *
+     * <p>
+     *     Corresponds to the {@link Immutable} annotation).
+     * </p>
+     */
+    DISABLED
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.java
new file mode 100644
index 0000000..d8e01f7
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.java
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+/**
+ * Whether an action can be invoked on a single object and/or on many objects in a collection.
+ */
+public enum InvokeOn {
+    /**
+     * The action can only be invoked on a single object.  This is the default.
+     */
+    OBJECT_ONLY,
+    /**
+     * The action can be invoked either on a single object or on a collection of objects (each in turn).
+     *
+     * <p>
+     *     Corresponds to (the deprecated) <code>@Bulk(appliesTo=BULK_AND_REGULAR)</code> annotation.
+     * </p>
+     */
+    OBJECT_AND_COLLECTION,
+    /**
+     * The action is intended to be invoked only on a collection of objects (each in turn).
+     *
+     * <p>
+     *     Corresponds to (the deprecated) <code>@Bulk(appliesTo=BULK_ONLY)</code> annotation.
+     * </p>
+     */
+    COLLECTION_ONLY;
+
+    @Deprecated
+    public static Bulk.AppliesTo from(final InvokeOn appliesToPolicy) {
+        if(appliesToPolicy == null) return null;
+        if(appliesToPolicy == OBJECT_AND_COLLECTION) return Bulk.AppliesTo.BULK_AND_REGULAR;
+        if(appliesToPolicy == COLLECTION_ONLY) return Bulk.AppliesTo.BULK_ONLY;
+        if(appliesToPolicy == OBJECT_ONLY) throw new IllegalArgumentException("No corresponding Bulk.AppliesTo enum for " + appliesToPolicy);
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized appliesTo: " + appliesToPolicy);
+    }
+
+    @Deprecated
+    public static InvokeOn from(final Bulk.AppliesTo appliesTo) {
+        if(appliesTo == null) return null;
+        if(appliesTo == Bulk.AppliesTo.BULK_AND_REGULAR) return OBJECT_AND_COLLECTION;
+        if(appliesTo == Bulk.AppliesTo.BULK_ONLY) return COLLECTION_ONLY;
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized appliesTo: " + appliesTo);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokedOn.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokedOn.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokedOn.java
new file mode 100644
index 0000000..66f001f
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokedOn.java
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+/**
+ * How an action was invoked.
+ */
+public enum InvokedOn {
+    OBJECT,
+    COLLECTION;
+
+    public boolean isObject() { return this == OBJECT; }
+    public boolean isCollection() { return this == COLLECTION; }
+
+    @Deprecated
+    public static InvokedOn from(final Bulk.InteractionContext.InvokedAs invokedAs) {
+        if (invokedAs == null) return null;
+        if (invokedAs == Bulk.InteractionContext.InvokedAs.REGULAR) return OBJECT;
+        if (invokedAs == Bulk.InteractionContext.InvokedAs.BULK) return COLLECTION;
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized bulk interactionContext invokedAs: " + invokedAs);
+    }
+
+    @Deprecated
+    public static Bulk.InteractionContext.InvokedAs from(final InvokedOn invokedOn) {
+        if (invokedOn == null) return null;
+        if (invokedOn == OBJECT) return Bulk.InteractionContext.InvokedAs.REGULAR;
+        if (invokedOn == COLLECTION) return Bulk.InteractionContext.InvokedAs.BULK;
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized bulk interactionContext invokedAs: " + invokedOn);
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Optionality.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Optionality.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Optionality.java
index c3a2877..3d08101 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Optionality.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Optionality.java
@@ -5,7 +5,7 @@ package org.apache.isis.applib.annotation;
  */
 public enum Optionality {
     /**
-     * Default, usually false (meaning mandatory) for properties and always false for parameters.
+     * Default, usually meaning mandatory for properties and always meaning mandatory for parameters.
      *
      * <p>
      * For properties, will be false unless JDO {@link javax.jdo.annotations.Column} has also specified with

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java
index b5c31c9..f88ef4b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java
@@ -30,7 +30,7 @@ import org.apache.isis.applib.spec.Specification;
  * Domain semantics for domain object collection.
  */
 @Inherited
-@Target({ ElementType.TYPE })
+@Target({ ElementType.PARAMETER })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Parameter {
 
@@ -77,7 +77,7 @@ public @interface Parameter {
      * If more than one is provided, then all must be satisfied (in effect &quot;AND&quot;ed together).
      * </p>
      */
-    Class<? extends Specification>[] mustSatisfy();
+    Class<? extends Specification>[] mustSatisfy() default {};
 
 
     // //////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
index 92e82a2..b125123 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
@@ -31,7 +31,7 @@ import org.apache.isis.applib.spec.Specification;
  * Domain semantics for domain object property.
  */
 @Inherited
-@Target({ ElementType.TYPE })
+@Target({ ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Property {
 
@@ -80,13 +80,13 @@ public @interface Property {
      *     Note that non-editable objects can nevertheless have actions invoked upon them.
      * </p>
      */
-    EditPolicy editing() default EditPolicy.AS_CONFIGURED;
+    Editing editing() default Editing.AS_CONFIGURED;
 
     /**
-     * If {@link #editing()} is set to {@link EditPolicy#DISABLED},
+     * If {@link #editing()} is set to {@link Editing#DISABLED},
      * then the reason to provide to the user as to why this property cannot be edited.
      */
-    String editingDisabledReason();
+    String editingDisabledReason() default "";
 
 
     // //////////////////////////////////////
@@ -111,7 +111,7 @@ public @interface Property {
      * If more than one is provided, then all must be satisfied (in effect &quot;AND&quot;ed together).
      * </p>
      */
-    Class<? extends Specification>[] mustSatisfy();
+    Class<? extends Specification>[] mustSatisfy() default {};
 
 
     // //////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java
index 90b6967..43323e8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java
@@ -38,13 +38,13 @@ import org.apache.isis.applib.services.publish.EventPayload;
 public @interface PublishedAction {
 
     /**
-     * @deprecated - use {@link org.apache.isis.applib.annotation.Action.PublishingPayloadFactory} instead.
+     * @deprecated - use {@link PublishingPayloadFactoryForAction} instead.
      */
     @Deprecated
     public interface PayloadFactory {
 
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.Action.PublishingPayloadFactory#payloadFor(org.apache.isis.applib.Identifier, Object, java.util.List, Object)} instead.
+         * @deprecated - use {@link PublishingPayloadFactoryForAction#payloadFor(org.apache.isis.applib.Identifier, Object, java.util.List, Object)} instead.
          */
         @Deprecated
         @Programmatic

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java
index f24f5c1..a34cb8e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java
@@ -36,34 +36,34 @@ import org.apache.isis.applib.services.publish.EventPayload;
 public @interface PublishedObject {
 
     /**
-     * @deprecated - use {@link org.apache.isis.applib.annotation.DomainObject.PublishingChangeKind} instead.
+     * @deprecated - use {@link PublishingChangeKind} instead.
      */
     @Deprecated
     public enum ChangeKind {
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.DomainObject.PublishingChangeKind#CREATE} instead.
+         * @deprecated - use {@link PublishingChangeKind#CREATE} instead.
          */
         @Deprecated
         CREATE,
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.DomainObject.PublishingChangeKind#UPDATE} instead.
+         * @deprecated - use {@link PublishingChangeKind#UPDATE} instead.
          */
         @Deprecated
         UPDATE,
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.DomainObject.PublishingChangeKind#DELETE} instead.
+         * @deprecated - use {@link PublishingChangeKind#DELETE} instead.
          */
         @Deprecated
         DELETE
     }
 
     /**
-     * @deprecated - use {@link org.apache.isis.applib.annotation.DomainObject.PublishingPayloadFactory} instead.
+     * @deprecated - use {@link PublishingPayloadFactoryForObject} instead.
      */
     @Deprecated
     public interface PayloadFactory {
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.DomainObject.PublishingPayloadFactory#payloadFor(Object, org.apache.isis.applib.annotation.DomainObject.PublishingChangeKind)} instead.
+         * @deprecated - use {@link PublishingPayloadFactoryForObject#payloadFor(Object, PublishingChangeKind)} instead.
          */
         @Deprecated
         @Programmatic

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Publishing.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Publishing.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Publishing.java
new file mode 100644
index 0000000..64f6638
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Publishing.java
@@ -0,0 +1,41 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+/**
+ * The available policies for publishing changes to the properties of the object.
+ */
+public enum Publishing {
+    /**
+     * The publishing of the object should be as per the default publishing policy configured in <tt>isis.properties</tt>.
+     *
+     * <p>
+     *     If no publishing policy is configured, then the publishing is disabled.
+     * </p>
+     */
+    AS_CONFIGURED,
+    /**
+     * Publish changes to this object.
+     */
+    ENABLED,
+    /**
+     * Do not publish changes to this object (even if otherwise configured to enable publishing).
+     */
+    DISABLED
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java
new file mode 100644
index 0000000..d92bfc2
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+public enum PublishingChangeKind {
+    CREATE,
+    UPDATE,
+    DELETE;
+
+    @Deprecated
+    public static PublishedObject.ChangeKind from(final PublishingChangeKind publishingChangeKind) {
+        if(publishingChangeKind == null) return null;
+        if(publishingChangeKind == CREATE) return PublishedObject.ChangeKind.CREATE;
+        if(publishingChangeKind == UPDATE) return PublishedObject.ChangeKind.UPDATE;
+        if(publishingChangeKind == DELETE) return PublishedObject.ChangeKind.DELETE;
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized changeKind: " + publishingChangeKind);
+    }
+    @Deprecated
+    public static PublishingChangeKind from(final PublishedObject.ChangeKind  publishingChangeKind) {
+        if(publishingChangeKind == null) return null;
+        if(publishingChangeKind == PublishedObject.ChangeKind.CREATE) return CREATE;
+        if(publishingChangeKind == PublishedObject.ChangeKind.UPDATE) return UPDATE;
+        if(publishingChangeKind == PublishedObject.ChangeKind.DELETE) return DELETE;
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized changeKind: " + publishingChangeKind);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java
new file mode 100644
index 0000000..4a3a93e
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java
@@ -0,0 +1,51 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+import java.util.List;
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.services.publish.EventPayload;
+
+public interface PublishingPayloadFactoryForAction {
+
+    @Programmatic
+    public EventPayload payloadFor(Identifier actionIdentifier, Object target, List<Object> arguments, Object result);
+
+    /**
+     * Adapter to subclass if have an existing {@link org.apache.isis.applib.annotation.PublishedObject.PayloadFactory}.
+     */
+    @Deprecated
+    public abstract class Adapter implements PublishingPayloadFactoryForAction {
+
+        private final PublishedAction.PayloadFactory payloadFactory;
+
+        public Adapter(final PublishedAction.PayloadFactory payloadFactory) {
+            this.payloadFactory = payloadFactory;
+        }
+
+        @Override
+        public EventPayload payloadFor(Identifier actionIdentifier, Object target, List<Object> arguments, Object result) {
+            return payloadFactory.payloadFor(actionIdentifier, target, arguments, result);
+        }
+
+        public PublishedAction.PayloadFactory getPayloadFactory() {
+            return payloadFactory;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java
new file mode 100644
index 0000000..fb3df0d
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+import org.apache.isis.applib.services.publish.EventPayload;
+
+public interface PublishingPayloadFactoryForObject {
+
+    @Programmatic
+    public EventPayload payloadFor(Object changedObject, PublishingChangeKind publishingChangeKind);
+
+    /**
+     * Adapter to subclass if have an existing {@link org.apache.isis.applib.annotation.PublishedObject.PayloadFactory}.
+     */
+    @Deprecated
+    public static class Adapter implements PublishingPayloadFactoryForObject {
+
+        private final PublishedObject.PayloadFactory payloadFactory;
+
+        public Adapter(final PublishedObject.PayloadFactory payloadFactory) {
+            this.payloadFactory = payloadFactory;
+        }
+
+        @Override
+        public EventPayload payloadFor(final Object changedObject, final PublishingChangeKind publishingChangeKind) {
+            return payloadFactory.payloadFor(changedObject, PublishingChangeKind.from(publishingChangeKind));
+        }
+
+        public PublishedObject.PayloadFactory getPayloadFactory() {
+            return payloadFactory;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPolicy.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPolicy.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPolicy.java
deleted file mode 100644
index 35704a8..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPolicy.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.applib.annotation;
-
-/**
- * The available policies for publishing changes to the properties of the object.
- */
-public enum PublishingPolicy {
-    /**
-     * The publishing of the object should be as per the default publishing policy configured in <tt>isis.properties</tt>.
-     *
-     * <p>
-     *     If no publishing policy is configured, then the publishing is disabled.
-     * </p>
-     */
-    AS_CONFIGURED,
-    /**
-     * Publish changes to this object.
-     */
-    ENABLED,
-    /**
-     * Do not publish changes to this object (even if otherwise configured to enable publishing).
-     */
-    DISABLED
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Render.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Render.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Render.java
index 5e7e1da..336cf1b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Render.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Render.java
@@ -35,17 +35,17 @@ import java.lang.annotation.Target;
 public @interface Render {
 
     /**
-     * @deprecated - use {@link org.apache.isis.applib.annotation.CollectionLayout.RenderType} instead.
+     * @deprecated - use {@link RenderType} instead.
      */
     @Deprecated
     public enum Type {
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.CollectionLayout.RenderType#EAGERLY} instead.
+         * @deprecated - use {@link RenderType#EAGERLY} instead.
          */
         @Deprecated
         EAGERLY,
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.CollectionLayout.RenderType#LAZILY} instead.
+         * @deprecated - use {@link RenderType#LAZILY} instead.
          */
         @Deprecated
         LAZILY

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java
new file mode 100644
index 0000000..776f8f6
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.annotation;
+
+public enum RenderType {
+    EAGERLY,
+    LAZILY;
+
+    @Deprecated
+    public static Render.Type typeOf(final RenderType renderType) {
+        if(renderType == null) return null;
+        if(renderType == EAGERLY) return Render.Type.EAGERLY;
+        if(renderType == LAZILY) return Render.Type.LAZILY;
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized renderType: " + renderType);
+    }
+
+    @Deprecated
+    public static RenderType typeOf(final Render.Type renderType) {
+        if(renderType == null) return null;
+        if (renderType == Render.Type.EAGERLY) return RenderType.EAGERLY;
+        if (renderType == Render.Type.LAZILY) return RenderType.LAZILY;
+        // shouldn't happen
+        throw new IllegalArgumentException("Unrecognized renderType: " + renderType);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/62ebe98d/core/applib/src/main/java/org/apache/isis/applib/annotation/Resolve.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Resolve.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Resolve.java
index 16b6bb5..df159b5 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Resolve.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Resolve.java
@@ -35,17 +35,17 @@ import java.lang.annotation.Target;
 public @interface Resolve {
 
     /**
-     * @deprecated - use {@link org.apache.isis.applib.annotation.CollectionLayout.RenderType} instead.
+     * @deprecated - use {@link RenderType} instead.
      */
     @Deprecated
     public enum Type {
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.CollectionLayout.RenderType#EAGERLY} instead.
+         * @deprecated - use {@link RenderType#EAGERLY} instead.
          */
         @Deprecated
         EAGERLY(Render.Type.EAGERLY),
         /**
-         * @deprecated - use {@link org.apache.isis.applib.annotation.CollectionLayout.RenderType#LAZILY} instead.
+         * @deprecated - use {@link RenderType#LAZILY} instead.
          */
         @Deprecated
         LAZILY(Render.Type.LAZILY);