You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/07/29 20:33:43 UTC

[2/2] isis git commit: ISIS-1051: updating doc for LayoutMetadataReader2.

ISIS-1051: updating doc for LayoutMetadataReader2.


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

Branch: refs/heads/master
Commit: c3d348088b03f7399a630fb784706a53bc604fc9
Parents: 405d0dd
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Jul 29 19:32:05 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Jul 29 19:32:05 2015 +0100

----------------------------------------------------------------------
 ...rogramming-model_layout-metadata-reader.adoc | 38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c3d34808/adocs/documentation/src/main/asciidoc/guides/_ug_extending_programming-model_layout-metadata-reader.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_extending_programming-model_layout-metadata-reader.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_extending_programming-model_layout-metadata-reader.adoc
index 26f908e..a517dbe 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_extending_programming-model_layout-metadata-reader.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_extending_programming-model_layout-metadata-reader.adoc
@@ -28,6 +28,44 @@ The implementation "simply" returns a set of properties where the property key i
 
 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