You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2021/08/20 13:59:42 UTC

[isis] branch master updated: ISIS-2838 Clicking on object-icon in parented colletion row now opens new tab and displays object within.

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

joergrade 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 551617c  ISIS-2838 Clicking on object-icon in parented colletion row now opens new tab and displays object within.
     new 6c65c69  Merge branch 'master' of https://github.com/apache/isis
551617c is described below

commit 551617c7f7828552ba28fb7cc1cbbfc012243846
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Fri Aug 20 15:51:52 2021 +0200

    ISIS-2838 Clicking on object-icon in parented colletion row now opens new tab and displays object within.
---
 .../kroviz/core/aggregator/AggregatorWithLayout.kt |  4 +-
 .../kroviz/core/aggregator/BaseAggregator.kt       |  6 +-
 .../kroviz/core/aggregator/CollectionAggregator.kt |  6 +-
 .../kroviz/core/aggregator/ObjectAggregator.kt     |  6 +-
 .../isis/client/kroviz/core/event/EventStore.kt    |  4 +
 .../event/{RequestProxy.kt => ResourceProxy.kt}    | 86 ++++++++--------------
 .../client/kroviz/core/event/RoXmlHttpRequest.kt   | 53 +++++++------
 .../isis/client/kroviz/core/model/ObjectDM.kt      | 31 +++++++-
 .../isis/client/kroviz/ui/core/MenuFactory.kt      | 12 +--
 .../apache/isis/client/kroviz/ui/core/RoTable.kt   |  4 +-
 .../apache/isis/client/kroviz/ui/dialog/Command.kt |  4 +-
 .../isis/client/kroviz/ui/dialog/SvgInline.kt      |  4 +-
 .../client/kroviz/ui/panel/DynamicMenuBuilder.kt   |  4 +-
 .../apache/isis/client/kroviz/utils/UmlUtils.kt    |  7 +-
 .../isis/client/kroviz/handler/IconHandlerTest.kt  |  4 +-
 .../org/apache/isis/client/kroviz/to/ActionTest.kt |  4 +-
 16 files changed, 123 insertions(+), 116 deletions(-)

diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt
index e0ab57c..46998dc 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt
@@ -14,9 +14,7 @@ abstract class AggregatorWithLayout : BaseAggregator() {
             dm.properties.propertyLayoutList.forEach { p ->
                 val l = p.link
                 if (l == null) {
-                    console.log("[AWL.handleLayout] propertyLayoutList doesn't have links anymore? ")
-                    console.log(p)
-                    console.log(dm)
+                    //                   console.log(p.id + " link empty")  // ISIS-2846
                 } else {
                     val isDn = l.href.contains("datanucleus")
                     if (!isDn) {
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt
index 1e3c1b1..46f4262 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt
@@ -19,7 +19,7 @@
 package org.apache.isis.client.kroviz.core.aggregator
 
 import org.apache.isis.client.kroviz.core.event.LogEntry
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.core.model.DisplayModel
 import org.apache.isis.client.kroviz.to.Link
 import org.apache.isis.client.kroviz.to.TObject
@@ -29,7 +29,7 @@ import org.apache.isis.client.kroviz.ui.core.Constants
  * An Aggregator:
  * @item is initially created in ResponseHandlers, displayModels, Menus
  * @item is assigned to at least one LogEntry,
- * @item is passed on to related LogEntries (eg. sibblings in a list, Layout),
+ * @item is passed on to related LogEntries (eg. siblings in a list, Layout),
  * @item is notified about changes to related LogEntries,
  * @item invokes subsequent links, and
  * @item triggers creation a view for an object or a list.
@@ -83,7 +83,7 @@ abstract class BaseAggregator {
     }
 
     protected fun invoke(link: Link, aggregator: BaseAggregator, subType: String = Constants.subTypeJson) {
-        RequestProxy().invoke(link, aggregator, subType)
+        ResourceProxy().fetch(link, aggregator, subType)
     }
 
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt
index 84b11d4..99f19b2 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt
@@ -20,7 +20,7 @@ package org.apache.isis.client.kroviz.core.aggregator
 
 import org.apache.isis.client.kroviz.core.event.EventState
 import org.apache.isis.client.kroviz.core.event.LogEntry
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.layout.Layout
 import org.apache.isis.client.kroviz.to.*
@@ -123,11 +123,11 @@ class CollectionAggregator(actionTitle: String, val parent: ObjectAggregator? =
     private fun handleCollection(collection: Collection) {
         collection.links.forEach {
             if (it.relation() == Relation.DESCRIBED_BY) {
-                RequestProxy().invoke(it, this)
+                ResourceProxy().fetch(it, this)
             }
         }
         collection.value.forEach {
-            RequestProxy().invoke(it, this)
+            ResourceProxy().fetch(it, this)
         }
     }
 
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt
index 7e75e55..c09a0e3 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt
@@ -19,7 +19,7 @@
 package org.apache.isis.client.kroviz.core.aggregator
 
 import org.apache.isis.client.kroviz.core.event.LogEntry
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.core.model.ObjectDM
 import org.apache.isis.client.kroviz.layout.Layout
@@ -43,7 +43,7 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() {
     }
 
     override fun update(logEntry: LogEntry, subType: String) {
-        if (logEntry.url != "") {  // le=="" -> invoked from CollectionAggregrator
+        if (!logEntry.isUpdatedFromParentedCollection()) {
             when (val obj = logEntry.getTransferObject()) {
                 is TObject -> handleObject(obj)
                 is ResultObject -> handleResultObject(obj)
@@ -106,7 +106,7 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() {
             val aggregator = CollectionAggregator(key, this)
             collectionMap.put(key, aggregator)
             val link = it.links.first()
-            RequestProxy().invoke(link, aggregator)
+            ResourceProxy().fetch(link, aggregator)
         }
     }
 
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/EventStore.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/EventStore.kt
index cc55bd4..b8fa60a 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/EventStore.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/EventStore.kt
@@ -147,6 +147,10 @@ object EventStore {
         return log.firstOrNull { it.getAggregator() == aggregator }
     }
 
+    fun findAllBy(aggregator: BaseAggregator): List<LogEntry> {
+        return log.filter { it.getAggregator() == aggregator }
+    }
+
     fun findByDispatcher(uuid: UUID): LogEntry {
         return log.first {
             val aggt = it.getAggregator()
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RequestProxy.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceProxy.kt
similarity index 64%
rename from incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RequestProxy.kt
rename to incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceProxy.kt
index 1202ed5..733a1de 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RequestProxy.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceProxy.kt
@@ -28,90 +28,66 @@ import org.apache.isis.client.kroviz.to.TObject
 import org.apache.isis.client.kroviz.ui.core.Constants
 
 /**
- * Facade for RoXmlHttpRequest. If a request is being issued, it:
+ * Facade for RoXmlHttpRequest. If a resource is being fetched, it:
  *
  * * looks in EventStore, if a (similar) request has been issued before and can be retrieved from local storage, and if
  * 1. No: issue the real request and handle the response via ResponseHandler (chain)
  * 2. Yes: use the cached response and pass it directly to the respective Aggregator/Dispatcher
  *
  */
-class RequestProxy {
+class ResourceProxy {
 
-    fun invoke(link: Link, aggregator: BaseAggregator? = null, subType: String = Constants.subTypeJson) {
-        val rs = ResourceSpecification(link.href)
-        when {
-            isCached(rs, link.method) -> processCached(rs, aggregator)
-            else -> RoXmlHttpRequest().process(link, aggregator, subType)
-        }
-    }
-
-    private fun isNotRenderedYet(aggregator: BaseAggregator?): Boolean {
-        if (aggregator != null && aggregator is AggregatorWithLayout) {
-            return !aggregator.dpm.isRendered
-        } else {
-            return false
+    // there may be more than one aggt - which may break this code
+    // we are coming from a parented collection ...
+    // we can assume the object hat been loaded as part of the collection before
+    fun load(tObject: TObject) {
+        val aggregator = ObjectAggregator(tObject.title)
+        // ASSUMPTION: there can be max one LogEntry for an Object
+        val le = EventStore.findBy(tObject)
+        if (le != null) {
+            le.addAggregator(aggregator)
+            aggregator.update(le, le.subType)
         }
     }
 
     private fun processCached(rs: ResourceSpecification, aggregator: BaseAggregator?) {
-        console.log("[RP.processCached]")
         val le = EventStore.findBy(rs)!!
         le.retrieveResponse()
         if (aggregator == null) {
             ResponseHandler.handle(le)
         } else {
-            console.log(aggregator)
-            console.log(le)
             aggregator.update(le, le.subType)
         }
-        cached(rs)
+        le.setCached()
+        EventStore.updateStatus(le)
     }
 
-    private fun cached(rs: ResourceSpecification): LogEntry {
-        val entry: LogEntry = EventStore.findBy(rs)!!
-        entry.setCached()
-        EventStore.updateStatus(entry)
-        return entry
-    }
-
-    fun invokeNonREST(link: Link, aggregator: BaseAggregator?, subType: String = Constants.subTypeXml) {
+    fun fetch(link: Link,
+              aggregator: BaseAggregator? = null,
+              subType: String = Constants.subTypeJson,
+              isRest: Boolean = true) {
         val rs = ResourceSpecification(link.href)
+        val isCached = when (val le = EventStore.findBy(rs)) {
+            null -> false
+            else -> le.isCached(rs, link.method)
+        }
         when {
-            isCached(rs, link.method) -> processCached(rs, aggregator)
-            else -> RoXmlHttpRequest().processNonREST(link, aggregator, subType)
+            isCached -> processCached(rs, aggregator)
+            !isCached && isRest -> RoXmlHttpRequest(aggregator).process(link, subType)
+            !isCached && !isRest -> RoXmlHttpRequest(aggregator).processNonREST(link, subType)
         }
     }
 
-    private fun isCached(rs: ResourceSpecification, method: String): Boolean {
-        val le = EventStore.findBy(rs)
-        if (le == null) {
-            return false
+    private fun isNotRenderedYet(aggregator: BaseAggregator?): Boolean {
+        if (aggregator != null && aggregator is AggregatorWithLayout) {
+            return !aggregator.dpm.isRendered
         } else {
-            val result = le.isCached(rs, method)
-            if (result) le.setCached()
-            return result
+            return false
         }
     }
 
-    fun invokeKroki(pumlCode: String, agr: SvgDispatcher) {
-        RoXmlHttpRequest().invokeKroki(pumlCode, agr)
-    }
-
-    // there may be more than one aggt - which may break this code
-    // we are coming from a parented collection ...
-    // we can assume the object hat been loaded as part of the collection before
-    fun load(tObject: TObject) {
-        console.log("[RP.load]")
-        val aggregator = ObjectAggregator(tObject.title)
-        // ASSUMPTION: there can be max one LogEntry for an Object
-        val le = EventStore.findBy(tObject)
-        console.log(le)
-        if (le != null) {
-            le.addAggregator(aggregator)
-            console.log(aggregator)
-            console.log(le)
-            aggregator.update(le, le.subType)
-        }
+    fun invokeKroki(pumlCode: String, aggregator: SvgDispatcher) {
+        RoXmlHttpRequest(aggregator).invokeKroki(pumlCode)
     }
 
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt
index 25ab910..28b9b1b 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt
@@ -18,8 +18,8 @@
  */
 package org.apache.isis.client.kroviz.core.event
 
+import org.apache.isis.client.kroviz.core.aggregator.AggregatorWithLayout
 import org.apache.isis.client.kroviz.core.aggregator.BaseAggregator
-import org.apache.isis.client.kroviz.core.aggregator.SvgDispatcher
 import org.apache.isis.client.kroviz.handler.ResponseHandler
 import org.apache.isis.client.kroviz.to.Link
 import org.apache.isis.client.kroviz.to.Method
@@ -34,12 +34,14 @@ import org.w3c.xhr.XMLHttpRequestResponseType
 /**
  * The name is somewhat misleading, see: https://en.wikipedia.org/wiki/XMLHttpRequest
  */
-class RoXmlHttpRequest {
+class RoXmlHttpRequest(val aggregator: BaseAggregator?) {
+
+    private val xhr = XMLHttpRequest()
 
     private val CONTENT_TYPE = "Content-Type"
     private val ACCEPT = "Accept"
 
-    internal fun process(link: Link, aggregator: BaseAggregator?, subType: String) {
+    internal fun process(link: Link, subType: String) {
         val method = link.method
         var url = link.href
         if (method != Method.POST.operation) {
@@ -47,7 +49,6 @@ class RoXmlHttpRequest {
         }
         val credentials: String = UiManager.getCredentials()
 
-        val xhr = XMLHttpRequest()
         xhr.open(method, url, true)
         xhr.setRequestHeader("Authorization", "Basic $credentials")
         xhr.setRequestHeader(CONTENT_TYPE, "application/$subType;charset=UTF-8")
@@ -56,8 +57,8 @@ class RoXmlHttpRequest {
             xhr.responseType = XMLHttpRequestResponseType.BLOB
         }
 
-        val body = buildBody(link, aggregator)
-        val rs = buildResourceSpecificationAndSetupHandler(url, subType, body, xhr)
+        val body = buildBody(link)
+        val rs = buildResourceSpecificationAndSetupHandler(url, subType, body)
 
         when {
             body.isEmpty() -> xhr.send()
@@ -66,7 +67,7 @@ class RoXmlHttpRequest {
         EventStore.start(rs, method, body, aggregator)
     }
 
-    private fun buildBody(link: Link, aggregator: BaseAggregator?): String {
+    private fun buildBody(link: Link): String {
         return when {
             link.hasArguments() -> StringUtils.argumentsAsBody(link)
             link.method == Method.PUT.operation -> {
@@ -80,56 +81,60 @@ class RoXmlHttpRequest {
         }
     }
 
-    internal fun processNonREST(link: Link, aggregator: BaseAggregator?, subType: String) {
+    internal fun processNonREST(link: Link, subType: String) {
         val method = link.method
         val url = link.href
 
-        val xhr = XMLHttpRequest()
         xhr.open(method, url, true)
         xhr.setRequestHeader(CONTENT_TYPE, Constants.stdMimeType)
         xhr.setRequestHeader(ACCEPT, Constants.svgMimeType)
 
         val body = StringUtils.argumentsAsList(link)
         xhr.send(body)
-        val rs = buildResourceSpecificationAndSetupHandler(url, subType, body, xhr)
+        val rs = buildResourceSpecificationAndSetupHandler(url, subType, body)
 
         EventStore.start(rs, method, body, aggregator)
     }
 
-    internal fun invokeKroki(pumlCode: String, agr: SvgDispatcher) {
+    internal fun invokeKroki(pumlCode: String) {
         val method = Method.POST.operation
         val url = Constants.krokiUrl + "plantuml"
 
-        val xhr = XMLHttpRequest()
         xhr.open(method, url, true)
         xhr.setRequestHeader(CONTENT_TYPE, Constants.stdMimeType)
         xhr.setRequestHeader(ACCEPT, Constants.svgMimeType)
 
-        val rs = buildResourceSpecificationAndSetupHandler(url, Constants.subTypeJson, pumlCode, xhr)
+        val rs = buildResourceSpecificationAndSetupHandler(url, Constants.subTypeJson, pumlCode)
 
         xhr.send(pumlCode)
-        EventStore.start(rs, method, pumlCode, agr)
+        EventStore.start(rs, method, pumlCode, aggregator)
     }
 
     private fun buildResourceSpecificationAndSetupHandler(
             url: String,
             subType: String,
-            body: String,
-            xhr: XMLHttpRequest): ResourceSpecification {
+            body: String): ResourceSpecification {
         val rs = ResourceSpecification(url, subType)
-        xhr.onload = { _ -> handleResult(rs, body, xhr) }
-        xhr.onerror = { _ -> handleError(rs, xhr) }
-        xhr.ontimeout = { _ -> handleError(rs, xhr) }
+        xhr.onload = { _ -> handleResult(rs, body) }
+        xhr.onerror = { _ -> handleError(rs) }
+        xhr.ontimeout = { _ -> handleError(rs) }
         return rs
     }
 
-    private fun handleResult(rs: ResourceSpecification, body: String, xhr: XMLHttpRequest) {
-        val response:Any? = xhr.response
-        val logEntry: LogEntry? = EventStore.end(rs, body, response)
-        if (logEntry != null) ResponseHandler.handle(logEntry)
+    private fun handleResult(rs: ResourceSpecification, body: String) {
+        val response: Any? = xhr.response
+        val le: LogEntry? = EventStore.end(rs, body, response)
+        if (le != null) {
+            when {
+                aggregator == null -> ResponseHandler.handle(le)
+                le.obj == null -> ResponseHandler.handle(le)
+                aggregator is AggregatorWithLayout -> aggregator.update(le, le.subType)
+                else -> ResponseHandler.handle(le)
+            }
+        }
     }
 
-    private fun handleError(rs: ResourceSpecification, xhr: XMLHttpRequest) {
+    private fun handleError(rs: ResourceSpecification) {
         val responseText = xhr.responseText
         EventStore.fault(rs, responseText)
     }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt
index 74040c3..ec80bfb 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt
@@ -18,8 +18,9 @@
  */
 package org.apache.isis.client.kroviz.core.model
 
+import org.apache.isis.client.kroviz.core.event.EventStore
 import org.apache.isis.client.kroviz.core.event.EventStore.findBy
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.core.event.ResourceSpecification
 import org.apache.isis.client.kroviz.to.*
 
@@ -29,6 +30,7 @@ class ObjectDM(override val title: String) : DisplayModelWithLayout() {
     private var dirty: Boolean = false
 
     override fun canBeDisplayed(): Boolean {
+ //       debug()
         return when {
             isRendered -> false
             (layout == null) && (grid == null) -> false
@@ -36,6 +38,29 @@ class ObjectDM(override val title: String) : DisplayModelWithLayout() {
         }
     }
 
+    private fun debug()  {
+        console.log("[]")
+        console.log("[ODM.debug] data / collections / layout / grid / properties / icon / aggregator / logEntries")
+        console.log(data)
+        console.log(collections)
+        console.log(layout)
+        console.log(grid)
+        console.log(properties)
+        console.log(icon)
+        if (data != null) {
+            val delegate = (data as Exposer).delegate
+            val selfLink = delegate.getSelfLink()
+            val rs = ResourceSpecification(selfLink.href)
+            val le = EventStore.findBy(rs)!!
+            val aggt = le.getAggregator()
+            console.log(aggt)
+            val logEntries = EventStore.findAllBy(aggt)
+            logEntries.forEach {
+                console.log(it)
+            }
+        }
+    }
+
     fun setDirty(value: Boolean) {
         dirty = value
     }
@@ -78,9 +103,9 @@ class ObjectDM(override val title: String) : DisplayModelWithLayout() {
             val aggregator = logEntry?.getAggregator()!!
             // there may be more than one aggt - which may break this code
 
-            RequestProxy().invoke(putLink, aggregator)
+            ResourceProxy().fetch(putLink, aggregator)
             // now data should be reloaded
-            RequestProxy().invoke(getLink, aggregator)
+            ResourceProxy().fetch(getLink, aggregator)
         }
     }
 
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/MenuFactory.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/MenuFactory.kt
index 653a1bc..f34cc30 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/MenuFactory.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/MenuFactory.kt
@@ -24,7 +24,7 @@ import io.kvision.dropdown.separator
 import io.kvision.html.ButtonStyle
 import io.kvision.utils.set
 import org.apache.isis.client.kroviz.core.event.EventStore
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.to.Link
 import org.apache.isis.client.kroviz.to.TObject
 import org.apache.isis.client.kroviz.to.mb.Menu
@@ -52,7 +52,7 @@ object MenuFactory {
             val link = buildActionLink(it.id, text)
             val invokeLink = it.getInvokeLink()!!
             link.onClick {
-                RequestProxy().invoke(invokeLink)
+                ResourceProxy().fetch(invokeLink)
             }
             dd.add(link)
         }
@@ -77,7 +77,7 @@ object MenuFactory {
             section.serviceAction.forEach { sa ->
                 val action = buildActionLink(sa.id!!, menuTitle)
                 action.onClick {
-                    RequestProxy().invoke(sa.link!!)
+                    ResourceProxy().fetch(sa.link!!)
                 }
                 action.setDragDropData(Constants.stdMimeType, action.id!!)
                 dd.add(action)
@@ -120,7 +120,7 @@ object MenuFactory {
                     val action = buildActionLink(sa.id, menuTitle)
                     action.label = ""
                     action.onClick {
-                        RequestProxy().invoke(sa.link!!)
+                        ResourceProxy().fetch(sa.link!!)
                     }
                     return action
                 }
@@ -172,7 +172,7 @@ object MenuFactory {
                 label = "save",
                 menuTitle = tObject.domainType)
         saveAction.onClick {
-            RequestProxy().invoke(saveLink)
+            ResourceProxy().fetch(saveLink)
         }
         dd.add(saveAction)
 
@@ -181,7 +181,7 @@ object MenuFactory {
                 label = "undo",
                 menuTitle = tObject.domainType)
         undoAction.onClick {
-            RequestProxy().invoke(undoLink)
+            ResourceProxy().fetch(undoLink)
         }
         dd.add(undoAction)
     }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt
index 8ac3864..1dbe848 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt
@@ -28,7 +28,7 @@ import io.kvision.tabulator.Tabulator
 import io.kvision.tabulator.TabulatorOptions
 import io.kvision.tabulator.js.Tabulator.CellComponent
 import io.kvision.utils.set
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.core.model.Exposer
 import org.apache.isis.client.kroviz.utils.StringUtils
@@ -66,7 +66,7 @@ class RoTable(displayCollection: CollectionDM) : SimplePanel() {
                     if (column == "icon") {
                         val exposer = cc.getData() as Exposer
                         val tObject = exposer.delegate
-                        RequestProxy().load(tObject)
+                        ResourceProxy().load(tObject)
                     }
                 }
             }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/Command.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/Command.kt
index 393286e..dea42e8 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/Command.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/Command.kt
@@ -19,7 +19,7 @@
 package org.apache.isis.client.kroviz.ui.dialog
 
 import org.apache.isis.client.kroviz.core.aggregator.ActionDispatcher
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.to.Link
 
 abstract class Command {
@@ -29,7 +29,7 @@ abstract class Command {
     }
 
     fun invoke(link: Link) {
-        RequestProxy().invoke(link, ActionDispatcher())
+        ResourceProxy().fetch(link, ActionDispatcher())
     }
 
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/SvgInline.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/SvgInline.kt
index 4e06358..2aab0f5 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/SvgInline.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/SvgInline.kt
@@ -20,7 +20,7 @@
 package org.apache.isis.client.kroviz.ui.dialog
 
 import org.apache.isis.client.kroviz.core.aggregator.SvgDispatcher
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.to.Link
 import org.apache.isis.client.kroviz.to.Method
 import org.apache.isis.client.kroviz.to.ValueType
@@ -52,7 +52,7 @@ class SvgInline : Command() {
         val url = "https://upload.wikimedia.org/wikipedia/commons/6/6c/Trajans-Column-lower-animated.svg"
         val link = Link(href = url, method = Method.GET.operation)
         val agr = SvgDispatcher(callBack)
-        RequestProxy().invokeNonREST(link, agr)
+        ResourceProxy().fetch(link, agr, isRest = false)
     }
 
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/DynamicMenuBuilder.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/DynamicMenuBuilder.kt
index efe005c..055df30 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/DynamicMenuBuilder.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/DynamicMenuBuilder.kt
@@ -21,7 +21,7 @@ package org.apache.isis.client.kroviz.ui.panel
 
 import io.kvision.utils.obj
 import org.apache.isis.client.kroviz.core.event.EventStore
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.to.TObject
 import org.apache.isis.client.kroviz.ui.chart.ChartFactory
 import org.apache.isis.client.kroviz.ui.core.UiManager
@@ -40,7 +40,7 @@ class DynamicMenuBuilder {
             val title = StringUtils.deCamel(it.id)
             val icon = IconManager.find(title)
             val invokeLink = it.getInvokeLink()!!
-            val command =  { RequestProxy().invoke(invokeLink) }
+            val command =  { ResourceProxy().fetch(invokeLink) }
             val me = buildMenuEntry(icon, title, command)
             menu.add(me)
         }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/UmlUtils.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/UmlUtils.kt
index ac0f343..a4860de 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/UmlUtils.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/UmlUtils.kt
@@ -19,7 +19,7 @@
 package org.apache.isis.client.kroviz.utils
 
 import org.apache.isis.client.kroviz.core.aggregator.SvgDispatcher
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.to.Argument
 import org.apache.isis.client.kroviz.to.Link
 import org.apache.isis.client.kroviz.to.Method
@@ -39,13 +39,12 @@ object UmlUtils {
         val link = Link(href = Constants.krokiUrl, method = Method.POST.operation, args = args)
         val agr = SvgDispatcher(callBack)
 
-        RequestProxy().invokeNonREST(link, agr)
+        ResourceProxy().fetch(link, agr, isRest = false)
     }
 
     fun generateJsonDiagram(pumlCode: String, callBack: Any) {
         val agr = SvgDispatcher(callBack)
-        RequestProxy().invokeKroki(pumlCode, agr)
+        ResourceProxy().invokeKroki(pumlCode, agr)
     }
 
-
 }
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/handler/IconHandlerTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/handler/IconHandlerTest.kt
index 90d4bef..716d193 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/handler/IconHandlerTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/handler/IconHandlerTest.kt
@@ -23,7 +23,7 @@ import io.kvision.html.Image
 import kotlinx.browser.window
 import org.apache.isis.client.kroviz.IntegrationTest
 import org.apache.isis.client.kroviz.core.aggregator.DispatchInterceptor
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.snapshots.demo2_0_0.OBJECT_ICON
 import org.apache.isis.client.kroviz.to.Icon
 import org.apache.isis.client.kroviz.to.Link
@@ -41,7 +41,7 @@ class IconHandlerTest : IntegrationTest() {
             //given
             val link = Link(href = OBJECT_ICON.url)
             val di = DispatchInterceptor()
-            RequestProxy().invoke(link, di)
+            ResourceProxy().fetch(link, di)
             wait(1000)
             val logEntry = di.logEntry!!
 
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/to/ActionTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/to/ActionTest.kt
index c20e5e8..26dea78 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/to/ActionTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/to/ActionTest.kt
@@ -21,7 +21,7 @@ package org.apache.isis.client.kroviz.to
 import org.apache.isis.client.kroviz.IntegrationTest
 import org.apache.isis.client.kroviz.core.aggregator.ActionDispatcher
 import org.apache.isis.client.kroviz.core.event.EventStore
-import org.apache.isis.client.kroviz.core.event.RequestProxy
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
 import org.apache.isis.client.kroviz.core.event.ResourceSpecification
 import org.apache.isis.client.kroviz.handler.ActionHandler
 import org.apache.isis.client.kroviz.snapshots.simpleapp1_16_0.*
@@ -62,7 +62,7 @@ class ActionTest : IntegrationTest() {
             console.log(body)
             val json = JSON.parse<Argument>(body)
             console.log(json)
-            RequestProxy().invoke(link, ActionDispatcher())
+            ResourceProxy().fetch(link, ActionDispatcher())
             val urlSpec = ResourceSpecification(url)
             val le = EventStore.findBy(urlSpec)!!
             console.log(EventStore.log)