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:58:43 UTC

[isis] branch dev/2.0.0/ISIS-1742-remove-deprecations updated (f85d30c -> 06c8f60)

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

danhaywood pushed a change to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git.


    from f85d30c  ISIS-1742: deletes Command2 interface.
     new e1ca604  ISIS-1742: fixes compile issues in test classes (Hamcrest matchers) from changes to DomainEvent hierarchy
     new 99298a3  ISIS-1742: deletes @Action#publishingPayloadFactory and @DomainObject#publishingPayloadFactory and associated interfaces, PublishingPayloadFactoryForAction and PublishingPayloadFactoryForObject.
     new b40bb23  ISIS-1742: deletes @PublishedAction and @PublishedObject annotations.
     new 4114ee1  ISIS-1742:changes PublishedActionFacet and PublishedObjectFacet to be MarkerFacets, rather than SingleValueFacets returning a publisihng factory
     new 216847f  ISIS-1742: fixes PublishedActionFacetAbstract and PublishedObjectFacetAbstract
     new 199fe06  ISIS-1742: deletes the PublishedActionPayloadFactoryDefault and PublishedObjectPayloadFactoryDefault implementations
     new 058b75a  ISIS-1742: fixes PublishedActionFacet implementations, removing reference to the now deleted PayloadFactory stuff
     new 7183a7a  ISIS-1742: fixes up PublishedObjectFacet implementations, removing references to the now deleted PublishingPayloadFactory stuff.
     new c52caae  ISIS-1742: fixes up ActionAnnotationFacetFactory so now compiles
     new a597acb  ISIS-1742: fixes up DomainObjectAnnotationFacetFactory so now compiles
     new b825232  ISIS-1742: replaces uses of the now deleted PublishedObject.ChangeKind enum with its replacement, PublishingChangeKind
     new 7e6495e  ISIS-1742: fixes unit test compilation
     new ab524bc  ISIS-1742: deletes EventPayload and subclasses
     new 563b29d  ISIS-1742: fixes up unit test that was referencing action payload factory
     new ece6151  ISIS-1742: deletes PublishingService interface
     new c4a322d  ISIS-1742: simplifies PublishingServiceInternalDefault, removes any reference to the now deleted PublishingService .... simply delegates to PublisherService
     new eaf82c8  ISIS-1742: changes visibility of injected services into PublishingServiceInternalDefault to package private, so can see which are used.
     new 28c638f  ISIS-1742: simplies/inlines methods in PublishingServiceInternalDefault, removes injected services no longer used.
     new 5459edb  ISIS-1742: deletes EventSerializer
     new 8b46742  ISIS-1742: deletes ObjectStringifier interface, now longer referened anywhere (part of publishing payload factory stuff)
     new c90adb7  ISIS-1742: simplifies the API of PublishingServiceInternalDefault.
     new e4e61fd  ISIS-1742: further updates to docs, removing reference to the now-deleted PublishingService.
     new 844d275  ISIS-1742: removes reference to EventSerializer from .adocs
     new 06c8f60  ISIS-1742: removes reference to PublishedObject and PublishedAction annotations

The 24 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.


Summary of changes:
 .../main/asciidoc/guides/rgant/_rgant-Action.adoc  |   7 +-
 .../guides/rgant/_rgant-Action_publishing.adoc     |  19 +-
 .../asciidoc/guides/rgant/_rgant-DomainObject.adoc |   7 +-
 .../rgant/_rgant-DomainObject_publishing.adoc      |  21 +-
 .../guides/rgant/_rgant-Property_publishing.adoc   |   5 +-
 .../guides/rgant/_rgant_aaa_deprecated.adoc        |  12 -
 .../guides/rgfis/_rgfis_application-layer.adoc     |   2 +-
 .../guides/rgfis/_rgfis_persistence-layer.adoc     |   5 +-
 ...stence-layer_ChangedObjectsServiceInternal.adoc |   2 +-
 ...ersistence-layer_PublishingServiceInternal.adoc |  22 +-
 ...rgsvc_application-layer-api_CommandContext.adoc |   2 +-
 ...rgsvc_application-layer-spi_CommandService.adoc |   8 +-
 .../_rgsvc_core-domain-api_EventBusService.adoc    |   2 +-
 .../main/asciidoc/guides/rgsvc/_rgsvc_intro.adoc   |   8 +-
 .../guides/rgsvc/_rgsvc_persistence-layer-spi.adoc |  22 --
 ...gsvc_persistence-layer-spi_EventSerializer.adoc |  78 ------
 ...svc_persistence-layer-spi_PublisherService.adoc |  11 +-
 ...vc_persistence-layer-spi_PublishingService.adoc | 199 --------------
 ...ailable-domain-services_framework-provided.adoc |   2 -
 .../_ugfun_core-concepts_apache-isis-vs_cqrs.adoc  |   2 +-
 ...ore-concepts_apache-isis-vs_event-sourcing.adoc |   2 +-
 ...amming-model_view-models_dto_dto-consumers.adoc |   2 +-
 .../ugodn/_ugodn_configuring_properties.adoc       |   4 -
 .../org/apache/isis/applib/annotation/Action.java  |   7 +-
 .../isis/applib/annotation/DomainObject.java       |  13 -
 .../isis/applib/annotation/PublishedAction.java    |  59 ----
 .../isis/applib/annotation/PublishedObject.java    |  79 ------
 .../applib/annotation/PublishingChangeKind.java    |  19 --
 .../PublishingPayloadFactoryForAction.java         |  75 -----
 .../PublishingPayloadFactoryForObject.java         |  73 -----
 .../isis/applib/services/command/Command.java      |   1 -
 .../applib/services/publish/EventMetadata.java     |   2 -
 .../isis/applib/services/publish/EventPayload.java |  40 ---
 .../publish/EventPayloadForActionInvocation.java   | 218 ---------------
 .../publish/EventPayloadForObjectChanged.java      |  70 -----
 .../applib/services/publish/EventSerializer.java   |  62 -----
 .../applib/services/publish/ObjectStringifier.java |  32 ---
 .../applib/services/publish/PublishingService.java |  87 ------
 .../applib/service/DomainChangeJdoAbstract.java    |   1 -
 .../action/ActionAnnotationFacetFactory.java       |  18 +-
 ...ctionInvocationFacetForDomainEventAbstract.java |   6 +-
 .../PublishedActionFacetForActionAnnotation.java   |  32 +--
 ...ActionFacetForActionAnnotationAsConfigured.java |   4 +-
 ...hedActionFacetForPublishedActionAnnotation.java |  67 -----
 .../PublishedActionFacetFromConfiguration.java     |   4 +-
 .../actions/publish/PublishedActionFacet.java      |   5 +-
 .../publish/PublishedActionFacetAbstract.java      |  25 +-
 .../PublishedActionPayloadFactoryDefault.java      |  63 -----
 .../DomainObjectAnnotationFacetFactory.java        |  21 +-
 ...lishedObjectFacetForDomainObjectAnnotation.java |  33 +--
 ...FacetForDomainObjectAnnotationAsConfigured.java |   5 +-
 ...hedObjectFacetForPublishedObjectAnnotation.java |  58 ----
 .../PublishedObjectFacetFromConfiguration.java     |   5 +-
 .../publishedobject/PublishedObjectFacet.java      |   5 +-
 .../PublishedObjectFacetAbstract.java              |  27 +-
 .../PublishedObjectPayloadFactoryDefault.java      |  54 ----
 .../core/metamodel/services/ServicesInjector.java  |   2 -
 .../publishing/PublishingServiceInternal.java      |  11 +-
 ...nEventHelperTest_newActionInteractionEvent.java |  20 +-
 ...HelperTest_newCollectionDomainEvent_forAdd.java |   9 +-
 ...perTest_newCollectionDomainEvent_forRemove.java |   9 +-
 ...HelperTest_newPropertyDomainEvent_forClear.java |  15 +-
 .../action/ActionAnnotationFacetFactoryTest.java   |  63 +----
 .../DomainObjectAnnotationFacetFactoryTest.java    | 126 +--------
 .../changes/ChangedObjectsServiceInternal.java     |  16 +-
 .../services/publish/PublishedObjectsDefault.java  |  28 +-
 .../publish/PublishingServiceInternalDefault.java  | 301 +--------------------
 67 files changed, 151 insertions(+), 2163 deletions(-)
 delete mode 100644 adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_EventSerializer.adoc
 delete mode 100644 adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublishingService.adoc
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayload.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForActionInvocation.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForObjectChanged.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/publish/EventSerializer.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/publish/ObjectStringifier.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishingService.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java

-- 
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <co...@isis.apache.org>'].

[isis] 21/24: ISIS-1742: simplifies the API of PublishingServiceInternalDefault.

Posted by da...@apache.org.
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 c90adb75bb9684ae32517ed38d03937e7e925b75
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 10:03:44 2017 +0100

    ISIS-1742: simplifies the API of PublishingServiceInternalDefault.
    
    Also deletes PublishingService.adoc
---
 ...vc_persistence-layer-spi_PublishingService.adoc | 199 ---------------------
 ...ctionInvocationFacetForDomainEventAbstract.java |   6 +-
 .../publishing/PublishingServiceInternal.java      |  11 +-
 .../publish/PublishingServiceInternalDefault.java  |   9 +-
 4 files changed, 4 insertions(+), 221 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublishingService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublishingService.adoc
deleted file mode 100644
index da4230d..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublishingService.adoc
+++ /dev/null
@@ -1,199 +0,0 @@
-[[_rgsvc_persistence-layer-spi_PublishingService]]
-= `PublishingService` (deprecated)
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:_basedir: ../../
-:_imagesdir: images/
-
-
-
-The `PublishingService` API is intended for coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system.  Here the only events published are those that action invocations and of changed objects.  A typical use case is to publish onto a pub/sub bus such as link:http://activemq.apache.org/[ActiveMQ] with link:http://camel.apache.org[Camel] to keep other systems up to date.
-
-
-[WARNING]
-====
-As of `1.13.0` this service is deprecated, replaced with xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
-====
-
-
-
-== SPI
-
-The SPI defined by the service is:
-
-[source,java]
-----
-@Deprecated
-public interface PublishingService {
-    public void publish(
-        EventMetadata metadata,                                 // <1>
-        EventPayload payload);                                  // <2>
-    void setEventSerializer(EventSerializer eventSerializer);   // <3>
-}
-----
-<1> standard metadata about the event, such as the user, the xref:../rgcms/rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[`transactionId`], date/time etc
-<2> for published actions, an `EventPayloadForActionInvocation` (or subclass thereof); for published objects, an `EventPayloadForObjectChanged` (or subclass thereof)
-<3> injects in the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_EventSerializer[`EventSerializer`] service.  This is deprecated because not every implementation is required to use an `EventSerializer` so its inclusion within the SPI of `PublishingService` was in retrospect a mistake.
-
-
-Typically implementations will use the injected `EventSerializer` to convert the metadata and payload into a form to be published:
-
-[source,java]
-----
-public interface EventSerializer {
-    public Object serialize(EventMetadata metadata, EventPayload payload);
-}
-----
-
-The serialized form returned by `EventSerializer` must be in a form that the `PublishingService` implementation is able to handle. Strings are a good lowest common denominator, but (if custom implementations of both `EventSerializer` and `PublishingService` were in use) then it might also be some other type, for example an `org.w3c.dom.Document` or an `org.json.JSONObject` might be returned instead.
-
-
-
-== Implementation
-
-The (obsolete) http://github.com/isisaddons-legacy/isis-module-publishing[Isis addons' publishing] module provides an implementation (`org.isisaddons.module.publishing.dom.PublishingService`) that persists each event as a `PublishedEvent` entity.
-This holds the serialized form of the event metadata and payload as translated into a string by the injected `EventSerializer`.  The module also provides its own implementation of `EventSerializer`,
-namely `RestfulObjectsSpecEventSerializer`, which represents the event payload using the representation defined by the
-link:http://restfulobjects.org[Restful Objects spec] of (transient) objects, grafting on the metadata as additional
-JSON nodes.
-
-The `PublishedEvent` entity also has a `state` field taking the values either "QUEUED" or "PROCESSED".
-The intention here is that an event bus can poll this table to grab pending events and dispatch them to downstream systems.
-When ``PublishedEvent``s are persisted initially they always take the value "QUEUED".
-
-The framework provides no default implementations of this service.
-
-
-
-== Usage
-
-To indicate that an action invocation should be published, annotate it with the xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`] annotation.
-
-To indicate that a changed object should be published is to annotate it with the xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`] annotation.
-
-
-It is also possible to "fine-tune" the `EventPayload` using the `#publishingFactory()` attribute (for both annotations).  By default the `EventPayload` that is serialized identifies the object(s) being interacted with or changed, and in the case of the action invocation provides details of the action arguments and result (if any) of that action.  However, the payload does not (by default) include any information about the new state of these objects. It is therefore the responsibility of  [...]
-
-[NOTE]
-====
-The replacement xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] does __not__ support the concept of "payload factories" (but is otherwise more flexible).
-====
-
-
-Although the representations (if using the Restful Object serializer and Restful Objects viewer) does include hrefs
-for the objects, this nevertheless requires an additional network call to obtain this information).
-
-In some circumstances, then, it may make more sense to eagerly "push" information about the change to the subscriber by including that state within the payload.
-
-To accomplish this, an implementation of a "`PayloadFactory`" must be specified in the annotation.
-
-For actions, we implement the `PublishingPayloadFactoryForAction` (in `o.a.i.applib.annotation`):
-
-[source,java]
-----
-@Deprecated
-public interface PublishingPayloadFactoryForAction {
-    public EventPayload payloadFor(
-            Identifier actionIdentifier,
-            Object target,
-            List<Object> arguments,
-            Object result);
-}
-}
-----
-The `EventPayloadForActionInvocation` abstract class (in the Isis applib) should be used as the base class for the object instance returned from `payLoadFor(...)`.
-
-For objects, the interface to implement is `PublishingPayloadFactoryForObject`:
-
-[source,java]
-----
-@Deprecated
-public interface PublishingPayloadFactoryForObject {
-    public EventPayload payloadFor(
-        Object changedObject,
-        PublishingChangeKind publishingChangeKind);     // <1>
-}
-----
-<1> an enum taking the values `CREATE`, `UPDATE`, `DELETE`
-
-Similarly, the `EventPayloadForObjectChanged` abstract class should be used as the base class for the object returned from `payLoadFor(...)`.
-
-For example, the following will eagerly include a `ToDoItem`'s `description` property whenever it is changed:
-
-[source,java]
-----
-@DomainObject(publishingPayloadFactory=ToDoItemPayloadFactory.class)
-public class ToDoItem {
-    ...
-}
-----
-
-where `ToDoItemPayloadFactory` is defined as:
-
-[source,java]
-----
-public class ToDoItemChangedPayloadFactory implements PublishingPayloadFactoryForObject {
-    public static class ToDoItemPayload
-        extends EventPayloadForObjectChanged<ToDoItem> {
-      public ToDoItemPayload(ToDoItem changed) { super(changed); }
-      public String getDescription() { return getChanged().getDescription(); }
-    }
-    @Override
-    public EventPayload payloadFor(Object changedObject, PublishingChangeKind kind) {
-        return new ToDoItemPayload((ToDoItem) changedObject);
-    }
-}
-----
-
-
-
-
-== Registering the Services
-
-There is no default implementation of this service provided by the core Apache Isis framework.
-
-The (obsolete) Isis addons' http://github.com/isisaddons-legacy/isis-module-publishing[publishing] module provides an implementation of this service.
-Assuming that an `AppManifest` is being used to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then this can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
-
-The module also provides services that contribute to the UI.
-If contributions are not required in the UI, these can be suppressed either using security or by implementing a xref:../ugbtb/ugbtb.adoc#_ugbtb_hints-and-tips_vetoing-visibility[vetoing subscriber].
-
-
-
-
-
-== Related Services
-
-The `PublishingService` is intended for coarse-grained publish/subscribe for system-to-system interactions, from
-Apache Isis to some other system. Here the only events published are those that action invocations (for actions
-annotated with xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`]) and of changed objects (for objects
-annotated with xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`].
-
-The xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] is intended as a replacement for this service.  The
-use case for `PublisherService` is the same: coarse-grained publishing of events for system-to-system interactions.  It
-is in most respects more flexible though: events are published both for action invocations (annotated with
-xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`]) and also for property edits (annotated with
-xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`].  It also publishes changed objects (for objects
-annotated with xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`]).  However, rather than
-publishing one event for every changed objects, it publishes a single event that identifies all objects created,
-updated or deleted.
-
-Another significant difference between `PublishingService` and `PublisherService` is in the content of the events
-themselves.  While the former uses the xref:../rgsvc/rgsvc.adoc#_rgsvc_integration-api_MementoService[`MementoService`] to create an
-ad-hoc serialization of the action being invoked, the latter uses the xref:../rgcms/rgcms.adoc#_rgcms_schema[DTOs/XML schemas]
-as a formal specification of the nature of the interaction (action invocation, property edit or changed objects).
-
-The xref:../rgsvc/rgsvc.adoc#_rgsvc_core-domain-api_EventBusService[`EventBusService`] meanwhile differs from both `PublishingService` and
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] in that it is intended for fine-grained
-publish/subscribe for object-to-object interactions within an Apache Isis domain object model. The event propagation
-is strictly in-memory, and there are no restrictions on the object acting as the event; it need not be serializable,
-for example.  (That said, it is possible to obtain a serialization of the action invocation/property edit causing the
-current event to be raised using xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`] domain service).
-
-
-== Design Notes
-
-The following class diagram shows how the above components fit together:
-
-image::{_imagesdir}reference-services-spi/PublishingService/yuml.me-23db58a4.png[width="800px",link="{_imagesdir}reference-services-spi/PublishingService/yuml.me-23db58a4.png"]
-
-This yuml.me diagram was generated at http://yuml.me/edit/23db58a4[yuml.me].
\ No newline at end of file
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
index 38c7fe0..a967962 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
@@ -341,10 +341,8 @@ public abstract class ActionInvocationFacetForDomainEventAbstract
                 final List<ObjectAdapter> parameterAdapters = Arrays.asList(argumentAdapters);
 
                 getPublishingServiceInternal().publishAction(
-                        priorExecution,
-                        owningAction, identifiedHolder,
-                        targetAdapter, parameterAdapters,
-                        returnedAdapter);
+                        priorExecution
+                );
             }
         }
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/publishing/PublishingServiceInternal.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/publishing/PublishingServiceInternal.java
index 5e857be..bf9d14a 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/publishing/PublishingServiceInternal.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/publishing/PublishingServiceInternal.java
@@ -18,13 +18,8 @@
  */
 package org.apache.isis.core.metamodel.services.publishing;
 
-import java.util.List;
-
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.iactn.Interaction;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 
 public interface PublishingServiceInternal {
 
@@ -33,11 +28,7 @@ public interface PublishingServiceInternal {
 
     @Programmatic
     void publishAction(
-            final Interaction.Execution execution,
-            final ObjectAction objectAction, final IdentifiedHolder identifiedHolder,
-            final ObjectAdapter targetAdapter,
-            final List<ObjectAdapter> parameterAdapters,
-            final ObjectAdapter resultAdapter);
+            final Interaction.Execution execution);
 
     @Programmatic
     void publishProperty(final Interaction.Execution execution);
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 72e75b7..0f88cb1 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
@@ -42,10 +42,8 @@ import org.apache.isis.applib.services.publish.PublishedObjects;
 import org.apache.isis.applib.services.publish.PublisherService;
 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.publishing.PublishingServiceInternal;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.runtime.services.changes.ChangedObjectsServiceInternal;
 
 /**
@@ -114,12 +112,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
 
     @Programmatic
     public void publishAction(
-            final Interaction.Execution execution,
-            final ObjectAction objectAction,
-            final IdentifiedHolder identifiedHolder,
-            final ObjectAdapter targetAdapter,
-            final List<ObjectAdapter> parameterAdapters,
-            final ObjectAdapter resultAdapter) {
+            final Interaction.Execution execution) {
 
         if(suppress) {
             return;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 19/24: ISIS-1742: deletes EventSerializer

Posted by da...@apache.org.
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 5459edbbd159693223326e928760a80d5ccfb6b8
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:43:16 2017 +0100

    ISIS-1742: deletes EventSerializer
---
 .../applib/services/publish/EventMetadata.java     |  2 -
 .../applib/services/publish/EventSerializer.java   | 62 ----------------------
 2 files changed, 64 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
index b159e02..e9d79bc 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
@@ -31,8 +31,6 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
  * 
  * <p>
  * This is a class rather than an interface so that it may be easily extended in the future.
-
- * @see EventPayload
  */
 public class EventMetadata {
     
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventSerializer.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventSerializer.java
deleted file mode 100644
index 802ede0..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventSerializer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.services.publish;
-
-import org.w3c.dom.Document;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-public interface EventSerializer {
-
-    /**
-     * Combines the {@link EventMetadata metadata} and the {@link EventPayload payload}
-     * into some serialized form (such as JSON, XML or a string) that can then be published.
-     * 
-     * <p>
-     * This method returns an object for maximum flexibility, which is then
-     * handed off to the {@link PublishingService}.  It's important to make sure that the
-     * publishing service is able to handle the serialized form.  Strings are a good
-     * lowest common denominator, but in some cases are type-safe equivalent, such as a
-     * {@link Document w3c DOM Document} or a JSON node might be passed instead.
-     *  
-     * @return a string, some JSON, some XML or some other standard serialized form. 
-     */
-    public Object serialize(EventMetadata metadata, EventPayload payload);
-
-    /**
-     * Used as a fallback if no other implementation is defined.
-     */
-    public static class Simple implements EventSerializer {
-
-        @Programmatic
-        @Override
-        public Object serialize(EventMetadata metadata, EventPayload payload) {
-            return "PUBLISHED:" +
-            		"\n  metadata:" + 
-                    "\n    id       :" + metadata.getId() + 
-                    "\n    eventType:" + metadata.getEventType() + 
-                    "\n    user     :" + metadata.getUser() + 
-                    "\n    timestamp:" + metadata.getTimestamp() + 
-                    "\n  payload:" +
-                    "\n" + payload.toString();
-        }
-    }
-
-}

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 01/24: ISIS-1742: fixes compile issues in test classes (Hamcrest matchers) from changes to DomainEvent hierarchy

Posted by da...@apache.org.
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 e1ca6047bc3f13e73904d4134877819f98a87187
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 08:40:48 2017 +0100

    ISIS-1742: fixes compile issues in test classes (Hamcrest matchers) from changes to DomainEvent hierarchy
---
 ...ainEventHelperTest_newActionInteractionEvent.java | 20 +++++++++++---------
 ...ntHelperTest_newCollectionDomainEvent_forAdd.java |  9 +++++----
 ...elperTest_newCollectionDomainEvent_forRemove.java |  9 +++++----
 ...ntHelperTest_newPropertyDomainEvent_forClear.java | 15 +++++++++------
 4 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
index 7831447..6397e6e 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newActionInteractionEvent.java
@@ -21,9 +21,11 @@ import org.junit.Test;
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
 
+import static junit.framework.Assert.assertEquals;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertThat;
 
 public class DomainEventHelperTest_newActionInteractionEvent {
@@ -43,11 +45,11 @@ public class DomainEventHelperTest_newActionInteractionEvent {
 
         final ActionDomainEvent<Object> ev = new DomainEventHelper(null).newActionDomainEvent(
                 ActionDomainEvent.Default.class, identifier, sdo, new Object[]{1, "bar"});
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getArguments(), is(not(nullValue())));
-        assertThat(ev.getArguments().get(0), is(Integer.valueOf(1)));
-        assertThat(ev.getArguments().get(1), is("bar"));
+        assertEquals(ev.getArguments().get(0), Integer.valueOf(1));
+        assertEquals(ev.getArguments().get(1), "bar");
     }
 
     @Test
@@ -57,11 +59,11 @@ public class DomainEventHelperTest_newActionInteractionEvent {
 
         final ActionDomainEvent<Object> ev = new DomainEventHelper(null).newActionDomainEvent(
                 ActionDomainEvent.Default.class, identifier, sdo, new Object[]{1, "bar"});
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getArguments(), is(not(nullValue())));
-        assertThat(ev.getArguments().get(0), is(Integer.valueOf(1)));
-        assertThat(ev.getArguments().get(1), is("bar"));
+        assertEquals(ev.getArguments().get(0), Integer.valueOf(1));
+        assertEquals(ev.getArguments().get(1), "bar");
     }
 
     @Test
@@ -71,11 +73,11 @@ public class DomainEventHelperTest_newActionInteractionEvent {
         
         final ActionDomainEvent<SomeDomainObject> ev = new DomainEventHelper(null).newActionDomainEvent(
                 SomeDomainObjectFooInvokedDomainEvent.class, identifier, sdo, new Object[]{1, "bar"});
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getArguments(), is(not(nullValue())));
-        assertThat(ev.getArguments().get(0), is(Integer.valueOf(1)));
-        assertThat(ev.getArguments().get(1), is("bar"));
+        assertEquals(ev.getArguments().get(0), Integer.valueOf(1));
+        assertEquals(ev.getArguments().get(1), "bar");
     }
     
 }
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
index 9fc1030..d589e77 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forAdd.java
@@ -25,6 +25,7 @@ import org.apache.isis.applib.services.eventbus.AbstractDomainEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
 
 import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertThat;
 
 public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
@@ -46,10 +47,10 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
                 CollectionDomainEvent.Default.class, null, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
-        assertThat(ev.getValue(), is(other));
+        assertSame(ev.getValue(), other);
     }
 
     @Test
@@ -60,10 +61,10 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forAdd {
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
                 CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.ADD_TO, other);
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.ADD_TO));
-        assertThat(ev.getValue(), is(other));
+        assertSame(ev.getValue(), other);
     }
 
     @Test
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
index 2a67610..5a8cfb8 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newCollectionDomainEvent_forRemove.java
@@ -25,6 +25,7 @@ import org.apache.isis.applib.services.eventbus.AbstractDomainEvent;
 import org.apache.isis.applib.services.eventbus.CollectionDomainEvent;
 
 import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertThat;
 
 public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
@@ -46,10 +47,10 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
                 CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
-        assertThat(ev.getValue(), is(other));
+        assertSame(ev.getValue(), other);
     }
 
     @Test
@@ -60,10 +61,10 @@ public class DomainEventHelperTest_newCollectionDomainEvent_forRemove {
 
         final CollectionDomainEvent<Object, Object> ev = new DomainEventHelper(null).newCollectionDomainEvent(
                 CollectionDomainEvent.Default.class, AbstractDomainEvent.Phase.EXECUTED, identifier, sdo, CollectionDomainEvent.Of.REMOVE_FROM, other);
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOf(), is(CollectionDomainEvent.Of.REMOVE_FROM));
-        assertThat(ev.getValue(), is(other));
+        assertSame(ev.getValue(), other);
     }
 
     @Test
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java
index c720e1c..46480bc 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/DomainEventHelperTest_newPropertyDomainEvent_forClear.java
@@ -18,11 +18,14 @@ package org.apache.isis.core.metamodel.facets;
 
 import org.joda.time.LocalDate;
 import org.junit.Test;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
 
+import static junit.framework.Assert.assertEquals;
 import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertThat;
 
 public class DomainEventHelperTest_newPropertyDomainEvent_forClear {
@@ -42,10 +45,10 @@ public class DomainEventHelperTest_newPropertyDomainEvent_forClear {
         
         final PropertyDomainEvent<Object, Object> ev =
                 new DomainEventHelper(null).newPropertyDomainEvent(PropertyDomainEvent.Default.class, identifier, sdo, oldValue, newValue);
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
-        assertThat(ev.getOldValue(), is(oldValue));
-        assertThat(ev.getNewValue(), is(newValue));
+        assertEquals(ev.getOldValue(), oldValue);
+        assertNull(ev.getNewValue());
     }
 
 
@@ -59,10 +62,10 @@ public class DomainEventHelperTest_newPropertyDomainEvent_forClear {
         
         final PropertyDomainEvent<SomeDomainObject, LocalDate> ev =
                 new DomainEventHelper(null).newPropertyDomainEvent(SomeDatePropertyChangedDomainEvent.class, identifier, sdo, oldValue, newValue);
-        assertThat(ev.getSource(), is(sdo));
+        assertSame(ev.getSource(), sdo);
         assertThat(ev.getIdentifier(), is(identifier));
         assertThat(ev.getOldValue(), is(oldValue));
-        assertThat(ev.getNewValue(), is(nullValue()));
+        assertNull(ev.getNewValue());
     }
     
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 11/24: ISIS-1742: replaces uses of the now deleted PublishedObject.ChangeKind enum with its replacement, PublishingChangeKind

Posted by da...@apache.org.
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 b8252323ffe2e23f81946e981d1a22a80da75a11
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:17:43 2017 +0100

    ISIS-1742: replaces uses of the now deleted PublishedObject.ChangeKind enum with its replacement, PublishingChangeKind
---
 ...stence-layer_ChangedObjectsServiceInternal.adoc |  2 +-
 .../changes/ChangedObjectsServiceInternal.java     | 15 ++++++------
 .../services/publish/PublishedObjectsDefault.java  | 27 +++++++++++----------
 .../publish/PublishingServiceInternalDefault.java  | 28 +++++++++++-----------
 4 files changed, 37 insertions(+), 35 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_ChangedObjectsServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_ChangedObjectsServiceInternal.adoc
index 660e6d0..7d42d0f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_ChangedObjectsServiceInternal.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_ChangedObjectsServiceInternal.adoc
@@ -27,7 +27,7 @@ public class ChangedObjectsServiceInternal {
 
     public boolean hasChangedAdapters();                                                        // <2>
 
-    public Map<ObjectAdapter, PublishedObject.ChangeKind> getChangeKindByEnlistedAdapter();     // <3>
+    public Map<ObjectAdapter, PublishingChangeKind> getChangeKindByEnlistedAdapter();     // <3>
     public int numberObjectsDirtied();
     public int numberObjectPropertiesModified();
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
index b00d413..2a82ea3 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
@@ -30,6 +30,7 @@ import com.google.common.collect.Sets;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.annotation.PublishingChangeKind;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.WithTransactionScope;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -66,7 +67,7 @@ public class ChangedObjectsServiceInternal implements WithTransactionScope {
 
 
     // used for publishing
-    private final Map<ObjectAdapter,PublishedObject.ChangeKind> changeKindByEnlistedAdapter = Maps.newLinkedHashMap();
+    private final Map<ObjectAdapter,PublishingChangeKind> changeKindByEnlistedAdapter = Maps.newLinkedHashMap();
 
     @Programmatic
     public boolean isEnlisted(ObjectAdapter adapter) {
@@ -91,7 +92,7 @@ public class ChangedObjectsServiceInternal implements WithTransactionScope {
             return;
         }
 
-        enlistForPublishing(adapter, PublishedObject.ChangeKind.CREATE);
+        enlistForPublishing(adapter, PublishingChangeKind.CREATE);
 
         for (ObjectAssociation property : adapter.getSpecification().getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES)) {
             final AdapterAndProperty aap = AdapterAndProperty.of(adapter, property);
@@ -125,7 +126,7 @@ public class ChangedObjectsServiceInternal implements WithTransactionScope {
             return;
         }
 
-        enlistForPublishing(adapter, PublishedObject.ChangeKind.UPDATE);
+        enlistForPublishing(adapter, PublishingChangeKind.UPDATE);
 
         for (ObjectAssociation property : adapter.getSpecification().getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES)) {
             final AdapterAndProperty aap = AdapterAndProperty.of(adapter, property);
@@ -159,7 +160,7 @@ public class ChangedObjectsServiceInternal implements WithTransactionScope {
             return;
         }
 
-        final boolean enlisted = enlistForPublishing(adapter, PublishedObject.ChangeKind.DELETE);
+        final boolean enlisted = enlistForPublishing(adapter, PublishingChangeKind.DELETE);
         if(!enlisted) {
             return;
         }
@@ -182,8 +183,8 @@ public class ChangedObjectsServiceInternal implements WithTransactionScope {
     /**
      * @return <code>true</code> if successfully enlisted, <code>false</code> if was already enlisted
      */
-    private boolean enlistForPublishing(final ObjectAdapter adapter, final PublishedObject.ChangeKind current) {
-        final PublishedObject.ChangeKind previous = changeKindByEnlistedAdapter.get(adapter);
+    private boolean enlistForPublishing(final ObjectAdapter adapter, final PublishingChangeKind current) {
+        final PublishingChangeKind previous = changeKindByEnlistedAdapter.get(adapter);
         if(previous == null) {
             changeKindByEnlistedAdapter.put(adapter, current);
             return true;
@@ -260,7 +261,7 @@ public class ChangedObjectsServiceInternal implements WithTransactionScope {
 
 
     @Programmatic
-    public Map<ObjectAdapter, PublishedObject.ChangeKind> getChangeKindByEnlistedAdapter() {
+    public Map<ObjectAdapter, PublishingChangeKind> getChangeKindByEnlistedAdapter() {
         return changeKindByEnlistedAdapter;
     }
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
index 43bd546..9784214 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
@@ -32,6 +32,7 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Multimaps;
 
 import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.annotation.PublishingChangeKind;
 import org.apache.isis.applib.services.publish.PublishedObjects;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
@@ -53,7 +54,7 @@ public class PublishedObjectsDefault implements PublishedObjects {
     private final Timestamp completedAt;
     private final int numberLoaded;
     private final int numberObjectPropertiesModified;
-    private final Map<ObjectAdapter, PublishedObject.ChangeKind> changesByAdapter;
+    private final Map<ObjectAdapter, PublishingChangeKind> changesByAdapter;
 
     public PublishedObjectsDefault(
             final UUID transactionUuid,
@@ -62,7 +63,7 @@ public class PublishedObjectsDefault implements PublishedObjects {
             final Timestamp completedAt,
             final int numberLoaded,
             final int numberObjectPropertiesModified,
-            final Map<ObjectAdapter, PublishedObject.ChangeKind> changesByAdapter) {
+            final Map<ObjectAdapter, PublishingChangeKind> changesByAdapter) {
         this.transactionUuid = transactionUuid;
         this.sequence = sequence;
         this.userName = userName;
@@ -124,17 +125,17 @@ public class PublishedObjectsDefault implements PublishedObjects {
 
     @Override
     public int getNumberCreated() {
-        return numAdaptersOfKind(PublishedObject.ChangeKind.CREATE);
+        return numAdaptersOfKind(PublishingChangeKind.CREATE);
     }
 
     @Override
     public int getNumberUpdated() {
-        return numAdaptersOfKind(PublishedObject.ChangeKind.UPDATE);
+        return numAdaptersOfKind(PublishingChangeKind.UPDATE);
     }
 
     @Override
     public int getNumberDeleted() {
-        return numAdaptersOfKind(PublishedObject.ChangeKind.DELETE);
+        return numAdaptersOfKind(PublishingChangeKind.DELETE);
     }
 
     @Override
@@ -142,7 +143,7 @@ public class PublishedObjectsDefault implements PublishedObjects {
         return numberObjectPropertiesModified;
     }
 
-    private int numAdaptersOfKind(final PublishedObject.ChangeKind kind) {
+    private int numAdaptersOfKind(final PublishingChangeKind kind) {
         final Collection<ObjectAdapter> objectAdapters = adaptersByChange().get(kind);
         return objectAdapters != null ? objectAdapters.size() : 0;
     }
@@ -151,9 +152,9 @@ public class PublishedObjectsDefault implements PublishedObjects {
     /**
      * Lazily populated
      */
-    private Map<PublishedObject.ChangeKind, Collection<ObjectAdapter>> adaptersByChange;
+    private Map<PublishingChangeKind, Collection<ObjectAdapter>> adaptersByChange;
 
-    private Map<PublishedObject.ChangeKind, Collection<ObjectAdapter>> adaptersByChange() {
+    private Map<PublishingChangeKind, Collection<ObjectAdapter>> adaptersByChange() {
         return adaptersByChange != null? adaptersByChange : (adaptersByChange = invert(changesByAdapter));
     }
 
@@ -180,9 +181,9 @@ public class PublishedObjectsDefault implements PublishedObjects {
 
         final ObjectsDto objectsDto = new ObjectsDto();
 
-        objectsDto.setCreated(oidsDtoFor(PublishedObject.ChangeKind.CREATE));
-        objectsDto.setUpdated(oidsDtoFor(PublishedObject.ChangeKind.UPDATE));
-        objectsDto.setDeleted(oidsDtoFor(PublishedObject.ChangeKind.DELETE));
+        objectsDto.setCreated(oidsDtoFor(PublishingChangeKind.CREATE));
+        objectsDto.setUpdated(oidsDtoFor(PublishingChangeKind.UPDATE));
+        objectsDto.setDeleted(oidsDtoFor(PublishingChangeKind.DELETE));
 
         objectsDto.setLoaded(getNumberLoaded());
         objectsDto.setPropertiesModified(getNumberPropertiesModified());
@@ -190,10 +191,10 @@ public class PublishedObjectsDefault implements PublishedObjects {
         return objectsDto;
     }
 
-    private OidsDto oidsDtoFor(final PublishedObject.ChangeKind kind) {
+    private OidsDto oidsDtoFor(final PublishingChangeKind kind) {
         final OidsDto oidsDto = new OidsDto();
 
-        final Map<PublishedObject.ChangeKind, Collection<ObjectAdapter>> adaptersByChange = adaptersByChange();
+        final Map<PublishingChangeKind, Collection<ObjectAdapter>> adaptersByChange = adaptersByChange();
 
         final Collection<ObjectAdapter> adapters = adaptersByChange.get(kind);
         if(adapters != null) {
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 7006679..aad979c 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
@@ -36,7 +36,7 @@ import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.PublishedObject.ChangeKind;
+import org.apache.isis.applib.annotation.PublishingChangeKind;
 import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.clock.ClockService;
 import org.apache.isis.applib.services.command.Command;
@@ -115,14 +115,14 @@ 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, ChangeKind> changeKindByEnlistedAdapter = Maps.newHashMap();
+        final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter = Maps.newHashMap();
         changeKindByEnlistedAdapter.putAll(changedObjectsServiceInternal.getChangeKindByEnlistedAdapter());
 
         publishObjectsToPublishingService(changeKindByEnlistedAdapter);
         publishObjectsToPublisherServices(changeKindByEnlistedAdapter);
     }
 
-    private void publishObjectsToPublishingService(final Map<ObjectAdapter, ChangeKind> changeKindByEnlistedAdapter) {
+    private void publishObjectsToPublishingService(final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter) {
 
         if(publishingServiceIfAny == null) {
             return;
@@ -132,9 +132,9 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
         final Timestamp timestamp = clockService.nowAsJavaSqlTimestamp();
         final ObjectStringifier stringifier = objectStringifier();
 
-        for (final Map.Entry<ObjectAdapter, ChangeKind> adapterAndChange : changeKindByEnlistedAdapter.entrySet()) {
+        for (final Map.Entry<ObjectAdapter, PublishingChangeKind> adapterAndChange : changeKindByEnlistedAdapter.entrySet()) {
             final ObjectAdapter enlistedAdapter = adapterAndChange.getKey();
-            final ChangeKind changeKind = adapterAndChange.getValue();
+            final PublishingChangeKind changeKind = adapterAndChange.getValue();
 
             publishObjectToPublishingService(
                     enlistedAdapter, changeKind, currentUser, timestamp, stringifier);
@@ -143,7 +143,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
 
     private void publishObjectToPublishingService(
             final ObjectAdapter enlistedAdapter,
-            final ChangeKind changeKind,
+            final PublishingChangeKind changeKind,
             final String currentUser,
             final Timestamp timestamp,
             final ObjectStringifier stringifier) {
@@ -171,9 +171,9 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
     }
 
     private void publishObjectsToPublisherServices(
-            final Map<ObjectAdapter, ChangeKind> changeKindByEnlistedAdapter) {
+            final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter) {
 
-        final Map<ObjectAdapter, ChangeKind> changeKindByPublishedAdapter =
+        final Map<ObjectAdapter, PublishingChangeKind> changeKindByPublishedAdapter =
                 Maps.filterKeys(
                         changeKindByEnlistedAdapter,
                         PublishedObjectFacet.Predicates.isPublished());
@@ -195,7 +195,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
     private PublishedObjects newPublishedObjects(
             final int numberLoaded,
             final int numberObjectPropertiesModified,
-            final Map<ObjectAdapter, ChangeKind> changeKindByPublishedAdapter) {
+            final Map<ObjectAdapter, PublishingChangeKind> changeKindByPublishedAdapter) {
 
         final Command command = commandContext.getCommand();
         final UUID transactionUuid = command.getTransactionId();
@@ -342,7 +342,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
     private EventMetadata newEventMetadata(
             final String currentUser,
             final Timestamp timestamp,
-            final ChangeKind changeKind,
+            final PublishingChangeKind changeKind,
             final String enlistedAdapterClass,
             final Bookmark enlistedTarget) {
         final EventType eventType = PublishingServiceInternalDefault.eventTypeFor(changeKind);
@@ -356,14 +356,14 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
                 enlistedAdapterClass, null, enlistedTarget, null, null, null, null);
     }
 
-    private static EventType eventTypeFor(ChangeKind changeKind) {
-        if(changeKind == ChangeKind.UPDATE) {
+    private static EventType eventTypeFor(PublishingChangeKind changeKind) {
+        if(changeKind == PublishingChangeKind.UPDATE) {
             return EventType.OBJECT_UPDATED;
         }
-        if(changeKind == ChangeKind.CREATE) {
+        if(changeKind == PublishingChangeKind.CREATE) {
             return EventType.OBJECT_CREATED;
         }
-        if(changeKind == ChangeKind.DELETE) {
+        if(changeKind == PublishingChangeKind.DELETE) {
             return EventType.OBJECT_DELETED;
         }
         throw new IllegalArgumentException("unknown ChangeKind '" + changeKind + "'");

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 04/24: ISIS-1742:changes PublishedActionFacet and PublishedObjectFacet to be MarkerFacets, rather than SingleValueFacets returning a publisihng factory

Posted by da...@apache.org.
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 4114ee17c4ea1204c9aca740d90cdc2258568383
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:00:52 2017 +0100

    ISIS-1742:changes PublishedActionFacet and PublishedObjectFacet to be MarkerFacets, rather than SingleValueFacets returning a publisihng factory
    
    ... because concept of publishing factory being removed.
    
    Also simplies PublishingChangeKind enum, removes deprecated converters from now deleted PublishedObject.ChangeKind
    
    Note that the code doesn't compile at this point.
---
 .../isis/applib/annotation/PublishingChangeKind.java  | 19 -------------------
 .../facets/actions/publish/PublishedActionFacet.java  |  4 ++--
 .../object/publishedobject/PublishedObjectFacet.java  |  4 ++--
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java
index d92bfc2..c7f7be7 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingChangeKind.java
@@ -22,23 +22,4 @@ public enum PublishingChangeKind {
     CREATE,
     UPDATE,
     DELETE;
-
-    @Deprecated
-    public static PublishedObject.ChangeKind from(final PublishingChangeKind publishingChangeKind) {
-        if(publishingChangeKind == null) return null;
-        if(publishingChangeKind == CREATE) return PublishedObject.ChangeKind.CREATE;
-        if(publishingChangeKind == UPDATE) return PublishedObject.ChangeKind.UPDATE;
-        if(publishingChangeKind == DELETE) return PublishedObject.ChangeKind.DELETE;
-        // shouldn't happen
-        throw new IllegalArgumentException("Unrecognized changeKind: " + publishingChangeKind);
-    }
-    @Deprecated
-    public static PublishingChangeKind from(final PublishedObject.ChangeKind  publishingChangeKind) {
-        if(publishingChangeKind == null) return null;
-        if(publishingChangeKind == PublishedObject.ChangeKind.CREATE) return CREATE;
-        if(publishingChangeKind == PublishedObject.ChangeKind.UPDATE) return UPDATE;
-        if(publishingChangeKind == PublishedObject.ChangeKind.DELETE) return DELETE;
-        // shouldn't happen
-        throw new IllegalArgumentException("Unrecognized changeKind: " + publishingChangeKind);
-    }
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java
index 9b523b4..c27eeb9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java
@@ -19,12 +19,12 @@
 
 package org.apache.isis.core.metamodel.facets.actions.publish;
 
-import org.apache.isis.core.metamodel.facets.SingleValueFacet;
+import org.apache.isis.core.metamodel.facets.MarkerFacet;
 
 /**
  * Indicates that the invocation of action should be published, specifying the means by which a
  * canonical event representing this invocation should be created.
  */
-public interface PublishedActionFacet extends SingleValueFacet<PublishedAction.PayloadFactory> {
+public interface PublishedActionFacet extends MarkerFacet {
 
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java
index e95b968..8c60c55 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java
@@ -22,13 +22,13 @@ package org.apache.isis.core.metamodel.facets.object.publishedobject;
 import com.google.common.base.Predicate;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.SingleValueFacet;
+import org.apache.isis.core.metamodel.facets.MarkerFacet;
 
 /**
  * Indicates that changes to an object's properties are to be published has, specifying the means by which 
  * a canonical event representing these changes should be created.
  */
-public interface PublishedObjectFacet extends SingleValueFacet<PublishedObject.PayloadFactory> {
+public interface PublishedObjectFacet extends MarkerFacet {
 
     class Predicates {
         private Predicates(){}

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 22/24: ISIS-1742: further updates to docs, removing reference to the now-deleted PublishingService.

Posted by da...@apache.org.
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 e4e61fdb76c7229482191ed51f0c6406b6954ee4
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 10:04:25 2017 +0100

    ISIS-1742: further updates to docs, removing reference to the now-deleted PublishingService.
---
 .../main/asciidoc/guides/rgant/_rgant-Action.adoc  |  7 +------
 .../guides/rgant/_rgant-Action_publishing.adoc     | 19 +------------------
 .../asciidoc/guides/rgant/_rgant-DomainObject.adoc |  7 +------
 .../rgant/_rgant-DomainObject_publishing.adoc      | 21 +++------------------
 .../guides/rgant/_rgant-Property_publishing.adoc   |  5 +++--
 .../guides/rgfis/_rgfis_application-layer.adoc     |  2 +-
 .../guides/rgfis/_rgfis_persistence-layer.adoc     |  5 ++---
 ...ersistence-layer_PublishingServiceInternal.adoc | 22 +++++++---------------
 ...rgsvc_application-layer-api_CommandContext.adoc |  2 +-
 ...rgsvc_application-layer-spi_CommandService.adoc |  8 ++++----
 .../_rgsvc_core-domain-api_EventBusService.adoc    |  2 +-
 .../main/asciidoc/guides/rgsvc/_rgsvc_intro.adoc   |  8 +++-----
 .../guides/rgsvc/_rgsvc_persistence-layer-spi.adoc | 21 ---------------------
 ...svc_persistence-layer-spi_PublisherService.adoc | 11 +++--------
 ...ailable-domain-services_framework-provided.adoc |  1 -
 .../_ugfun_core-concepts_apache-isis-vs_cqrs.adoc  |  2 +-
 ...ore-concepts_apache-isis-vs_event-sourcing.adoc |  2 +-
 ...amming-model_view-models_dto_dto-consumers.adoc |  2 +-
 .../ugodn/_ugodn_configuring_properties.adoc       |  4 ----
 19 files changed, 34 insertions(+), 117 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action.adoc
index 3b8f5c9..6e94177 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action.adoc
@@ -62,12 +62,7 @@ Currently this is only supported for no-arg actions.
 |xref:../rgant/rgant.adoc#_rgant-Action_publishing[`publishing()`]
 |`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
 (`AS_CONFIGURED`)
-|whether the action invocation should be published to the registered xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
-
-|`publishing-` +
-`PayloadFactory()`
-|subtype of `PublishingPayloadFactory-` `ForAction` (none)
-|specifies that a custom implementation of `PublishingPayloadFactoryForAction` be used to create the (payload of the) published event representing the action invocation
+|whether the action invocation should be published to the registered xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 
 |xref:../rgant/rgant.adoc#_rgant-Action_restrictTo[`restrictTo()`]
 |`NO_RESTRICTIONS`,`PROTOTYPING` +
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
index f305d97..0a17ecc 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
@@ -8,7 +8,7 @@
 
 
 The `publishing()` attribute determines whether and how an action invocation is published via the registered
-implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or
+implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`]) or
 xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].  This attribute is also
 supported for xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[domain objects], where it controls whether changed objects
 are published as events, and for xref:../rgant/rgant.adoc#_rgant_Property_publishing[`@Property#publishing()`], where it controls
@@ -51,21 +51,4 @@ public class Order {
 
 
 
-== `publishingPayloadFactory()`
-
-The (optional) related `publishingPayloadFactory()` specifies the class to use to create the (payload of the) event to
-be published by the publishing factory.
-
-Rather than simply broadcast that the action was invoked, the payload factory allows a "fatter" payload to be
-instantiated that can eagerly push commonly-required information to all subscribers. For at least some subscribers
-this should avoid the necessity to query back for additional information.
-
-[WARNING]
-====
-Be aware that this attribute is only honoured by the (deprecated) xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`], so should itself be considered as deprecated.  It
-is ignored by the replacement xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`],
-====
-
-
-
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject.adoc
index d456528..99bc031 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject.adoc
@@ -87,14 +87,9 @@ The default "reserved" method name is `$$`.
 |xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`publishing()`]
 |`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
 (`AS_CONFIGURED`)
-|whether changes to the object should be published to the registered xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
+|whether changes to the object should be published to the registered xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 
 
-|`publishing-` +
-`PayloadFactory()`
-|subtype of `PublishingPayloadFactory-` `ForObject` (none)
-|specifies that a custom implementation of `PublishingPayloadFactoryForObject` be used to create the (payload of the) published event representing the change to the object
-
 |xref:../rgant/rgant.adoc#_rgant-DomainObject_removingLifecycleEvent[`removing-` +
 `LifecycleEvent()`]
 |subtype of `ObjectRemovingEvent` +
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
index 7cd7f3d..bfba388 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
@@ -7,8 +7,9 @@
 
 
 The `publishing()` attribute determines whether and how a modified object instance is published via the registered
-implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].  This attribute is also supported
+implementation of
+xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
+This attribute is also supported
 for xref:../rgant/rgant.adoc#_rgant-Action_publishing[actions], where it controls whether action invocations are published as
 events, and for xref:../rgant/rgant.adoc#_rgant_Property_publishing[`@Property#publishing()`], where it controls whether
 property edits are published as events.
@@ -45,19 +46,3 @@ public class InterestRate {
 
 
 
-== `publishingPayloadFactory()`
-
-The (optional) related `publishingPayloadFactory()` specifies the class to use to create the (payload of the) event to
-be published by the publishing factory.
-
-Rather than simply broadcast that the object was changed, the payload factory allows a "fatter" payload to be
-instantiated that can eagerly push commonly-required information to all subscribers. For at least some subscribers
-this should avoid the necessity to query back for additional information.
-
-
-[WARNING]
-====
-Be aware that this attribute is only honoured by the (deprecated)
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`], so should itself be considered as deprecated.  It
-is ignored by the replacement xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`],
-====
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
index 74713e3..2be7751 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
@@ -8,8 +8,9 @@
 
 
 The `publishing()` attribute determines whether and how a property edit is published via the registered implementation
-of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].  This attribute is also supported
+of
+xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
+This attribute is also supported
 for xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[domain objects], where it controls whether changed objects are
 published as events, and for xref:../rgant/rgant.adoc#_rgant_Property_publishing[`@Property#publishing()`], where it controls
 whether property edits are published as events.
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer.adoc
index 699f9a8..05cda09 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_application-layer.adoc
@@ -50,7 +50,7 @@ xref:../rgant/rgant.adoc#_rgant-Property_command[`@Property#commandExecuteIn()`]
 
 |xref:../rgfis/rgfis.adoc#_rgfis_application-layer_InteractionDtoServiceInternal[`o.a.i.c.m.s.ixn` +
 `InteractionDtoServiceInternal`]
-|Creates DTO for the current execution of an action invocation or property edit, for use either as a reified command or for implementations of the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
+|Creates DTO for the current execution of an action invocation or property edit, for use either as a reified command or for implementations of the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 |`CommandDtoService-` +
 `InternalServiceDefault` +
 ``isis-core-metamodel``
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer.adoc
index 63a6be5..c26022d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer.adoc
@@ -57,9 +57,8 @@ querying and for persisting objects.
 `PublishingServiceInternal`]
 |Co-ordinates between
 xref:../rgfis/rgfis.adoc#_rgfis_persistence-layer_ChangedObjectsServiceInternal[`ChangedObjectsServiceInternal`] and
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-api_MetricsService[`MetricsService`] and the SPI services,
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] and (deprecated)
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
+xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-api_MetricsService[`MetricsService`] and the SPI services, and the
+xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 |`PublishingService-` +
 `InternalDefault` +
 `isis-core-runtime`
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_PublishingServiceInternal.adoc b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_PublishingServiceInternal.adoc
index fe1266b..31eba46 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_PublishingServiceInternal.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgfis/_rgfis_persistence-layer_PublishingServiceInternal.adoc
@@ -14,8 +14,7 @@ For published action invocations/ property edits, it provides an API for those m
 For published objects, it provides an API for the framework to call at the end of the interaction; it obtains details
 of the changed objects (from the
 xref:../rgfis/rgfis.adoc#_rgfis_persistence-layer_ChangedObjectsServiceInternal[`ChangedObjectsServiceInternal`]) and filters them to just
-those objects that are to be published; these are then passed through to any configured `PublisherService` or
-`PublishingService` implementations.
+those objects that are to be published; these are then passed through to any configured `PublisherService` implementations.
 
 
 
@@ -26,29 +25,22 @@ The SPI of the service is:
 [source,java]
 ----
 public class PublishingServiceInternal {
-    void publishAction(
-            Interaction.Execution execution,        // <1>
-            ObjectAction objectAction,              // <2>
-            IdentifiedHolder identifiedHolder,
-            ObjectAdapter targetAdapter,
-            List<ObjectAdapter> parameterAdapters,
-            ObjectAdapter resultAdapter);
-    void publishProperty(                           // <3>
+    void publishAction(                             // <1>
             Interaction.Execution execution);
-    void publishObjects();                          // <4>
+    void publishProperty(                           // <2>
+            Interaction.Execution execution);
+    void publishObjects();                          // <3>
 }
 ----
 <1> to publish an action invocation, as represented by the specified member `Execution` parameter and with the
 xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`] annotation attribute or equivalent, to any configured
 xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].  The `Execution` object will be an instance of
 `ActionInvocation` (see xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`] for details).
-<2> the remaining parameters are to support the publishing of the action to any configured
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] services (deprecated).
-<3> to publish a property edit, as as represented by the specified member `Execution` parameter and with the
+<2> to publish a property edit, as as represented by the specified member `Execution` parameter and with the
 xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`] annotation attribute or equivalent, to any
 configured xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].  The `Execution` object will be an instance
 of `PropertyEdit` (see xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_InteractionContext[`InteractionContext`] for details).
-<4> to publish all changed objects that are to be published (with the
+<3> to publish all changed objects that are to be published (with the
 xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`] annotation attribute or equivalent).
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_CommandContext.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_CommandContext.adoc
index 74f2c59..6f06ac6 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_CommandContext.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-api_CommandContext.adoc
@@ -16,7 +16,7 @@ As of `1.13.0`, the primary use case for persistent ``Command``s is in support o
 In previous versions of the framework, persistent ``Command``s also supported a number of other use cases:
 
 * they enable profiling of the running application (which actions are invoked then most often, what is their response time)
-* if a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] (the latter now deprecated) is configured, they provide better traceability as the `Command` is also correlated with any published events, again through the unique `transactionId` GUID
+* if a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] is configured, they provide better traceability as the `Command` is also correlated with any published events, again through the unique `transactionId` GUID
 * if a xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuderService[`AuditerService`] or xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuditService[`AuditingService`] (the latter now deprecated) is configured, they provide better audit information, since the `Command` (the 'cause' of an action) can be correlated to the audit records (the "effect" of the action) through the `transactionId` GUID
 
 As of `1.13.0`, these other uses cases are now more fully supported through the
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc
index 57920ea..c2096f0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_application-layer-spi_CommandService.adoc
@@ -17,8 +17,7 @@ xref:../rgant/rgant.adoc#_rgant-Action_command[`@Action#command()`] annotation.
 In previous versions of the framework, persistent ``Command``s also supported a number of other use cases:
 
 * they enable profiling of the running application (which actions are invoked then most often, what is their response time)
-* if xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] or
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] (latter deprecated) is configured, they provide
+* if xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] is configured, they provide
 better traceability as the `Command` is also correlated with any published events, again through the unique
 `transactionId` GUID
 * if xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_AuderService[`AuditerService`] or
@@ -110,9 +109,10 @@ persisted. This is closely related to the xref:../rgsvc/rgsvc.adoc#_rgsvc_applic
 
 The implementations of `CommandService` and `BackgroundCommandService` are intended to go together, so that persistent parent `Command`s can be associated with their child background `Command`s.
 
-The services provided by this module combines very well with the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_AuditingService[`AuditingService`].  The `CommandService` captures the _cause_ of an interaction (an action was invoked, a property was edited), while the `AuditingService3` captures the _effect_ of that interaction in terms of changed state.
+The services provided by this module combines very well with the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_AuditingService[`AuditingService`].
+The `CommandService` captures the _cause_ of an interaction (an action was invoked, a property was edited), while the `AuditingService3` captures the _effect_ of that interaction in terms of changed state.
 
-You may also want to configure the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
+You may also want to configure the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 
 All three of these services collaborate implicitly by way of the xref:../rgcms/rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[`HasTransactionId`] interface.
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_EventBusService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_EventBusService.adoc
index 82c0fd2..50a9163 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_EventBusService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_core-domain-api_EventBusService.adoc
@@ -400,4 +400,4 @@ in the xref:../rgsvc/rgsvc.adoc#__rgsvc_intro_overriding-the-services[introducti
 
 The `EventBusService` is intended for fine-grained publish/subscribe for object-to-object interactions within an Apache Isis domain object model. The event propagation is strictly in-memory, and there are no restrictions on the object acting as the event (it need not be serializable, for example).
 
-The xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] meanwhile is intended for coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system. Here the only events published are those that action invocations (for actions annotated with xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`]) and of changed objects (for objects annotated with xref:../rgant/rgant.adoc#_rgant-DomainObjec [...]
\ No newline at end of file
+The xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`] meanwhile is intended for coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system. Here the only events published are those that action invocations (for actions annotated with xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`]) and of changed objects (for objects annotated with xref:../rgant/rgant.adoc#_rgant-DomainObject_ [...]
\ No newline at end of file
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_intro.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_intro.adoc
index c63386f..d6c4b16 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_intro.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_intro.adoc
@@ -210,13 +210,11 @@ xref:../rgfis/rgfis.adoc#_rgfis_spi_PublisherServiceInternal[`PublisherServiceIn
 actions/properties annotated appropriate (with xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`] or
 xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`]).  +
 +
-The internal service delegates in turn to any registered
-xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] (deprecated) and also to any
-registered xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`]s (there may be more than one).
+The internal service delegates in turn to any registered xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`]s (there may be more than one).
 
 * At the end of each transaction, details of all changed objects are published, again through the (internal)
-xref:../rgfis/rgfis.adoc#_rgfis_spi_PublisherServiceInternal[`PublisherServiceInternal`] to any registered `PublishingService`
-or `PublisherService` implementations.  Only domain objects specified to be published with
+xref:../rgfis/rgfis.adoc#_rgfis_spi_PublisherServiceInternal[`PublisherServiceInternal`] to any registered `PublisherService` implementations.
+Only domain objects specified to be published with
 xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`] are published. +
 +
 [NOTE]
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc
index 3234c27..b26d489 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc
@@ -45,16 +45,6 @@ an audit record for every changed property of every changed object within a tran
 |
 
 
-|xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_EventSerializer[`o.a.i.applib.` +
-`services.publish` +
-`EventSerializer`]
-|(deprecated, not used by replacement xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`]) Creates a representation of either an action invocation or a changed object being published through the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
-|`RestfulObjects-` +
-`SpecEventSerializer` +
-``o.ia.m.publishing`` +
-``isis-module-publishing``
-|
-
 
 
 |xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`o.a.i.applib.` +
@@ -71,16 +61,6 @@ also +
 |
 
 
-|xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`o.a.i.applib.` +
-`services.publish` +
-`PublishingService`]
-|(deprecated, replaced by xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`]) Publish any action invocations and changed objects, typically for interchange with an external system in a different bounded context.
-|`PublishingService` +
-``o.ia.m.publishing`` +
-``isis-module-publishing``
-
-|
-
 
 
 |xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_UserRegistrationService[`o.a.i.applib.` +
@@ -114,5 +94,4 @@ include::_rgsvc_persistence-layer-spi_AuditerService.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi_AuditingService.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi_EventSerializer.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi_PublisherService.adoc[leveloffset=+1]
-include::_rgsvc_persistence-layer-spi_PublishingService.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi_UserRegistrationService.adoc[leveloffset=+1]
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublisherService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublisherService.adoc
index 0053f18..f743d7e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublisherService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_PublisherService.adoc
@@ -90,7 +90,7 @@ log4j.additivity.org.apache.isis.applib.services.publish.PublisherServiceLogging
 ----
 
 
-The (non-ASF) link:http://platform.incode.org[Incode Platform^]'s publishmq module also provides an implementation (`o.ia.m.publishmq.dom.servicespi.PublishingServiceUsingActiveMq`).
+The (non-ASF) link:http://platform.incode.org[Incode Platform^]'s publishmq module also provides an implementation (`o.ia.m.publishmq.dom.servicespi.PublisherServiceUsingActiveMq`).
 This implementation publishes each member execution as an event on an link:http://activemq.apache.org[ActiveMQ] message queue.
 It also persists each execution as a `PublishedEvent` entity, allowing the event to be republished if necessary.
 The implementation also provides the ability to log additional `StatusMessage` entities, correlated on the transactionId, useful for diagnosing and monitoring the activity of subscribers of said message queues.
@@ -121,13 +121,8 @@ If contributions are not required in the UI, these can be suppressed either usin
 
 This service supports two main use cases:
 
-* coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system. +
-+
-[NOTE]
-====
-The xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] also supports this use case, but
-is deprecated: the `PublisherService` is intended as a replacement for `PublishingService`.
-====
+* coarse-grained publish/subscribe for system-to-system interactions, from Apache Isis to some other system.
+
 
 * profiling of interactions/transactions, eg to diagnose response/throughput issues.
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc
index f9b1aba..11ace71 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc
@@ -36,7 +36,6 @@ Commands/Interactions/Background/Auditing/Publishing/Profiling:
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_AuditerService[`AuditerService`] (SPI)
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-api_BackgroundService[`BackgroundService`]
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_BackgroundCommandService[`BackgroundCommandService`] (SPI)
-* xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] (SPI) (deprecated)
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublishererService`] (SPI)
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-api_MetricsService[`MetricsService`]
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_cqrs.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_cqrs.adoc
index 00f85f4..dce75dd 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_cqrs.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_cqrs.adoc
@@ -31,7 +31,7 @@ There are other reasons though why a separate read model might make sense, such
 In these cases Apache Isis can often provide a reasonable alternative, namely to map domain entities against RDBMS views, either materialized views or dynamic.
 In such cases there is still only a single physical datastore, and so transactional integrity is retained.
 
-Or, the CQRS architecture can be more fully implemented with Apache Isis by introducing a separate read model, synchronized using the xref:../rgsvc/rgsvc.adoc#_rgsvc_api_PublishingService[`PublishingService`], or using xref:../rgcms/rgcms.adoc#_rgcms_classes_super_AbstractSubscriber[subscribers]  on the xref:../rgsvc/rgsvc.adoc#_rgsvc_core-domain-api_EventBusService[`EventBusService`].
+Or, the CQRS architecture can be more fully implemented with Apache Isis by introducing a separate read model, synchronized using the xref:../rgsvc/rgsvc.adoc#_rgsvc_spi_PublisherService[`PublisherService`], or using xref:../rgcms/rgcms.adoc#_rgcms_classes_super_AbstractSubscriber[subscribers]  on the xref:../rgsvc/rgsvc.adoc#_rgsvc_core-domain-api_EventBusService[`EventBusService`].
 One can then use xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_view-models[view models] to surface the data in the external read datastore.
 
 With respect to commands, Apache Isis does of course support the xref:../rgsvc/rgsvc.adoc#_rgsvc_application-layer-spi_CommandService[`CommandService`] which allows each business action to be reified into a `Command`.
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_event-sourcing.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_event-sourcing.adoc
index ef5660f..6130cde 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_event-sourcing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_core-concepts_apache-isis-vs_event-sourcing.adoc
@@ -22,7 +22,7 @@ Note that the event might be dispatched and consumed in-process or alternatively
 If the latter, then the subscriber will operate within a separate transaction, meaning the usual eventual consistency concerns and also compensating actions if a rollback is required.
 CQRS/event sourcing advocates point out -- correctly -- that this is just how things are in the "real world" too.
 
-In Apache Isis every business action (and indeed, property and collection) emits domain events through the xref:../rgsvc/rgsvc.adoc#_rgsvc_core-domain-api_EventBusService[`EventBusService`], and can optionally also be published through the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
+In Apache Isis every business action (and indeed, property and collection) emits domain events through the xref:../rgsvc/rgsvc.adoc#_rgsvc_core-domain-api_EventBusService[`EventBusService`], and can optionally also be published through the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 The former are dispatched and consumed in-process and within the same transaction, and for this reason the xref:../rgcms/rgcms.adoc#_rgcms_classes_super_AbstractSubscriber[subscribers] can also veto the events.
 The latter are intended for out-of-process consumption; the (obsolete) http://github.com/isisaddons-legacy/isis-module-publishing[Isis addons' publishing] and the (non-ASF) link:http://platform.incode.org[Incode Platform^]'s publishmq modules provide implementations for dispatching either through a RDBMS database table, or directly through to an link:http://camel.apache.org[ActiveMQ] message queue (eg wired up to link:http://camel.apache.org[Apache Camel] event bus).
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc
index 541891a..e1767ff 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_programming-model_view-models_dto_dto-consumers.adoc
@@ -23,7 +23,7 @@ In our case we focus on the validation (to determine the nature of the inbound m
 ====
 
 The (non-ASF) link:http://platform.incode.org[Incode Platform^]'s publishmq module provides an out-of-the-box solution of this design.
-It provides an implementation of the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`], but which simply publishes instances of xref:../rgcms/rgcms.adoc#_rgcms_schema-aim[`ActionInvocationMemento`] to an ActiveMQ queue.
+It provides an implementation of the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`], but which simply publishes instances of xref:../rgcms/rgcms.adoc#_rgcms_schema-aim[`ActionInvocationMemento`] to an ActiveMQ queue.
 Camel (or similar) can then be hooked up to consume these events from this queue, and use a processor to parse the action memento to determine what has changed on the source system.
 Thereafter, a subsequent Camel processor can then call back to the source - via the xref:../ugvro/ugvro.adoc#[Restful Objects viewer] - to enrich the message with additional details using a DTO.
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc b/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc
index 8af569d..bb84a9c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc
@@ -33,10 +33,6 @@ These configuration properties are typically stored in `WEB-INF/persistor_datanu
 This property is IGNORED if the xref:../rgcfg/rgcfg.adoc#_rgcfg_specifying-components[`isis.appManifest`] configuration property is specified, or if an xref:../rgcms/rgcms.adoc#_rgcms_classes_super_AppManifest[`AppManifest`] is provided programmatically.
 
 
-|`isis.persistor.datanucleus.` +
-`PublishingService.serializedForm`
-| zipped
-|
 
 |===
 

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 03/24: ISIS-1742: deletes @PublishedAction and @PublishedObject annotations.

Posted by da...@apache.org.
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 b40bb237ccab5964ebb573d90fb16e79f87ef7ae
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 08:48:26 2017 +0100

    ISIS-1742: deletes @PublishedAction and @PublishedObject annotations.
    
    Code doesn't compile at this point.
---
 .../isis/applib/annotation/PublishedAction.java    | 59 ----------------
 .../isis/applib/annotation/PublishedObject.java    | 79 ----------------------
 .../action/ActionAnnotationFacetFactory.java       |  1 -
 ...hedActionFacetForPublishedActionAnnotation.java |  1 -
 .../actions/publish/PublishedActionFacet.java      |  1 -
 .../publish/PublishedActionFacetAbstract.java      |  1 -
 .../PublishedActionPayloadFactoryDefault.java      |  1 -
 .../DomainObjectAnnotationFacetFactory.java        |  1 -
 ...hedObjectFacetForPublishedObjectAnnotation.java |  1 -
 .../publishedobject/PublishedObjectFacet.java      |  1 -
 .../PublishedObjectFacetAbstract.java              |  1 -
 .../PublishedObjectPayloadFactoryDefault.java      |  1 -
 .../action/ActionAnnotationFacetFactoryTest.java   |  2 -
 .../DomainObjectAnnotationFacetFactoryTest.java    |  2 -
 .../changes/ChangedObjectsServiceInternal.java     |  1 -
 .../services/publish/PublishedObjectsDefault.java  |  1 -
 .../publish/PublishingServiceInternalDefault.java  |  2 -
 17 files changed, 156 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java
deleted file mode 100644
index 43323e8..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.util.List;
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.services.publish.EventPayload;
-
-/**
- * @deprecated - use {@link Action#publishingPayloadFactory()} instead
- */
-@Deprecated
-@Inherited
-@Target({ ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface PublishedAction {
-
-    /**
-     * @deprecated - use {@link PublishingPayloadFactoryForAction} instead.
-     */
-    @Deprecated
-    public interface PayloadFactory {
-
-        /**
-         * @deprecated - use {@link PublishingPayloadFactoryForAction#payloadFor(org.apache.isis.applib.Identifier, Object, java.util.List, Object)} instead.
-         */
-        @Deprecated
-        @Programmatic
-        public EventPayload payloadFor(Identifier actionIdentifier, Object target, List<Object> arguments, Object result);
-    }
-
-    /**
-     * @deprecated - use {@link Action#publishingPayloadFactory()} instead
-     */
-    @Deprecated
-    Class<? extends PayloadFactory> value()  default PayloadFactory.class;
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java
deleted file mode 100644
index dccd509..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishedObject.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.isis.applib.services.publish.EventPayload;
-
-/**
- * @deprecated - use {@link org.apache.isis.applib.annotation.DomainObject#publishingPayloadFactory()} instead.
- */
-@Deprecated
-@Inherited
-@Target({ ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface PublishedObject {
-
-    /**
-     * @deprecated - use {@link PublishingChangeKind} instead.
-     */
-    @Deprecated
-    public enum ChangeKind {
-        /**
-         * @deprecated - use {@link PublishingChangeKind#CREATE} instead.
-         */
-        @Deprecated
-        CREATE,
-        /**
-         * @deprecated - use {@link PublishingChangeKind#UPDATE} instead.
-         */
-        @Deprecated
-        UPDATE,
-        /**
-         * @deprecated - use {@link PublishingChangeKind#DELETE} instead.
-         */
-        @Deprecated
-        DELETE
-    }
-
-    /**
-     * @deprecated - use {@link PublishingPayloadFactoryForObject} instead.
-     */
-    @Deprecated
-    public interface PayloadFactory {
-        /**
-         * @deprecated - use {@link PublishingPayloadFactoryForObject#payloadFor(Object, PublishingChangeKind)} instead.
-         */
-        @Deprecated
-        @Programmatic
-        public EventPayload payloadFor(Object changedObject, ChangeKind changeKind);
-    }
-
-    /**
-     * @deprecated - use {@link DomainObject#publishingPayloadFactory()} instead.
-     */
-    @Deprecated
-    Class<? extends PayloadFactory> value() default PayloadFactory.class;
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
index 4153589..f234bdd 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
@@ -29,7 +29,6 @@ import org.apache.isis.applib.annotation.Disabled;
 import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.applib.annotation.Idempotent;
 import org.apache.isis.applib.annotation.Prototype;
-import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.applib.annotation.QueryOnly;
 import org.apache.isis.applib.annotation.TypeOf;
 import org.apache.isis.applib.services.HasTransactionId;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java
index 87d3fa2..ad1f6f4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.actions.action.publishing;
 
-import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacet;
 import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacetAbstract;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java
index b172789..9b523b4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacet.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.actions.publish;
 
-import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.core.metamodel.facets.SingleValueFacet;
 
 /**
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
index b83c4e4..a4cde99 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.actions.publish;
 
-import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
index 4a37125..98939db 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
@@ -21,7 +21,6 @@ package org.apache.isis.core.metamodel.facets.actions.publish;
 import java.util.List;
 
 import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.publish.EventPayloadForActionInvocation;
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
index 34a1811..a61a99e 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
@@ -33,7 +33,6 @@ import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Immutable;
 import org.apache.isis.applib.annotation.Nature;
 import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.eventbus.ObjectCreatedEvent;
 import org.apache.isis.applib.services.eventbus.ObjectLoadedEvent;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java
index 8f89af0..2ab33e2 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.object.domainobject.publishing;
 
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacet;
 import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacetAbstract;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java
index f344c00..e95b968 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacet.java
@@ -21,7 +21,6 @@ package org.apache.isis.core.metamodel.facets.object.publishedobject;
 
 import com.google.common.base.Predicate;
 
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.SingleValueFacet;
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
index 48905e6..f795bdf 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.object.publishedobject;
 
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
index 7ef69cf..7c27c00 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.core.metamodel.facets.object.publishedobject;
 
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.annotation.PublishingChangeKind;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.publish.EventPayloadForObjectChanged;
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 3f57662..8af4332 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -40,7 +40,6 @@ import org.apache.isis.applib.annotation.CommandPersistence;
 import org.apache.isis.applib.annotation.CommandReification;
 import org.apache.isis.applib.annotation.Idempotent;
 import org.apache.isis.applib.annotation.InvokeOn;
-import org.apache.isis.applib.annotation.PublishedAction;
 import org.apache.isis.applib.annotation.QueryOnly;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Where;
@@ -1093,7 +1092,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
 
             // given
             class Customer {
-                @org.apache.isis.applib.annotation.PublishedAction(CustomerSomeActionPayloadFactory.class)
                 public void someAction() {
                 }
             }
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
index ea0c11e..49366e1 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
@@ -30,7 +30,6 @@ import org.junit.Test;
 import org.apache.isis.applib.annotation.Audited;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Immutable;
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.annotation.PublishingChangeKind;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.publish.EventPayload;
@@ -303,7 +302,6 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
 
     public static class Publishing extends DomainObjectAnnotationFacetFactoryTest {
 
-        @PublishedObject
         class CustomerWithPublishedObjectAnnotation {
         }
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
index 063aaa6..b00d413 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
@@ -30,7 +30,6 @@ import com.google.common.collect.Sets;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.WithTransactionScope;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
index 8899679..43bd546 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishedObjectsDefault.java
@@ -32,7 +32,6 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Multimaps;
 
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.services.publish.PublishedObjects;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
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 788de3e..7006679 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
@@ -36,8 +36,6 @@ import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.PublishedAction;
-import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.annotation.PublishedObject.ChangeKind;
 import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.clock.ClockService;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 24/24: ISIS-1742: removes reference to PublishedObject and PublishedAction annotations

Posted by da...@apache.org.
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 06c8f608981e2ea40797f8a37f2506a358ac7e12
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 10:06:56 2017 +0100

    ISIS-1742: removes reference to PublishedObject and PublishedAction annotations
---
 .../main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc    | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc
index 997eb9e..26a452f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc
@@ -286,18 +286,6 @@ Also part of the toString representation of bookmarks, if using the Bookmark Ser
 |UI
 |Yes
 
-|`@PublishedAction`
-|Action invocation should be serialized and published by configured PublishingService (if any), eg to other systems.
-|xref:../rgant/rgant.adoc#_rgant-Action_publishing[`@Action#publishing()`]
-|Domain
-|
-
-|`@PublishedObject`
-|Change to object should be serialized and published by configured PublishingService (if any), eg to other systems.
-|xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject#publishing()`]
-|Domain
-|
-
 |`@QueryOnly`
 |Whether an action is query-only (has no side-effects).
 |xref:../rgant/rgant.adoc#_rgant-Action_semantics[`@Action#semantics()`]

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 10/24: ISIS-1742: fixes up DomainObjectAnnotationFacetFactory so now compiles

Posted by da...@apache.org.
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 a597acbefda6400dfaef6f9928edbde8991fdff7
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:14:07 2017 +0100

    ISIS-1742: fixes up DomainObjectAnnotationFacetFactory so now compiles
---
 .../DomainObjectAnnotationFacetFactory.java           | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
index 2a72c05..1a717ae 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
@@ -97,7 +97,6 @@ public class DomainObjectAnnotationFacetFactory extends FacetFactoryAbstract
         implements MetaModelValidatorRefiner, PostConstructMethodCache {
 
     private final MetaModelValidatorForDeprecatedAnnotation auditedValidator = new MetaModelValidatorForDeprecatedAnnotation(Audited.class);
-    private final MetaModelValidatorForDeprecatedAnnotation publishedObjectValidator = new MetaModelValidatorForDeprecatedAnnotation(PublishedObject.class);
     private final MetaModelValidatorForDeprecatedAnnotation autoCompleteValidator = new MetaModelValidatorForDeprecatedAnnotation(AutoComplete.class);
     private final MetaModelValidatorForDeprecatedAnnotation boundedValidator = new MetaModelValidatorForDeprecatedAnnotation(Bounded.class);
     private final MetaModelValidatorForDeprecatedAnnotation immutableValidator = new MetaModelValidatorForDeprecatedAnnotation(Immutable.class);
@@ -173,19 +172,9 @@ public class DomainObjectAnnotationFacetFactory extends FacetFactoryAbstract
             return;
         }
 
-        PublishedObjectFacet publishedObjectFacet;
-
-        // check for the deprecated @PublishedObject annotation first
-        final PublishedObject publishedObject = Annotations.getAnnotation(processClassContext.getCls(),
-                PublishedObject.class);
-        publishedObjectFacet = publishedObjectValidator.flagIfPresent(
-                                    PublishedObjectFacetForPublishedObjectAnnotation.create(publishedObject, facetHolder));
-
-        // else check from @DomainObject(publishing=...)
-        if(publishedObjectFacet == null) {
-            publishedObjectFacet=
-                    PublishedObjectFacetForDomainObjectAnnotation.create(domainObject, getConfiguration(), facetHolder);
-        }
+        // check from @DomainObject(publishing=...)
+        PublishedObjectFacet publishedObjectFacet = PublishedObjectFacetForDomainObjectAnnotation
+                .create(domainObject, getConfiguration(), facetHolder);
 
         // then add
         FacetUtil.addFacet(publishedObjectFacet);
@@ -579,7 +568,6 @@ public class DomainObjectAnnotationFacetFactory extends FacetFactoryAbstract
 
         }));
 
-        metaModelValidator.add(publishedObjectValidator);
         metaModelValidator.add(auditedValidator);
         metaModelValidator.add(autoCompleteValidator);
         metaModelValidator.add(boundedValidator);
@@ -598,7 +586,6 @@ public class DomainObjectAnnotationFacetFactory extends FacetFactoryAbstract
         super.setServicesInjector(servicesInjector);
         IsisConfiguration configuration = getConfiguration();
 
-        publishedObjectValidator.setConfiguration(configuration);
         auditedValidator.setConfiguration(configuration);
         autoCompleteValidator.setConfiguration(configuration);
         boundedValidator.setConfiguration(configuration);

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 12/24: ISIS-1742: fixes unit test compilation

Posted by da...@apache.org.
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 7e6495e625cbd1410849320fbc1a61930f0ca97b
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:24:36 2017 +0100

    ISIS-1742: fixes unit test compilation
---
 .../DomainObjectAnnotationFacetFactoryTest.java    | 121 +++------------------
 1 file changed, 15 insertions(+), 106 deletions(-)

diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
index 81fef2e..6985e3a 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
@@ -30,9 +30,7 @@ import org.junit.Test;
 import org.apache.isis.applib.annotation.Audited;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Immutable;
-import org.apache.isis.applib.annotation.PublishingChangeKind;
 import org.apache.isis.applib.services.HasTransactionId;
-import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryJUnit4TestCase;
 import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
@@ -62,7 +60,6 @@ import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.Matchers.instanceOf;
 import static org.junit.Assert.assertThat;
 
 public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4TestCase {
@@ -156,7 +153,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_all() {
                 allowingConfigurationToReturn("isis.services.audit.objects", "all");
 
-                facetFactory.processAuditing(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.processAuditing(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(AuditableFacet.class);
                 assertThat(facet, is(notNullValue()));
@@ -169,7 +166,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_none() {
                 allowingConfigurationToReturn("isis.services.audit.objects", "none");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(AuditableFacet.class);
                 Assert.assertNull(facet);
@@ -181,7 +178,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_not_recognized() {
                 allowingConfigurationToReturn("isis.services.audit.objects", "foobar");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(AuditableFacet.class);
                 Assert.assertNull(facet);
@@ -213,7 +210,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             @Test
             public void does_not_have_annotation() {
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(AuditableFacet.class);
                 Assert.assertNull(facet);
@@ -315,21 +312,6 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
         class CustomerWithDomainObjectAndPublishingSetToEnabled {
         }
 
-        public static class CustomerPayloadFactory implements PublishingPayloadFactoryForObject {
-            @Override
-            public EventPayload payloadFor(final Object changedObject, final PublishingChangeKind publishingChangeKind) {
-                return null;
-            }
-        }
-
-        @DomainObject(publishing = org.apache.isis.applib.annotation.Publishing.AS_CONFIGURED, publishingPayloadFactory = CustomerPayloadFactory.class)
-        class CustomerWithDomainObjectAndPublishingSetToAsConfiguredWithCustomPayloadFactory {
-        }
-
-        @DomainObject(publishing = org.apache.isis.applib.annotation.Publishing.ENABLED, publishingPayloadFactory = CustomerPayloadFactory.class)
-        class CustomerWithDomainObjectAndPublishingSetToEnabledWithCustomPayloadFactory {
-        }
-
         @Test
         public void ignoreHasTransactionId() {
 
@@ -349,7 +331,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_all() {
                 allowingConfigurationToReturn("isis.services.publish.objects", "all");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(PublishedObjectFacet.class);
                 Assert.assertNotNull(facet);
@@ -362,7 +344,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_none() {
                 allowingConfigurationToReturn("isis.services.publish.objects", "none");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(PublishedObjectFacet.class);
                 Assert.assertNull(facet);
@@ -374,7 +356,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_not_recognized() {
                 allowingConfigurationToReturn("isis.services.publish.objects", "foobar");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(PublishedObjectFacet.class);
                 Assert.assertNull(facet);
@@ -383,38 +365,6 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             }
         }
 
-        public static class WithPublishedObjectAnnotation extends Publishing {
-
-            @Before
-            public void setUp() throws Exception {
-                super.setUp();
-                allowingConfigurationToReturn("isis.services.publish.objects", null);
-            }
-
-            @Test
-            public void has_annotation() {
-
-                facetFactory.process(new ProcessClassContext(CustomerWithPublishedObjectAnnotation.class, null, mockMethodRemover, facetHolder));
-
-                final Facet facet = facetHolder.getFacet(PublishedObjectFacet.class);
-                Assert.assertNotNull(facet);
-                Assert.assertTrue(facet instanceof PublishedObjectFacetForPublishedObjectAnnotation);
-
-                expectNoMethodsRemoved();
-            }
-
-            @Test
-            public void does_not_have_annotation() {
-
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
-
-                final Facet facet = facetHolder.getFacet(PublishedObjectFacet.class);
-                Assert.assertNull(facet);
-
-                expectNoMethodsRemoved();
-            }
-
-        }
 
         public static class WithDomainObjectAnnotationWithPublishingSetToAsConfigured extends Publishing {
 
@@ -432,27 +382,6 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             }
 
             @Test
-            public void configured_value_set_to_all_forCustomPayloadFactory() {
-                allowingConfigurationToReturn("isis.services.publish.objects", "all");
-
-                facetFactory.process(new ProcessClassContext(CustomerWithDomainObjectAndPublishingSetToAsConfiguredWithCustomPayloadFactory.class, null, mockMethodRemover, facetHolder));
-
-                final Facet facet = facetHolder.getFacet(PublishedObjectFacet.class);
-                Assert.assertNotNull(facet);
-                Assert.assertTrue(facet instanceof PublishedObjectFacetForDomainObjectAnnotationAsConfigured);
-
-                final PublishedObject.PayloadFactory payloadFactory = ((PublishedObjectFacetForDomainObjectAnnotationAsConfigured) facet).value();
-
-                assertThat(payloadFactory, instanceOf(PublishedObjectPayloadFactoryDefault.class));
-                final PublishedObjectPayloadFactoryDefault legacyAdapter = (PublishedObjectPayloadFactoryDefault) payloadFactory;
-
-                final PublishingPayloadFactoryForObject specifiedPayloadFactory = legacyAdapter.getPayloadFactory();
-                assertThat(specifiedPayloadFactory, instanceOf(CustomerPayloadFactory.class));
-
-                expectNoMethodsRemoved();
-            }
-
-            @Test
             public void configured_value_set_to_none() {
                 allowingConfigurationToReturn("isis.services.publish.objects", "none");
 
@@ -493,26 +422,6 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
                 expectNoMethodsRemoved();
             }
 
-            @Test
-            public void irrespective_of_configured_value_forCustomPayloadFactory() {
-                allowingConfigurationToReturn("isis.services.publish.objects", null);
-
-                facetFactory.process(new ProcessClassContext(CustomerWithDomainObjectAndPublishingSetToEnabledWithCustomPayloadFactory.class, null, mockMethodRemover, facetHolder));
-
-                final Facet facet = facetHolder.getFacet(PublishedObjectFacet.class);
-                Assert.assertNotNull(facet);
-                Assert.assertTrue(facet instanceof PublishedObjectFacetForDomainObjectAnnotation);
-
-                final PublishedObject.PayloadFactory payloadFactory = ((PublishedObjectFacetForDomainObjectAnnotation) facet).value();
-
-                assertThat(payloadFactory, instanceOf(PublishedObjectPayloadFactoryDefault.class));
-                final PublishedObjectPayloadFactoryDefault legacyAdapter = (PublishedObjectPayloadFactoryDefault) payloadFactory;
-
-                final PublishingPayloadFactoryForObject specifiedPayloadFactory = legacyAdapter.getPayloadFactory();
-                assertThat(specifiedPayloadFactory, instanceOf(CustomerPayloadFactory.class));
-
-                expectNoMethodsRemoved();
-            }
         }
 
         public static class WithDomainObjectAnnotationWithPublishingSetToDisabled extends Publishing {
@@ -605,7 +514,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
         @Test
         public void whenNoDomainObjectAnnotation() {
 
-            facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+            facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
             final Facet facet = facetHolder.getFacet(AutoCompleteFacet.class);
             Assert.assertNull(facet);
@@ -662,7 +571,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
         @Test
         public void whenNoDomainObjectAnnotation() {
 
-            facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+            facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
             final Facet facet = facetHolder.getFacet(ChoicesFacet.class);
             Assert.assertNull(facet);
@@ -697,7 +606,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_true() {
                 allowingConfigurationToReturn(EditingObjectsConfiguration.EDIT_OBJECTS_KEY, "true");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(ImmutableFacet.class);
                 Assert.assertNull(facet);
@@ -709,7 +618,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_false() {
                 allowingConfigurationToReturn(EditingObjectsConfiguration.EDIT_OBJECTS_KEY, "false");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(ImmutableFacet.class);
                 Assert.assertNotNull(facet);
@@ -722,7 +631,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             public void configured_value_set_to_not_recognized() {
                 allowingConfigurationToReturn(EditingObjectsConfiguration.EDIT_OBJECTS_KEY, "foobar");
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(ImmutableFacet.class);
                 Assert.assertNull(facet);
@@ -755,7 +664,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
             @Test
             public void does_not_have_annotation() {
 
-                facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+                facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
                 final Facet facet = facetHolder.getFacet(ImmutableFacet.class);
                 Assert.assertNull(facet);
@@ -887,7 +796,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
         @Test
         public void whenNoDomainObjectAnnotation() {
 
-            facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+            facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
             final Facet facet = facetHolder.getFacet(ObjectSpecIdFacet.class);
             Assert.assertNull(facet);
@@ -1006,7 +915,7 @@ public class DomainObjectAnnotationFacetFactoryTest extends AbstractFacetFactory
         @Test
         public void whenNoDomainObjectAnnotation() {
 
-            facetFactory.process(new ProcessClassContext(Customer.class, null, mockMethodRemover, facetHolder));
+            facetFactory.process(new ProcessClassContext(DomainObjectAnnotationFacetFactoryTest.Customer.class, null, mockMethodRemover, facetHolder));
 
             final Facet facet = facetHolder.getFacet(ViewModelFacet.class);
             Assert.assertNull(facet);

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 05/24: ISIS-1742: fixes PublishedActionFacetAbstract and PublishedObjectFacetAbstract

Posted by da...@apache.org.
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 216847f410f472aac32d3c2711ec53c54d58053b
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:03:19 2017 +0100

    ISIS-1742: fixes PublishedActionFacetAbstract and PublishedObjectFacetAbstract
    
    removes reference to the now deleted PayloadFactory stuff
---
 .../publish/PublishedActionFacetAbstract.java      | 23 +++-----------------
 .../PublishedObjectFacetAbstract.java              | 25 ++--------------------
 2 files changed, 5 insertions(+), 43 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
index a4cde99..ec419d2 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
@@ -21,35 +21,18 @@ package org.apache.isis.core.metamodel.facets.actions.publish;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
+import org.apache.isis.core.metamodel.facets.MarkerFacetAbstract;
 
-public abstract class PublishedActionFacetAbstract extends SingleValueFacetAbstract<PublishedAction.PayloadFactory> implements PublishedActionFacet {
+public abstract class PublishedActionFacetAbstract extends MarkerFacetAbstract implements PublishedActionFacet {
 
     public static Class<? extends Facet> type() {
         return PublishedActionFacet.class;
     }
 
-    public PublishedActionFacetAbstract(final PublishingPayloadFactoryForAction payloadFactory, final FacetHolder holder) {
-        this(legacyPayloadFactoryFor(payloadFactory), holder);
-    }
-
-    public PublishedActionFacetAbstract(final PublishedAction.PayloadFactory payloadFactory, final FacetHolder holder) {
+    public PublishedActionFacetAbstract(final FacetHolder holder) {
         super(  type(),
-                payloadFactory != null
-                        ? payloadFactory
-                        : new PublishedActionPayloadFactoryDefault(),
                 holder);
     }
 
-    static PublishedAction.PayloadFactory legacyPayloadFactoryFor(final PublishingPayloadFactoryForAction publishingPayloadFactory) {
-        if(publishingPayloadFactory == null) {
-            return null;
-        }
-        if(publishingPayloadFactory instanceof PublishingPayloadFactoryForAction.Adapter) {
-            final PublishingPayloadFactoryForAction.Adapter adapter = (PublishingPayloadFactoryForAction.Adapter) publishingPayloadFactory;
-            return adapter.getPayloadFactory();
-        }
-        return new PublishedActionPayloadFactoryDefault(publishingPayloadFactory);
-    }
 
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
index f795bdf..09b28b0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
@@ -21,39 +21,18 @@ package org.apache.isis.core.metamodel.facets.object.publishedobject;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
+import org.apache.isis.core.metamodel.facets.MarkerFacetAbstract;
 
-public abstract class PublishedObjectFacetAbstract extends SingleValueFacetAbstract<PublishedObject.PayloadFactory> implements PublishedObjectFacet {
+public abstract class PublishedObjectFacetAbstract extends MarkerFacetAbstract implements PublishedObjectFacet {
 
     public static Class<? extends Facet> type() {
         return PublishedObjectFacet.class;
     }
 
     public PublishedObjectFacetAbstract(
-            final PublishedObject.PayloadFactory payloadFactory,
             final FacetHolder holder) {
         super(  type(),
-                payloadFactory != null
-                        ? payloadFactory
-                        : new PublishedObjectPayloadFactoryDefault(),
                 holder);
     }
 
-    protected PublishedObjectFacetAbstract(
-            final PublishingPayloadFactoryForObject publishingPayloadFactory,
-            final FacetHolder holder) {
-        this(legacyPayloadFactoryFor(publishingPayloadFactory), holder);
-    }
-
-    static PublishedObject.PayloadFactory legacyPayloadFactoryFor(final PublishingPayloadFactoryForObject publishingPayloadFactory) {
-        if(publishingPayloadFactory == null) {
-            return null;
-        }
-        if(publishingPayloadFactory instanceof PublishingPayloadFactoryForObject.Adapter) {
-            final PublishingPayloadFactoryForObject.Adapter adapter = (PublishingPayloadFactoryForObject.Adapter) publishingPayloadFactory;
-            return adapter.getPayloadFactory();
-        }
-        return new PublishedObjectPayloadFactoryDefault(publishingPayloadFactory);
-    }
-
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 06/24: ISIS-1742: deletes the PublishedActionPayloadFactoryDefault and PublishedObjectPayloadFactoryDefault implementations

Posted by da...@apache.org.
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 199fe06254406d851ca09120fb941cceb1df040d
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:04:30 2017 +0100

    ISIS-1742: deletes the PublishedActionPayloadFactoryDefault and PublishedObjectPayloadFactoryDefault implementations
    
    since these concepts have been removed
---
 .../PublishedActionPayloadFactoryDefault.java      | 61 ----------------------
 .../PublishedObjectPayloadFactoryDefault.java      | 52 ------------------
 .../action/ActionAnnotationFacetFactoryTest.java   |  1 -
 .../DomainObjectAnnotationFacetFactoryTest.java    |  1 -
 4 files changed, 115 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
deleted file mode 100644
index 98939db..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.core.metamodel.facets.actions.publish;
-
-import java.util.List;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.services.publish.EventPayload;
-import org.apache.isis.applib.services.publish.EventPayloadForActionInvocation;
-
-public class PublishedActionPayloadFactoryDefault implements PublishedAction.PayloadFactory {
-
-    private final PublishingPayloadFactoryForAction payloadFactory;
-
-    public PublishedActionPayloadFactoryDefault() {
-        this(null);
-    }
-
-    public PublishedActionPayloadFactoryDefault(
-            final PublishingPayloadFactoryForAction payloadFactory) {
-        this.payloadFactory = payloadFactory;
-    }
-
-    @Override
-    public EventPayload payloadFor(
-            final Identifier actionIdentifier,
-            final Object target,
-            final List<Object> arguments,
-            final Object result) {
-        return payloadFactory != null
-                ? payloadFactory.payloadFor(actionIdentifier, target, arguments, result)
-                : new EventPayloadForActionInvocation<Object>(
-                actionIdentifier,
-                target,
-                arguments,
-                result);
-    }
-
-    /**
-     * For testing only.
-     */
-    public PublishingPayloadFactoryForAction getPayloadFactory() {
-        return payloadFactory;
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
deleted file mode 100644
index 7c27c00..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.core.metamodel.facets.object.publishedobject;
-
-import org.apache.isis.applib.annotation.PublishingChangeKind;
-import org.apache.isis.applib.services.publish.EventPayload;
-import org.apache.isis.applib.services.publish.EventPayloadForObjectChanged;
-
-public class PublishedObjectPayloadFactoryDefault implements PublishedObject.PayloadFactory {
-
-    private final PublishingPayloadFactoryForObject payloadFactory;
-
-    public PublishedObjectPayloadFactoryDefault() {
-        this(null);
-    }
-
-    PublishedObjectPayloadFactoryDefault(final PublishingPayloadFactoryForObject payloadFactory) {
-        this.payloadFactory = payloadFactory;
-    }
-
-    @Override
-    public EventPayload payloadFor(
-            final Object changedObject,
-            final PublishedObject.ChangeKind changeKind) {
-        return payloadFactory != null
-                ? payloadFactory.payloadFor(changedObject, PublishingChangeKind.from(changeKind))
-                : new EventPayloadForObjectChanged<Object>(changedObject);
-    }
-
-    /**
-     * For testing only.
-     */
-    public PublishingPayloadFactoryForObject getPayloadFactory() {
-        return payloadFactory;
-    }
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 8af4332..360d0ef 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -75,7 +75,6 @@ import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacet;
 import org.apache.isis.core.metamodel.facets.actions.command.CommandFacet;
 import org.apache.isis.core.metamodel.facets.actions.prototype.PrototypeFacet;
 import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacet;
-import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionPayloadFactoryDefault;
 import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacet;
 import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacetAbstract;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
index 49366e1..51efe7f 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
@@ -57,7 +57,6 @@ import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;
 import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.ImmutableFacetForImmutableAnnotation;
 import org.apache.isis.core.metamodel.facets.object.objectspecid.ObjectSpecIdFacet;
 import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacet;
-import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectPayloadFactoryDefault;
 import org.apache.isis.core.metamodel.facets.object.viewmodel.ViewModelFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.choices.ChoicesFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 23/24: ISIS-1742: removes reference to EventSerializer from .adocs

Posted by da...@apache.org.
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 844d27567e4f6a2d393b5ba2cb83c8b9e2a32e97
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 10:06:17 2017 +0100

    ISIS-1742: removes reference to EventSerializer from .adocs
---
 .../guides/rgsvc/_rgsvc_persistence-layer-spi.adoc |  1 -
 ...gsvc_persistence-layer-spi_EventSerializer.adoc | 78 ----------------------
 ...ailable-domain-services_framework-provided.adoc |  1 -
 3 files changed, 80 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc
index b26d489..267a356 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi.adoc
@@ -92,6 +92,5 @@ Where an implementation is available (on the classpath) then it is always regist
 
 include::_rgsvc_persistence-layer-spi_AuditerService.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi_AuditingService.adoc[leveloffset=+1]
-include::_rgsvc_persistence-layer-spi_EventSerializer.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi_PublisherService.adoc[leveloffset=+1]
 include::_rgsvc_persistence-layer-spi_UserRegistrationService.adoc[leveloffset=+1]
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_EventSerializer.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_EventSerializer.adoc
deleted file mode 100644
index dea6d50..0000000
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_persistence-layer-spi_EventSerializer.adoc
+++ /dev/null
@@ -1,78 +0,0 @@
-[[_rgsvc_persistence-layer-spi_EventSerializer]]
-= `EventSerializer` (deprecated)
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:_basedir: ../../
-:_imagesdir: images/
-
-
-The `EmailSerializer` service is a supporting service intended for use by (any implementation of) xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].  Its responsibility is to combine the `EventMetadata` and the `EventPayload` into some serialized form (such as JSON, XML or a string) that can then be published.
-
-[WARNING]
-====
-This service is deprecated, replaced with xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
-====
-
-See xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`] for further discussion.
-
-
-
-
-== SPI
-
-The SPI defined by this service is:
-
-[source,java]
-----
-@Deprecated
-public interface EventSerializer {
-    Object serialize(                   // <1>
-            EventMetadata metadata,     // <2>
-            EventPayload payload);      // <3>
-}
-----
-<1> returns an object for maximum flexibility, which is then handed off to the `PublishingService`.
-<2> standard metadata about the event, such as the user, the xref:../rgcms/rgcms.adoc#_rgcms_classes_mixins_HasTransactionId[`transactionId`], date/time etc
-<3> for published actions, will generally be an `EventPayloadForActionInvocation` (or subclass thereof); for published objects, will generally be an `EventPayloadForObjectChanged` (or subclass thereof)
-
-It's important to make sure that the publishing service implementation is able to handle the serialized form.  Strings are a good lowest common denominator, but in some cases a type-safe equivalent, such as a w3c DOM `Document` or JSON node might be passed instead.
-
-
-
-
-
-== Implementation
-
-The (obsolete) http://github.com/isisaddons-legacy/isis-module-publishing[Isis addons' publishing] module provides an implementation (`org.isisaddons.module.publishing.dom.eventserializer.RestfulObjectsSpecEventSerializer`) that represents the event payload using the representation defined by the link:http://restfulobjects.org[Restful Objects spec] of (transient) objects, grafting on the metadata as additional JSON nodes.
-
-For example, this is the JSON generated on an action invocation:
-
-.JSON representation of a published action invocation
-image::{_imagesdir}reference-services-spi/EventSerializer/action-invocation-published-to-stderr.png[width="750px",link="{_imagesdir}reference-services-spi/EventSerializer/action-invocation-published-to-stderr.png"]
-
-while this is the object change JSON:
-
-.JSON representation of a published changed object
-image::{_imagesdir}reference-services-spi/EventSerializer/changed-object-published-to-stderr.png[width="750px",link="{_imagesdir}reference-services-spi/EventSerializer/changed-object-published-to-stderr.png"]
-
-You could if you wish change the representation by registering your own implementation of this API in `isis.properties`:
-
-
-
-
-== Registering the Services
-
-There is no default implementation of this service provided by the core Apache Isis framework.
-
-The (obsolete) http://github.com/isisaddons-legacy/isis-module-publishing[Isis addons' publishing] module provides an implementation of this service (`RestfulObjectsSpecEventSerializer`) that serializes action invocations and published
-objects into a format based on the Restful Objects specification.  It also (as you might imagine) provides an
-implementation of the xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].
-
-Assuming that an `AppManifest` is being used to xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app])
-then this can be activated by updating the `pom.xml` and updating the `AppManifest#getModules()` method.
-
-
-
-== Related Services
-
-This service is intended (though not mandated) to be used by implementations of xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`].  The (non-ASF) http://github.com/isisaddons-legacy/isis-module-publishing[Isis addons' publishing] module does use it (though the (non-ASF) link:http://platform.incode.org[Incode Platform^] publishmq module does not).
-
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc
index 11ace71..5dfc1e8 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_available-domain-services_framework-provided.adoc
@@ -93,7 +93,6 @@ Other SPI:
 
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_bootstrapping-spi_ClassDiscoveryService[`ClassDiscoveryService`] (SPI)
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_ErrorReportingService[`ErrorReportingService`] (SPI)
-* xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_EventSerializer[`EventSerializer`] (SPI)
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_ExceptionRecognizer[`ExceptionRecognizer`] (SPI)
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_testing_FixtureScriptsSpecificationProvider[`FixtureScriptsSpecificationProvider`] (SPI)
 * xref:../rgsvc/rgsvc.adoc#_rgsvc_presentation-layer-spi_LocaleProvider[`LocaleProvider`] (SPI)

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 16/24: ISIS-1742: simplifies PublishingServiceInternalDefault, removes any reference to the now deleted PublishingService .... simply delegates to PublisherService

Posted by da...@apache.org.
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 c4a322d6125b09826853b0c14e44fc63a5c9b7a3
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:35:47 2017 +0100

    ISIS-1742: simplifies PublishingServiceInternalDefault, removes any reference to the now deleted PublishingService .... simply delegates to PublisherService
---
 .../publish/PublishingServiceInternalDefault.java  | 229 +--------------------
 1 file changed, 1 insertion(+), 228 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 74a9592f..1158460 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
@@ -20,46 +20,29 @@
 package org.apache.isis.core.runtime.services.publish;
 
 import java.sql.Timestamp;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
 import javax.enterprise.context.RequestScoped;
 
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
-import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.annotation.PublishingChangeKind;
-import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.clock.ClockService;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.CommandContext;
 import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.iactn.InteractionContext;
 import org.apache.isis.applib.services.metrics.MetricsService;
-import org.apache.isis.applib.services.publish.EventMetadata;
-import org.apache.isis.applib.services.publish.EventType;
-import org.apache.isis.applib.services.publish.ObjectStringifier;
 import org.apache.isis.applib.services.publish.PublishedObjects;
 import org.apache.isis.applib.services.publish.PublisherService;
 import org.apache.isis.applib.services.user.UserService;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
-import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
-import org.apache.isis.core.metamodel.facets.FacetedMethod;
-import org.apache.isis.core.metamodel.facets.FacetedMethodParameter;
-import org.apache.isis.core.metamodel.facets.actions.action.invocation.CommandUtil;
-import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacet;
-import org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet;
 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;
@@ -69,7 +52,7 @@ import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
 
 /**
- * Wrapper around {@link PublishingService}.  Is a no-op if there is no injected service.
+ * Wrapper around {@link PublisherService}.  Is a no-op if there is no injected service.
  */
 @DomainService(
         nature = NatureOfService.DOMAIN,
@@ -78,30 +61,6 @@ import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
 @RequestScoped
 public class PublishingServiceInternalDefault implements PublishingServiceInternal {
 
-    private final static OidMarshaller OID_MARSHALLER = OidMarshaller.INSTANCE;
-
-    //region > static helper functions
-    private Function<ObjectAdapter, ObjectAdapter> notDestroyedElseEmpty() {
-        return new Function<ObjectAdapter, ObjectAdapter>() {
-            public ObjectAdapter apply(ObjectAdapter adapter) {
-                if (adapter == null) {
-                    return null;
-                }
-                if (!adapter.isDestroyed()) {
-                    return adapter;
-                }
-                // objectstores such as JDO prevent the underlying pojo from being touched once it has been deleted.
-                // we therefore replace that pojo with an 'empty' one.
-
-                Object replacementObject = getPersistenceSession()
-                        .instantiateAndInjectServices(adapter.getSpecification());
-                getPersistenceSession().remapRecreatedPojo(adapter, replacementObject);
-                return adapter;
-            }
-        };
-    }
-    //endregion
-
     //region > publishObjects
     @Override
     @Programmatic
@@ -116,55 +75,9 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
         final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter = Maps.newHashMap();
         changeKindByEnlistedAdapter.putAll(changedObjectsServiceInternal.getChangeKindByEnlistedAdapter());
 
-        publishObjectsToPublishingService(changeKindByEnlistedAdapter);
         publishObjectsToPublisherServices(changeKindByEnlistedAdapter);
     }
 
-    private void publishObjectsToPublishingService(final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter) {
-
-        if(publishingServiceIfAny == null) {
-            return;
-        }
-
-        final String currentUser = userService.getUser().getName();
-        final Timestamp timestamp = clockService.nowAsJavaSqlTimestamp();
-        final ObjectStringifier stringifier = objectStringifier();
-
-        for (final Map.Entry<ObjectAdapter, PublishingChangeKind> adapterAndChange : changeKindByEnlistedAdapter.entrySet()) {
-            final ObjectAdapter enlistedAdapter = adapterAndChange.getKey();
-            final PublishingChangeKind changeKind = adapterAndChange.getValue();
-
-            publishObjectToPublishingService(
-                    enlistedAdapter, changeKind, currentUser, timestamp, stringifier);
-        }
-    }
-
-    private void publishObjectToPublishingService(
-            final ObjectAdapter enlistedAdapter,
-            final PublishingChangeKind changeKind,
-            final String currentUser,
-            final Timestamp timestamp,
-            final ObjectStringifier stringifier) {
-
-        final PublishedObjectFacet publishedObjectFacet =
-                enlistedAdapter.getSpecification().getFacet(PublishedObjectFacet.class);
-        if(publishedObjectFacet == null) {
-            return;
-        }
-
-        final RootOid enlistedAdapterOid = (RootOid) enlistedAdapter.getOid();
-        final String enlistedAdapterClass = CommandUtil.targetClassNameFor(enlistedAdapter);
-        final Bookmark enlistedTarget = enlistedAdapterOid.asBookmark();
-
-        final EventMetadata metadata = newEventMetadata(
-                currentUser, timestamp, changeKind, enlistedAdapterClass, enlistedTarget);
-
-        final Object pojo = ObjectAdapter.Util.unwrap(undeletedElseEmpty(enlistedAdapter));
-        final EventPayload payload = payloadFactory.payloadFor(pojo, changeKind);
-
-        payload.withStringifier(stringifier);
-        publishingServiceIfAny.publish(metadata, payload);
-    }
 
     private void publishObjectsToPublisherServices(
             final Map<ObjectAdapter, PublishingChangeKind> changeKindByEnlistedAdapter) {
@@ -222,148 +135,11 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
         if(suppress) {
             return;
         }
-        publishActionToPublishingService(
-                objectAction, identifiedHolder, targetAdapter, parameterAdapters, resultAdapter
-        );
 
         publishToPublisherServices(execution);
     }
 
-    private void publishActionToPublishingService(
-            final ObjectAction objectAction,
-            final IdentifiedHolder identifiedHolder,
-            final ObjectAdapter targetAdapter,
-            final List<ObjectAdapter> parameterAdapters,
-            final ObjectAdapter resultAdapter) {
-        if(publishingServiceIfAny == null) {
-            return;
-        }
-        final String currentUser = userService.getUser().getName();
-        final Timestamp timestamp = clockService.nowAsJavaSqlTimestamp();
-
-        final PublishedActionFacet publishedActionFacet =
-                identifiedHolder.getFacet(PublishedActionFacet.class);
-        if(publishedActionFacet == null) {
-            return;
-        }
-
-        final RootOid adapterOid = (RootOid) targetAdapter.getOid();
-        final String oidStr = OID_MARSHALLER.marshal(adapterOid);
-        final Identifier actionIdentifier = objectAction.getIdentifier();
-        final String title = oidStr + ": " + actionIdentifier.toNameParmsIdentityString();
-
-        final String actionTargetClass = CommandUtil.targetClassNameFor(targetAdapter);
-        final String actionTargetAction = CommandUtil.targetMemberNameFor(objectAction);
-        final Bookmark actionTarget = CommandUtil.bookmarkFor(targetAdapter);
-        final String actionMemberIdentifier = CommandUtil.memberIdentifierFor(objectAction);
-
-        final List<String> parameterNames;
-        final List<Class<?>> parameterTypes;
-        final Class<?> returnType;
-
-        if(identifiedHolder instanceof FacetedMethod) {
-            // should always be the case
-
-            final FacetedMethod facetedMethod = (FacetedMethod) identifiedHolder;
-            returnType = facetedMethod.getType();
-
-            final List<FacetedMethodParameter> parameters = facetedMethod.getParameters();
-            parameterNames = immutableList(Iterables.transform(parameters, FacetedMethodParameter.Functions.GET_NAME));
-            parameterTypes = immutableList(Iterables.transform(parameters, FacetedMethodParameter.Functions.GET_TYPE));
-        } else {
-            parameterNames = null;
-            parameterTypes = null;
-            returnType = null;
-        }
-
-        final Interaction interaction = interactionContext.getInteraction();
-
-        final int nextEventSequence = interaction.next(Interaction.Sequence.PUBLISHED_EVENT.id());
-        final UUID transactionId = interaction.getTransactionId();
-        final EventMetadata metadata = new EventMetadata(
-                transactionId, nextEventSequence, EventType.ACTION_INVOCATION, currentUser, timestamp, title,
-                actionTargetClass, actionTargetAction, actionTarget, actionMemberIdentifier, parameterNames,
-                parameterTypes, returnType);
-
-        final PublishedAction.PayloadFactory payloadFactory = publishedActionFacet.value();
-
-        final ObjectStringifier stringifier = objectStringifier();
-
-        final EventPayload payload = payloadFactory.payloadFor(
-                identifiedHolder.getIdentifier(),
-                ObjectAdapter.Util.unwrap(undeletedElseEmpty(targetAdapter)),
-                ObjectAdapter.Util.unwrap(undeletedElseEmpty(parameterAdapters)),
-                ObjectAdapter.Util.unwrap(undeletedElseEmpty(resultAdapter)));
-        payload.withStringifier(stringifier);
-        publishingServiceIfAny.publish(metadata, payload);
-    }
-
-    private static <T> List<T> immutableList(final Iterable<T> iterable) {
-        return Collections.unmodifiableList(Lists.newArrayList(iterable));
-    }
-
-    private ObjectStringifier objectStringifier() {
-        return new ObjectStringifier() {
-                @Override
-                public String toString(Object object) {
-                    if(object == null) {
-                        return null;
-                    }
-                    final ObjectAdapter adapter = isisSessionFactory.getCurrentSession()
-                            .getPersistenceSession().adapterFor(object);
-                    Oid oid = adapter.getOid();
-                    return oid != null? oid.enString(): encodedValueOf(adapter);
-                }
-                private String encodedValueOf(ObjectAdapter adapter) {
-                    EncodableFacet facet = adapter.getSpecification().getFacet(EncodableFacet.class);
-                    return facet != null? facet.toEncodedString(adapter): adapter.toString();
-                }
-                @Override
-                public String classNameOf(Object object) {
-                    final ObjectAdapter adapter = getPersistenceSession().adapterFor(object);
-                    final String className = adapter.getSpecification().getFullIdentifier();
-                    return className;
-                }
-            };
-    }
-
-    private List<ObjectAdapter> undeletedElseEmpty(List<ObjectAdapter> parameters) {
-        return Lists.newArrayList(Iterables.transform(parameters, notDestroyedElseEmpty()));
-    }
-
-    private ObjectAdapter undeletedElseEmpty(ObjectAdapter adapter) {
-        return notDestroyedElseEmpty().apply(adapter);
-    }
-
-    private EventMetadata newEventMetadata(
-            final String currentUser,
-            final Timestamp timestamp,
-            final PublishingChangeKind changeKind,
-            final String enlistedAdapterClass,
-            final Bookmark enlistedTarget) {
-        final EventType eventType = PublishingServiceInternalDefault.eventTypeFor(changeKind);
-
-        final Interaction interaction = interactionContext.getInteraction();
 
-        final int nextEventSequence = interaction.next(Interaction.Sequence.PUBLISHED_EVENT.id());
-        final UUID transactionId = interaction.getTransactionId();
-        return new EventMetadata(
-                transactionId, nextEventSequence, eventType, currentUser, timestamp, enlistedTarget.toString(),
-                enlistedAdapterClass, null, enlistedTarget, null, null, null, null);
-    }
-
-    private static EventType eventTypeFor(PublishingChangeKind changeKind) {
-        if(changeKind == PublishingChangeKind.UPDATE) {
-            return EventType.OBJECT_UPDATED;
-        }
-        if(changeKind == PublishingChangeKind.CREATE) {
-            return EventType.OBJECT_CREATED;
-        }
-        if(changeKind == PublishingChangeKind.DELETE) {
-            return EventType.OBJECT_DELETED;
-        }
-        throw new IllegalArgumentException("unknown ChangeKind '" + changeKind + "'");
-    }
     //endregion
 
     //region > publishProperty
@@ -420,9 +196,6 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
     private List<PublisherService> publisherServices;
 
     @javax.inject.Inject
-    private PublishingService publishingServiceIfAny;
-
-    @javax.inject.Inject
     private ChangedObjectsServiceInternal changedObjectsServiceInternal;
 
     @javax.inject.Inject

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 02/24: ISIS-1742: deletes @Action#publishingPayloadFactory and @DomainObject#publishingPayloadFactory and associated interfaces, PublishingPayloadFactoryForAction and PublishingPayloadFactoryForObject.

Posted by da...@apache.org.
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 99298a3ace3316b23436132f4447f53f663cf924
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 08:46:54 2017 +0100

    ISIS-1742: deletes @Action#publishingPayloadFactory and @DomainObject#publishingPayloadFactory and associated interfaces, PublishingPayloadFactoryForAction and PublishingPayloadFactoryForObject.
    
    Code doesn't compile at this point
---
 .../org/apache/isis/applib/annotation/Action.java  |  7 +-
 .../isis/applib/annotation/DomainObject.java       | 13 ----
 .../PublishingPayloadFactoryForAction.java         | 75 ----------------------
 .../PublishingPayloadFactoryForObject.java         | 73 ---------------------
 .../PublishedActionFacetForActionAnnotation.java   |  1 -
 ...ActionFacetForActionAnnotationAsConfigured.java |  1 -
 .../PublishedActionFacetFromConfiguration.java     |  1 -
 .../publish/PublishedActionFacetAbstract.java      |  1 -
 .../PublishedActionPayloadFactoryDefault.java      |  1 -
 ...lishedObjectFacetForDomainObjectAnnotation.java |  1 -
 ...FacetForDomainObjectAnnotationAsConfigured.java |  1 -
 .../PublishedObjectFacetFromConfiguration.java     |  1 -
 .../PublishedObjectFacetAbstract.java              |  1 -
 .../PublishedObjectPayloadFactoryDefault.java      |  1 -
 .../action/ActionAnnotationFacetFactoryTest.java   |  1 -
 .../DomainObjectAnnotationFacetFactoryTest.java    |  1 -
 16 files changed, 1 insertion(+), 179 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
index a546ddd..9e4e3a3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
@@ -24,8 +24,8 @@ import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
+
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.applib.services.publish.PublisherService;
 
 /**
  * Domain semantics for domain object collection.
@@ -157,11 +157,6 @@ public @interface Action {
      */
     Publishing publishing() default Publishing.AS_CONFIGURED;
 
-    /**
-     * @deprecated - not supported by {@link PublisherService}.
-     */
-    @Deprecated
-    Class<? extends PublishingPayloadFactoryForAction> publishingPayloadFactory() default PublishingPayloadFactoryForAction.class;
 
 
     // //////////////////////////////////////
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
index 97a9512..4d72bee 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
@@ -31,7 +31,6 @@ import org.apache.isis.applib.services.eventbus.ObjectPersistingEvent;
 import org.apache.isis.applib.services.eventbus.ObjectRemovingEvent;
 import org.apache.isis.applib.services.eventbus.ObjectUpdatedEvent;
 import org.apache.isis.applib.services.eventbus.ObjectUpdatingEvent;
-import org.apache.isis.applib.services.publish.PublisherService;
 
 /**
  * Domain semantics for domain objects (entities and view models; for services see {@link org.apache.isis.applib.annotation.DomainService}).
@@ -65,18 +64,6 @@ public @interface DomainObject {
      */
     Publishing publishing() default Publishing.AS_CONFIGURED;
 
-    /**
-     * The factory to construct the payload factory.
-     *
-     * <p>
-     *     If not specified then a default implementation will be used.
-     * </p>
-     *
-     * @deprecated - not supported by {@link PublisherService}.
-     */
-    @Deprecated
-    Class<? extends PublishingPayloadFactoryForObject> publishingPayloadFactory() default PublishingPayloadFactoryForObject.class;
-
 
     // //////////////////////////////////////
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java
deleted file mode 100644
index 2d437cc..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.applib.annotation;
-
-import java.util.List;
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.services.publish.EventPayload;
-import org.apache.isis.applib.services.publish.PublisherService;
-import org.apache.isis.applib.services.publish.PublishingService;
-
-/**
- * @deprecated - supports the deprecated {@link PublishingService}; use instead {@link PublisherService} (which ignores {@link Action#publishingPayloadFactory()} but is otherwise more flexible.
- */
-@Deprecated
-public interface PublishingPayloadFactoryForAction {
-
-    /**
-     * @deprecated - because {@link PublishingService} is deprecated.
-     */
-    @Deprecated
-    @Programmatic
-    public EventPayload payloadFor(Identifier actionIdentifier, Object target, List<Object> arguments, Object result);
-
-    /**
-     * Adapter to subclass if have an existing {@link org.apache.isis.applib.annotation.PublishedObject.PayloadFactory}.
-     *
-     * @deprecated
-     */
-    @Deprecated
-    public abstract class Adapter implements PublishingPayloadFactoryForAction {
-
-        private final PublishedAction.PayloadFactory payloadFactory;
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        public Adapter(final PublishedAction.PayloadFactory payloadFactory) {
-            this.payloadFactory = payloadFactory;
-        }
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        @Override
-        public EventPayload payloadFor(Identifier actionIdentifier, Object target, List<Object> arguments, Object result) {
-            return payloadFactory.payloadFor(actionIdentifier, target, arguments, result);
-        }
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        public PublishedAction.PayloadFactory getPayloadFactory() {
-            return payloadFactory;
-        }
-    }
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java
deleted file mode 100644
index f223b6e..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/PublishingPayloadFactoryForObject.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.applib.annotation;
-
-import org.apache.isis.applib.services.publish.EventPayload;
-import org.apache.isis.applib.services.publish.PublisherService;
-import org.apache.isis.applib.services.publish.PublishingService;
-
-/**
- * @deprecated - supports the deprecated {@link PublishingService}; use instead {@link PublisherService} (which ignores {@link DomainObject#publishingPayloadFactory()} but is otherwise more flexible.
- */
-@Deprecated
-public interface PublishingPayloadFactoryForObject {
-
-    /**
-     * @deprecated - because {@link PublishingService} is deprecated.
-     */
-    @Deprecated
-    @Programmatic
-    public EventPayload payloadFor(Object changedObject, PublishingChangeKind publishingChangeKind);
-
-    /**
-     * Adapter to subclass if have an existing {@link org.apache.isis.applib.annotation.PublishedObject.PayloadFactory}.
-     *
-     * @deprecated
-     */
-    @Deprecated
-    public static class Adapter implements PublishingPayloadFactoryForObject {
-
-        private final PublishedObject.PayloadFactory payloadFactory;
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        public Adapter(final PublishedObject.PayloadFactory payloadFactory) {
-            this.payloadFactory = payloadFactory;
-        }
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        @Override
-        public EventPayload payloadFor(final Object changedObject, final PublishingChangeKind publishingChangeKind) {
-            return payloadFactory.payloadFor(changedObject, PublishingChangeKind.from(publishingChangeKind));
-        }
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        public PublishedObject.PayloadFactory getPayloadFactory() {
-            return payloadFactory;
-        }
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java
index d859846..6bcd831 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java
@@ -21,7 +21,6 @@ package org.apache.isis.core.metamodel.facets.actions.action.publishing;
 
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.Publishing;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForAction;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacet;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java
index e737c35..1f42f10 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.actions.action.publishing;
 
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForAction;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 
 public class PublishedActionFacetForActionAnnotationAsConfigured extends PublishedActionFacetForActionAnnotation {
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java
index 816ea0a..f06e45d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.actions.action.publishing;
 
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForAction;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacetAbstract;
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
index 047ca66..b83c4e4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionFacetAbstract.java
@@ -20,7 +20,6 @@
 package org.apache.isis.core.metamodel.facets.actions.publish;
 
 import org.apache.isis.applib.annotation.PublishedAction;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForAction;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
index e5513c6..4a37125 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/publish/PublishedActionPayloadFactoryDefault.java
@@ -22,7 +22,6 @@ import java.util.List;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.PublishedAction;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForAction;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.publish.EventPayloadForActionInvocation;
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java
index 8dfa0b4..2ef5b69 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java
@@ -21,7 +21,6 @@ package org.apache.isis.core.metamodel.facets.object.domainobject.publishing;
 
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Publishing;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForObject;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacet;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java
index ed513a6..eadcec4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.object.domainobject.publishing;
 
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForObject;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 
 public class PublishedObjectFacetForDomainObjectAnnotationAsConfigured extends PublishedObjectFacetForDomainObjectAnnotation {
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java
index fd9ce9e..6848fd0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java
@@ -19,7 +19,6 @@
 
 package org.apache.isis.core.metamodel.facets.object.domainobject.publishing;
 
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForObject;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacetAbstract;
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
index 95350a6..48905e6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectFacetAbstract.java
@@ -20,7 +20,6 @@
 package org.apache.isis.core.metamodel.facets.object.publishedobject;
 
 import org.apache.isis.applib.annotation.PublishedObject;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForObject;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
index bcd6f6b..7ef69cf 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/publishedobject/PublishedObjectPayloadFactoryDefault.java
@@ -20,7 +20,6 @@ package org.apache.isis.core.metamodel.facets.object.publishedobject;
 
 import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.annotation.PublishingChangeKind;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForObject;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.publish.EventPayloadForObjectChanged;
 
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 26fb44f..3f57662 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -41,7 +41,6 @@ import org.apache.isis.applib.annotation.CommandReification;
 import org.apache.isis.applib.annotation.Idempotent;
 import org.apache.isis.applib.annotation.InvokeOn;
 import org.apache.isis.applib.annotation.PublishedAction;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForAction;
 import org.apache.isis.applib.annotation.QueryOnly;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Where;
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
index 505989f..ea0c11e 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
@@ -32,7 +32,6 @@ import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Immutable;
 import org.apache.isis.applib.annotation.PublishedObject;
 import org.apache.isis.applib.annotation.PublishingChangeKind;
-import org.apache.isis.applib.annotation.PublishingPayloadFactoryForObject;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.core.metamodel.facetapi.Facet;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 07/24: ISIS-1742: fixes PublishedActionFacet implementations, removing reference to the now deleted PayloadFactory stuff

Posted by da...@apache.org.
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 058b75a0dfcd4a02301924b63959879344e75544
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:07:50 2017 +0100

    ISIS-1742: fixes PublishedActionFacet implementations, removing reference to the now deleted PayloadFactory stuff
    
    Also deletes PublishedActoinFacetForPublishedActionAnnotation, since that annotation was previously deleted.
---
 .../action/ActionAnnotationFacetFactory.java       |  1 -
 .../PublishedActionFacetForActionAnnotation.java   | 31 ++--------
 ...ActionFacetForActionAnnotationAsConfigured.java |  3 +-
 ...hedActionFacetForPublishedActionAnnotation.java | 66 ----------------------
 .../PublishedActionFacetFromConfiguration.java     |  3 +-
 .../action/ActionAnnotationFacetFactoryTest.java   |  1 -
 6 files changed, 6 insertions(+), 99 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
index f234bdd..e6436c2 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
@@ -59,7 +59,6 @@ import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInv
 import org.apache.isis.core.metamodel.facets.actions.action.prototype.PrototypeFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.prototype.PrototypeFacetForPrototypeAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForPublishedActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.semantics.ActionSemanticsFacetFallbackToNonIdempotent;
 import org.apache.isis.core.metamodel.facets.actions.action.semantics.ActionSemanticsFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.semantics.ActionSemanticsFacetForActionSemanticsAnnotation;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java
index 6bcd831..9ea448e 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotation.java
@@ -54,45 +54,22 @@ public class PublishedActionFacetForActionAnnotation extends PublishedActionFace
                         }
                         // else fall through
                     default:
-                        final PublishingPayloadFactoryForAction publishingPayloadFactory = newPayloadFactory(action);
                         return action != null
-                                ? new PublishedActionFacetForActionAnnotationAsConfigured(publishingPayloadFactory, holder)
-                                : new PublishedActionFacetFromConfiguration(publishingPayloadFactory, holder);
+                                ? new PublishedActionFacetForActionAnnotationAsConfigured(holder)
+                                : new PublishedActionFacetFromConfiguration(holder);
                 }
             case DISABLED:
                 return null;
             case ENABLED:
-                return new PublishedActionFacetForActionAnnotation(
-                        newPayloadFactory(action), holder);
+                return new PublishedActionFacetForActionAnnotation(holder);
         }
         return null;
     }
 
-    /**
-     * @return null means that the default payload factories will be used; this is handled within IsisTransaction.
-     */
-    private static PublishingPayloadFactoryForAction newPayloadFactory(final Action action) {
-        if(action == null) {
-            return null;
-        }
-        final Class<? extends PublishingPayloadFactoryForAction> payloadFactoryClass = action.publishingPayloadFactory();
-        if(payloadFactoryClass == null) {
-            return null;
-        }
-
-        try {
-            return payloadFactoryClass.newInstance();
-        } catch (final InstantiationException e) {
-            return null;
-        } catch (final IllegalAccessException e) {
-            return null;
-        }
-    }
 
     public PublishedActionFacetForActionAnnotation(
-            final PublishingPayloadFactoryForAction publishingPayloadFactory,
             final FacetHolder holder) {
-        super(publishingPayloadFactory, holder);
+        super(holder);
     }
 
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java
index 1f42f10..6ea559f 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForActionAnnotationAsConfigured.java
@@ -24,9 +24,8 @@ import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 public class PublishedActionFacetForActionAnnotationAsConfigured extends PublishedActionFacetForActionAnnotation {
 
     public PublishedActionFacetForActionAnnotationAsConfigured(
-            final PublishingPayloadFactoryForAction publishingPayloadFactory,
             final FacetHolder holder) {
-        super(publishingPayloadFactory, holder);
+        super(holder);
     }
 
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java
deleted file mode 100644
index ad1f6f4..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetForPublishedActionAnnotation.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.action.publishing;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacet;
-import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacetAbstract;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PublishedActionFacetForPublishedActionAnnotation extends PublishedActionFacetAbstract {
-
-    public static PublishedActionFacet create(
-            final PublishedAction publishedAction,
-            final FacetHolder holder) {
-
-        if (publishedAction == null) {
-            return null;
-        }
-
-        return new PublishedActionFacetForPublishedActionAnnotation(newPayloadFactory(publishedAction), holder);
-    }
-
-
-    public PublishedActionFacetForPublishedActionAnnotation(
-            final PublishedAction.PayloadFactory payloadFactory,
-            final FacetHolder holder) {
-        super(payloadFactory, holder);
-    }
-
-    private static PublishedAction.PayloadFactory newPayloadFactory(final PublishedAction publishedAction) {
-        final Class<? extends PublishedAction.PayloadFactory> payloadFactoryClass = publishedAction.value();
-        if(payloadFactoryClass == null) {
-            return null;
-        }
-
-        try {
-            return payloadFactoryClass.newInstance();
-        } catch (final InstantiationException e) {
-            return null;
-        } catch (final IllegalAccessException e) {
-            return null;
-        }
-    }
-
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java
index f06e45d..d5483b9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/publishing/PublishedActionFacetFromConfiguration.java
@@ -25,9 +25,8 @@ import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFace
 public class PublishedActionFacetFromConfiguration extends PublishedActionFacetAbstract {
 
     public PublishedActionFacetFromConfiguration(
-            final PublishingPayloadFactoryForAction publishingPayloadFactory,
             final FacetHolder holder) {
-        super(publishingPayloadFactory, holder);
+        super(holder);
     }
 
 }
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 360d0ef..03d28d9 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -67,7 +67,6 @@ import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInv
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventFromDefault;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForPublishedActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetFromConfiguration;
 import org.apache.isis.core.metamodel.facets.actions.action.typeof.TypeOfFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.typeof.TypeOfFacetOnActionForTypeOfAnnotation;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 14/24: ISIS-1742: fixes up unit test that was referencing action payload factory

Posted by da...@apache.org.
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 563b29d30f6b82d9a64a589a93a0d0450c8eb839
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:30:01 2017 +0100

    ISIS-1742: fixes up unit test that was referencing action payload factory
---
 .../action/ActionAnnotationFacetFactoryTest.java   | 57 +---------------------
 1 file changed, 2 insertions(+), 55 deletions(-)

diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 9993493..6f5177c 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -1057,20 +1057,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
 
     public static class Publishing extends ActionAnnotationFacetFactoryTest {
 
-        public static class CustomerSomeActionPayloadFactory implements PublishedAction.PayloadFactory {
-            @Override
-            public EventPayload payloadFor(final Identifier actionIdentifier, final Object target, final List<Object> arguments, final Object result) {
-                return null;
-            }
-        }
-
-        public static class CustomerSomeActionPublishingPayloadFactory implements PublishingPayloadFactoryForAction {
-            @Override
-            public EventPayload payloadFor(final Identifier actionIdentifier, final Object target, final List<Object> arguments, final Object result) {
-                return null;
-            }
-        }
-
         @Test
         public void givenHasTransactionId_thenIgnored() {
 
@@ -1085,29 +1071,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
         }
 
         @Test
-        public void givenDeprecatedAnnotation() {
-
-            // given
-            class Customer {
-                public void someAction() {
-                }
-            }
-            final Method actionMethod = findMethod(Customer.class, "someAction");
-
-            // when
-            facetFactory.processPublishing(new ProcessMethodContext(Customer.class, null, null, actionMethod, mockMethodRemover, facetedMethod));
-
-            // then
-            final Facet facet = facetedMethod.getFacet(PublishedActionFacet.class);
-            assertNotNull(facet);
-            assertTrue(facet instanceof PublishedActionFacetForPublishedActionAnnotation);
-            final PublishedActionFacetForPublishedActionAnnotation facetImpl = (PublishedActionFacetForPublishedActionAnnotation) facet;
-            assertThat(facetImpl.value(), instanceOf(CustomerSomeActionPayloadFactory.class));
-
-            expectNoMethodsRemoved();
-        }
-
-        @Test
         public void given_noAnnotation_and_configurationSetToIgnoreQueryOnly_andSafeSemantics_thenNone() {
 
             // given
@@ -1140,8 +1103,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             final Facet facet = facetedMethod.getFacet(PublishedActionFacet.class);
             assertNotNull(facet);
             final PublishedActionFacetFromConfiguration facetImpl = (PublishedActionFacetFromConfiguration) facet;
-            final PublishedAction.PayloadFactory payloadFactory = facetImpl.value();
-            assertThat(payloadFactory, is(instanceOf(PublishedActionPayloadFactoryDefault.class)));
         }
 
         @Test(expected=IllegalStateException.class)
@@ -1219,8 +1180,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             // given
             class Customer {
                 @Action(
-                        publishing = org.apache.isis.applib.annotation.Publishing.AS_CONFIGURED,
-                        publishingPayloadFactory = CustomerSomeActionPublishingPayloadFactory.class
+                        publishing = org.apache.isis.applib.annotation.Publishing.AS_CONFIGURED
                 )
                 public void someAction() {
                 }
@@ -1238,11 +1198,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             final Facet facet = facetedMethod.getFacet(PublishedActionFacet.class);
             assertNotNull(facet);
             final PublishedActionFacetForActionAnnotation facetImpl = (PublishedActionFacetForActionAnnotation) facet;
-            final PublishedAction.PayloadFactory payloadFactory = facetImpl.value();
-            assertThat(payloadFactory, instanceOf(PublishedActionPayloadFactoryDefault.class));
-
-            final PublishedActionPayloadFactoryDefault legacyAdapter = (PublishedActionPayloadFactoryDefault) payloadFactory;
-            assertThat(legacyAdapter.getPayloadFactory(), instanceOf(CustomerSomeActionPublishingPayloadFactory.class));
 
             expectNoMethodsRemoved();
         }
@@ -1289,8 +1244,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             // given
             class Customer {
                 @Action(
-                        publishing = org.apache.isis.applib.annotation.Publishing.AS_CONFIGURED,
-                        publishingPayloadFactory = CustomerSomeActionPublishingPayloadFactory.class
+                        publishing = org.apache.isis.applib.annotation.Publishing.AS_CONFIGURED
                 )
                 public void someAction() {
                 }
@@ -1307,13 +1261,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             assertNotNull(facet);
             assertTrue(facet instanceof PublishedActionFacetForActionAnnotation);
 
-            final PublishedActionFacetForActionAnnotation facetImpl = (PublishedActionFacetForActionAnnotation) facet;
-            final PublishedAction.PayloadFactory payloadFactory = facetImpl.value();
-            assertThat(payloadFactory, instanceOf(PublishedActionPayloadFactoryDefault.class));
-
-            final PublishedActionPayloadFactoryDefault legacyAdapter = (PublishedActionPayloadFactoryDefault) payloadFactory;
-            assertThat(legacyAdapter.getPayloadFactory(), instanceOf(CustomerSomeActionPublishingPayloadFactory.class));
-
             expectNoMethodsRemoved();
         }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 08/24: ISIS-1742: fixes up PublishedObjectFacet implementations, removing references to the now deleted PublishingPayloadFactory stuff.

Posted by da...@apache.org.
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 7183a7a07754dec756731d52a6391b0926a1b11f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:12:30 2017 +0100

    ISIS-1742: fixes up PublishedObjectFacet implementations, removing references to the now deleted PublishingPayloadFactory stuff.
    
    Also deletes PublishedObjectFacetForPublishedObjectAnnotation, since that annotation previously deleted.
---
 .../DomainObjectAnnotationFacetFactory.java        |  1 -
 ...lishedObjectFacetForDomainObjectAnnotation.java | 32 ++----------
 ...FacetForDomainObjectAnnotationAsConfigured.java |  4 +-
 ...hedObjectFacetForPublishedObjectAnnotation.java | 57 ----------------------
 .../PublishedObjectFacetFromConfiguration.java     |  4 +-
 .../DomainObjectAnnotationFacetFactoryTest.java    |  1 -
 6 files changed, 9 insertions(+), 90 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
index a61a99e..2a72c05 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactory.java
@@ -72,7 +72,6 @@ import org.apache.isis.core.metamodel.facets.object.domainobject.objectspecid.Ob
 import org.apache.isis.core.metamodel.facets.object.domainobject.objectspecid.ObjectSpecIdFacetForJdoPersistenceCapableAnnotation;
 import org.apache.isis.core.metamodel.facets.object.domainobject.objectspecid.ObjectSpecIdFacetFromObjectTypeAnnotation;
 import org.apache.isis.core.metamodel.facets.object.domainobject.publishing.PublishedObjectFacetForDomainObjectAnnotation;
-import org.apache.isis.core.metamodel.facets.object.domainobject.publishing.PublishedObjectFacetForPublishedObjectAnnotation;
 import org.apache.isis.core.metamodel.facets.object.domainobject.recreatable.RecreatableObjectFacetForDomainObjectAnnotation;
 import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;
 import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.ImmutableFacetForImmutableAnnotation;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java
index 2ef5b69..5e284e8 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotation.java
@@ -43,42 +43,20 @@ public class PublishedObjectFacetForDomainObjectAnnotation extends PublishedObje
                     case NONE:
                         return null;
                     default:
-                        final PublishingPayloadFactoryForObject publishingPayloadFactory = newPayloadFactory(domainObject);
                         return domainObject != null
-                            ? new PublishedObjectFacetForDomainObjectAnnotationAsConfigured(publishingPayloadFactory, holder)
-                            : new PublishedObjectFacetFromConfiguration(publishingPayloadFactory, holder);
+                            ? new PublishedObjectFacetForDomainObjectAnnotationAsConfigured(holder)
+                            : new PublishedObjectFacetFromConfiguration(holder);
                 }
             case DISABLED:
                 return null;
             case ENABLED:
-                return new PublishedObjectFacetForDomainObjectAnnotation(
-                        newPayloadFactory(domainObject), holder);
+                return new PublishedObjectFacetForDomainObjectAnnotation(holder);
         }
         return null;
     }
 
-    /**
-     * @return null means that the default payload factories will be used; this is handled within IsisTransaction.
-     */
-    protected static PublishingPayloadFactoryForObject newPayloadFactory(final DomainObject domainObject) {
-        if(domainObject == null) {
-            return null;
-        }
-        final Class<? extends PublishingPayloadFactoryForObject> value = domainObject.publishingPayloadFactory();
-        if(value == null) {
-            return null;
-        }
-        try {
-            return value.newInstance();
-        } catch (final InstantiationException e) {
-            return null;
-        } catch (final IllegalAccessException e) {
-            return null;
-        }
-    }
-
-    PublishedObjectFacetForDomainObjectAnnotation(final PublishingPayloadFactoryForObject publishingPayloadFactory, final FacetHolder holder) {
-        super(publishingPayloadFactory, holder);
+    PublishedObjectFacetForDomainObjectAnnotation(final FacetHolder holder) {
+        super(holder);
     }
 
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java
index eadcec4..c5d061b 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForDomainObjectAnnotationAsConfigured.java
@@ -24,7 +24,7 @@ import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 public class PublishedObjectFacetForDomainObjectAnnotationAsConfigured extends PublishedObjectFacetForDomainObjectAnnotation {
 
 
-    PublishedObjectFacetForDomainObjectAnnotationAsConfigured(final PublishingPayloadFactoryForObject publishingPayloadFactory, final FacetHolder holder) {
-        super(publishingPayloadFactory, holder);
+    PublishedObjectFacetForDomainObjectAnnotationAsConfigured(final FacetHolder holder) {
+        super(holder);
     }
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java
deleted file mode 100644
index 2ab33e2..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetForPublishedObjectAnnotation.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.domainobject.publishing;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacet;
-import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObjectFacetAbstract;
-
-@Deprecated
-public class PublishedObjectFacetForPublishedObjectAnnotation extends PublishedObjectFacetAbstract {
-
-    public static PublishedObjectFacet create(
-            final PublishedObject publishedObject,
-            final FacetHolder holder) {
-
-        if (publishedObject == null) {
-            return null;
-        }
-
-        else return new PublishedObjectFacetForPublishedObjectAnnotation(newPayloadFactory(publishedObject.value()), holder);
-    }
-
-    private PublishedObjectFacetForPublishedObjectAnnotation(final PublishedObject.PayloadFactory payloadFactory, final FacetHolder holder) {
-        super(payloadFactory, holder);
-    }
-
-    private static PublishedObject.PayloadFactory newPayloadFactory(final Class<? extends PublishedObject.PayloadFactory> value) {
-        if(value == null) {
-            return null;
-        }
-        try {
-            return value.newInstance();
-        } catch (final InstantiationException e) {
-            return null;
-        } catch (final IllegalAccessException e) {
-            return null;
-        }
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java
index 6848fd0..a1b1088 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainobject/publishing/PublishedObjectFacetFromConfiguration.java
@@ -24,8 +24,8 @@ import org.apache.isis.core.metamodel.facets.object.publishedobject.PublishedObj
 
 public class PublishedObjectFacetFromConfiguration extends PublishedObjectFacetAbstract {
 
-    PublishedObjectFacetFromConfiguration(final PublishingPayloadFactoryForObject publishingPayloadFactory, final FacetHolder holder) {
-        super(publishingPayloadFactory, holder);
+    PublishedObjectFacetFromConfiguration(final FacetHolder holder) {
+        super(holder);
     }
 
 }
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
index 51efe7f..81fef2e 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainobject/DomainObjectAnnotationFacetFactoryTest.java
@@ -50,7 +50,6 @@ import org.apache.isis.core.metamodel.facets.object.domainobject.editing.Immutab
 import org.apache.isis.core.metamodel.facets.object.domainobject.objectspecid.ObjectSpecIdFacetForDomainObjectAnnotation;
 import org.apache.isis.core.metamodel.facets.object.domainobject.publishing.PublishedObjectFacetForDomainObjectAnnotation;
 import org.apache.isis.core.metamodel.facets.object.domainobject.publishing.PublishedObjectFacetForDomainObjectAnnotationAsConfigured;
-import org.apache.isis.core.metamodel.facets.object.domainobject.publishing.PublishedObjectFacetForPublishedObjectAnnotation;
 import org.apache.isis.core.metamodel.facets.object.domainobject.publishing.PublishedObjectFacetFromConfiguration;
 import org.apache.isis.core.metamodel.facets.object.domainobject.recreatable.RecreatableObjectFacetForDomainObjectAnnotation;
 import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 15/24: ISIS-1742: deletes PublishingService interface

Posted by da...@apache.org.
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 ece61514531722d6ed87bf9df1a202c12da13e2d
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:31:28 2017 +0100

    ISIS-1742: deletes PublishingService interface
---
 .../applib/services/publish/PublishingService.java | 87 ----------------------
 .../applib/service/DomainChangeJdoAbstract.java    |  1 -
 .../core/metamodel/services/ServicesInjector.java  |  2 -
 .../publish/PublishingServiceInternalDefault.java  |  1 -
 4 files changed, 91 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishingService.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishingService.java
deleted file mode 100644
index 8acd912..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishingService.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.applib.services.publish;
-
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * Will be called whenever an publishable entity has changed its state, or an published action has been invoked.
- *
- * <p>
- * Typically an entity is marked to be published using the {@link org.apache.isis.applib.annotation.PublishedObject}
- * annotation, and an action is marked to be published using the
- * {@link org.apache.isis.applib.annotation.PublishedAction} annotation.
- *
- * @deprecated - use the {@link PublisherService} instead.
- */
-@Deprecated
-public interface PublishingService {
-
-    /**
-     * @param metadata
-     * @param payload
-     *
-     * @deprecated - use instead {@link PublisherService#publish(org.apache.isis.applib.services.iactn.Interaction.Execution)}.
-     */
-    @Deprecated
-    @Programmatic
-    void publish(EventMetadata metadata, EventPayload payload);
-    
-    /**
-     * @deprecated  - not every implementation will use an {@link EventSerializer}, so this ought not to have been
-     * defined in the interface.
-     */
-    @Programmatic
-    @Deprecated
-    void setEventSerializer(EventSerializer eventSerializer);
-
-
-    /**
-     * @deprecated
-     */
-    @Deprecated
-    class Stderr implements PublishingService {
-
-        private EventSerializer eventSerializer = new EventSerializer.Simple();
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        @Hidden
-        @Override
-        public void publish(EventMetadata metadata, EventPayload payload) {
-            Object serializedEvent = eventSerializer.serialize(metadata, payload);
-            System.err.println(serializedEvent);
-        }
-
-        /**
-         * @deprecated
-         */
-        @Deprecated
-        @Override
-        public void setEventSerializer(EventSerializer eventSerializer) {
-            this.eventSerializer = eventSerializer;
-        }
-    }
-
-}
-
-
diff --git a/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java b/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java
index 22c8cd9..19ed79d 100644
--- a/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java
+++ b/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java
@@ -41,7 +41,6 @@ import org.apache.isis.applib.services.message.MessageService;
 import org.apache.isis.applib.services.metamodel.MetaModelService2;
 import org.apache.isis.applib.services.metamodel.MetaModelService3;
 import org.apache.isis.applib.services.publish.PublisherService;
-import org.apache.isis.applib.services.publish.PublishingService;
 import org.apache.isis.applib.util.ObjectContracts;
 
 import static org.apache.isis.applib.annotation.Optionality.MANDATORY;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjector.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjector.java
index a940154..152e82c 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjector.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ServicesInjector.java
@@ -41,13 +41,11 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.exceprecog.ExceptionRecognizer;
-import org.apache.isis.applib.services.publish.PublishingService;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.commons.components.ApplicationScopedComponent;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationDefault;
 import org.apache.isis.core.commons.util.ToString;
-import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategoryProvider;
 import org.apache.isis.core.metamodel.exceptions.MetaModelException;
 import org.apache.isis.core.metamodel.services.configinternal.ConfigurationServiceInternal;
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 ba035b5..74a9592f 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
@@ -49,7 +49,6 @@ import org.apache.isis.applib.services.publish.EventType;
 import org.apache.isis.applib.services.publish.ObjectStringifier;
 import org.apache.isis.applib.services.publish.PublishedObjects;
 import org.apache.isis.applib.services.publish.PublisherService;
-import org.apache.isis.applib.services.publish.PublishingService;
 import org.apache.isis.applib.services.user.UserService;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 18/24: ISIS-1742: simplies/inlines methods in PublishingServiceInternalDefault, removes injected services no longer used.

Posted by da...@apache.org.
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>.

[isis] 09/24: ISIS-1742: fixes up ActionAnnotationFacetFactory so now compiles

Posted by da...@apache.org.
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 c52caae1d4cb335e60ef13841dece7b7a2bd32cc
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:13:53 2017 +0100

    ISIS-1742: fixes up ActionAnnotationFacetFactory so now compiles
---
 .../actions/action/ActionAnnotationFacetFactory.java     | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
index e6436c2..14e650c 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
@@ -88,7 +88,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
     private final MetaModelValidatorForDeprecatedAnnotation commandValidator = new MetaModelValidatorForDeprecatedAnnotation(Command.class);
     private final MetaModelValidatorForDeprecatedAnnotation queryOnlyValidator = new MetaModelValidatorForDeprecatedAnnotation(QueryOnly.class);
     private final MetaModelValidatorForDeprecatedAnnotation idempotentValidator = new MetaModelValidatorForDeprecatedAnnotation(Idempotent.class);
-    private final MetaModelValidatorForDeprecatedAnnotation publishedActionValidator = new MetaModelValidatorForDeprecatedAnnotation(PublishedAction.class);
     private final MetaModelValidatorForDeprecatedAnnotation typeOfValidator = new MetaModelValidatorForDeprecatedAnnotation(TypeOf.class);
     private final MetaModelValidatorForDeprecatedAnnotation hiddenValidator = new MetaModelValidatorForDeprecatedAnnotation(Hidden.class);
     private final MetaModelValidatorForDeprecatedAnnotation disabledValidator = new MetaModelValidatorForDeprecatedAnnotation(Disabled.class);
@@ -348,17 +347,8 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
             return;
         }
 
-        PublishedActionFacet facet;
-
-        // check for deprecated @PublishedAction annotation first
-        final PublishedAction annotation = Annotations.getAnnotation(processMethodContext.getMethod(), PublishedAction.class);
-        facet = publishedActionValidator.flagIfPresent(
-                PublishedActionFacetForPublishedActionAnnotation.create(annotation, holder), processMethodContext);
-
-        // else check for @Action(publishing=...)
-        if(facet == null) {
-            facet = PublishedActionFacetForActionAnnotation.create(action, getConfiguration(), holder);
-        }
+        // check for @Action(publishing=...)
+        PublishedActionFacet facet = PublishedActionFacetForActionAnnotation.create(action, getConfiguration(), holder);
 
         FacetUtil.addFacet(facet);
     }
@@ -416,7 +406,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
         metaModelValidator.add(commandValidator);
         metaModelValidator.add(queryOnlyValidator);
         metaModelValidator.add(idempotentValidator);
-        metaModelValidator.add(publishedActionValidator);
         metaModelValidator.add(typeOfValidator);
         metaModelValidator.add(hiddenValidator);
         metaModelValidator.add(disabledValidator);
@@ -436,7 +425,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract
         commandValidator.setConfiguration(configuration);
         queryOnlyValidator.setConfiguration(configuration);
         idempotentValidator.setConfiguration(configuration);
-        publishedActionValidator.setConfiguration(configuration);
         typeOfValidator.setConfiguration(configuration);
         hiddenValidator.setConfiguration(configuration);
         disabledValidator.setConfiguration(configuration);

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 17/24: ISIS-1742: changes visibility of injected services into PublishingServiceInternalDefault to package private, so can see which are used.

Posted by da...@apache.org.
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 eaf82c8348e2eea5eaf924b709a89822e461e909
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:38:24 2017 +0100

    ISIS-1742: changes visibility of injected services into PublishingServiceInternalDefault to package private, so can see which are used.
---
 .../publish/PublishingServiceInternalDefault.java  | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 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 1158460..bb89243 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
@@ -48,7 +48,6 @@ 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.persistence.PersistenceSession;
 import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
 
 /**
@@ -193,35 +192,32 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
 
     //region > injected services
     @javax.inject.Inject
-    private List<PublisherService> publisherServices;
+    List<PublisherService> publisherServices;
 
     @javax.inject.Inject
-    private ChangedObjectsServiceInternal changedObjectsServiceInternal;
+    ChangedObjectsServiceInternal changedObjectsServiceInternal;
 
     @javax.inject.Inject
-    private InteractionDtoServiceInternal interactionDtoServiceInternal;
+    InteractionDtoServiceInternal interactionDtoServiceInternal;
 
     @javax.inject.Inject
-    private CommandContext commandContext;
+    CommandContext commandContext;
 
     @javax.inject.Inject
-    private InteractionContext interactionContext;
+    InteractionContext interactionContext;
 
     @javax.inject.Inject
-    private ClockService clockService;
+    ClockService clockService;
 
     @javax.inject.Inject
-    private UserService userService;
+    UserService userService;
 
     @javax.inject.Inject
-    private MetricsService metricsService;
+    MetricsService metricsService;
 
     @javax.inject.Inject
-    private IsisSessionFactory isisSessionFactory;
+    IsisSessionFactory isisSessionFactory;
 
-    private PersistenceSession getPersistenceSession() {
-        return isisSessionFactory.getCurrentSession().getPersistenceSession();
-    }
     //endregion
 
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 20/24: ISIS-1742: deletes ObjectStringifier interface, now longer referened anywhere (part of publishing payload factory stuff)

Posted by da...@apache.org.
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 8b467420434fca7f211b0dfe78b2268afa06fbb6
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:45:31 2017 +0100

    ISIS-1742: deletes ObjectStringifier interface, now longer referened anywhere (part of publishing payload factory stuff)
---
 .../applib/services/publish/ObjectStringifier.java | 32 ----------------------
 1 file changed, 32 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/ObjectStringifier.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/ObjectStringifier.java
deleted file mode 100644
index 7277574..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/ObjectStringifier.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.services.publish;
-
-import org.apache.isis.applib.annotation.PublishedObject.PayloadFactory;
-
-
-/**
- * Decouples the {@link PayloadFactory payload} {@link org.apache.isis.applib.annotation.PublishedAction.PayloadFactory factory}
- * implementations from the framework for obtaining an string form (OID) and the class name of objects.
- */
-public interface ObjectStringifier {
-    public String classNameOf(Object object);
-    public String toString(Object object);
-}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.

[isis] 13/24: ISIS-1742: deletes EventPayload and subclasses

Posted by da...@apache.org.
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 ab524bce95d0310e9d1b33bbc1733972df14d556
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:26:48 2017 +0100

    ISIS-1742: deletes EventPayload and subclasses
    
    These being the objects previously created by the payload factories.
---
 .../isis/applib/services/command/Command.java      |   1 -
 .../isis/applib/services/publish/EventPayload.java |  40 ----
 .../publish/EventPayloadForActionInvocation.java   | 218 ---------------------
 .../publish/EventPayloadForObjectChanged.java      |  70 -------
 .../action/ActionAnnotationFacetFactoryTest.java   |   1 -
 .../publish/PublishingServiceInternalDefault.java  |   3 -
 6 files changed, 333 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
index a6f458f..2118897 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
@@ -33,7 +33,6 @@ import org.apache.isis.applib.services.bookmark.BookmarkService;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
 import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.publish.EventMetadata;
-import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.wrapper.WrapperFactory;
 import org.apache.isis.schema.cmd.v1.CommandDto;
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayload.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayload.java
deleted file mode 100644
index 6d03666..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayload.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.services.publish;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-
-
-
-/**
- * @deprecated - no longer provided to {@link PublishingService#publish(EventMetadata, EventPayload)} (always <tt>null</tt>).
- */
-@Deprecated
-public interface EventPayload {
-
-    /**
-     * Injected by Isis runtime immediately after instantiation.
-     */
-    @Deprecated
-    @Programmatic
-    void withStringifier(ObjectStringifier stringifier);
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForActionInvocation.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForActionInvocation.java
deleted file mode 100644
index ced2150..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForActionInvocation.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.services.publish;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * No longer in use.
- *
- * @deprecated
- */
-@Deprecated
-public class EventPayloadForActionInvocation<T> implements EventPayload {
-    
-    private final Identifier actionIdentifier;
-    private final T target;
-    private final List<? extends Object> arguments;
-    private final Object result;
-    private ObjectStringifier stringifier;
-
-    public EventPayloadForActionInvocation(final Identifier actionIdentifier, final T target, final List<? extends Object> arguments, final Object result) {
-        this.target = target;
-        this.actionIdentifier = actionIdentifier;
-        this.arguments = arguments != null? arguments: Collections.emptyList();
-        this.result = result;
-    }
-
-    /**
-     * Injected by Isis runtime immediately after instantiation.
-     */
-    @Deprecated
-    @Programmatic
-    public void withStringifier(ObjectStringifier stringifier) {
-        this.stringifier = stringifier;
-    }
-
-    @Deprecated
-    @Programmatic
-    public List<? extends Object> getArguments() {
-        return arguments;
-    }
-
-    @Deprecated
-    @Programmatic
-    public T getTarget() {
-        return target;
-    }
-
-    @Deprecated
-    @Programmatic
-    public String getActionName() {
-        return actionIdentifier.toFullIdentityString();
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg0() {
-        return getArg(0);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg0() {
-        return hideArg(0);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg1() {
-        return getArg(1);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg1() {
-        return hideArg(1);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg2() {
-        return getArg(2);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg2() {
-        return hideArg(2);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg3() {
-        return getArg(3);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg3() {
-        return hideArg(3);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg4() {
-        return getArg(4);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg4() {
-        return hideArg(4);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg5() {
-        return getArg(5);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg5() {
-        return hideArg(5);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg6() {
-        return getArg(6);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg6() {
-        return hideArg(6);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg7() {
-        return getArg(7);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg7() {
-        return hideArg(7);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg8() {
-        return getArg(8);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg8() {
-        return hideArg(8);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getArg9() {
-        return getArg(9);
-    }
-    @Deprecated
-    @Programmatic
-    public boolean hideArg9() {
-        return hideArg(9);
-    }
-
-    @Deprecated
-    @Programmatic
-    public Object getResult() {
-        return result;
-    }
-
-    private Object getArg(int paramNum) {
-        return arguments.size()>paramNum?arguments.get(paramNum):null;
-    }
-    private boolean hideArg(int paramNum) {
-        return arguments.size()<=paramNum;
-    }
-    
-    @Override
-    public String toString() {
-        if(stringifier == null) {
-            throw new IllegalStateException("ObjectStringifier has not been injected");
-        }
-
-        final StringBuilder buf = new StringBuilder();
-        buf.append(getActionName());
-        buf.append("\n    target=").append(stringifier.toString(target));
-        buf.append("\n      args=[");
-        for (Object arg : arguments) {
-            buf.append("\n           ").append(stringifier.toString(arg));
-        }
-        buf.append("\n      ]");
-        final String stringifiedResult = stringifier.toString(result);
-        buf.append("\n    result=").append(stringifiedResult != null ? stringifiedResult : "void");
-        return buf.toString();
-    }
-
-}
\ No newline at end of file
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForObjectChanged.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForObjectChanged.java
deleted file mode 100644
index 816e691..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventPayloadForObjectChanged.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.services.publish;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * No longer in use.
- *
- * @deprecated
- */
-@Deprecated
-public class EventPayloadForObjectChanged<T> implements EventPayload {
-    
-    private final T changed;
-    private ObjectStringifier stringifier;
-
-    public EventPayloadForObjectChanged(T changed) {
-        this.changed = changed;
-    }
-
-    /**
-     * Injected by Isis runtime immediately after instantiation.
-     */
-    @Deprecated
-    @Programmatic
-    public void withStringifier(ObjectStringifier stringifier) {
-        this.stringifier = stringifier;
-    }
-
-    @Deprecated
-    @Programmatic
-    public T getChanged() {
-        return changed;
-    }
-
-    @Deprecated
-    @Programmatic
-    public String getClassName() {
-        if(stringifier == null) {
-            throw new IllegalStateException("ObjectStringifier has not been injected");
-        }
-        return stringifier.classNameOf(changed);
-    }
-
-    @Override
-    public String toString() {
-        if(stringifier == null) {
-            throw new IllegalStateException("ObjectStringifier has not been injected");
-        }
-        return stringifier.toString(changed);
-    }
-}
\ No newline at end of file
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index 03d28d9..9993493 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -45,7 +45,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.services.HasTransactionId;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
-import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategoryProvider;
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 aad979c..ba035b5 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
@@ -45,7 +45,6 @@ import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.iactn.InteractionContext;
 import org.apache.isis.applib.services.metrics.MetricsService;
 import org.apache.isis.applib.services.publish.EventMetadata;
-import org.apache.isis.applib.services.publish.EventPayload;
 import org.apache.isis.applib.services.publish.EventType;
 import org.apache.isis.applib.services.publish.ObjectStringifier;
 import org.apache.isis.applib.services.publish.PublishedObjects;
@@ -154,8 +153,6 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
             return;
         }
 
-        final PublishedObject.PayloadFactory payloadFactory = publishedObjectFacet.value();
-
         final RootOid enlistedAdapterOid = (RootOid) enlistedAdapter.getOid();
         final String enlistedAdapterClass = CommandUtil.targetClassNameFor(enlistedAdapter);
         final Bookmark enlistedTarget = enlistedAdapterOid.asBookmark();

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.