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 2017/10/03 11:59:01 UTC
[isis] 18/24: ISIS-1742: simplies/inlines methods in
PublishingServiceInternalDefault, removes injected services no longer used.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 28c638fae24b71d19575f68342c11782219f089a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:41:13 2017 +0100
ISIS-1742: simplies/inlines methods in PublishingServiceInternalDefault, removes injected services no longer used.
---
.../publish/PublishingServiceInternalDefault.java | 33 ++--------------------
1 file changed, 2 insertions(+), 31 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
index bb89243..72e75b7 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
@@ -44,11 +44,9 @@ import org.apache.isis.applib.services.user.UserService;
import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacet;
-import org.apache.isis.core.metamodel.services.ixn.InteractionDtoServiceInternal;
import org.apache.isis.core.metamodel.services.publishing.PublishingServiceInternal;
import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
import org.apache.isis.core.runtime.services.changes.ChangedObjectsServiceInternal;
-import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
/**
* Wrapper around {@link PublisherService}. Is a no-op if there is no injected service.
@@ -60,7 +58,7 @@ import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
@RequestScoped
public class PublishingServiceInternalDefault implements PublishingServiceInternal {
- //region > publishObjects
+
@Override
@Programmatic
public void publishObjects() {
@@ -71,16 +69,10 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
// take a copy of enlisted adapters ... the JDO implementation of the PublishingService
// creates further entities which would be enlisted; taking copy of the map avoids ConcurrentModificationException
+
final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter = Maps.newHashMap();
changeKindByEnlistedAdapter.putAll(changedObjectsServiceInternal.getChangeKindByEnlistedAdapter());
- publishObjectsToPublisherServices(changeKindByEnlistedAdapter);
- }
-
-
- private void publishObjectsToPublisherServices(
- final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter) {
-
final Map<ObjectAdapter, PublishingChangeKind> changeKindByPublishedAdapter =
Maps.filterKeys(
changeKindByEnlistedAdapter,
@@ -118,9 +110,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
return new PublishedObjectsDefault(transactionUuid, nextEventSequence, userName, timestamp, numberLoaded, numberObjectPropertiesModified, changeKindByPublishedAdapter);
}
- //endregion
- //region > publishAction
@Programmatic
public void publishAction(
@@ -139,10 +129,6 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
}
- //endregion
-
- //region > publishProperty
-
@Override
public void publishProperty(
final Interaction.Execution execution) {
@@ -155,10 +141,6 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
}
- //endregion
-
- //region > helper: publishToPublisherServices
-
private void publishToPublisherServices(final Interaction.Execution<?,?> execution) {
if(publisherServices == null || publisherServices.isEmpty()) {
@@ -170,11 +152,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
}
}
- //endregion
-
- //region > suppress
- // this service is request scoped
boolean suppress;
@Programmatic
@@ -188,7 +166,6 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
}
}
- //endregion
//region > injected services
@javax.inject.Inject
@@ -198,9 +175,6 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
ChangedObjectsServiceInternal changedObjectsServiceInternal;
@javax.inject.Inject
- InteractionDtoServiceInternal interactionDtoServiceInternal;
-
- @javax.inject.Inject
CommandContext commandContext;
@javax.inject.Inject
@@ -215,9 +189,6 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
@javax.inject.Inject
MetricsService metricsService;
- @javax.inject.Inject
- IsisSessionFactory isisSessionFactory;
-
//endregion
}
--
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.