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/09/11 00:08:56 UTC
[32/50] isis git commit: ISIS-1194: law of demeter for
FrameworkSynchronizer and ServicesInjector - call PersistenceSession instead.
ISIS-1194: law of demeter for FrameworkSynchronizer and ServicesInjector - call PersistenceSession instead.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/b2088371
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/b2088371
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/b2088371
Branch: refs/heads/master
Commit: b20883719c4a23bb24b44bf77ba2dcd853c7b0f3
Parents: 1933082
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Sep 10 16:24:12 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Sep 10 16:24:12 2015 +0100
----------------------------------------------------------------------
.../runtime/system/persistence/FrameworkSynchronizer.java | 6 +-----
.../core/runtime/system/persistence/PersistenceSession.java | 8 ++++++++
2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/b2088371/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
index 06bcc04..ed51221 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/FrameworkSynchronizer.java
@@ -42,7 +42,6 @@ import org.apache.isis.core.metamodel.facets.object.callbacks.PersistingCallback
import org.apache.isis.core.metamodel.facets.object.callbacks.RemovingCallbackFacet;
import org.apache.isis.core.metamodel.facets.object.callbacks.UpdatedCallbackFacet;
import org.apache.isis.core.metamodel.facets.object.callbacks.UpdatingCallbackFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjectorSpi;
import org.apache.isis.core.runtime.system.transaction.IsisTransaction;
public class FrameworkSynchronizer {
@@ -51,7 +50,6 @@ public class FrameworkSynchronizer {
private final PersistenceSession persistenceSession;
private final AuthenticationSession authenticationSession;
- private ServicesInjectorSpi servicesInjector;
public FrameworkSynchronizer(
final PersistenceSession persistenceSession,
@@ -59,8 +57,6 @@ public class FrameworkSynchronizer {
this.persistenceSession = persistenceSession;
this.authenticationSession = authenticationSession;
- this.servicesInjector = getPersistenceSession().getServicesInjector();
-
}
/**
@@ -92,7 +88,7 @@ public class FrameworkSynchronizer {
// need to do eagerly, because (if a viewModel then) a
// viewModel's #viewModelMemento might need to use services
- servicesInjector.injectServicesInto(pojo);
+ persistenceSession.injectServicesInto(pojo);
final Version datastoreVersion = getVersionIfAny(pc);
http://git-wip-us.apache.org/repos/asf/isis/blob/b2088371/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
index dbd9696..0ba7341 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
@@ -1177,6 +1177,14 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
// endregion
+ //region > ServicesInjector delegate methods
+
+ public void injectServicesInto(final Object domainObject) {
+ servicesInjector.injectInto(domainObject);
+ }
+
+ //endregion
+
}