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 2014/12/05 16:23:27 UTC

[04/11] isis git commit: ISIS-964: unified UI hints in @ClassLayout, @PropertyLayout, @CollectionLayout, @ActionLayout, @ParameterLayout and corresponding support in .layout.json for properties, collections and actions.

ISIS-964: unified UI hints in @ClassLayout, @PropertyLayout, @CollectionLayout, @ActionLayout, @ParameterLayout and corresponding support in .layout.json for properties, collections and actions.


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

Branch: refs/heads/master
Commit: 4495b1a6cb10a250979aa0bf8a9ad0387f59a9fc
Parents: 8aaa166
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Dec 5 06:42:38 2014 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Dec 5 06:42:38 2014 +0000

----------------------------------------------------------------------
 .../components/scalars/ScalarPanelAbstract.java |   6 +-
 .../isis/applib/annotation/ActionLayout.java    |  37 ++++-
 .../isis/applib/annotation/ClassLayout.java     |  71 ++++++++
 .../applib/annotation/CollectionLayout.java     | 125 ++++++++++++++
 .../apache/isis/applib/annotation/CssClass.java |   7 +-
 .../isis/applib/annotation/CssClassFa.java      |   4 +-
 .../isis/applib/annotation/DescribedAs.java     |   4 +-
 .../isis/applib/annotation/LabelPosition.java   |   1 +
 .../isis/applib/annotation/MultiLine.java       |  17 +-
 .../apache/isis/applib/annotation/Named.java    |   3 +-
 .../apache/isis/applib/annotation/Paged.java    |  14 +-
 .../isis/applib/annotation/ParameterLayout.java |  62 ++++++-
 .../apache/isis/applib/annotation/Plural.java   |   3 +-
 .../isis/applib/annotation/PropertyLayout.java  |  68 +++++++-
 .../isis/applib/annotation/Prototype.java       |   3 +-
 .../apache/isis/applib/annotation/Render.java   |  30 +---
 .../applib/annotation/RenderedAsDayBefore.java  |  22 +--
 .../apache/isis/applib/annotation/SortedBy.java |  23 +--
 .../apache/isis/applib/annotation/Title.java    |   1 +
 .../isis/applib/annotation/TypicalLength.java   |   8 +-
 .../actions/layout/ActionLayoutFacet.java       |  45 -----
 .../layout/ActionLayoutFacetAbstract.java       |  50 ------
 .../layout/ActionLayoutFacetAnnotation.java     |  31 ----
 .../layout/ActionLayoutFacetFactory.java        |  68 --------
 .../layout/ActionLayoutFacetFallback.java       |  31 ----
 .../layout/ActionLayoutFacetFromProperties.java |  36 ----
 .../actions/layout/ActionLayoutFactory.java     | 117 +++++++++++++
 ...nPositionFacetForActionLayoutAnnotation.java |  41 +++++
 ...sitionFacetOnActionFromLayoutProperties.java |  53 ++++++
 ...ssClassFaFacetForActionLayoutAnnotation.java |  41 +++++
 ...lassFaFacetOnActionFromLayoutProperties.java |  45 +++++
 .../CssClassFacetForActionLayoutAnnotation.java |  41 +++++
 ...sClassFacetOnActionFromLayoutProperties.java |  45 +++++
 ...scribedAsFacetForActionLayoutAnnotation.java |  41 +++++
 ...ibedAsFacetOnActionFromLayoutProperties.java |  50 ++++++
 .../HiddenFacetForActionLayoutAnnotation.java   |  52 ++++++
 ...HiddenFacetOnActionFromLayoutProperties.java |  59 +++++++
 .../NamedFacetForActionLayoutAnnotation.java    |  41 +++++
 .../NamedFacetOnActionFromLayoutProperties.java |  50 ++++++
 ...PrototypeFacetForActionLayoutAnnotation.java |  41 +++++
 ...totypeFacetOnActionFromLayoutProperties.java |  49 ++++++
 .../actions/position/ActionPositionFacet.java   |  44 +++++
 .../position/ActionPositionFacetAbstract.java   |  50 ++++++
 .../position/ActionPositionFacetFallback.java   |  31 ++++
 .../layout/CollectionLayoutFactory.java         | 117 +++++++++++++
 ...ClassFacetForCollectionLayoutAnnotation.java |  41 +++++
 ...ssFacetOnCollectionFromLayoutProperties.java |  45 +++++
 ...bedAsFacetForCollectionLayoutAnnotation.java |  41 +++++
 ...AsFacetOnCollectionFromLayoutProperties.java |  50 ++++++
 ...iddenFacetForCollectionLayoutAnnotation.java |  52 ++++++
 ...enFacetOnCollectionFromLayoutProperties.java |  59 +++++++
 ...NamedFacetForCollectionLayoutAnnotation.java |  41 +++++
 ...edFacetOnCollectionFromLayoutProperties.java |  50 ++++++
 ...PagedFacetForCollectionLayoutAnnotation.java |  41 +++++
 ...edFacetOnCollectionFromLayoutProperties.java |  45 +++++
 ...enderFacetForCollectionLayoutAnnotation.java |  41 +++++
 ...erFacetOnCollectionFromLayoutProperties.java |  54 ++++++
 ...tedByFacetForCollectionLayoutAnnotation.java |  42 +++++
 ...ByFacetOnCollectionFromLayoutProperties.java |  51 ++++++
 .../facets/fallback/FallbackFacetFactory.java   |   2 +-
 .../LabelAtFacetFromLayoutConfiguration.java    |  30 ++++
 .../fallback/PagedFacetFromConfiguration.java   |   2 +-
 .../PropParamLayoutFacetFromConfiguration.java  |  30 ----
 .../objcoll/paged/PagedFacetAnnotation.java     |   2 +-
 .../objcoll/paged/PagedFacetProperties.java     |   2 +-
 .../object/layout/ClassLayoutFactory.java       |  53 ++++++
 .../CssClassFacetForClassLayoutAnnotation.java  |  41 +++++
 ...escribedAsFacetForClassLayoutAnnotation.java |  41 +++++
 .../NamedFacetForClassLayoutAnnotation.java     |  41 +++++
 .../PagedFacetForClassLayoutAnnotation.java     |  41 +++++
 .../PluralFacetForClassLayoutAnnotation.java    |  41 +++++
 .../facets/object/paged/PagedFacetAbstract.java |   2 +-
 .../TypicalLengthFacetOnTypeAnnotation.java     |   2 +-
 .../typicallen/TypicalLengthFacetAbstract.java  |   4 +-
 ...sClassFacetForParameterLayoutAnnotation.java |  40 +++++
 ...ibedAsFacetForParameterLayoutAnnotation.java |  40 +++++
 ...abelAtFacetForParameterLayoutAnnotation.java |  42 +++++
 ...tiLineFacetForParameterLayoutAnnotation.java |  40 +++++
 .../NamedFacetForParameterLayoutAnnotation.java |  41 +++++
 .../param/layout/ParameterLayoutFactory.java    |  67 ++++++++
 ...justedFacetForParameterLayoutAnnotation.java |  43 +++++
 ...LengthFacetForParameterLayoutAnnotation.java |  48 ++++++
 ...LayoutFacetForParameterLayoutAnnotation.java |  32 ----
 ...acetForParameterLayoutAnnotationFactory.java |  59 -------
 ...tiLineFacetOnParameterAnnotationFactory.java |   4 +-
 ...edAsDayBeforeFacetOnParameterAnnotation.java |   7 +-
 ...TypicalLengthFacetOnParameterAnnotation.java |   2 +-
 ...alLengthFacetOnParameterDerivedFromType.java |   2 +-
 ...ssClassFacetForPropertyLayoutAnnotation.java |  41 +++++
 ...lassFacetOnPropertyFromLayoutProperties.java |  45 +++++
 ...ribedAsFacetForPropertyLayoutAnnotation.java |  41 +++++
 ...edAsFacetOnPropertyFromLayoutProperties.java |  50 ++++++
 .../HiddenFacetForPropertyLayoutAnnotation.java |  52 ++++++
 ...ddenFacetOnPropertyFromLayoutProperties.java |  59 +++++++
 ...LabelAtFacetForPropertyLayoutAnnotation.java |  42 +++++
 ...elAtFacetOnPropertyFromLayoutProperties.java |  54 ++++++
 ...ltiLineFacetForPropertyLayoutAnnotation.java |  41 +++++
 ...LineFacetOnPropertyFromLayoutProperties.java |  45 +++++
 .../NamedFacetForPropertyLayoutAnnotation.java  |  41 +++++
 ...amedFacetOnPropertyFromLayoutProperties.java |  50 ++++++
 .../layout/PropertyLayoutFactory.java           | 127 ++++++++++++++
 ...djustedFacetForPropertyLayoutAnnotation.java |  43 +++++
 ...stedFacetOnPropertyFromLayoutProperties.java |  48 ++++++
 ...lLengthFacetForPropertyLayoutAnnotation.java |  49 ++++++
 ...ngthFacetOnPropertyFromLayoutProperties.java |  53 ++++++
 ...mLayoutFacetForPropertyLayoutAnnotation.java |  32 ----
 ...FacetForPropertyLayoutAnnotationFactory.java |  66 --------
 ...aramLayoutFacetOnPropertyFromProperties.java |  37 -----
 .../MultiLineFacetOnPropertyFactory.java        |   4 +-
 ...redAsDayBeforeFacetAnnotationOnProperty.java |   6 +-
 .../TypicalLengthFacetOnPropertyAnnotation.java |   2 +-
 ...icalLengthFacetOnPropertyFromProperties.java |   2 +-
 ...calLengthFacetOnPropertyDerivedFromType.java |   2 +-
 .../facets/propparam/layout/LabelAtFacet.java   |  36 ++++
 .../propparam/layout/LabelAtFacetAbstract.java  |  50 ++++++
 .../LabelAtFacetInferredFromMultiLineFacet.java |  38 +++++
 .../propparam/layout/PropParamLayoutFacet.java  |  36 ----
 .../layout/PropParamLayoutFacetAbstract.java    |  50 ------
 ...amLayoutFacetInferredFromMultiLineFacet.java |  38 -----
 .../propparam/multiline/MultiLineFacet.java     |   1 +
 .../RenderedAdjustedFacetAbstract.java          |   9 +-
 .../layoutmetadata/ActionLayoutFacetRepr.java   |  11 +-
 .../metamodel/layoutmetadata/ActionRepr.java    |  27 ++-
 .../CollectionLayoutFacetRepr.java              |  33 ++++
 .../metamodel/layoutmetadata/MemberRepr.java    |  73 +++++++-
 .../layoutmetadata/PagedFacetRepr.java          |   2 -
 .../layoutmetadata/PropertyLayoutFacetRepr.java |  14 +-
 .../json/LayoutMetadataReaderFromJson.java      | 165 ++++++++++++++-----
 .../metamodel/spec/feature/ObjectAction.java    |   4 +-
 .../dflt/ProgrammingModelFacetsJava5.java       |  26 ++-
 .../ActionLayoutAnnotationFacetFactoryTest.java |  16 +-
 ...ForParameterLayoutAnnotationFactoryTest.java |  52 ++++++
 ...ForParameterLayoutAnnotationFactoryTest.java |  50 ------
 ...tForPropertyLayoutAnnotationFactoryTest.java |  55 +++++++
 ...tForPropertyLayoutAnnotationFactoryTest.java |  53 ------
 .../dom/src/main/java/dom/todo/ToDoItem.java    |   5 +-
 .../fixture/todo/ToDoItemsFixturesService.java  |   2 +-
 137 files changed, 4141 insertions(+), 969 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
index 5aaeddc..80793c1 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
@@ -37,7 +37,7 @@ import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
-import org.apache.isis.core.metamodel.facets.propparam.layout.PropParamLayoutFacet;
+import org.apache.isis.core.metamodel.facets.propparam.layout.LabelAtFacet;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.links.LinkAndLabel;
@@ -309,7 +309,7 @@ public abstract class ScalarPanelAbstract extends PanelAbstract<ScalarModel> imp
     }
 
     /**
-     * Applies the {@literal @}{@link org.apache.isis.core.metamodel.facets.propparam.layout.PropParamLayoutFacet} and also CSS based on
+     * Applies the {@literal @}{@link org.apache.isis.core.metamodel.facets.propparam.layout.LabelAtFacet} and also CSS based on
      * whether any of the associated actions have {@literal @}{@link org.apache.isis.applib.annotation.ActionLayout layout} positioned to
      * the {@link org.apache.isis.applib.annotation.ActionLayout.Position#RIGHT right}.
      *
@@ -330,7 +330,7 @@ public abstract class ScalarPanelAbstract extends PanelAbstract<ScalarModel> imp
     }
 
     private static String determinePropParamLayoutCss(ScalarModel model) {
-        final PropParamLayoutFacet facet = model.getFacet(PropParamLayoutFacet.class);
+        final LabelAtFacet facet = model.getFacet(LabelAtFacet.class);
         if (facet != null) {
             switch (facet.label()) {
                 case LEFT:

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/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 1984c8c..3db8d57 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
@@ -34,7 +34,37 @@ import java.lang.annotation.Target;
 public @interface ActionLayout {
 
     /**
-     * If associated with a property, indicates the positioning of the
+     * Indicates the css class that an action should have.
+     *
+     * <p>
+     *     For the Wicket viewer, this can be a bootstrap class such as <code>btn-info</code>.
+     * </p>
+     */
+    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 "";
+
+    /**
+     * 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.NOWHERE;
+
+    /**
+     * 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.
      *
      * <p>
@@ -50,4 +80,9 @@ public @interface ActionLayout {
         PANEL_DROPDOWN
     }
 
+    /**
+     * Whether an action is a prototype action, only available when running in prototype (development) mode.
+     */
+    boolean prototype() default false;
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/ClassLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/ClassLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/ClassLayout.java
new file mode 100644
index 0000000..d2ac7a3
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/ClassLayout.java
@@ -0,0 +1,71 @@
+/*
+ *  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.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Layout hints for collections.
+ */
+@Inherited
+@Target({ ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ClassLayout {
+
+    /**
+     * Indicates the css class that a domain class (type) should have.
+     */
+    String cssClass() default "";
+
+    /**
+     * Description of this class, eg to be rendered in a tooltip.
+     */
+    String describedAs() default "";
+
+    /**
+     * Name of this class (overriding the name derived from its name in code).
+     */
+    String named() default "";
+
+    /**
+     * The page size for instances of this class when rendered within
+     * a table.
+     *
+     * <p>
+     * If annotated on a collection, then the page size refers to
+     * parented collections (eg <tt>Order#lineItems</tt>).
+     *
+     * <p>
+     * If annotated on a type, then the page size refers to standalone
+     * collections (eg as returned from a repository query).
+     */
+    public int paged() default -1;
+
+    /**
+     * The plural name of the class.
+     */
+    String plural() default "";
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/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
new file mode 100644
index 0000000..f189bd8
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
@@ -0,0 +1,125 @@
+/*
+ *  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.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Comparator;
+
+/**
+ * Layout hints for collections.
+ */
+@Inherited
+@Target({ ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CollectionLayout {
+
+
+    /**
+     * Indicates the css class that a collection should have.
+     */
+    String cssClass() default "";
+
+    /**
+     * Description of this collection, eg to be rendered in a tooltip.
+     */
+    String describedAs() default "";
+
+    /**
+     * Indicates where in the UI the collection should <i>not</i>not be visible.
+     */
+    Where hidden() default Where.NOWHERE;
+
+    /**
+     * Name of this collection (overriding the name derived from its name in code).
+     */
+    String named() default "";
+
+    /**
+     * The page size for instances of this class when rendered within
+     * a table.
+     *
+     * <p>
+     * If annotated on a collection, then the page size refers to
+     * parented collections (eg <tt>Order#lineItems</tt>).
+     *
+     * <p>
+     * If annotated on a type, then the page size refers to standalone
+     * collections (eg as returned from a repository query).
+     */
+    public int paged() default -1;
+
+    public enum RenderType {
+        EAGERLY,
+        LAZILY;
+
+        public static Render.Type typeOf(RenderType renderType) {
+            if (renderType == EAGERLY) {
+                return Render.Type.EAGERLY;
+            } else { // (renderType == CollectionLayout.RenderType.LAZILY)
+                return Render.Type.LAZILY;
+            }
+        }
+    }
+
+    /**
+     * Indicates that the rendering of a collection should be performed lazily or eagerly.
+     *
+     * <p>
+     * By default, collections are rendered lazily, meaning its contents is not shown automatically.
+     *
+     * <p>
+     * Using this attribute, an <tt>Order#lineItems</tt> collection might berendered eagerly.  A viewer might use this
+     * hint to &quot;open&quot; the collection automatically so that the user could see a list of line items
+     * immediately when the order is rendered.
+     * </p>
+     *
+     * <p>
+     * There is some similarity between this concept and that of eager-loading as supported by some object stores.
+     * </p>
+     */
+    public RenderType render() default RenderType.EAGERLY;
+
+
+    /**
+     * Indicates that the elements in a ({@link java.util.SortedSet}) collection should be sorted according to a different order than the
+     * natural sort order, as defined by the specified{@link java.util.Comparator}.
+     *
+     * <p>
+     * Whenever there is a collection of type {@link java.util.SortedSet}, the domain entity referenced
+     * is expected to implement {@link Comparable}, ie to have a natural ordering.  In effect tis
+     * means that all domain entities should provide a natural ordering.
+     *
+     * <p>
+     * However, in some circumstances the ordering of collection may be different to the entity's
+     * natural ordering.  For example, the entity may represent an interval of time sorted by its
+     * <i>startDate</i> ascending, but the collection may wish to sort by <i>startDate</i>.
+     *
+     * <p>
+     * The purpose of this annotation is to provide a {@link java.util.Comparator} such that the collection
+     * may be sorted in an order more suitable to the context.
+     */
+    @SuppressWarnings("rawtypes")
+    Class sortedBy() default Comparator.class;
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClass.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClass.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClass.java
index b33694e..ec98578 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClass.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClass.java
@@ -26,13 +26,12 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Indicates the css class that a class/property/action should have.
+ * @deprecated - use {@link ClassLayout#cssClass()}, {@link PropertyLayout#cssClass()}, {@link CollectionLayout#cssClass()}, {@link ActionLayout#cssClass()} and {@link ParameterLayout#cssClass()}.
  */
-
+@Deprecated
 @Inherited
 @Target({ ElementType.METHOD, ElementType.TYPE })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface CssClass {
     String value();
-}
-
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java
index e06c1a9..3ff2f4f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java
@@ -22,9 +22,9 @@ package org.apache.isis.applib.annotation;
 import java.lang.annotation.*;
 
 /**
- * Indicates the <a href="http://fortawesome.github.io/Font-Awesome/">Font Awesome</a> CSS class to decorate an
- * action (button or menu item).
+ * @deprecated - see {@link ActionLayout#cssClassFa()}
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.METHOD, ElementType.TYPE })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/DescribedAs.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/DescribedAs.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/DescribedAs.java
index a3414be..c0735b8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/DescribedAs.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/DescribedAs.java
@@ -26,8 +26,10 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Description of a property/action.
+ * @deprecated - see {@link ClassLayout#describedAs()}, {@link PropertyLayout#describedAs()},
+ * {@link CollectionLayout#describedAs()}, {@link ActionLayout#describedAs()} and {@link ParameterLayout#describedAs()}.
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
index 93d559b..229806a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
@@ -25,6 +25,7 @@ package org.apache.isis.applib.annotation;
  * @see org.apache.isis.applib.annotation.ParameterLayout
  */
 public enum LabelPosition {
+    DEFAULT,
     LEFT,
     TOP,
     NONE

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/MultiLine.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/MultiLine.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/MultiLine.java
index 008ba4b..4235468 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/MultiLine.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/MultiLine.java
@@ -26,22 +26,9 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Indicates that a string property may have more than one line (ie may contain
- * carriage returns).
- * 
- * <p>
- * In addition you can specify the typical number of lines (defaults to 6) and
- * whether the lines should not be wrapped (by default they will not be
- * wrapped).
- * 
- * <p>
- * Can also be specified for types that are annotated as <tt>@Value</tt> types.
- * To apply, the value must have string semantics.
- * 
- * <p>
- * Note that if this annotation is applied, then any choices for the property
- * (ie as per a <tt>choicesXxx</tt> method) will be ignored.
+ * @deprecated - use instead {@link PropertyLayout#multiLine()} and {@link ParameterLayout#multiLine()}.
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/Named.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Named.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Named.java
index b1d3a02..ba4d495 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Named.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Named.java
@@ -26,8 +26,9 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Indicates the name that a property/action should be been known by.
+ * @deprecated - use instead {@link ClassLayout#named()}, {@link PropertyLayout#named()}, {@link CollectionLayout#named()}, {@link ActionLayout#named()} and {@link ParameterLayout#named()}.
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/Paged.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Paged.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Paged.java
index 3e3542b..62ee436 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Paged.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Paged.java
@@ -20,22 +20,16 @@
 package org.apache.isis.applib.annotation;
 
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * The page size for instances of this class when rendered within
- * a table.
- * 
- * <p>
- * If annotated on a collection, then the page size refers to
- * parented collections (eg <tt>Order#lineItems</tt>).
- * 
- * <p>
- * If annotated on a type, then the page size refers to standalone
- * collections (eg as returned from a repository query).
+ * @deprecated - use instead {@link ClassLayout#paged()} or {@link CollectionLayout#paged()}.
  */
+@Deprecated
+@Inherited
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.TYPE, ElementType.METHOD})
 public @interface Paged {

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java
index b8ddf4e..fa37dbe 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java
@@ -34,6 +34,66 @@ import java.lang.annotation.Target;
 @Target({ ElementType.PARAMETER })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface ParameterLayout {
-    LabelPosition labelPosition();
+
+    /**
+     * Indicates the css class that a parameter should have.
+     */
+    String cssClass() default "";
+
+    /**
+     * Description of this property, eg to be rendered in a tooltip.
+     */
+    String describedAs() default "";
+
+    /**
+     * In forms, positioning of the label (left, top or none) relative to the parameter value.
+     *
+     * <p>
+     * If not specified, the default depends upon the parameter value's datatype.
+     * </p>
+     */
+    LabelPosition labelPosition() default LabelPosition.DEFAULT;
+
+    /**
+     * Name of this action parameter.
+     */
+    String named() default "";
+
+    /**
+     * For string parameters (and properties), whether to render as a text area over multiple lines.
+     */
+    int multiLine() default -1;
+
+    /**
+     * For date parameters (and properties ) only, instructs the viewer that the date should be rendered as one day
+     * prior to the actually stored date.
+     *
+     * <p>
+     * This is intended to be used so that an exclusive end date of an interval
+     * can be rendered as 1 day before the actual value stored.
+     * </p>
+     *
+     * <p>
+     * For example:
+     * </p>
+     * <pre>
+     * public void updateDates(
+     *     &#64;ParameterLayout(named="From") LocalDate startDate,
+     *     &#64;ParameterLayout(named="To"), renderedAsOneDayBefore=true) LocalDate startDate) { ... }
+     * </pre>
+     *
+     * <p>
+     * Here, the interval of the [1-may-2013,1-jun-2013) would be rendered as the dates
+     * 1-may-2013 for the start date but using 31-may-2013 (the day before) for the end date.  What is stored
+     * In the domain object, itself, however, the value stored is 1-jun-2013.
+     * </p>
+     */
+    boolean renderedAsDayBefore() default false;
+
+    /**
+     * The typical entry length of a field, use to determine the optimum width for display
+     */
+    int typicalLength() default -1;
+
 }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java
index 3338cdb..fbc22d0 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java
@@ -26,8 +26,9 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * The plural name of the class.
+ * @deprecated - use {@link ClassLayout#plural()}.
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.TYPE })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java
index bce1f80..08d8214 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java
@@ -30,6 +30,72 @@ import java.lang.annotation.*;
 @Target({ ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface PropertyLayout {
-    LabelPosition labelPosition();
+
+    /**
+     * Indicates the css class that a property should have.
+     */
+    String cssClass() default "";
+
+    /**
+     * Description of this property, eg to be rendered in a tooltip.
+     */
+    String describedAs() default "";
+
+    /**
+     * Indicates where in the UI the property should <i>not</i>not be visible.
+     */
+    Where hidden() default Where.NOWHERE;
+
+    /**
+     * In forms, positioning of the label (left, top or none) relative to the property value.
+     *
+     * <p>
+     * If not specified, the default depends upon the property value's datatype.
+     * </p>
+     */
+    LabelPosition labelPosition() default LabelPosition.LEFT;
+
+    /**
+     * For string properties (and parameters), render as a text area over specified number of lines.
+     */
+    int multiLine() default -1;
+
+    /**
+     * Name of this property (overriding the name derived from its name in code).
+     */
+    String named() default "";
+
+    /**
+     * For date properties (and parameters) only, instructs the viewer that the date should be rendered as one day
+     * prior to the actually stored date.
+     *
+     * <p>
+     * This is intended to be used so that an exclusive end date of an interval
+     * can be rendered as 1 day before the actual value stored.
+     * </p>
+     *
+     * <p>
+     * For example:
+     * </p>
+     * <pre>
+     * public LocalDate getStartDate() { ... }
+     *
+     * &#64;PropertyLayout(renderedAsDayBefore=true)
+     * public LocalDate getEndDate() { ... }
+     * </pre>
+     *
+     * <p>
+     * Here, the interval of the [1-may-2013,1-jun-2013) would be rendered as the dates
+     * 1-may-2013 for the start date but using 31-may-2013 (the day before) for the end date.  What is stored
+     * In the domain object, itself, however, the value stored is 1-jun-2013.
+     * </p>
+     */
+    boolean renderedAsDayBefore() default false;
+
+
+    /**
+     * The typical entry length of a field, use to determine the optimum width for display
+     */
+    int typicalLength() default -1;
 }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/Prototype.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Prototype.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Prototype.java
index b8e503d..cb9178b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Prototype.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Prototype.java
@@ -26,8 +26,9 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Indicates the an action should be only available in prototype mode
+ * @deprecated - use {@link ActionLayout#prototype()} instead.
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/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 6d20c2f..01fad77 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
@@ -26,36 +26,12 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Indicates that the rendering of a collection should be performed lazily or eagerly.
- * 
- * <p>
- * By default, collections and reference properties are rendered
- * lazily, meaning that their contents is not shown automatically; value properties 
- * on the other hand are rendered eagerly (the title at least is shown).
- * 
- * <p>
- * Using this annotation, an <tt>Order#lineItems</tt> collection might be
- * rendered eagerly.  A viewer might use this hint to &quot;open&quot; 
- * the collection automatically so that the user could see a list of
- * line items immediately when the order is rendered.
- * 
- * <p>
- * Or, a reference property containing an <tt>Address</tt> might be shown
- * address as an embedded property.
- *
- * <p>
- * Or, a value property might be annotated to render lazily; this would be
- * suitable for handling of BLOBs and CLOBs.
- * 
- * <p>
- * For properties and collections there is some similarity between this concept 
- * and that of eager-loading as supported by some object stores.  Indeed, some 
- * object stores may choose use their own specific annotations (eg a JDO default 
- * fetch group) in order to infer this semantic.
+ * @deprecated - use instead {@link CollectionLayout#render()}
  */
 @Inherited
 @Target( ElementType.METHOD )
 @Retention(RetentionPolicy.RUNTIME)
+@Deprecated
 public @interface Render {
 
     public enum Type {
@@ -64,7 +40,7 @@ public @interface Render {
     }
 
     /**
-     * How to resolve; by default {@value Type#EAGERLY}.
+     * @deprecated - use instead {@link CollectionLayout#render()}
      */
     Type value() default Type.EAGERLY;
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderedAsDayBefore.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderedAsDayBefore.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderedAsDayBefore.java
index faf909f..6676191 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderedAsDayBefore.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderedAsDayBefore.java
@@ -26,27 +26,9 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * A rendering hint, instructing the viewer that the date should as one day prior to
- * the actually stored date.
- * 
- * <p>
- * This is intended to be used so that an exclusive end date of an interval
- * can be rendered as 1 day before the actual value stored.
- * 
- * <p>
- * For example:
- * <pre>
- * public LocalDate getStartDate() { ... }
- * 
- * &#64;RenderedAsDayBefore
- * public LocalDate getEndDate() { ... }
- * </pre>
- * 
- * <p>
- * Here, the interval of the [1-may-2013,1-jun-2013) would be rendered as the dates
- * 1-may-2013 for the start date but using 31-may-2013 (the day before) for the end date.  What is stored
- * In the domain object, itself, however, the value stored is 1-jun-2013.
+ * @deprecated - use instead {@link PropertyLayout#renderedAsDayBefore()} and {@link ParameterLayout#renderedAsDayBefore()}.
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.METHOD, ElementType.PARAMETER })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/SortedBy.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/SortedBy.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/SortedBy.java
index dc935f5..5a58001 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/SortedBy.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/SortedBy.java
@@ -25,30 +25,11 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 import java.util.Comparator;
-import java.util.SortedSet;
 
 /**
- * Indicates that the elements in a ({@link SortedSet}) collection should be sorted according to a different order than the
- * natural sort order.
- * 
- * <p>
- * Whenever there is a collection of type {@link SortedSet}, the domain entity referenced 
- * is expected to implement {@link Comparable}, ie to have a natural ordering.  In effect tis
- * means that all domain entities should provide a natural ordering.
- * 
- * <p>
- * However, in some circumstances the ordering of collection may be different to the entity's
- * natural ordering.  For example, the entity may represent an interval of time sorted by its
- * <i>startDate</i> ascending, but the collection may wish to sort by <i>startDate</i>.
- * 
- * <p>
- * The purpose of this annotation is to provide a {@link Comparator} such that the collection
- * may be sorted in an order more suitable to the context.
- * 
- * 
- * <p>
- * Supported by Wicket viewer; check documentation for other viewers.
+ * @deprecated - use instead {@link CollectionLayout#sortedBy()}.
  */
+@Deprecated
 @Inherited
 @Target( ElementType.METHOD )
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/Title.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Title.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Title.java
index 1f87e13..6bc3b12 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Title.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Title.java
@@ -31,6 +31,7 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.METHOD)
 public @interface Title {
+
     /**
      * The order (in Dewey decimal notation) that the property annotated with
      * {@link Title} appears with respect to other properties also annotated

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/applib/src/main/java/org/apache/isis/applib/annotation/TypicalLength.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/TypicalLength.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/TypicalLength.java
index 9ba4b28..d9d5c4c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/TypicalLength.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/TypicalLength.java
@@ -25,14 +25,12 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import org.apache.isis.applib.adapters.Parser;
-
 /**
- * The typical entry length of a field, use to determine the optimum width for
- * display
+ * @deprecated - use instead {@link PropertyLayout#typicalLength()} or
+ * {@link ParameterLayout#typicalLength()}.
  * 
- * @see Parser
  */
+@Deprecated
 @Inherited
 @Target({ ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE })
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacet.java
deleted file mode 100644
index 12d87e2..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacet.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-
-/**
- * The preferred mechanism for determining the order in which the members of the
- * object should be rendered.
- * 
- * <p>
- * In the standard Apache Isis Programming Model, corresponds to annotating each
- * of the member methods with the <tt>@ActionLayout</tt>.
- */
-public interface ActionLayoutFacet extends Facet {
-
-    /**
-     * If associated with a property, indicates the positioning of the
-     * action's button relative to the property.
-     *
-     * <p>
-     * Ignored if the action has not been associated with a property.
-     * </p>
-     */
-    public ActionLayout.Position position();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAbstract.java
deleted file mode 100644
index 1b8a8b52..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAbstract.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-public abstract class ActionLayoutFacetAbstract extends FacetAbstract implements ActionLayoutFacet {
-
-    public static Class<? extends Facet> type() {
-        return ActionLayoutFacet.class;
-    }
-
-    private final ActionLayout.Position position;
-
-    public ActionLayoutFacetAbstract(final ActionLayout.Position position, final FacetHolder holder) {
-        super(type(), holder, Derivation.NOT_DERIVED);
-        this.position = position;
-    }
-
-    @Override
-    public ActionLayout.Position position() {
-        return position;
-    }
-
-    @Override
-    protected String toStringValues() {
-        return "position=" + position;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAnnotation.java
deleted file mode 100644
index 0ab9179..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-public class ActionLayoutFacetAnnotation extends ActionLayoutFacetAbstract {
-
-    public ActionLayoutFacetAnnotation(final ActionLayout.Position position, final FacetHolder holder) {
-        super(position, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java
deleted file mode 100644
index c694083..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import java.util.Properties;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.ContributeeMemberFacetFactory;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-
-public class ActionLayoutFacetFactory extends FacetFactoryAbstract implements ContributeeMemberFacetFactory {
-
-    public ActionLayoutFacetFactory() {
-        super(FeatureType.ACTIONS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-        ActionLayoutFacet facet = createFromMetadataPropertiesIfPossible(processMethodContext);
-        if(facet == null) {
-            facet = createFromAnnotationIfPossible(processMethodContext);
-        }
-        if(facet == null) {
-            facet = new ActionLayoutFacetFallback(processMethodContext.getFacetHolder());
-        }
-
-        // no-op if null
-        FacetUtil.addFacet(facet);
-    }
-
-    @Override
-    public void process(ProcessContributeeMemberContext processMemberContext) {
-    }
-    
-    private static ActionLayoutFacet createFromMetadataPropertiesIfPossible(
-            final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {
-        
-        final FacetHolder holder = pcwmp.getFacetHolder();
-        
-        final Properties properties = pcwmp.metadataProperties("actionLayout");
-        return properties != null ? new ActionLayoutFacetFromProperties(properties, holder) : null;
-    }
-
-    private static ActionLayoutFacetAnnotation createFromAnnotationIfPossible(final ProcessMethodContext processMethodContext) {
-        final ActionLayout annotation = Annotations.getAnnotation(processMethodContext.getMethod(), ActionLayout.class);
-        return (annotation != null) ? new ActionLayoutFacetAnnotation(annotation.position(), processMethodContext.getFacetHolder()) : null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFallback.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFallback.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFallback.java
deleted file mode 100644
index d2909ad..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFallback.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-public class ActionLayoutFacetFallback extends ActionLayoutFacetAbstract {
-
-    public ActionLayoutFacetFallback(final FacetHolder holder) {
-        super(ActionLayout.Position.BELOW, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFromProperties.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFromProperties.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFromProperties.java
deleted file mode 100644
index f3c7a3d..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFromProperties.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import java.util.Properties;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-public class ActionLayoutFacetFromProperties extends ActionLayoutFacetAbstract {
-
-    public ActionLayoutFacetFromProperties(Properties properties, FacetHolder holder) {
-        super(valueFrom(properties), holder);
-    }
-
-    private static ActionLayout.Position valueFrom(Properties properties) {
-        return ActionLayout.Position.valueOf(properties.getProperty("position"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFactory.java
new file mode 100644
index 0000000..da33d7f
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFactory.java
@@ -0,0 +1,117 @@
+/*
+ *  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.facets.actions.layout;
+
+
+import java.util.Properties;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facetapi.FacetUtil;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facets.Annotations;
+import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacetFallback;
+import org.apache.isis.core.metamodel.facets.actions.prototype.PrototypeFacet;
+import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
+import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
+import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
+import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacet;
+
+
+public class ActionLayoutFactory extends FacetFactoryAbstract {
+
+    public ActionLayoutFactory() {
+        super(FeatureType.ACTIONS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessMethodContext processMethodContext) {
+
+        final FacetHolder holder = processMethodContext.getFacetHolder();
+
+        Properties properties = processMethodContext.metadataProperties("actionLayout");
+        if(properties == null) {
+            // alternate key
+            properties = processMethodContext.metadataProperties("layout");
+        }
+        final ActionLayout actionLayout = Annotations.getAnnotation(processMethodContext.getMethod(), ActionLayout.class);
+
+
+        // cssClass
+        CssClassFacet cssClassFacet = CssClassFacetOnActionFromLayoutProperties.create(properties, holder);
+        if(cssClassFacet == null) {
+            cssClassFacet = CssClassFacetForActionLayoutAnnotation.create(actionLayout, holder);
+        }
+        FacetUtil.addFacet(cssClassFacet);
+
+
+        // cssClassFa
+        CssClassFaFacet cssClassFaFacet = CssClassFaFacetOnActionFromLayoutProperties.create(properties, holder);
+        if(cssClassFaFacet == null) {
+            cssClassFaFacet = CssClassFaFacetForActionLayoutAnnotation.create(actionLayout, holder);
+        }
+        FacetUtil.addFacet(cssClassFaFacet);
+
+
+        // describedAs
+        DescribedAsFacet describedAsFacet = DescribedAsFacetOnActionFromLayoutProperties.create(properties, holder);
+        if(describedAsFacet == null) {
+            describedAsFacet = DescribedAsFacetForActionLayoutAnnotation.create(actionLayout, holder);
+        }
+        FacetUtil.addFacet(describedAsFacet);
+
+
+        // hidden
+        HiddenFacet hiddenFacet = HiddenFacetOnActionFromLayoutProperties.create(properties, holder);
+        if(hiddenFacet == null) {
+            hiddenFacet = HiddenFacetForActionLayoutAnnotation.create(actionLayout, holder);
+        }
+        FacetUtil.addFacet(hiddenFacet);
+
+
+        // named
+        NamedFacet namedFacet = NamedFacetOnActionFromLayoutProperties.create(properties, holder);
+        if(namedFacet == null) {
+            namedFacet = NamedFacetForActionLayoutAnnotation.create(actionLayout, holder);
+        }
+        FacetUtil.addFacet(namedFacet);
+
+
+        // position
+        ActionPositionFacet actionPositionFacet = ActionPositionFacetOnActionFromLayoutProperties.create(properties, holder);
+        if(actionPositionFacet == null) {
+            actionPositionFacet = ActionPositionFacetForActionLayoutAnnotation.create(actionLayout, holder);
+        }
+        if(actionPositionFacet == null) {
+            actionPositionFacet = new ActionPositionFacetFallback(processMethodContext.getFacetHolder());
+        }
+        FacetUtil.addFacet(actionPositionFacet);
+
+
+        // prototype
+        PrototypeFacet prototypeFacet = PrototypeFacetOnActionFromLayoutProperties.create(properties, holder);
+        if(prototypeFacet == null) {
+            prototypeFacet = PrototypeFacetForActionLayoutAnnotation.create(actionLayout, holder);
+        }
+        FacetUtil.addFacet(prototypeFacet);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutAnnotation.java
new file mode 100644
index 0000000..21e97c7
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutAnnotation.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.core.metamodel.facets.actions.layout;
+
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacetAbstract;
+
+public class ActionPositionFacetForActionLayoutAnnotation extends ActionPositionFacetAbstract {
+
+    public static ActionPositionFacet create(ActionLayout actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final ActionLayout.Position position = actionLayout.position();
+        return position != null ? new ActionPositionFacetForActionLayoutAnnotation(position, holder) : null;
+    }
+
+    private ActionPositionFacetForActionLayoutAnnotation(final ActionLayout.Position position, final FacetHolder holder) {
+        super(position, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetOnActionFromLayoutProperties.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetOnActionFromLayoutProperties.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetOnActionFromLayoutProperties.java
new file mode 100644
index 0000000..72509e1
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetOnActionFromLayoutProperties.java
@@ -0,0 +1,53 @@
+/*
+ *  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.facets.actions.layout;
+
+import java.util.Properties;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacetAbstract;
+
+public class ActionPositionFacetOnActionFromLayoutProperties extends ActionPositionFacetAbstract {
+
+    public static ActionPositionFacet create(Properties properties, FacetHolder holder) {
+        final ActionLayout.Position position = position(properties);
+        return position != null? new ActionPositionFacetOnActionFromLayoutProperties(position, holder): null;
+    }
+
+    private ActionPositionFacetOnActionFromLayoutProperties(ActionLayout.Position position, FacetHolder holder) {
+        super(position, holder);
+    }
+
+    private static ActionLayout.Position position(Properties properties) {
+        if(properties == null) {
+            return null;
+        }
+        String position = properties.getProperty("position");
+        if(position == null) {
+            position = properties.getProperty("actionPosition");
+        }
+        if(position == null) {
+            return null;
+        }
+        return ActionLayout.Position.valueOf(position);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutAnnotation.java
new file mode 100644
index 0000000..47ebf63
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutAnnotation.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.core.metamodel.facets.actions.layout;
+
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacet;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacetAbstract;
+
+public class CssClassFaFacetForActionLayoutAnnotation extends CssClassFaFacetAbstract {
+
+    public static CssClassFaFacet create(ActionLayout actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String cssClass = actionLayout.cssClass();
+        return cssClass != null ? new CssClassFaFacetForActionLayoutAnnotation(cssClass, holder) : null;
+    }
+
+    private CssClassFaFacetForActionLayoutAnnotation(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetOnActionFromLayoutProperties.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetOnActionFromLayoutProperties.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetOnActionFromLayoutProperties.java
new file mode 100644
index 0000000..57f7f53
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetOnActionFromLayoutProperties.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.facets.actions.layout;
+
+import java.util.Properties;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacet;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacetAbstract;
+
+public class CssClassFaFacetOnActionFromLayoutProperties extends CssClassFaFacetAbstract {
+
+    public static CssClassFaFacet create(Properties properties, FacetHolder holder) {
+        final String cssClassFa = cssClassFa(properties);
+        return cssClassFa != null? new CssClassFaFacetOnActionFromLayoutProperties(cssClassFa, holder): null;
+    }
+
+    private CssClassFaFacetOnActionFromLayoutProperties(String cssClass, FacetHolder holder) {
+        super(cssClass, holder);
+    }
+
+    private static String cssClassFa(Properties properties) {
+        if(properties == null) {
+            return null;
+        }
+        return properties.getProperty("cssClassFa");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutAnnotation.java
new file mode 100644
index 0000000..ae8d111
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutAnnotation.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.core.metamodel.facets.actions.layout;
+
+import org.apache.isis.applib.annotation.ActionLayout;
+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;
+
+public class CssClassFacetForActionLayoutAnnotation extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(ActionLayout actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String cssClass = actionLayout.cssClass();
+        return cssClass != null ? new CssClassFacetForActionLayoutAnnotation(cssClass, holder) : null;
+    }
+
+    private CssClassFacetForActionLayoutAnnotation(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetOnActionFromLayoutProperties.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetOnActionFromLayoutProperties.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetOnActionFromLayoutProperties.java
new file mode 100644
index 0000000..86e6597
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetOnActionFromLayoutProperties.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.facets.actions.layout;
+
+import java.util.Properties;
+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;
+
+public class CssClassFacetOnActionFromLayoutProperties extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(Properties properties, FacetHolder holder) {
+        final String cssClass = cssClass(properties);
+        return cssClass != null? new CssClassFacetOnActionFromLayoutProperties(cssClass, holder): null;
+    }
+
+    private CssClassFacetOnActionFromLayoutProperties(String cssClass, FacetHolder holder) {
+        super(cssClass, holder);
+    }
+
+    private static String cssClass(Properties properties) {
+        if(properties == null) {
+            return null;
+        }
+        return properties.getProperty("cssClass");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutAnnotation.java
new file mode 100644
index 0000000..3b06b11
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutAnnotation.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.core.metamodel.facets.actions.layout;
+
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
+import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacetAbstract;
+
+public class DescribedAsFacetForActionLayoutAnnotation extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(ActionLayout actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String describedAs = actionLayout.describedAs();
+        return describedAs != null ? new DescribedAsFacetForActionLayoutAnnotation(describedAs, holder) : null;
+    }
+
+    private DescribedAsFacetForActionLayoutAnnotation(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetOnActionFromLayoutProperties.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetOnActionFromLayoutProperties.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetOnActionFromLayoutProperties.java
new file mode 100644
index 0000000..278fe70
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetOnActionFromLayoutProperties.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.core.metamodel.facets.actions.layout;
+
+import java.util.Properties;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
+import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacetAbstract;
+
+public class DescribedAsFacetOnActionFromLayoutProperties extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(Properties properties, FacetHolder holder) {
+        final String describedAs = describedAs(properties);
+        return describedAs != null? new DescribedAsFacetOnActionFromLayoutProperties(describedAs, holder): null;
+    }
+
+    private DescribedAsFacetOnActionFromLayoutProperties(String describedAs, FacetHolder holder) {
+        super(describedAs, holder);
+    }
+
+    private static String describedAs(Properties properties) {
+        if(properties == null) {
+            return null;
+        }
+        String describedAs = properties.getProperty("describedAs");
+        if(describedAs == null) {
+            // alternate key
+            describedAs = properties.getProperty("description");
+        }
+        return describedAs;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4495b1a6/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutAnnotation.java
new file mode 100644
index 0000000..5f78357
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutAnnotation.java
@@ -0,0 +1,52 @@
+/*
+ *  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.facets.actions.layout;
+
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.When;
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
+import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
+
+public class HiddenFacetForActionLayoutAnnotation extends HiddenFacetAbstract {
+
+    public static HiddenFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
+        if (actionLayout == null) {
+            return null;
+        }
+        final Where where = actionLayout.hidden();
+        return where != null ? new HiddenFacetForActionLayoutAnnotation(where, holder) : null;
+    }
+
+    private HiddenFacetForActionLayoutAnnotation(final Where where, final FacetHolder holder) {
+        super(When.ALWAYS, where, holder);
+    }
+
+    @Override
+    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
+        if(!where().includes(whereContext)) {
+            return null;
+        }
+        return "Hidden on " + where().getFriendlyName();
+    }
+
+}