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 2017/11/01 10:49:40 UTC

[isis] 02/02: ISIS-1766: adds some documentation about MenuBarsSevice and MenuBarsLoaderService and the new MenuBars layout classes. Also...

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit c1d590cdfc6811faeb89c1e74187d7bc748b76f1
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Nov 1 10:49:26 2017 +0000

    ISIS-1766: adds some documentation about MenuBarsSevice and MenuBarsLoaderService and the new MenuBars layout classes.  Also...
    
    Also:
    - renames LinkData to Link
    - renames ActionLayoutData to ServiceActionLayoutData
---
 .../main/asciidoc/guides/rgcms/_rgcms_classes.adoc |  1 +
 .../guides/rgcms/_rgcms_classes_layout.adoc        | 53 ++++++++++---
 .../guides/rgcms/_rgcms_classes_menubars.adoc      | 90 ++++++++++++++++++++++
 .../rgsvc/_rgsvc_presentation-layer-spi.adoc       |  2 +
 ...sentation-layer-spi_MenuBarsLoaderService.adoc} | 27 ++++---
 ...svc_presentation-layer-spi_MenuBarsService.adoc |  5 +-
 .../applib/layout/component/ActionLayoutData.java  |  8 +-
 .../layout/component/CollectionLayoutData.java     |  8 +-
 .../layout/component/DomainObjectLayoutData.java   |  8 +-
 .../layout/component/PropertyLayoutData.java       |  8 +-
 .../layout/links/{LinkData.java => Link.java}      |  6 +-
 .../applib/layout/menus/ActionLayoutDataOwner.java |  4 +-
 .../isis/applib/layout/menus/MenuSection.java      |  6 +-
 ...ayoutData.java => ServiceActionLayoutData.java} | 14 ++--
 .../services/menu/MenuBarsLoaderService.java       | 18 +++++
 .../isis/applib/services/menu/MenuBarsService.java | 18 +++++
 .../layout/menus/MenuBars_roundtrip_Test.java      | 10 +--
 .../services/menu/MenuBarsServiceDefault.java      |  4 +-
 .../resources/DomainObjectResourceServerside.java  | 10 +--
 .../resources/MenuBarsResourceServerside.java      | 10 +--
 .../serviceactions/ServiceActionUtil.java          |  4 +-
 21 files changed, 235 insertions(+), 79 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes.adoc
index a5b318e..9f6f781 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes.adoc
@@ -21,5 +21,6 @@ include::_rgcms_classes_contributee.adoc[leveloffset=+1]
 include::_rgcms_classes_roles.adoc[leveloffset=+1]
 include::_rgcms_classes_mixins.adoc[leveloffset=+1]
 include::_rgcms_classes_layout.adoc[leveloffset=+1]
+include::_rgcms_classes_menubars.adoc[leveloffset=+1]
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_layout.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_layout.adoc
index 493abfe..f2e45c2 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_layout.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_layout.adoc
@@ -1,11 +1,11 @@
 [[_rgcms_classes_layout]]
-= Layout
+= (Object) Layout
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
 :_basedir: ../../
 :_imagesdir: images/
 
 
-The `org.apache.isis.applib.layout` package defines a number of classes that allow the layout of domain objects (entities and view models) to be customized.
+The `org.apache.isis.applib.layout.grid` and `org.apache.isis.applib.layout.component` packages together define a number of classes that allow the layout of domain objects (entities and view models) to be customized.
 These classes fall into two main categories:
 
 * grid classes, that define a grid structure of rows, columns, tab groups and tabs, and;
@@ -21,7 +21,11 @@ The component classes, meanwhile, are broadly equivalent to the "layout" annotat
 
 All of the classes in this package are JAXB-annotated, meaning that they can be serialized to/from XML (the `component` classes in the `http://isis.apache.org/applib/layout/component` XSD namespace, the bootstrap 3 grid classes in the `http://isis.apache.org/applib/layout/grid/bootstrap3` XSD namespace).
 This ability to serialize to/from XML is used by the xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_GridLoaderService[`GridLoaderService`], the default implementation of which reads the grid layout for a domain class from a `.layout.xml` file on the classpath.
+It also allows the grid to be exposed through the REST API provided by the xref:../ugvro/ugvro.adoc#[Restful Objects viewer], as either XML or (as of `1.16.0-SNAPSHOT`) JSON.
 
+(Also as of `1.16.0-SNAPSHOT`), the various components (properties, collections, actions and domain object) also allow a link to be associated with each.
+These links are populated by the framework automatically when exposing the object layout grid through the REST API, pointing back to the standard Restful Objects resources.
+This design greatly assists in the implementation of generic REST clients.
 
 
 [[__rgcms_classes_layout_component]]
@@ -31,8 +35,7 @@ The component classes reside in the `org.apache.isis.applib.layout.component` pa
 
 * `FieldSet` +
 +
-A fieldset (previously also called a property group or member group) of a number of the domain object's properties
-(along with any associationed actions of those properties).
+A fieldset (sometimes also called a property group or member group) of a number of the domain object's properties (along with any associationed actions of those properties).
 
 * layout data classes, which correspond to the similarly named annotations:
 
@@ -48,17 +51,18 @@ In addition, the component package includes `Grid`, representing the top level c
 `Grid` itself is merely an interface, but it also defines the visitor pattern to make it easy for validate and normalize the grid layouts.
 The `GridAbstract` convenience superclass provides a partial implementation of this visitor pattern.
 
+The XSD for these classes is available at link:http://isis.apache.org/applib/layout/component/component.xsd[].
 
 
 [[__rgcms_classes_layout_grid-bootstrap3]]
 == Bootstrap3 Grid
 
-As noted above, the default bootstrap3 grid classes are modelled closely on link:http://getbootstrap.com[Bootstrap 3].
-Bootstrap's link:http://getbootstrap.com/css/#grid[grid system] divides the page width equally into 12 columns, and so
-each column spans 1 or more of these widths.
+The bootstrap3 grid classes are modelled closely on link:http://getbootstrap.com[Bootstrap 3].
+Bootstrap's link:http://getbootstrap.com/css/#grid[grid system] divides the page width equally into 12 columns, and so each column spans 1 or more of these widths.
 Thus, a column with a span of 12 is the full width, one with a span of 6 is half the width, one with a span of 4 is a third of the width, and so on.
 
-When specifying the span of a column, Bootstrap also allows a size to be specified (`XS`, `SM`, `MD`, `LG`).  The size determines the rules for responsive design.
+When specifying the span of a column, Bootstrap also allows a size to be specified (`XS`, `SM`, `MD`, `LG`).
+The size determines the rules for responsive design.
 Apache Isis defaults to `MD` but this can be overridden.
 It is also possible to specify multiple size/spans for a given column.
 
@@ -66,22 +70,23 @@ The grid classes provided by Apache Isis reside in the `org.apache.isis.applib.l
 
 * `BS3Grid` +
 +
-Consists of a number of ``BS3Row``s.  +
+Consists of a number of ``BS3Row``s.
 +
 This class is the concrete implementation of `Grid` interface, discussed previously.
 As such, it extends the `Grid.Visitor` to iterate over all of the ``Row``s of the grid.
 
 * `BS3Row` +
 +
-A container of ``BS3Col``s.  This element is rendered as `<div class="row">`.
+A container of ``BS3Col``s.
+This element is rendered as `<div class="row">`.
 
 * `BS3Col` +
 +
 A container of almost everything else.
 A column most commonly contains properties (grouped into ``FieldSet``s, described above) or collections (specified by ``CollectionLayoutData``, also above).
-However, a `Col` might instead contain a ``BS3TabGroup`` (described below) in order that the object members is arranged into tabs.  +
+However, a `Col` might instead contain a ``BS3TabGroup`` (described below) in order that the object members is arranged into tabs.
 +
-It is also possible for a ``Col`` to contain the object's title/icon (using ``DomainObjectLayoutData``) or indeed arbitrary actions (using ``ActionLayoutData`). +
+It is also possible for a ``Col`` to contain the object's title/icon (using ``DomainObjectLayoutData``) or indeed arbitrary actions (using ``ActionLayoutData`).
 +
 Finally, a ``BS3Col`` can also contain other ``BS3Row``s, allowing arbitrarily deep hierarchies of containers as required.
 +
@@ -103,4 +108,28 @@ As you can probably guess, the `BS3Grid` is the top-level object (that is, it is
 All of these classes also allow custom CSS to be specified; these are added to the CSS classes for the corresponding `<div`> in the rendered page.
 The xref:../ugvw/ugvw.adoc#_ugvw_customisation_tweaking-css-classes[`application.css`] file can then be used for application-specific CSS, allowing arbitrary fine-tuning of the layout of the page.
 
+The XSD for these classes is available at link:http://isis.apache.org/applib/layout/menus/menubars.xsd[].
 
+
+[[__rgcms_classes_layout_link]]
+== Link (`1.16.0-SNAPSHOT`)
+
+The link classes reside in the `org.apache.isis.applib.layout.links` package, and consist of just the `Link` class:
+
+[source,java]
+----
+public class Link  {
+    public String getRel() { ... }      // <1>
+    public String getMethod() { ... }   // <2>
+    public String getHref() { ... }     // <3>
+    public String getType() { ... }     // <4>
+    ...
+}
+----
+<1> an "rel" (as defined by section 2.7.1.2 of the RO spec v1.0), identifying the nature of the link.
+<2> the HTTP method to access the link.
+This is always "GET".
+<3> The (absolute) URL to access the Restful Objects resource.
+<4> The media type (`Accept` header) that will be returned by the URL.
+
+The XSD for these classes is available at link:http://isis.apache.org/applib/layout/links/links.xsd[].
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc
new file mode 100644
index 0000000..28613db
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_menubars.adoc
@@ -0,0 +1,90 @@
+[[_rgcms_classes_menubars]]
+= MenuBars Layout (`1.16.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+:_basedir: ../../
+:_imagesdir: images/
+
+
+The `org.apache.isis.applib.layout.menus` package defines a number of classes that allow the layout of domain service actions to be organised across menu bars, menus and menu sections.
+
+These classes fall into two main categories:
+
+* menu classes, that define a hierarchical structure of menu bars, menus and menu sections, and;
+
++
+Unlike the xref:rgcms.adoc#_rgcms_classes_layout[object layout] classes, the menu classes have no dependency on any particular layout architecture (that is, they don't attempt to model some particular grid system such as bootstrap3).
+
+* a component class `(ServiceActionLayoutData`) that captures the layout metadata for a domain services action.
+These are grouped into menu sections.
+
++
+The component class is broadly equivalent to the "layout" annotations for actions, ie xref:../rgant/rgant.adoc#_rgant-ActionLayout[`@ActionLayout`].
+
+The menu classes and the component class should be reusable across all any and all UI implementations, so this is a less abstract (though equally general) design as compared to the xref:rgcms.adoc#_rgcms_classes_layout[object layout] design.
+
+All of the classes in this package are JAXB-annotated, meaning that they can be serialized to/from XML (in the `http://isis.apache.org/applib/layout/menus` XSD namespace).
+This ability to serialize to/from XML is used by the xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_MenuBarsLoaderService[`MenuBarsLoaderService`], the default implementation of which reads the grid layout for a domain class from a `.layout.xml` file on the classpath.
+It also allows the menu bars to be exposed through the REST API provided by the xref:../ugvro/ugvro.adoc#[Restful Objects viewer], as either XML or JSON.
+
+The service action component also allow a link to be associated with it.
+Each such link is populated by the framework automatically when exposing the menu bars layout through the REST API, pointing back to the standard Restful Objects resources.
+This design greatly assists in the implementation of generic REST clients.
+
+
+[[_rgcms_classes_menubars]]
+== Menus
+
+Both the menu and component classes reside in the `org.apache.isis.applib.layout.menus` package, consisting of:
+
+* `MenuBars`
+
++
+The top-level structure that define three fields: a primary `MenuBar`, secondary `MenuBar` and tertiary `MenuBar`.
+The xref:../ugvw/ugvw.adoc#[Wicket viewer] places the primary bar to the left, the secondary bar aligned right, and the tertiary bar (expected to consist of just one `Menu`) under the user names.
+
+* `MenuBar`
+
++
+consisting of one or many ``Menu``s.
+
+* `Menu`
+
++
+consisting of one or many ``MenuSection``s.
+The xref:../ugvw/ugvw.adoc#[Wicket viewer] renders a separator between each section.
+
+* `MenuSection`
+
++
+consisting of one or many actions (``ServiceActionLayoutData``s)
+
+* `ServiceActionLayoutData` class, which correspond to the xref:../rgant/rgant.adoc#_rgant-ActionLayout[`@ActionLayout`] annotation.
+
++
+This is similar to `ActionLayoutData` (of the xref:rgcms.adoc#_rgcms_classes_layout[object layout] classes), however it also identifies the domain service to which it belongs.
+(This isn't required for the object layouts because that is implicit).
+
+
+
+[[__rgcms_classes_layout_link]]
+== Link
+
+The link classes reside in the `org.apache.isis.applib.layout.links` package, and consist of just the `Link` class:
+
+[source,java]
+----
+public class Link  {
+    public String getRel() { ... }      // <1>
+    public String getMethod() { ... }   // <2>
+    public String getHref() { ... }     // <3>
+    public String getType() { ... }     // <4>
+    ...
+}
+----
+<1> an "rel" (as defined by section 2.7.1.2 of the RO spec v1.0), identifying the nature of the link.
+<2> the HTTP method to access the link.
+This is always "GET".
+<3> The (absolute) URL to access the Restful Objects resource.
+<4> The media type (`Accept` header) that will be returned by the URL.
+
+The XSD for these classes is available at link:http://isis.apache.org/applib/layout/links/links.xsd[].
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi.adoc
index 9edb262..cddd147 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi.adoc
@@ -207,6 +207,8 @@ include::_rgsvc_presentation-layer-spi_GridService.adoc[leveloffset=+1]
 include::_rgsvc_presentation-layer-spi_GridSystemService.adoc[leveloffset=+1]
 include::_rgsvc_presentation-layer-spi_HintStore.adoc[leveloffset=+1]
 include::_rgsvc_presentation-layer-spi_LocaleProvider.adoc[leveloffset=+1]
+include::_rgsvc_presentation-layer-spi_MenuBarsLoaderService.adoc[leveloffset=+1]
+include::_rgsvc_presentation-layer-spi_MenuBarsService.adoc[leveloffset=+1]
 include::_rgsvc_presentation-layer-spi_RoutingService.adoc[leveloffset=+1]
 include::_rgsvc_presentation-layer-spi_SessionLoggingService.adoc[leveloffset=+1]
 include::_rgsvc_presentation-layer-spi_TableColumnOrderService.adoc[leveloffset=+1]
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsLoaderService.adoc
similarity index 51%
copy from adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc
copy to adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsLoaderService.adoc
index 1cb1047..b67e97d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsLoaderService.adoc
@@ -1,13 +1,13 @@
-[[_rgsvc_presentation-layer-spi_MenuBarsService]]
-= `MenuBarsService` (`1.16.0-SNAPSHOT`)
+[[_rgsvc_presentation-layer-spi_MenuBarsLoaderService]]
+= `MenuBarsLoaderService` (`1.16.0-SNAPSHOT`)
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
 :_basedir: ../../
 :_imagesdir: images/
 
 
 
-The `MenuBarsService` is responsible for returning an XML representation of the domain service actions.
-This is used by the Wicket viewer to build up the menu, and is also served as the "menuBars" resource by the xref:../ugvro/ugvro.adoc#[Restful Objects] viewer.
+The `MenuBarsLoaderService` is used by the default implementation of xref:rgsvc.adoc#_rgsvc_presentation-layer-spi_MenuBarsService[MenuBarsService] to return a `MenuBars` instance read from the classpath.
+
 
 
 [NOTE]
@@ -22,20 +22,19 @@ The SPI defined by this service is:
 
 [source,java]
 ----
-public interface MenuBarsService {
-    MenuBars menuBars();                    // <1>
+public interface MenuBarsLoaderService {
+    boolean supportsReloading();        // <1>
+    MenuBars menuBars();                // <2>
 }
 ----
-<1> An instance of `MenuBars`.
+<1> Whether dynamic reloading of the menu bars layout is enabled.
+If not, then the xref:rgsvc.adoc#_rgsvc_presentation-layer-spi_MenuBarsService[MenuBarsService] will cache the layout once loaded.
+<2> Returns a new instance of `MenuBars` if possible, otherwise null.
 
-[NOTE]
-====
-TODO: need to document `MenuBars` in the rgcms.adoc guide.
-====
 
 
 == Implementation
 
-The framework provides a default implementation of this service, namely `o.a.i.core.runtime.services.menu.MenuBarsServiceDefault`.
-
-
+The framework provides a default implementation of this service, namely `o.a.i.core.runtime.services.menu.MenuBarsLayoutServiceDefault`.
+This searches for a file resource `menubars.layout.xml` in the same package as the `AppManifest` used to bootstrap the application.
+It supports reloading only in prototype mode.
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc
index 1cb1047..583e0d4 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_MenuBarsService.adoc
@@ -6,7 +6,7 @@
 
 
 
-The `MenuBarsService` is responsible for returning an XML representation of the domain service actions.
+The `MenuBarsService` is responsible for returning a `MenuBars` instance, a data structure representing the arrangement of domain service actions across multiple menu bars, menus and sections.
 This is used by the Wicket viewer to build up the menu, and is also served as the "menuBars" resource by the xref:../ugvro/ugvro.adoc#[Restful Objects] viewer.
 
 
@@ -37,5 +37,4 @@ TODO: need to document `MenuBars` in the rgcms.adoc guide.
 == Implementation
 
 The framework provides a default implementation of this service, namely `o.a.i.core.runtime.services.menu.MenuBarsServiceDefault`.
-
-
+This uses the xref:rgsvc.adoc#_rgsvc_presentation-layer-spi_MenuBarsLoaderService[MenuBarsLoaderService]
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java
index 96df2bb..e7b6e8d 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlType;
 import org.apache.isis.applib.annotation.BookmarkPolicy;
 import org.apache.isis.applib.annotation.PromptStyle;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.links.LinkData;
+import org.apache.isis.applib.layout.links.Link;
 
 /**
  * Describes the layout of a single action, broadly corresponding to {@link org.apache.isis.applib.annotation.ActionLayout}.
@@ -257,7 +257,7 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
     }
 
 
-    private LinkData link;
+    private Link link;
 
     /**
      * The link to access this resource from the REST API (Restful Objects viewer).
@@ -267,11 +267,11 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
      * </p>
      */
     @XmlElement(required = false)
-    public LinkData getLink() {
+    public Link getLink() {
         return link;
     }
 
-    public void setLink(final LinkData link) {
+    public void setLink(final Link link) {
         this.link = link;
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
index fd3ab25..26fc325 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
@@ -31,7 +31,7 @@ import com.google.common.base.Function;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.links.LinkData;
+import org.apache.isis.applib.layout.links.Link;
 
 /**
  * Describes the layout of a single collection, broadly corresponds to the {@link org.apache.isis.applib.annotation.CollectionLayout} annotation.
@@ -248,7 +248,7 @@ public class CollectionLayoutData
 
 
 
-    private LinkData link;
+    private Link link;
 
     /**
      * The link to access this resource from the REST API (Restful Objects viewer).
@@ -258,11 +258,11 @@ public class CollectionLayoutData
      * </p>
      */
     @XmlElement(required = false)
-    public LinkData getLink() {
+    public Link getLink() {
         return link;
     }
 
-    public void setLink(final LinkData link) {
+    public void setLink(final Link link) {
         this.link = link;
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java
index 6829c29..184c98a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java
@@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.layout.links.LinkData;
+import org.apache.isis.applib.layout.links.Link;
 
 /**
  * Describes the layout of the title and icon of a domain object, broadly corresponding to {@link org.apache.isis.applib.annotation.DomainObjectLayout}.
@@ -205,7 +205,7 @@ public class DomainObjectLayoutData implements Serializable, Owned<DomainObjectL
     }
 
 
-    private LinkData link;
+    private Link link;
 
     /**
      * The link to access this resource from the REST API (Restful Objects viewer).
@@ -215,11 +215,11 @@ public class DomainObjectLayoutData implements Serializable, Owned<DomainObjectL
      * </p>
      */
     @XmlElement(required = false)
-    public LinkData getLink() {
+    public Link getLink() {
         return link;
     }
 
-    public void setLink(final LinkData link) {
+    public void setLink(final Link link) {
         this.link = link;
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
index a1257a5..76bb144 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
@@ -32,7 +32,7 @@ import com.google.common.collect.Lists;
 import org.apache.isis.applib.annotation.LabelPosition;
 import org.apache.isis.applib.annotation.PromptStyle;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.links.LinkData;
+import org.apache.isis.applib.layout.links.Link;
 
 /**
  * Describes the layout of a single property, broadly corresponds to the {@link org.apache.isis.applib.annotation.PropertyLayout} annotation.
@@ -273,7 +273,7 @@ public class PropertyLayoutData
 
 
 
-    private LinkData link;
+    private Link link;
 
     /**
      * The link to access this resource from the REST API (Restful Objects viewer).
@@ -283,11 +283,11 @@ public class PropertyLayoutData
      * </p>
      */
     @XmlElement(required = false)
-    public LinkData getLink() {
+    public Link getLink() {
         return link;
     }
 
-    public void setLink(final LinkData link) {
+    public void setLink(final Link link) {
         this.link = link;
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/links/LinkData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/links/Link.java
similarity index 96%
rename from core/applib/src/main/java/org/apache/isis/applib/layout/links/LinkData.java
rename to core/applib/src/main/java/org/apache/isis/applib/layout/links/Link.java
index 905788e..db13ad2 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/links/LinkData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/links/Link.java
@@ -35,14 +35,14 @@ import javax.xml.bind.annotation.XmlType;
     }
 )
 @XmlAccessorType(XmlAccessType.FIELD)
-public class LinkData implements Serializable {
+public class Link implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    public LinkData() {
+    public Link() {
     }
 
-    public LinkData(
+    public Link(
             final String rel,
             final String method,
             final String href,
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ActionLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ActionLayoutDataOwner.java
index 93c3700..a2cab1b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ActionLayoutDataOwner.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ActionLayoutDataOwner.java
@@ -23,6 +23,6 @@ import java.util.List;
 import org.apache.isis.applib.layout.component.Owner;
 
 public interface ActionLayoutDataOwner extends Owner {
-    List<ActionLayoutData> getActions();
-    void setActions(List<ActionLayoutData> actions);
+    List<ServiceActionLayoutData> getActions();
+    void setActions(List<ServiceActionLayoutData> actions);
 }
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/menus/MenuSection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/menus/MenuSection.java
index 8d9bb62..871d205 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/menus/MenuSection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/menus/MenuSection.java
@@ -44,17 +44,17 @@ public class MenuSection implements Serializable, ActionLayoutDataOwner {
     }
 
 
-    private List<ActionLayoutData> actions = Lists.newArrayList();
+    private List<ServiceActionLayoutData> actions = Lists.newArrayList();
 
     // no wrapper
     @Override
     @XmlElement(name = "action", required = true)
-    public List<ActionLayoutData> getActions() {
+    public List<ServiceActionLayoutData> getActions() {
         return actions;
     }
 
     @Override
-    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
+    public void setActions(List<ServiceActionLayoutData> actionLayoutDatas) {
         this.actions = actionLayoutDatas;
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ActionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ServiceActionLayoutData.java
similarity index 94%
rename from core/applib/src/main/java/org/apache/isis/applib/layout/menus/ActionLayoutData.java
rename to core/applib/src/main/java/org/apache/isis/applib/layout/menus/ServiceActionLayoutData.java
index 9a608fe..57612f1 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ActionLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/menus/ServiceActionLayoutData.java
@@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.layout.links.LinkData;
+import org.apache.isis.applib.layout.links.Link;
 
 /**
  * Describes the layout of a single action, broadly corresponding to {@link org.apache.isis.applib.annotation.ActionLayout}.
@@ -55,14 +55,14 @@ import org.apache.isis.applib.layout.links.LinkData;
         , "link"
     }
 )
-public class ActionLayoutData implements Serializable {
+public class ServiceActionLayoutData implements Serializable {
 
 
     private static final long serialVersionUID = 1L;
 
-    public ActionLayoutData() {
+    public ServiceActionLayoutData() {
     }
-    public ActionLayoutData(final String oid, final String id) {
+    public ServiceActionLayoutData(final String oid, final String id) {
         this.oid = oid;
         this.id = id;
     }
@@ -211,7 +211,7 @@ public class ActionLayoutData implements Serializable {
     }
 
 
-    private LinkData link;
+    private Link link;
 
     /**
      * The link to access this resource from the REST API (Restful Objects viewer).
@@ -221,11 +221,11 @@ public class ActionLayoutData implements Serializable {
      * </p>
      */
     @XmlElement(required = false)
-    public LinkData getLink() {
+    public Link getLink() {
         return link;
     }
 
-    public void setLink(final LinkData link) {
+    public void setLink(final Link link) {
         this.link = link;
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsLoaderService.java b/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsLoaderService.java
index 19df252..9a6ac39 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsLoaderService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsLoaderService.java
@@ -1,3 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
 package org.apache.isis.applib.services.menu;
 
 import org.apache.isis.applib.annotation.Programmatic;
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsService.java b/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsService.java
index 5bd0e81..c1e0b1b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/menu/MenuBarsService.java
@@ -1,3 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
 package org.apache.isis.applib.services.menu;
 
 import org.apache.isis.applib.annotation.Programmatic;
diff --git a/core/applib/src/test/java/org/apache/isis/applib/layout/menus/MenuBars_roundtrip_Test.java b/core/applib/src/test/java/org/apache/isis/applib/layout/menus/MenuBars_roundtrip_Test.java
index 9ffd97f..4923cc3 100644
--- a/core/applib/src/test/java/org/apache/isis/applib/layout/menus/MenuBars_roundtrip_Test.java
+++ b/core/applib/src/test/java/org/apache/isis/applib/layout/menus/MenuBars_roundtrip_Test.java
@@ -49,14 +49,14 @@ public class MenuBars_roundtrip_Test {
         menu.setNamed("Parties");
 
         MenuSection organisationMenu = new MenuSection();
-        organisationMenu.getActions().add(new ActionLayoutData("parties.OrganisationMenu:1", "findByReference"));
-        organisationMenu.getActions().add(new ActionLayoutData("parties.OrganisationMenu:1", "findByName"));
-        organisationMenu.getActions().add(new ActionLayoutData("parties.OrganisationMenu:1", "create"));
+        organisationMenu.getActions().add(new ServiceActionLayoutData("parties.OrganisationMenu:1", "findByReference"));
+        organisationMenu.getActions().add(new ServiceActionLayoutData("parties.OrganisationMenu:1", "findByName"));
+        organisationMenu.getActions().add(new ServiceActionLayoutData("parties.OrganisationMenu:1", "create"));
         menu.getSections().add(organisationMenu);
 
         MenuSection personMenu = new MenuSection();
-        personMenu.getActions().add(new ActionLayoutData("parties.PersonMenu:1", "findByUsername"));
-        personMenu.getActions().add(new ActionLayoutData("parties.PersonMenu:1", "create"));
+        personMenu.getActions().add(new ServiceActionLayoutData("parties.PersonMenu:1", "findByUsername"));
+        personMenu.getActions().add(new ServiceActionLayoutData("parties.PersonMenu:1", "create"));
         menu.getSections().add(personMenu);
 
         menuBars.getPrimary().getMenus().add(menu);
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/menu/MenuBarsServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/menu/MenuBarsServiceDefault.java
index d476586..86b2dde 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/menu/MenuBarsServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/menu/MenuBarsServiceDefault.java
@@ -37,7 +37,7 @@ import org.apache.isis.applib.annotation.DomainServiceLayout;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.filter.Filters;
-import org.apache.isis.applib.layout.menus.ActionLayoutData;
+import org.apache.isis.applib.layout.menus.ServiceActionLayoutData;
 import org.apache.isis.applib.layout.menus.Menu;
 import org.apache.isis.applib.layout.menus.MenuBar;
 import org.apache.isis.applib.layout.menus.MenuBars;
@@ -146,7 +146,7 @@ public class MenuBarsServiceDefault implements MenuBarsService {
 
                 ObjectAction objectAction = serviceAndAction.objectAction;
                 final String serviceOid = serviceAndAction.serviceAdapter.getOid().enString();
-                ActionLayoutData action = new ActionLayoutData(serviceOid, objectAction.getId());
+                ServiceActionLayoutData action = new ServiceActionLayoutData(serviceOid, objectAction.getId());
                 action.setNamed(objectAction.getName());
                 menuSection.getActions().add(action);
             }
diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainObjectResourceServerside.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainObjectResourceServerside.java
index 76e6697..c3730a8 100644
--- a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainObjectResourceServerside.java
+++ b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainObjectResourceServerside.java
@@ -37,7 +37,7 @@ import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.applib.layout.component.DomainObjectLayoutData;
 import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.layout.component.PropertyLayoutData;
-import org.apache.isis.applib.layout.links.LinkData;
+import org.apache.isis.applib.layout.links.Link;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.core.commons.url.UrlEncodingUtils;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -238,7 +238,7 @@ public class DomainObjectResourceServerside extends ResourceAbstract implements
         grid.visit(new Grid.VisitorAdapter() {
             @Override
             public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
-                LinkData link = new LinkData(
+                Link link = new Link(
                         Rel.ELEMENT.getName(),
                         RestfulHttpMethod.GET.getJavaxRsMethod(),
                         getResourceContext().urlFor(
@@ -250,7 +250,7 @@ public class DomainObjectResourceServerside extends ResourceAbstract implements
 
             @Override
             public void visit(final ActionLayoutData actionLayoutData) {
-                LinkData link = new LinkData(
+                Link link = new Link(
                         Rel.ACTION.getName(),
                         RestfulHttpMethod.GET.getJavaxRsMethod(),
                         getResourceContext().urlFor(
@@ -262,7 +262,7 @@ public class DomainObjectResourceServerside extends ResourceAbstract implements
 
             @Override
             public void visit(final PropertyLayoutData propertyLayoutData) {
-                LinkData link = new LinkData(
+                Link link = new Link(
                         Rel.PROPERTY.getName(),
                         RestfulHttpMethod.GET.getJavaxRsMethod(),
                         getResourceContext().urlFor(
@@ -274,7 +274,7 @@ public class DomainObjectResourceServerside extends ResourceAbstract implements
 
             @Override
             public void visit(final CollectionLayoutData collectionLayoutData) {
-                LinkData link = new LinkData(
+                Link link = new Link(
                         Rel.COLLECTION.getName(),
                         RestfulHttpMethod.GET.getJavaxRsMethod(),
                         getResourceContext().urlFor(
diff --git a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/MenuBarsResourceServerside.java b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/MenuBarsResourceServerside.java
index ce04eed..b97ef4b 100644
--- a/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/MenuBarsResourceServerside.java
+++ b/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/MenuBarsResourceServerside.java
@@ -25,8 +25,8 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.links.LinkData;
-import org.apache.isis.applib.layout.menus.ActionLayoutData;
+import org.apache.isis.applib.layout.links.Link;
+import org.apache.isis.applib.layout.menus.ServiceActionLayoutData;
 import org.apache.isis.applib.layout.menus.Menu;
 import org.apache.isis.applib.layout.menus.MenuBar;
 import org.apache.isis.applib.layout.menus.MenuBars;
@@ -80,11 +80,11 @@ public class MenuBarsResourceServerside extends ResourceAbstract implements Menu
         for (Menu menu : menus) {
             List<MenuSection> sections = menu.getSections();
             for (MenuSection section : sections) {
-                List<ActionLayoutData> actions = section.getActions();
-                for (ActionLayoutData actionLayoutData : actions) {
+                List<ServiceActionLayoutData> actions = section.getActions();
+                for (ServiceActionLayoutData actionLayoutData : actions) {
                     String oid = actionLayoutData.getOid();
                     Bookmark bookmark = new Bookmark(oid);
-                    LinkData link = new LinkData(
+                    Link link = new Link(
                             Rel.ACTION.getName(),
                             RestfulHttpMethod.GET.getJavaxRsMethod(),
                             getResourceContext().urlFor(
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionUtil.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionUtil.java
index ece262f..e2be143 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionUtil.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionUtil.java
@@ -38,7 +38,7 @@ import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Fragment;
 import org.apache.wicket.model.Model;
 
-import org.apache.isis.applib.layout.menus.ActionLayoutData;
+import org.apache.isis.applib.layout.menus.ServiceActionLayoutData;
 import org.apache.isis.applib.layout.menus.Menu;
 import org.apache.isis.applib.layout.menus.MenuBar;
 import org.apache.isis.applib.layout.menus.MenuBars;
@@ -224,7 +224,7 @@ public final class ServiceActionUtil {
 
                 boolean firstSection = true;
 
-                for (final ActionLayoutData actionLayoutData : menuSection.getActions()) {
+                for (final ServiceActionLayoutData actionLayoutData : menuSection.getActions()) {
                     final String oid = actionLayoutData.getOid();
                     final ObjectAdapter serviceAdapter = serviceAdapterByOid.get(oid);
                     final EntityModel entityModel = new EntityModel(serviceAdapter);

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.