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 2022/05/19 10:11:16 UTC

[isis] branch ISIS-2900 created (now 0b73920e3e)

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

danhaywood pushed a change to branch ISIS-2900
in repository https://gitbox.apache.org/repos/asf/isis.git


      at 0b73920e3e ISIS-2900: injects into mixee, mixin and results

This branch includes the following new commits:

     new 194bd98346 ISIS-2900: adds gitcommit.sh utility script
     new 0b73920e3e ISIS-2900: injects into mixee, mixin and results

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[isis] 02/02: ISIS-2900: injects into mixee, mixin and results

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2900
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 0b73920e3e11872d2d0009084a6e07bbb2a94ddf
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu May 19 11:11:01 2022 +0100

    ISIS-2900: injects into mixee, mixin and results
---
 .../runtimeservices/executor/MemberExecutorServiceDefault.java     | 3 +++
 .../isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java   | 7 ++++++-
 .../wrapper/handlers/DomainObjectInvocationHandler.java            | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/executor/MemberExecutorServiceDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/executor/MemberExecutorServiceDefault.java
index 73580c1967..8ea4ced751 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/executor/MemberExecutorServiceDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/executor/MemberExecutorServiceDefault.java
@@ -36,6 +36,7 @@ import org.apache.isis.applib.services.iactn.ActionInvocation;
 import org.apache.isis.applib.services.iactn.Execution;
 import org.apache.isis.applib.services.iactn.PropertyEdit;
 import org.apache.isis.applib.services.iactnlayer.InteractionLayerTracker;
+import org.apache.isis.applib.services.inject.ServiceInjector;
 import org.apache.isis.applib.services.metrics.MetricsService;
 import org.apache.isis.applib.services.xactn.TransactionService;
 import org.apache.isis.commons.collections.Can;
@@ -88,6 +89,7 @@ implements MemberExecutorService {
     private final @Getter IsisConfiguration configuration;
     private final @Getter ObjectManager objectManager;
     private final @Getter ClockService clockService;
+    private final @Getter ServiceInjector serviceInjector;
     private final @Getter Provider<MetricsService> metricsService;
     private final @Getter InteractionDtoFactory interactionDtoFactory;
     private final @Getter Provider<ExecutionPublisher> executionPublisher;
@@ -167,6 +169,7 @@ implements MemberExecutorService {
         }
 
         val returnedPojo = priorExecution.getReturned();
+        getServiceInjector().injectServicesInto(returnedPojo);
         val returnedAdapter = objectManager.adapt(
                 returnedPojo, owningAction::getElementType, EntityAdaptingMode.MEMOIZE_BOOKMARK);
 
diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java
index d49125f879..40a8394329 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java
@@ -212,15 +212,20 @@ public class WrapperFactoryDefault implements WrapperFactory {
             final @NonNull SyncControl syncControl) {
 
         T mixin = factoryService.mixin(mixinClass, mixee);
+        serviceInjector.injectServicesInto(mixin);
 
         if (isWrapper(mixee)) {
             val wrapperObject = (WrappingObject) mixee;
             val executionMode = wrapperObject.__isis_executionModes();
+            val underlyingMixee = wrapperObject.__isis_wrapped();
+            serviceInjector.injectServicesInto(underlyingMixee);
+
             if(equivalent(executionMode, syncControl.getExecutionModes())) {
                 return mixin;
             }
-            val underlyingMixee = wrapperObject.__isis_wrapped();
             return _Casts.uncheckedCast(createMixinProxy(underlyingMixee, mixin, syncControl));
+        } else {
+            serviceInjector.injectServicesInto(mixee);
         }
 
         return createMixinProxy(mixee, mixin, syncControl);
diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/handlers/DomainObjectInvocationHandler.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/handlers/DomainObjectInvocationHandler.java
index 63a018a20e..12ea279e23 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/handlers/DomainObjectInvocationHandler.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/handlers/DomainObjectInvocationHandler.java
@@ -342,6 +342,7 @@ extends DelegatingInvocationHandlerDefault<T> {
 
             val currentReferencedObj = UnwrapUtil.single(currentReferencedAdapter);
 
+
             val propertyAccessEvent = new PropertyAccessEvent(
                     getDelegate(), property.getFeatureIdentifier(), currentReferencedObj);
             notifyListeners(propertyAccessEvent);


[isis] 01/02: ISIS-2900: adds gitcommit.sh utility script

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2900
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 194bd98346e80207a6c3ae64e3d273b7c46c8188
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu May 19 11:10:32 2022 +0100

    ISIS-2900: adds gitcommit.sh utility script
---
 gitcommit.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gitcommit.sh b/gitcommit.sh
new file mode 100644
index 0000000000..6af2b0c791
--- /dev/null
+++ b/gitcommit.sh
@@ -0,0 +1,68 @@
+#!/usr/bin/env bash
+usage() {
+  echo "$(basename $0): [-A] [-P] message" >&2
+  echo "  -A : suppress adding automatically, ie don't call 'git add .'" >&2
+  echo "  -p : also push" >&2
+}
+
+PUSH=""
+ADD=""
+
+while getopts ":hAp" arg; do
+  case $arg in
+    h)
+      usage
+      exit 0
+      ;;
+    A)
+      ADD="no-add"
+      ;;
+    p)
+      PUSH="push"
+      ;;
+    *)
+      usage
+      exit 1
+  esac
+done
+
+if [ $# -lt 1 ];
+then
+  echo $USAGE >&2
+  exit 1
+fi
+
+shift $((OPTIND-1))
+
+ISSUE=$(git rev-parse --abbrev-ref HEAD | cut -d- -f1,2)
+MSG=$*
+
+echo "ISSUE     : $ISSUE"
+echo "MSG       : $MSG"
+echo "(NO-)ADD  : $ADD"
+echo "PUSH      : $PUSH"
+
+if [ -d _pipeline-resources ]
+then
+  pushd _pipeline-resources || exit
+  if [ -z "$ADD" ]
+  then
+    git add .
+  fi
+  git commit -m "$ISSUE: ${MSG}"
+  if [ -n "$PUSH" ]
+  then
+    git push
+  fi
+  popd || exit
+fi
+
+if [ -z "$ADD" ]
+then
+  git add .
+fi
+git commit -m "$ISSUE: ${MSG}"
+if [ -n "$PUSH" ]
+then
+  git push
+fi