You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/01/28 17:57:29 UTC

[isis] branch master updated: ISIS-2158: adding comments for future extension

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

ahuber 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 0ef3369  ISIS-2158: adding comments for future extension
0ef3369 is described below

commit 0ef3369256c113dfe1d9154f7ce57df147031678
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Jan 28 18:57:21 2020 +0100

    ISIS-2158: adding comments for future extension
---
 .../org/apache/isis/testdomain/rest/RestServiceTest.java     |  2 +-
 .../extensions/restclient/ActionParameterListBuilder.java    | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/examples/smoketests/src/test/java/org/apache/isis/testdomain/rest/RestServiceTest.java b/examples/smoketests/src/test/java/org/apache/isis/testdomain/rest/RestServiceTest.java
index e64ef0e..3c1b41a 100644
--- a/examples/smoketests/src/test/java/org/apache/isis/testdomain/rest/RestServiceTest.java
+++ b/examples/smoketests/src/test/java/org/apache/isis/testdomain/rest/RestServiceTest.java
@@ -130,7 +130,7 @@ class RestServiceTest {
         assertNotNull(restService.getPort());
         assertTrue(restService.getPort()>0);
 
-        val useRequestDebugLogging = true;
+        val useRequestDebugLogging = false;
         val restfulClient = restService.newClient(useRequestDebugLogging);
 
         val digest = restService.getRecommendedBookOfTheWeekAsDto(restfulClient);
diff --git a/mappings/restclient/api/src/main/java/org/apache/isis/extensions/restclient/ActionParameterListBuilder.java b/mappings/restclient/api/src/main/java/org/apache/isis/extensions/restclient/ActionParameterListBuilder.java
index 2b2cda7..c80e2b5 100644
--- a/mappings/restclient/api/src/main/java/org/apache/isis/extensions/restclient/ActionParameterListBuilder.java
+++ b/mappings/restclient/api/src/main/java/org/apache/isis/extensions/restclient/ActionParameterListBuilder.java
@@ -74,6 +74,12 @@ public class ActionParameterListBuilder {
         return this;
     }
 
+//XXX would be nice to have, but also requires the RO spec to be updated     
+//    public ActionParameterListBuilder addActionParameterDto(String parameterName, Object parameterDto) {
+//        actionParameters.put(parameterName, dto(parameterDto));
+//        return this;
+//    }
+    
     public Entity<String> build() {
 
         final StringBuilder sb = new StringBuilder();
@@ -93,6 +99,12 @@ public class ActionParameterListBuilder {
     private String value(String valueLiteral) {
         return "{\"value\" : " + valueLiteral + "}";
     }
+    
+//    @SneakyThrows
+//    private String dto(Object dto) {
+//        val mapper = new ObjectMapper();
+//        return mapper.writeValueAsString(dto);
+//    }
 
     private String toJson(Map.Entry<String, String> entry) {
         return "   \""+entry.getKey()+"\": "+entry.getValue();