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 2020/01/03 15:21:20 UTC

[isis] branch master updated: ISIS-2243: sync'ing adocs

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


The following commit(s) were added to refs/heads/master by this push:
     new eb58929  ISIS-2243: sync'ing adocs
eb58929 is described below

commit eb589299728729ab4ddafa7ec216c89500020788
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 3 15:12:09 2020 +0000

    ISIS-2243: sync'ing adocs
---
 .../examples/mixins/layout/Object_openRestApi.java | 24 ++++++++++++++--------
 .../generated/isis.viewer.restfulobjects.adoc      |  5 -----
 .../examples/generated/isis.viewer.wicket.adoc     |  2 +-
 .../config/examples/generated/resteasy.adoc        | 21 +++++++++++++++++++
 4 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/core/applib/src/main/doc/modules/applib-cm/examples/mixins/layout/Object_openRestApi.java b/core/applib/src/main/doc/modules/applib-cm/examples/mixins/layout/Object_openRestApi.java
index b03e4f4..6ce557e 100644
--- a/core/applib/src/main/doc/modules/applib-cm/examples/mixins/layout/Object_openRestApi.java
+++ b/core/applib/src/main/doc/modules/applib-cm/examples/mixins/layout/Object_openRestApi.java
@@ -29,18 +29,23 @@ import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.mixins.MixinConstants;
 import org.apache.isis.applib.services.bookmark.BookmarkService;
+import org.apache.isis.applib.services.confview.ConfigurationViewService;
 import org.apache.isis.applib.value.LocalResourcePath;
 import org.apache.isis.commons.internal.resources._Resources;
 
 import lombok.RequiredArgsConstructor;
 import lombok.val;
 
+import java.util.Optional;
+
 @Mixin(method="act")
 @RequiredArgsConstructor
 public class Object_openRestApi {
 
     @Inject private BookmarkService bookmarkService;
-    
+    @Inject private ConfigurationViewService configurationViewService;
+    @Inject private RestfulPathProvider restfulPathProvider;
+
     private final Object holder;
 
     public static class ActionDomainEvent
@@ -61,14 +66,17 @@ public class Object_openRestApi {
         val bookmark = bookmarkService.bookmarkForElseThrow(holder);
         val objType = bookmark.getObjectType();
         val objId = bookmark.getIdentifier();
-        val restfulPathIfAny = _Resources.getRestfulPathIfAny();
 
-        return restfulPathIfAny!=null
-                ? new LocalResourcePath(String.format(
-                        "/%s/objects/%s/%s", restfulPathIfAny, objType, objId))
-                        : new LocalResourcePath(String.format(
-                                "/objects/%s/%s", objType, objId));
+        val restfulPathIfAny = restfulPathProvider.getRestfulPath();
+
+        final String format = restfulPathIfAny
+                .map(path -> String.format("%s/objects/%s/%s", path, objType, objId))
+                .orElseGet(() -> String.format("/objects/%s/%s", objType, objId));
+        return new LocalResourcePath(format);
+    }
+
+    public interface RestfulPathProvider {
+        Optional<String> getRestfulPath();
     }
-    
 
 }
diff --git a/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.restfulobjects.adoc b/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.restfulobjects.adoc
index cb7af38..dc934d5 100644
--- a/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.restfulobjects.adoc
+++ b/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.restfulobjects.adoc
@@ -1,9 +1,4 @@
 | isis.viewer.restfulobjects. +
-base-path
-|  /restful
-| 
-
-| isis.viewer.restfulobjects. +
 gsoc2013.legacy-param-details
 | 
 | 
diff --git a/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.wicket.adoc b/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.wicket.adoc
index 1ef5680..bd4c912 100644
--- a/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.wicket.adoc
+++ b/core/config/src/main/doc/modules/config/examples/generated/isis.viewer.wicket.adoc
@@ -62,7 +62,7 @@ application.version
 |  The version of the application, eg 1.0, 1.1, etc. If present, then this will be shown in the footer on every page as well as on the  about page.
 
 | isis.viewer.wicket.base-path
-|  /wicket
+|  /wicket/
 | 
 
 | isis.viewer.wicket. +
diff --git a/core/config/src/main/doc/modules/config/examples/generated/resteasy.adoc b/core/config/src/main/doc/modules/config/examples/generated/resteasy.adoc
new file mode 100644
index 0000000..8a8ac8b
--- /dev/null
+++ b/core/config/src/main/doc/modules/config/examples/generated/resteasy.adoc
@@ -0,0 +1,21 @@
+| resteasy.as-map
+| 
+| 
+
+| resteasy.environment
+| 
+| 
+
+| resteasy.jaxrs.app. +
+registration
+| 
+| 
+
+| resteasy.jaxrs.default-path
+|  /restful
+|  Note that this is used rather than `resteasy.servlet.mapping.prefix</code> because there is _NO</i> implementation of {@link javax.ws.rs.core.Application}, so we rely on it being automatically created.
+
+| resteasy.resteasy-settings
+| 
+| 
+