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/10/05 11:01:53 UTC

[isis] 06/06: ISIS-1742: updates .adocs, removes references to .layout.json files

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 8e25a9aa226102593e19d8d98733e4fd1c5e3d95
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Oct 5 14:01:35 2017 +0300

    ISIS-1742: updates .adocs, removes references to .layout.json files
---
 .../guides/rgant/_rgant-DomainObjectLayout.adoc    |  2 +-
 .../guides/rgant/_rgant-DomainServiceLayout.adoc   |  2 +-
 .../guides/rgant/_rgant-ParameterLayout.adoc       |  2 +-
 .../guides/rgant/_rgant-ViewModelLayout.adoc       |  2 +-
 .../guides/rgcfg/_rgcfg_configuring-core.adoc      |  9 ---
 .../rgsvc/_rgsvc_metadata-api_LayoutService.adoc   |  7 +-
 .../guides/ugbtb/_ugbtb_programming-model.adoc     |  1 -
 ...b_programming-model_layout-metadata-reader.adoc | 88 ----------------------
 .../guides/ugvw/_ugvw_layout_file-based.adoc       | 10 +--
 .../src/main/asciidoc/pages/tg/_tg_pet-clinic.adoc |  2 +-
 .../tg/_tg_stop-scaffolding-start-coding.adoc      |  6 +-
 todo-deprecation-list.txt                          |  9 ++-
 12 files changed, 17 insertions(+), 123 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObjectLayout.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObjectLayout.adoc
index 99035be..6f14fe2 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObjectLayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObjectLayout.adoc
@@ -109,7 +109,7 @@ public class ToDoItem {
 
 [NOTE]
 ====
-Note that there is (currently) no support for specifying UI hints for domain objects through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.json`] file (only for properties, collections and actions are supported).
+Note that there is (currently) no support for specifying UI hints for domain objects through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
 ====
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainServiceLayout.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainServiceLayout.adoc
index 817b8b6..b7cd67c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainServiceLayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainServiceLayout.adoc
@@ -64,7 +64,7 @@ public class ToDoItems {
 
 [NOTE]
 ====
-Note that there is (currently) no support for specifying UI hints for domain services through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.json`] file (only for properties, collections and actions are supported).
+Note that there is (currently) no support for specifying UI hints for domain services through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
 ====
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ParameterLayout.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ParameterLayout.adoc
index bba6565..b30d65a 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ParameterLayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ParameterLayout.adoc
@@ -96,7 +96,7 @@ public class ToDoItem {
 
 [NOTE]
 ====
-Note that there is (currently) no support for specifying UI hints for domain services through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.json`] file (only for properties, collections and actions are supported).
+Note that there is (currently) no support for specifying UI hints for domain services through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
 ====
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ViewModelLayout.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ViewModelLayout.adoc
index 8526bb0..8aad9bb 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ViewModelLayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-ViewModelLayout.adoc
@@ -82,7 +82,7 @@ public class CategoryPieChart { ... }
 
 [NOTE]
 ====
-Note that there is (currently) no support for specifying UI hints for view models through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.json`] file (only for properties, collections and actions are supported).
+Note that there is (currently) no support for specifying UI hints for view models through the dynamic xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
 ====
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
index fcfc5d1..0b35d85 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
@@ -731,15 +731,6 @@ To be safe, we recommend that you first run your application using `isis.reflect
 See xref:../ugbtb/ugbtb.adoc#_ugbtb_programming-model_finetuning[finetuning the programming model] for more details.
 
 
-|`isis.reflector.` +
-`layoutMetadataReaders`
-|`FQCN`,`FQCN2`,...
-|Fully qualified class names of classes to be instantiated to read layout metadata, as used in for xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[file-based layout]s. +
-
-See xref:../ugbtb/ugbtb.adoc#_ugbtb_programming-model_layout-metadata-reader[Layout Metadata Reader] for more information.
-
-
-
 |`isis.viewers.` +
 `paged.parented`
 |positive integer (12)
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_LayoutService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_LayoutService.adoc
index 689aca1..66558e1 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_LayoutService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_LayoutService.adoc
@@ -38,10 +38,9 @@ enum Style {
 }
 ----
 
-The `CURRENT` style corresponds to the layout already loaded for the domain class, typically from an already persisted
-`layout.xml` file.  The other three styles allow the developer to choose how much metadata is to be specified in the
-XML, and how much (if any) will be obtained elsewhere, typically from annotations in the metamodel (but also from
-`.layout.json` file if present).  The table below summarises the choices:
+The `CURRENT` style corresponds to the layout already loaded for the domain class, typically from an already persisted `layout.xml` file.
+The other three styles allow the developer to choose how much metadata is to be specified in the XML, and how much (if any) will be obtained elsewhere, typically from annotations in the metamodel.
+The table below summarises the choices:
 
 .Table caption
 [cols="<.>,^.>,^.>,^.>", options="header"]
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_programming-model.adoc b/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_programming-model.adoc
index bf67e44..f28d11c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_programming-model.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_programming-model.adoc
@@ -10,5 +10,4 @@ build up its metamodel.
 
 include::_ugbtb_programming-model_custom-validator.adoc[leveloffset=+1]
 include::_ugbtb_programming-model_finetuning.adoc[leveloffset=+1]
-include::_ugbtb_programming-model_layout-metadata-reader.adoc[leveloffset=+1]
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_programming-model_layout-metadata-reader.adoc b/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_programming-model_layout-metadata-reader.adoc
deleted file mode 100644
index e468ee3..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_programming-model_layout-metadata-reader.adoc
+++ /dev/null
@@ -1,88 +0,0 @@
-[[_ugbtb_programming-model_layout-metadata-reader]]
-= Layout Metadata Reader (deprecated)
-: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 metadata for domain objects is obtained both xref:../ugvw/ugvw.adoc#_ugvw_layout_annotation-based[annotations] and xref:../ugvw/ugvw.adoc#_ugvw_layout_file-based[files].
-There is also deprecated support for reading layouts from `.layout.json` files.
-This service provides an SPI (and default implementation) for reading layouts defined in this fashion.
-
-
-== Default implementation
-
-The default implementation for reading dynamic layout metadata is `org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJson`, which is responsible for reading from the `Xxx.layout.json` files on the classpath (for each domain entity `Xxx`).
-
-You can also implement your own metadata readers and plug them into Apache Isis.  These could read from a different file format, or they could, even, read data dynamically from a URL or database.  (Indeed, one could imagine an implementation whereby users could share layouts, all stored in some central repository).
-
-
-
-
-== API and Implementation
-
-Any reader must implement Apache Isis' internal `LayoutMetadataReader` interface:
-
-[source,java]
-----
-public interface LayoutMetadataReader {
-    public Properties asProperties(Class<?> domainClass) throws ReaderException;
-}
-----
-
-The implementation "simply" returns a set of properties where the property key is a unique identifier to both the class member and also the facet of the class member to which the metadata relates.
-
-See the implementation of the built-in `LayoutMetadataReaderFromJson` for more detail.
-
-Returning either `null` or throwing an exception indicates that the reader was unable to load any metadata for the specified class.
-
-
-=== Extended API
-
-Optionally the reader can implement the extended `LayoutMetadaReader2` API:
-
-[source,java]
-----
-public interface LayoutMetadataReader2 extends LayoutMetadataReader {
-    public static class Support {
-        public static Support entitiesOnly() {
-            return new Support(false,false,false,false,false,false,false);
-        }
-        ...
-        public boolean interfaces() { ... } // <1>
-        public boolean anonymous() { ... }  // <2>
-        public boolean synthetic() { ... }  // <3>
-        public boolean array() { ... }      // <4>
-        public boolean enums() { ... }      // <5>
-        public boolean applibValueTypes() { // <6>
-        public boolean services() { ... }   // <7>
-    }
-    Support support();
-}
-----
-<1> whether this implementation can provide metadata for interface types.
-<2> whether this implementation can provide metadata for anonymous classes.
-<3> whether this implementation can provide metadata for synthetic types.
-<4> whether this implementation can provide metadata for arrays.
-<5> whether this implementation can provide metadata for enums.
-<6> whether this implementation can provide metadata for applib value types.
-<7> whether this implementation can provide metadata for domain services.
-
-The `support()` method returns a struct class that describes the types of classes are supported by this implementation.
-
-The `LayoutMetadataReaderFromJson` implements this extended API.
-
-
-
-== Configuration
-
-Once you have implemented your validator, you must register it with the framework by defining the appropriate configuration property:
-
-[source,ini]
-----
-isis.reflector.layoutMetadataReaders=\
-           com.mycompany.myapp.MyMetaModelValidator,\
-           org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJson   # <1>
-----
-<1> the property replaces any existing metadata readers; if you want to preserve the ability to read from `Xxx.layout.json` then also register Apache Isis' built-in implementation.
-
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_layout_file-based.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_layout_file-based.adoc
index ff94776..fbf9125 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_layout_file-based.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_layout_file-based.adoc
@@ -30,14 +30,6 @@ The `Xxx.layout.xml` file is just the serialized form of a xref:../rgcms/rgcms.a
 is that IDEs such as IntelliJ and Eclipse can provide "intellisense", making iteasy to author such layout files.
 
 
-[NOTE]
-====
-It is also possible to describe layouts using a `.layout.json` file.
-However, `.layout.json` support is deprecated; the ``.layout.xml`` file also enables much more sophisticated layouts than those afforded by ``.layout.json``.
-
-If you have an application with older `.layout.json` files, then it is possible to download initial `.layout.xml` files using the xref:../rgsvc/rgsvc.adoc#_rgsvc_metadata-api_LayoutService[`LayoutService`] (exposed as an action on the prototyping menu).
-The `.layout.json` file will be ignored once a `.layout.xml` file is present.
-====
 
 
 == Grids vs Components
@@ -358,7 +350,7 @@ There are four "styles":
 * minimal
 
 
-Ignorig the "current" style (which merely downloads the currently cached layout), the other three styles allow the developer to choose how much metadata is to be specified in the XML, and how much (if any) will be obtained elsewhere, either from annotations in the metamodel or from an earlier `.layout.json` file if present.
+Ignorig the "current" style (which merely downloads the currently cached layout), the other three styles allow the developer to choose how much metadata is to be specified in the XML, and how much (if any) will be obtained from annotations in the metamodel.
 The table below summarises the choices:
 
 .Table caption
diff --git a/adocs/documentation/src/main/asciidoc/pages/tg/_tg_pet-clinic.adoc b/adocs/documentation/src/main/asciidoc/pages/tg/_tg_pet-clinic.adoc
index 0285e76..f3e3eeb 100644
--- a/adocs/documentation/src/main/asciidoc/pages/tg/_tg_pet-clinic.adoc
+++ b/adocs/documentation/src/main/asciidoc/pages/tg/_tg_pet-clinic.adoc
@@ -1,5 +1,5 @@
 [[_tg_pet-clinic]]
-= Pet Clinic
+= Pet Clinic (<= 1.13.1)
 :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/
diff --git a/adocs/documentation/src/main/asciidoc/pages/tg/_tg_stop-scaffolding-start-coding.adoc b/adocs/documentation/src/main/asciidoc/pages/tg/_tg_stop-scaffolding-start-coding.adoc
index 4e80a24..3f962ba 100644
--- a/adocs/documentation/src/main/asciidoc/pages/tg/_tg_stop-scaffolding-start-coding.adoc
+++ b/adocs/documentation/src/main/asciidoc/pages/tg/_tg_stop-scaffolding-start-coding.adoc
@@ -511,7 +511,7 @@ Why are contributions so useful? Because the service action will match not on th
 That means that you can apply the http://en.wikipedia.org/wiki/Dependency_inversion_principle[dependency inversion principle] to ensure that the modules of your application have acyclic dependencies; but in the UI it can still appear as if there are bidirectional dependencies between those modules.
 The lack of bidirectional dependencies can help save your app degrading into a http://en.wikipedia.org/wiki/Big_ball_of_mud[big ball of mud].
 
-Finally, note that the layout of contributed actions/collections/properties can be specified using the `.layout.json` file (and it is highly recommended that you do so).
+Finally, note that the layout of contributed actions/collections/properties can be specified using the `.layout.xml` file (and it is highly recommended that you do so).
 
 === Contributed Actions
 
@@ -532,7 +532,7 @@ Finally, note that the layout of contributed actions/collections/properties can
 * For this action:
 ** add the xref:../../guides/rgant/rgant.adoc#_rgant-ActionLayout_contributedAs[`@ActionLayout(contributedAs=ASSOCIATION)`] annotation
 ** should be rendered in the UI "as if" a collection of the entity
-* use `.layout.json` to position as required
+* use `.layout.xml` to position as required
 
 
 === Contributed Properties
@@ -542,7 +542,7 @@ Finally, note that the layout of contributed actions/collections/properties can
 * For this action:
 ** add the xref:../../guides/rgant/rgant.adoc#_rgant-ActionLayout_contributedAs[`@ActionLayout(contributedAs=ASSOCIATION)`] annotation
 * should be rendered in the UI "as if" a property of the entity
-* use `.layout.json` to position as required
+* use `.layout.xml` to position as required
 
 
 
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index 871c776..d02c1bd 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -1,8 +1,12 @@
 
 
+DONE:
+
+    removed support for Xxx.layout.json
+    - "reflector.layoutMetadataReaders" config prop
+
 
 
-DONE:
 
 org.apache.isis.applib
 
@@ -292,9 +296,6 @@ sometimes there are multiple versions of a type, eg BookmarkService2 and Bookmar
 
 Also propose:
     make AppManifest mandatory
-    remove support for Xxx.layout.json
-
-    - "reflector.layoutMetadataReaders" config prop
 
     remove support for contributed services (use mixins instead)
 

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