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 2020/08/23 17:08:06 UTC
[isis] branch master updated (f16da7f -> f537ae4)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git.
from f16da7f ISIS-2222: wip for @DomainObject#publishing (demo now works, just docs to tidy up).
new 25e4450 ISIS-2222: completes demo for @DomainObject#publishing ... hooray!
new f537ae4 ISIS-2222: wip Action#command
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../demoapp/dom/annotDomain/Action/ActionMenu.java | 14 +-
.../dom/annotDomain/Action/command/.gitkeep | 0
.../ActionCommandDisabledMetaAnnotation.java} | 8 +-
.../ActionCommandEnabledMetaAnnotation.java} | 8 +-
.../command/ActionCommandJdo-description.adoc | 140 +++++++++++++++++
.../ActionCommandJdo.java} | 61 ++++++--
.../ActionCommandJdo.layout.xml} | 5 +-
.../Action/command/ActionCommandJdoEntities.java | 31 ++++
.../command/ActionCommandJdoSeedService.java} | 8 +-
.../ActionCommandJdo_mixinUpdateProperty.java | 38 +++++
...mmandJdo_mixinUpdatePropertyMetaAnnotation.java | 37 +++++
...ixinUpdatePropertyMetaAnnotationOverridden.java | 41 +++++
.../ActionCommandJdo_backgroundCommands.java | 39 +++++
.../ActionCommandJdo_clearBackgroundCommands.java | 38 +++++
.../ActionCommandJdo_clearForegroundCommands.java | 38 +++++
...ActionCommandJdo_executeBackgroundCommands.java | 39 +++++
.../ActionCommandJdo_foregroundCommands.java | 39 +++++
.../spiimpl/CommandServiceSpiForActions.java | 95 ++++++++++++
.../ActionPublishingDisabledMetaAnnotation.java | 3 +-
.../ActionPublishingJdo-description.adoc | 20 +++
.../Action/publishing/ActionPublishingJdo.java | 6 +-
.../publishing/ActionPublishingJdo.layout.xml | 1 -
.../annotDomain/DomainObject/DomainObjectMenu.java | 4 -
...ainObjectPublishingDisabledJdo-description.adoc | 1 -
...mainObjectPublishingEnabledJdo-description.adoc | 1 -
.../DomainObjectPublishingVm-description.adoc | 170 ++++++++++-----------
.../publishing/DomainObjectPublishingVm.layout.xml | 6 +-
.../DomainObjectPublishingVm_create.java | 57 ++++++-
.../DomainObjectPublishingVm_delete.java | 53 ++++++-
...ectPublishingVm_publishingDisabledEntities.java | 24 ---
...jectPublishingVm_publishingEnabledEntities.java | 24 ---
.../DomainObjectPublishingVm_updateAll.java | 47 +++++-
...ainObjectPublishingDisabledJdo-description.adoc | 7 +
.../DomainObjectPublishingDisabledJdo.java | 19 +--
.../DomainObjectPublishingDisabledJdo.layout.xml | 0
.../DomainObjectPublishingDisabledJdoEntities.java | 8 +-
...mainObjectPublishingDisabledJdoSeedService.java | 2 +-
...hingVm_publishingDisabledAnnotatedEntities.java | 28 ++++
...mainObjectPublishingEnabledJdo-description.adoc | 8 +
.../enabled}/DomainObjectPublishingEnabledJdo.java | 19 +--
.../DomainObjectPublishingEnabledJdo.layout.xml | 0
.../DomainObjectPublishingEnabledJdoEntities.java | 7 +-
...omainObjectPublishingEnabledJdoSeedService.java | 2 +-
...shingVm_publishingEnabledAnnotatedEntities.java | 28 ++++
...omainObjectPublishingEnabledMetaAnnotation.java | 6 +-
...lishingEnabledMetaAnnotatedJdo-description.adoc | 18 +++
...inObjectPublishingEnabledMetaAnnotatedJdo.java} | 28 ++--
...ctPublishingEnabledMetaAnnotatedJdo.layout.xml} | 0
...tPublishingEnabledMetaAnnotatedJdoEntities.java | 41 +++++
...lishingEnabledMetaAnnotatedJdoSeedService.java} | 8 +-
...gVm_publishingEnabledMetaAnnotatedEntities.java | 26 ++++
...mainObjectPublishingDisabledMetaAnnotation.java | 6 +-
...gEnabledMetaAnnotOverriddenJdo-description.adoc | 18 +++
...ctPublishingEnabledMetaAnnotOverriddenJdo.java} | 27 ++--
...ishingEnabledMetaAnnotOverriddenJdo.layout.xml} | 0
...shingEnabledMetaAnnotOverriddenJdoEntities.java | 41 +++++
...gEnabledMetaAnnotOverriddenJdoSeedService.java} | 8 +-
...blishingEnabledMetaAnnotOverriddenEntities.java | 26 ++++
.../PublisherServiceSpiForDomainObject.java | 4 +-
.../PropertyPublishingJdo-description.adoc | 16 ++
.../Property/publishing/PropertyPublishingJdo.java | 4 +-
.../publishing/PropertyPublishingJdo.layout.xml | 1 -
.../annotLayout/ActionLayout/ActionLayoutMenu.java | 2 +-
.../src/main/java/demoapp/dom/menubars.layout.xml | 1 +
.../demo/domain/src/main/resources/application.yml | 4 +
.../src/main/resources/static/css/application.css | 6 +
.../main/resources/static/scripts/application.js | 1 +
67 files changed, 1239 insertions(+), 277 deletions(-)
delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/.gitkeep
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/{publishing/ActionPublishingDisabledMetaAnnotation.java => command/ActionCommandDisabledMetaAnnotation.java} (62%)
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/{publishing/ActionPublishingDisabledMetaAnnotation.java => command/ActionCommandEnabledMetaAnnotation.java} (65%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo-description.adoc
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/{publishing/ActionPublishingJdo.java => command/ActionCommandJdo.java} (66%)
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/{publishing/ActionPublishingJdo.layout.xml => command/ActionCommandJdo.layout.xml} (93%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdoEntities.java
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/{DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java => Action/command/ActionCommandJdoSeedService.java} (77%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdateProperty.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotation.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotationOverridden.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_backgroundCommands.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearBackgroundCommands.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearForegroundCommands.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_executeBackgroundCommands.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_foregroundCommands.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/CommandServiceSpiForActions.java
delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo-description.adoc
delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo-description.adoc
delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingDisabledEntities.java
delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingEnabledEntities.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo-description.adoc
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/disabled}/DomainObjectPublishingDisabledJdo.java (82%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/disabled}/DomainObjectPublishingDisabledJdo.layout.xml (100%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/disabled}/DomainObjectPublishingDisabledJdoEntities.java (72%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/disabled}/DomainObjectPublishingDisabledJdoSeedService.java (93%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingVm_publishingDisabledAnnotatedEntities.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo-description.adoc
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/enabled}/DomainObjectPublishingEnabledJdo.java (82%)
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/enabled}/DomainObjectPublishingEnabledJdo.layout.xml (100%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/enabled}/DomainObjectPublishingEnabledJdoEntities.java (76%)
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => annotated/enabled}/DomainObjectPublishingEnabledJdoSeedService.java (93%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingVm_publishingEnabledAnnotatedEntities.java
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => metaAnnot}/DomainObjectPublishingEnabledMetaAnnotation.java (72%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo-description.adoc
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{DomainObjectPublishingEnabledJdo.java => metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo.java} (70%)
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{DomainObjectPublishingEnabledJdo.layout.xml => metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo.layout.xml} (100%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoEntities.java
copy examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{DomainObjectPublishingEnabledJdoSeedService.java => metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoSeedService.java} (73%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotatedEntities.java
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{ => metaAnnotOverridden}/DomainObjectPublishingDisabledMetaAnnotation.java (71%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo-description.adoc
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{DomainObjectPublishingEnabledJdo.java => metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.java} (68%)
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{DomainObjectPublishingEnabledJdo.layout.xml => metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.layout.xml} (100%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities.java
rename examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/{DomainObjectPublishingEnabledJdoSeedService.java => metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoSeedService.java} (72%)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotOverriddenEntities.java
[isis] 01/02: ISIS-2222: completes demo for
@DomainObject#publishing ... hooray!
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 25e4450c5d1bd988dadb59a9c1910ebf0500a5c5
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Aug 22 12:08:06 2020 +0100
ISIS-2222: completes demo for @DomainObject#publishing ... hooray!
---
.../ActionPublishingJdo-description.adoc | 20 +++
.../annotDomain/DomainObject/DomainObjectMenu.java | 4 -
...ainObjectPublishingDisabledJdo-description.adoc | 1 -
...mainObjectPublishingEnabledJdo-description.adoc | 1 -
.../DomainObjectPublishingVm-description.adoc | 170 ++++++++++-----------
.../publishing/DomainObjectPublishingVm.layout.xml | 6 +-
.../DomainObjectPublishingVm_create.java | 57 ++++++-
.../DomainObjectPublishingVm_delete.java | 53 ++++++-
...ectPublishingVm_publishingDisabledEntities.java | 24 ---
...jectPublishingVm_publishingEnabledEntities.java | 24 ---
.../DomainObjectPublishingVm_updateAll.java | 47 +++++-
...ainObjectPublishingDisabledJdo-description.adoc | 7 +
.../DomainObjectPublishingDisabledJdo.java | 19 +--
.../DomainObjectPublishingDisabledJdo.layout.xml | 0
.../DomainObjectPublishingDisabledJdoEntities.java | 8 +-
...mainObjectPublishingDisabledJdoSeedService.java | 2 +-
...hingVm_publishingDisabledAnnotatedEntities.java | 28 ++++
...mainObjectPublishingEnabledJdo-description.adoc | 8 +
.../enabled}/DomainObjectPublishingEnabledJdo.java | 19 +--
.../DomainObjectPublishingEnabledJdo.layout.xml | 0
.../DomainObjectPublishingEnabledJdoEntities.java | 7 +-
...omainObjectPublishingEnabledJdoSeedService.java | 2 +-
...shingVm_publishingEnabledAnnotatedEntities.java | 28 ++++
...omainObjectPublishingEnabledMetaAnnotation.java | 6 +-
...lishingEnabledMetaAnnotatedJdo-description.adoc | 18 +++
...inObjectPublishingEnabledMetaAnnotatedJdo.java} | 28 ++--
...ctPublishingEnabledMetaAnnotatedJdo.layout.xml} | 0
...tPublishingEnabledMetaAnnotatedJdoEntities.java | 41 +++++
...lishingEnabledMetaAnnotatedJdoSeedService.java} | 8 +-
...gVm_publishingEnabledMetaAnnotatedEntities.java | 26 ++++
...mainObjectPublishingDisabledMetaAnnotation.java | 6 +-
...gEnabledMetaAnnotOverriddenJdo-description.adoc | 18 +++
...ctPublishingEnabledMetaAnnotOverriddenJdo.java} | 27 ++--
...ishingEnabledMetaAnnotOverriddenJdo.layout.xml} | 0
...shingEnabledMetaAnnotOverriddenJdoEntities.java | 41 +++++
...gEnabledMetaAnnotOverriddenJdoSeedService.java} | 8 +-
...blishingEnabledMetaAnnotOverriddenEntities.java | 26 ++++
.../PublisherServiceSpiForDomainObject.java | 4 +-
.../PropertyPublishingJdo-description.adoc | 16 ++
.../demo/domain/src/main/resources/application.yml | 4 +
.../src/main/resources/static/css/application.css | 6 +
.../main/resources/static/scripts/application.js | 1 +
42 files changed, 581 insertions(+), 238 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo-description.adoc
index 8071721..c5a8948 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo-description.adoc
@@ -116,3 +116,23 @@ include::spiimpl/ActionPublishingJdo_interactionExecutions.java[tags=class]
include::spiimpl/ActionPublishingJdo_clearInteractionExecutions.java[tags=class]
----
+
+== Configuration
+
+By default, publishing of action invocations is disabled.
+This can be configured globally:
+
+[source,yaml]
+.application.yml
+----
+isis:
+ applib:
+ annotation:
+ action:
+ publishing: none
+----
+
+In addition to globally enabling or disabling action publishing, it is also possible to specify `ignore_safe`.
+
+This enables publishing for all actions except those that have safe (that is, query-only) semantics.
+In other words actions are published except for those that don't change (aren't declared as changing) the state of the system.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/DomainObjectMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/DomainObjectMenu.java
index 58099a2..48b91b3 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/DomainObjectMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/DomainObjectMenu.java
@@ -18,8 +18,6 @@
*/
package demoapp.dom.annotDomain.DomainObject;
-import javax.inject.Inject;
-
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.applib.annotation.DomainService;
@@ -28,8 +26,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
import lombok.extern.log4j.Log4j2;
-import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingEnabledJdo;
-import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingEnabledJdoEntities;
import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingVm;
@DomainService(nature=NatureOfService.VIEW, objectType = "demo.DomainObjectMenu")
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo-description.adoc
deleted file mode 100644
index d5b090d..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo-description.adoc
+++ /dev/null
@@ -1 +0,0 @@
-CAUTION: TODO
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo-description.adoc
deleted file mode 100644
index d5b090d..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo-description.adoc
+++ /dev/null
@@ -1 +0,0 @@
-CAUTION: TODO
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm-description.adoc
index 38bc66f..b28a636 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm-description.adoc
@@ -1,100 +1,86 @@
-The `publishing` semantic for a domain object means that all registered implementation(s) of link:https://isis.apache.org/refguide/2.0.0-M3/applib-svc/PublisherService.html#spi[`PublisherService` SPI] will be notified of the identity and nature of change (created/updated/deleted) of the domain object.
+The `publishing` semantic for a domain object means that all registered implementation(s) of the link:https://isis.apache.org/refguide/2.0.0-M3/applib-svc/PublisherService.html#spi[`PublisherService` SPI] will be notified of the identity and nature of the change (created/updated/deleted) to the domain object.
This is done _after_ the interaction in which the object(s) was changed has completed.
This notification is done only once per interaction, so will include _all_ domain objects that were changed.
The event object can be converted to type xref:https://isis.apache.org/refguide/2.0.0-M3/schema/chg.html[ChangesDto].
-NOTE: This is only supported for domain entities, not view models.
-
-Common use cases are to replicate data to another system, or for gathering metrics (which objects are changed the most?).
+Common use cases are to replicate data to another system, or for gathering metrics ("which objects change the most?").
A typical SPI implementation could publish the event over the network, or perhaps store in a database.
(Note that the framework provides an link:https://isis.apache.org/mappings/2.0.0-M3/outbox-publisher/about.html[out-of-the-box implementation] of the link:https://microservices.io/patterns/data/transactional-outbox.html[outbox pattern]).
-The semantic can be specified using either the `@Property` annotation, or through a meta-annotation.
-
-NOTE: The demo shows publishing of entities, as this is much more common use case than publishing a view model.
-
-CAUTION: TODO
-
-//== Annotated
-//
-//The `publisher` semantic can be specified explicitly using an annotation through `@Property#publishing()`:
-//
-//[source,java,indent=0]
-//----
-//include::PropertyPublishingJdo.java[tags=annotation]
-//----
-//<.> explicitly specifies that modifying the property should be published.
-//
-//The annotation could also be applied to a mixin, but would have little effect because mixin properties are always read-only.
-//
-//== Meta-annotated
-//
-//The `publishing` semantic can also be specified using a custom meta-annotation:
-//
-//* the meta-annotation is defined as:
-//+
-//[source,java]
-//----
-//include::PropertyPublishingEnabledMetaAnnotation.java[tags=class]
-//----
-//<.> annotated for a property
-//<.> annotation can be applied to a property (either its getter or the field directly)
-//
-//* and can be applied to a property:
-//+
-//[source,java,indent=0]
-//----
-//include::PropertyPublishingJdo.java[tags=meta-annotated]
-//----
-//<.> semantic is inherited from the meta-annotation
-//
-//
-//
-//=== Meta-annotated Overridden
-//
-//The meta-annotation can itself be overridden:
-//
-//* in a property:
-//+
-//[source,java,indent=0]
-//----
-//include::PropertyPublishingJdo.java[tags=meta-annotated-overridden]
-//----
-//<.> semantic from meta-annotation ...
-//<.> \... is overridden by the `@Property` annotation
-//
-//
-//== PublisherService
-//
-//The demo provides a simple implementation of `PublisherService` that just stores the DTOs in memory:
-//
-//[source,java]
-//----
-//include::spiimpl/PublisherServiceSpiForProperties.java[tags=class]
-//----
-//<.> serializes to `InteractionDto`, as defined by the link:https://isis.apache.org/refguide/2.0.0-M3/schema/ixn.html[Apache Isis schema].
-//
-//The demo implementation also provides a way to query these executions:
-//
-//[source,java,indent=0]
-//----
-//include::spiimpl/PublisherServiceSpiForProperties.java[tags=demo]
-//----
-//
-//Supporting mixins surface this list as contributions on the object:
-//
-//* `interactionExecutions` collection:
-//+
-//[source,java,indent=0]
-//----
-//include::spiimpl/PropertyPublishingJdo_interactionExecutions.java[tags=class]
-//----
-//
-//* `clearInteractionExecutions` action:
-//+
-//[source,java,indent=0]
-//----
-//include::spiimpl/PropertyPublishingJdo_clearInteractionExecutions.java[tags=class]
-//----
-//
+The semantic can be specified using either the `@DomainObject` annotation, or through a meta-annotation.
+
+NOTE: Publishing of domain objects is only supported for domain entities, not view models.
+
+
+== Explanation of the Demo
+
+The demo provides a view model which can be used to create, update or delete four variations of a domain entity:
+
+* annotated using `@DomainObject(publishing=...)` for both enabled and disabled
+* meta-annotated as enabled
+* meta-annotated as disabled, but then overridden
+
+These can be updated using the view model's `create`, `update all` and `delete` actions, generating publishing events.
+
+TIP: Click through to the entity objects to see examples of the annotations applied.
+
+== PublisherService
+
+The demo also has a simple implementation of `PublisherService` that just stores the DTOs in memory:
+
+[source,java]
+----
+include::spiimpl/PublisherServiceSpiForDomainObject.java[tags=class]
+----
+<.> serializes to `ChangesDto`, as defined by the link:https://isis.apache.org/refguide/2.0.0-M3/schema/chg.html[Apache Isis schema].
+
+The demo implementation also provides a way to query these executions:
+
+[source,java,indent=0]
+----
+include::spiimpl/PublisherServiceSpiForDomainObject.java[tags=demo]
+----
+
+Supporting mixins surface this list as contributions on the object:
+
+* `publishedObjects` collection:
++
+[source,java,indent=0]
+----
+include::spiimpl/DomainObjectPublishingVm_publishedObjects.java[tags=class]
+----
+
+* `clearPublishedObjects` action:
++
+[source,java,indent=0]
+----
+include::spiimpl/DomainObjectPublishingVm_clearPublishedObjects.java[tags=class]
+----
+
+
+For the three (of the four in total) domain entities where publishing is enabled, this collection should be appended to when the `create`, `update all` or `delete` actions are invoked.
+
+[NOTE]
+====
+Because the `Publisher` is notified after the interaction has completed, it's necessary to refresh the page to see the collection of changes being updated.
+
+This can be done simply by clicking on the view model's title.
+====
+
+
+== Configuration
+
+By default, publishing of domain objects is disabled.
+This can be configured globally:
+
+[source,yaml]
+.application.yml
+----
+isis:
+ applib:
+ annotation:
+ domain-object:
+ publishing: none
+----
+
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm.layout.xml
index 6126994..900adeb 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm.layout.xml
@@ -21,8 +21,10 @@
<bs3:col span="6">
<bs3:row>
<bs3:col span="12">
- <cpt:collection id="publishingEnabledEntities"/>
- <cpt:collection id="publishingDisabledEntities"/>
+ <cpt:collection id="publishingEnabledAnnotatedEntities"/>
+ <cpt:collection id="publishingDisabledAnnotatedEntities"/>
+ <cpt:collection id="publishingEnabledMetaAnnotatedEntities"/>
+ <cpt:collection id="publishingEnabledMetaAnnotOverriddenEntities"/>
<cpt:collection id="publishedObjects"/>
</bs3:col>
</bs3:row>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_create.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_create.java
index a045fa6..854c11d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_create.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_create.java
@@ -8,10 +8,15 @@ import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.repository.RepositoryService;
-import lombok.val;
-
import demoapp.dom._infra.samples.NameSamples;
-import demoapp.dom.types.Samples;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled.DomainObjectPublishingDisabledJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled.DomainObjectPublishingDisabledJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled.DomainObjectPublishingEnabledMetaAnnotatedJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled.DomainObjectPublishingEnabledMetaAnnotatedJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled.DomainObjectPublishingEnabledMetaAnnotOverriddenJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled.DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities;
//tag::class[]
@Action(semantics = SemanticsOf.NON_IDEMPOTENT)
@@ -26,17 +31,55 @@ public class DomainObjectPublishingVm_create {
}
@MemberOrder(sequence = "1.0")
- public DomainObjectPublishingVm act(String newValue) {
- repositoryService.persistAndFlush(new DomainObjectPublishingEnabledJdo(newValue));
- repositoryService.persistAndFlush(new DomainObjectPublishingDisabledJdo(newValue));
+ public DomainObjectPublishingVm act(
+ String newValue
+ , boolean publishingEnabled
+ , boolean publishingDisabled
+ , boolean publishingEnabledMetaAnnotated
+ , boolean publishingEnabledMetaAnnotOverridden
+ ) {
+ if(publishingEnabled) {
+ publishingEnabledJdoEntities.create(newValue);
+ }
+ if(publishingDisabled) {
+ publishingDisabledJdoEntities.create(newValue);
+ }
+ if(publishingEnabledMetaAnnotated) {
+ publishingEnabledMetaAnnotatedJdoEntities.create(newValue);
+ }
+ if(publishingEnabledMetaAnnotOverridden) {
+ publishingEnabledMetaAnnotOverriddenJdoEntities.create(newValue);
+ }
return domainObjectPublishingVm;
}
public String default0Act() {
return nameSamples.random();
}
+ public boolean default1Act() {
+ return true;
+ }
+ public boolean default2Act() {
+ return true;
+ }
+ public boolean default3Act() {
+ return true;
+ }
+ public boolean default4Act() {
+ return true;
+ }
+
+ @Inject
+ DomainObjectPublishingEnabledJdoEntities publishingEnabledJdoEntities;
+
+ @Inject
+ DomainObjectPublishingDisabledJdoEntities publishingDisabledJdoEntities;
@Inject
- RepositoryService repositoryService;
+ DomainObjectPublishingEnabledMetaAnnotatedJdoEntities publishingEnabledMetaAnnotatedJdoEntities;
+
+ @Inject
+ DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities publishingEnabledMetaAnnotOverriddenJdoEntities;
+
@Inject
NameSamples nameSamples;
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_delete.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_delete.java
index 02a2e82..b5ea910 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_delete.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_delete.java
@@ -1,12 +1,21 @@
package demoapp.dom.annotDomain.DomainObject.publishing;
+import javax.annotation.Nullable;
import javax.inject.Inject;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.services.repository.RepositoryService;
+
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled.DomainObjectPublishingDisabledJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled.DomainObjectPublishingDisabledJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled.DomainObjectPublishingEnabledMetaAnnotatedJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled.DomainObjectPublishingEnabledMetaAnnotatedJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled.DomainObjectPublishingEnabledMetaAnnotOverriddenJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled.DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities;
//tag::class[]
@Action(semantics = SemanticsOf.IDEMPOTENT)
@@ -21,21 +30,49 @@ public class DomainObjectPublishingVm_delete {
}
@MemberOrder(sequence = "3.0")
- public DomainObjectPublishingVm act(DomainObjectPublishingEnabledJdo enabledJdo, DomainObjectPublishingDisabledJdo disabledJdo) {
- enabledJdoEntities.remove(enabledJdo);
- disabledJdoEntities.remove(disabledJdo);
+ public DomainObjectPublishingVm act(
+ @Nullable DomainObjectPublishingEnabledJdo enabledJdo
+ , @Nullable DomainObjectPublishingDisabledJdo disabledJdo
+ , @Nullable DomainObjectPublishingEnabledMetaAnnotatedJdo metaAnnotatedJdo
+ , @Nullable DomainObjectPublishingEnabledMetaAnnotOverriddenJdo metaAnnotOverriddenJdo
+ ) {
+ if(enabledJdo != null) {
+ publishingEnabledJdoEntities.remove(enabledJdo);
+ }
+ if(disabledJdo != null) {
+ publishingDisabledJdoEntities.remove(disabledJdo);
+ }
+ if(metaAnnotatedJdo != null) {
+ publishingEnabledMetaAnnotatedJdoEntities.remove(metaAnnotatedJdo);
+ }
+ if(metaAnnotOverriddenJdo != null) {
+ publishingEnabledMetaAnnotOverriddenJdoEntities.remove(metaAnnotOverriddenJdo);
+ }
return domainObjectPublishingVm;
}
public DomainObjectPublishingEnabledJdo default0Act() {
- return enabledJdoEntities.first();
+ return publishingEnabledJdoEntities.first();
}
public DomainObjectPublishingDisabledJdo default1Act() {
- return disabledJdoEntities.first();
+ return publishingDisabledJdoEntities.first();
+ }
+ public DomainObjectPublishingEnabledMetaAnnotatedJdo default2Act() {
+ return publishingEnabledMetaAnnotatedJdoEntities.first();
}
+ public DomainObjectPublishingEnabledMetaAnnotOverriddenJdo default3Act() {
+ return publishingEnabledMetaAnnotOverriddenJdoEntities.first();
+ }
+
+ @Inject
+ DomainObjectPublishingEnabledJdoEntities publishingEnabledJdoEntities;
+
+ @Inject
+ DomainObjectPublishingDisabledJdoEntities publishingDisabledJdoEntities;
@Inject
- DomainObjectPublishingEnabledJdoEntities enabledJdoEntities;
+ DomainObjectPublishingEnabledMetaAnnotatedJdoEntities publishingEnabledMetaAnnotatedJdoEntities;
+
@Inject
- DomainObjectPublishingDisabledJdoEntities disabledJdoEntities;
+ DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities publishingEnabledMetaAnnotOverriddenJdoEntities;
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingDisabledEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingDisabledEntities.java
deleted file mode 100644
index 9c00c4b..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingDisabledEntities.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
-
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.isis.applib.annotation.Collection;
-
-@Collection()
-public class DomainObjectPublishingVm_publishingDisabledEntities {
-
- private final DomainObjectPublishingVm domainObjectPublishingVm;
-
- public DomainObjectPublishingVm_publishingDisabledEntities(DomainObjectPublishingVm domainObjectPublishingVm) {
- this.domainObjectPublishingVm = domainObjectPublishingVm;
- }
-
- public List<DomainObjectPublishingDisabledJdo> coll() {
- return publishingDisabledJdoEntities.all();
- }
-
- @Inject
- DomainObjectPublishingDisabledJdoEntities publishingDisabledJdoEntities;
-}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingEnabledEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingEnabledEntities.java
deleted file mode 100644
index d0bc170..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_publishingEnabledEntities.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
-
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.isis.applib.annotation.Collection;
-
-@Collection()
-public class DomainObjectPublishingVm_publishingEnabledEntities {
-
- private final DomainObjectPublishingVm domainObjectPublishingVm;
-
- public DomainObjectPublishingVm_publishingEnabledEntities(DomainObjectPublishingVm domainObjectPublishingVm) {
- this.domainObjectPublishingVm = domainObjectPublishingVm;
- }
-
- public List<DomainObjectPublishingEnabledJdo> coll() {
- return publishingEnabledJdoEntities.all();
- }
-
- @Inject
- DomainObjectPublishingEnabledJdoEntities publishingEnabledJdoEntities;
-}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_updateAll.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_updateAll.java
index c719744..7ffcd77 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_updateAll.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingVm_updateAll.java
@@ -9,10 +9,14 @@ import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.services.repository.RepositoryService;
import lombok.val;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled.DomainObjectPublishingDisabledJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled.DomainObjectPublishingEnabledMetaAnnotatedJdoEntities;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled.DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities;
+
//tag::class[]
@Action(semantics = SemanticsOf.IDEMPOTENT)
@ActionLayout(
@@ -26,13 +30,40 @@ public class DomainObjectPublishingVm_updateAll {
}
@MemberOrder(sequence = "2.0")
- public DomainObjectPublishingVm act() {
+ public DomainObjectPublishingVm act(
+ boolean publishingEnabled
+ , boolean publishingDisabled
+ , boolean publishingEnabledMetaAnnotated
+ , boolean publishingEnabledMetaAnnotOverridden
+ ) {
- renumber((List)publishingEnabledJdoEntities.all());
- renumber((List)publishingDisabledJdoEntities.all());
+ if(publishingEnabled) {
+ renumber((List)publishingEnabledJdoEntities.all());
+ }
+ if(publishingDisabled) {
+ renumber((List)publishingDisabledJdoEntities.all());
+ }
+ if(publishingEnabledMetaAnnotated) {
+ renumber((List)publishingEnabledMetaAnnotatedJdoEntities.all());
+ }
+ if(publishingEnabledMetaAnnotOverridden) {
+ renumber((List)publishingEnabledMetaAnnotOverriddenJdoEntities.all());
+ }
return domainObjectPublishingVm;
}
+ public boolean default0Act() {
+ return true;
+ }
+ public boolean default1Act() {
+ return true;
+ }
+ public boolean default2Act() {
+ return true;
+ }
+ public boolean default3Act() {
+ return true;
+ }
private static void renumber(List<DomainObjectPublishingJdo> all) {
val ai = new AtomicInteger(0);
@@ -40,9 +71,15 @@ public class DomainObjectPublishingVm_updateAll {
}
@Inject
+ DomainObjectPublishingEnabledJdoEntities publishingEnabledJdoEntities;
+
+ @Inject
DomainObjectPublishingDisabledJdoEntities publishingDisabledJdoEntities;
@Inject
- DomainObjectPublishingEnabledJdoEntities publishingEnabledJdoEntities;
+ DomainObjectPublishingEnabledMetaAnnotatedJdoEntities publishingEnabledMetaAnnotatedJdoEntities;
+
+ @Inject
+ DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities publishingEnabledMetaAnnotOverriddenJdoEntities;
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo-description.adoc
new file mode 100644
index 0000000..9c2b9a8
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo-description.adoc
@@ -0,0 +1,7 @@
+If publishing has been enabled by default, then it can of course also be disabled:
+
+[source,java,indent=0]
+----
+include::DomainObjectPublishingDisabledJdo.java[tags=class]
+----
+<.> explicitly specifies that modifying the domain object should _not_ be published.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo.java
similarity index 82%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo.java
index 7b3d486..88642b3 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled;
import javax.jdo.annotations.DatastoreIdentity;
import javax.jdo.annotations.IdGeneratorStrategy;
@@ -39,21 +39,22 @@ import lombok.Getter;
import lombok.Setter;
import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingJdo;
//tag::class[]
@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
@DomainObject(
- nature=Nature.JDO_ENTITY
- , objectType = "demo.DomainObjectPublishingDisabledJdo"
- , publishing = Publishing.DISABLED // <.>
- , bounding = Bounding.BOUNDED
+ nature=Nature.JDO_ENTITY
+ , objectType = "demo.DomainObjectPublishingDisabledJdo"
+ , publishing = Publishing.DISABLED // <.>
+ , bounding = Bounding.BOUNDED
)
@DomainObjectLayout(
- describedAs =
- "@DomainObject(publishing=DISABLED)"
+ describedAs = "@DomainObject(publishing=DISABLED)"
)
-public class DomainObjectPublishingDisabledJdo implements DomainObjectPublishingJdo {
+public class DomainObjectPublishingDisabledJdo
+ implements DomainObjectPublishingJdo {
// ...
//end::class[]
@@ -62,7 +63,6 @@ public class DomainObjectPublishingDisabledJdo implements DomainObjectPublishing
this.propertyUpdatedByAction = initialValue;
}
-//tag::class[]
@Title(sequence = "1.0")
@Getter @Setter
private String property;
@@ -71,5 +71,6 @@ public class DomainObjectPublishingDisabledJdo implements DomainObjectPublishing
@Title(sequence = "2.0", prepend = " / ")
private String propertyUpdatedByAction;
+//tag::class[]
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo.layout.xml
similarity index 100%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdo.layout.xml
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdo.layout.xml
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdoEntities.java
similarity index 72%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdoEntities.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdoEntities.java
index d7d714b..01e8166 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdoEntities.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdoEntities.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled;
import java.util.List;
import java.util.Objects;
@@ -10,6 +10,8 @@ import org.springframework.stereotype.Service;
import org.apache.isis.applib.services.repository.RepositoryService;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdo;
+
@Service
public class DomainObjectPublishingDisabledJdoEntities {
@@ -25,6 +27,10 @@ public class DomainObjectPublishingDisabledJdoEntities {
return all().stream().findFirst().get();
}
+ public DomainObjectPublishingDisabledJdo create(String newValue) {
+ return repositoryService.persistAndFlush(new DomainObjectPublishingDisabledJdo(newValue));
+ }
+
public void remove(DomainObjectPublishingDisabledJdo disabledJdo) {
repositoryService.removeAndFlush(disabledJdo);
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdoSeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdoSeedService.java
similarity index 93%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdoSeedService.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdoSeedService.java
index 34b0fe9..e699056 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledJdoSeedService.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingDisabledJdoSeedService.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled;
import javax.inject.Inject;
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingVm_publishingDisabledAnnotatedEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingVm_publishingDisabledAnnotatedEntities.java
new file mode 100644
index 0000000..b8e664c
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/disabled/DomainObjectPublishingVm_publishingDisabledAnnotatedEntities.java
@@ -0,0 +1,28 @@
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Collection;
+
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingVm;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled.DomainObjectPublishingDisabledJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.disabled.DomainObjectPublishingDisabledJdoEntities;
+
+@Collection()
+public class DomainObjectPublishingVm_publishingDisabledAnnotatedEntities {
+
+ private final DomainObjectPublishingVm domainObjectPublishingVm;
+
+ public DomainObjectPublishingVm_publishingDisabledAnnotatedEntities(DomainObjectPublishingVm domainObjectPublishingVm) {
+ this.domainObjectPublishingVm = domainObjectPublishingVm;
+ }
+
+ public List<DomainObjectPublishingDisabledJdo> coll() {
+ return publishingDisabledJdoEntities.all();
+ }
+
+ @Inject
+ DomainObjectPublishingDisabledJdoEntities publishingDisabledJdoEntities;
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo-description.adoc
new file mode 100644
index 0000000..02527ab
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo-description.adoc
@@ -0,0 +1,8 @@
+The `publishing` semantic can be specified explicitly using an annotation through `@DomainObject#publishing()`:
+
+[source,java,indent=0]
+----
+include::DomainObjectPublishingEnabledJdo.java[tags=class]
+----
+<.> explicitly specifies that modifying the domain object should be published.
+
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo.java
similarity index 82%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo.java
index 0e8c341..6fb181f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled;
import javax.jdo.annotations.DatastoreIdentity;
import javax.jdo.annotations.IdGeneratorStrategy;
@@ -39,21 +39,22 @@ import lombok.Getter;
import lombok.Setter;
import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingJdo;
//tag::class[]
@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
@DomainObject(
- nature=Nature.JDO_ENTITY
- , objectType = "demo.DomainObjectPublishingEnabledJdo"
- , publishing = Publishing.ENABLED // <.>
- , bounding = Bounding.BOUNDED
+ nature=Nature.JDO_ENTITY
+ , objectType = "demo.DomainObjectPublishingEnabledJdo"
+ , publishing = Publishing.ENABLED // <.>
+ , bounding = Bounding.BOUNDED
)
@DomainObjectLayout(
- describedAs =
- "@DomainObject(publishing=ENABLED)"
+ describedAs = "@DomainObject(publishing=ENABLED)"
)
-public class DomainObjectPublishingEnabledJdo implements DomainObjectPublishingJdo {
+public class DomainObjectPublishingEnabledJdo
+ implements DomainObjectPublishingJdo {
// ...
//end::class[]
@@ -62,7 +63,6 @@ public class DomainObjectPublishingEnabledJdo implements DomainObjectPublishingJ
this.propertyUpdatedByAction = initialValue;
}
-//tag::class[]
@Title(sequence = "1.0")
@Getter @Setter
private String property;
@@ -71,5 +71,6 @@ public class DomainObjectPublishingEnabledJdo implements DomainObjectPublishingJ
@Title(sequence = "2.0", prepend = " / ")
private String propertyUpdatedByAction;
+//tag::class[]
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo.layout.xml
similarity index 100%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.layout.xml
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdo.layout.xml
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdoEntities.java
similarity index 76%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoEntities.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdoEntities.java
index f224f69..303e1f0 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoEntities.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdoEntities.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled;
import java.util.List;
import java.util.Objects;
@@ -25,9 +25,8 @@ public class DomainObjectPublishingEnabledJdoEntities {
return all().stream().findFirst().get();
}
- public DomainObjectPublishingEnabledJdo cloneAndPersist(DomainObjectPublishingEnabledJdo original) {
- return repositoryService.persistAndFlush(
- new DomainObjectPublishingEnabledJdo(original.getProperty()));
+ public DomainObjectPublishingEnabledJdo create(String newValue) {
+ return repositoryService.persistAndFlush(new DomainObjectPublishingEnabledJdo(newValue));
}
public void remove(DomainObjectPublishingEnabledJdo enabledJdo) {
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdoSeedService.java
similarity index 93%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdoSeedService.java
index 3880748..42ad49a 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingEnabledJdoSeedService.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled;
import javax.inject.Inject;
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingVm_publishingEnabledAnnotatedEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingVm_publishingEnabledAnnotatedEntities.java
new file mode 100644
index 0000000..a2f05fa
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/annotated/enabled/DomainObjectPublishingVm_publishingEnabledAnnotatedEntities.java
@@ -0,0 +1,28 @@
+package demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Collection;
+
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingVm;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdoEntities;
+
+@Collection()
+public class DomainObjectPublishingVm_publishingEnabledAnnotatedEntities {
+
+ private final DomainObjectPublishingVm domainObjectPublishingVm;
+
+ public DomainObjectPublishingVm_publishingEnabledAnnotatedEntities(DomainObjectPublishingVm domainObjectPublishingVm) {
+ this.domainObjectPublishingVm = domainObjectPublishingVm;
+ }
+
+ public List<DomainObjectPublishingEnabledJdo> coll() {
+ return publishingEnabledJdoEntities.all();
+ }
+
+ @Inject
+ DomainObjectPublishingEnabledJdoEntities publishingEnabledJdoEntities;
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/DomainObjectPublishingEnabledMetaAnnotation.java
similarity index 72%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledMetaAnnotation.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/DomainObjectPublishingEnabledMetaAnnotation.java
index 54cfde5..57e592d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/DomainObjectPublishingEnabledMetaAnnotation.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -11,10 +11,10 @@ import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.Publishing;
//tag::class[]
-@DomainObject(publishing = Publishing.ENABLED) // <.>
+@DomainObject(publishing = Publishing.ENABLED) // <.>
@Inherited
@Target({
- ElementType.TYPE // <.>
+ ElementType.TYPE, ElementType.ANNOTATION_TYPE // <.>
})
@Retention(RetentionPolicy.RUNTIME)
public @interface DomainObjectPublishingEnabledMetaAnnotation {
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo-description.adoc
new file mode 100644
index 0000000..884dc96
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo-description.adoc
@@ -0,0 +1,18 @@
+The `publishing` semantic can also be specified using a custom meta-annotation:
+
+* the meta-annotation is defined as:
++
+[source,java]
+----
+include::../DomainObjectPublishingEnabledMetaAnnotation.java[tags=class]
+----
+<.> annotated for a domain object
+<.> annotation can be applied to the type or a further meta-annotation type only
+
+* and can be applied to a domain object:
++
+[source,java,indent=0]
+----
+include::DomainObjectPublishingEnabledMetaAnnotatedJdo.java[tags=class]
+----
+<.> semantic is inherited from the meta-annotation
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo.java
similarity index 70%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo.java
index 0e8c341..2ecb370 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo.java
@@ -16,53 +16,48 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled;
import javax.jdo.annotations.DatastoreIdentity;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
-import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.Bounding;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.DomainObjectLayout;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.Publishing;
-import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.annotation.Title;
import lombok.Getter;
import lombok.Setter;
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.DomainObjectPublishingEnabledMetaAnnotation;
//tag::class[]
@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
+@DomainObjectPublishingEnabledMetaAnnotation // <.>
@DomainObject(
- nature=Nature.JDO_ENTITY
- , objectType = "demo.DomainObjectPublishingEnabledJdo"
- , publishing = Publishing.ENABLED // <.>
- , bounding = Bounding.BOUNDED
+ nature=Nature.JDO_ENTITY
+ , objectType = "demo.DomainObjectPublishingEnabledMetaAnnotatedJdo"
+ , bounding = Bounding.BOUNDED
)
@DomainObjectLayout(
- describedAs =
- "@DomainObject(publishing=ENABLED)"
+ describedAs = "@DomainObjectPublishingEnabledMetaAnnotation"
)
-public class DomainObjectPublishingEnabledJdo implements DomainObjectPublishingJdo {
+public class DomainObjectPublishingEnabledMetaAnnotatedJdo
+ implements DomainObjectPublishingJdo {
// ...
//end::class[]
- public DomainObjectPublishingEnabledJdo(String initialValue) {
+ public DomainObjectPublishingEnabledMetaAnnotatedJdo(String initialValue) {
this.property = initialValue;
this.propertyUpdatedByAction = initialValue;
}
-//tag::class[]
@Title(sequence = "1.0")
@Getter @Setter
private String property;
@@ -71,5 +66,6 @@ public class DomainObjectPublishingEnabledJdo implements DomainObjectPublishingJ
@Title(sequence = "2.0", prepend = " / ")
private String propertyUpdatedByAction;
+//tag::class[]
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo.layout.xml
similarity index 100%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.layout.xml
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdo.layout.xml
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoEntities.java
new file mode 100644
index 0000000..3c4f352
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoEntities.java
@@ -0,0 +1,41 @@
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.services.repository.RepositoryService;
+
+import demoapp.dom.annotDomain.DomainObject.publishing.annotated.enabled.DomainObjectPublishingEnabledJdo;
+
+@Service
+public class DomainObjectPublishingEnabledMetaAnnotatedJdoEntities {
+
+ public Optional<DomainObjectPublishingEnabledMetaAnnotatedJdo> find(final String value) {
+ return repositoryService.firstMatch(DomainObjectPublishingEnabledMetaAnnotatedJdo.class, x -> Objects.equals(x.getProperty(), value));
+ }
+
+ public List<DomainObjectPublishingEnabledMetaAnnotatedJdo> all() {
+ return repositoryService.allInstances(DomainObjectPublishingEnabledMetaAnnotatedJdo.class);
+ }
+
+ public DomainObjectPublishingEnabledMetaAnnotatedJdo first() {
+ return all().stream().findFirst().get();
+ }
+
+ public DomainObjectPublishingEnabledMetaAnnotatedJdo create(String newValue) {
+ return repositoryService.persistAndFlush(new DomainObjectPublishingEnabledMetaAnnotatedJdo(newValue));
+ }
+
+ public void remove(DomainObjectPublishingEnabledMetaAnnotatedJdo enabledJdo) {
+ repositoryService.removeAndFlush(enabledJdo);
+ }
+
+ @Inject
+ RepositoryService repositoryService;
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoSeedService.java
similarity index 73%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoSeedService.java
index 3880748..d581a9e 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingEnabledMetaAnnotatedJdoSeedService.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled;
import javax.inject.Inject;
@@ -11,9 +11,9 @@ import demoapp.dom._infra.seed.SeedServiceAbstract;
import demoapp.dom.types.Samples;
@Service
-public class DomainObjectPublishingEnabledJdoSeedService extends SeedServiceAbstract {
+public class DomainObjectPublishingEnabledMetaAnnotatedJdoSeedService extends SeedServiceAbstract {
- public DomainObjectPublishingEnabledJdoSeedService() {
+ public DomainObjectPublishingEnabledMetaAnnotatedJdoSeedService() {
super(PropertyPublishingJdoEntityFixture::new);
}
@@ -22,7 +22,7 @@ public class DomainObjectPublishingEnabledJdoSeedService extends SeedServiceAbst
@Override
protected void execute(ExecutionContext executionContext) {
samples.stream()
- .map(DomainObjectPublishingEnabledJdo::new)
+ .map(DomainObjectPublishingEnabledMetaAnnotatedJdo::new)
.forEach(domainObject -> {
repositoryService.persist(domainObject);
executionContext.addResult(this, domainObject);
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotatedEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotatedEntities.java
new file mode 100644
index 0000000..191c139
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnot/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotatedEntities.java
@@ -0,0 +1,26 @@
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Collection;
+
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingVm;
+
+@Collection()
+public class DomainObjectPublishingVm_publishingEnabledMetaAnnotatedEntities {
+
+ private final DomainObjectPublishingVm domainObjectPublishingVm;
+
+ public DomainObjectPublishingVm_publishingEnabledMetaAnnotatedEntities(DomainObjectPublishingVm domainObjectPublishingVm) {
+ this.domainObjectPublishingVm = domainObjectPublishingVm;
+ }
+
+ public List<DomainObjectPublishingEnabledMetaAnnotatedJdo> coll() {
+ return publishingEnabledJdoEntities.all();
+ }
+
+ @Inject
+ DomainObjectPublishingEnabledMetaAnnotatedJdoEntities publishingEnabledJdoEntities;
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/DomainObjectPublishingDisabledMetaAnnotation.java
similarity index 71%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledMetaAnnotation.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/DomainObjectPublishingDisabledMetaAnnotation.java
index 7344b36..087fa20 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingDisabledMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/DomainObjectPublishingDisabledMetaAnnotation.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -11,10 +11,10 @@ import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.Publishing;
//tag::class[]
-@DomainObject(publishing = Publishing.DISABLED) // <.>
+@DomainObject(publishing = Publishing.DISABLED) // <.>
@Inherited
@Target({
- ElementType.TYPE // <.>
+ ElementType.TYPE, ElementType.ANNOTATION_TYPE // <.>
})
@Retention(RetentionPolicy.RUNTIME)
public @interface DomainObjectPublishingDisabledMetaAnnotation {
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo-description.adoc
new file mode 100644
index 0000000..c306895
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo-description.adoc
@@ -0,0 +1,18 @@
+The `publishing` semantic can also be specified using a custom meta-annotation:
+
+* the meta-annotation is defined as:
++
+[source,java]
+----
+include::../DomainObjectPublishingDisabledMetaAnnotation.java[tags=class]
+----
+<.> annotated for a domain object
+<.> annotation can be applied to the type or a further meta-annotation type only
+
+* and can be applied to a domain object:
++
+[source,java,indent=0]
+----
+include::DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.java[tags=class]
+----
+<.> semantic is inherited from the meta-annotation
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.java
similarity index 68%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.java
index 0e8c341..af6b81f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.java
@@ -16,53 +16,51 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled;
import javax.jdo.annotations.DatastoreIdentity;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
-import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.Bounding;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.DomainObjectLayout;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.Publishing;
-import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.annotation.Title;
import lombok.Getter;
import lombok.Setter;
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingJdo;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.DomainObjectPublishingEnabledMetaAnnotation;
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.DomainObjectPublishingDisabledMetaAnnotation;
//tag::class[]
@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
+@DomainObjectPublishingDisabledMetaAnnotation // <.>
@DomainObject(
nature=Nature.JDO_ENTITY
- , objectType = "demo.DomainObjectPublishingEnabledJdo"
- , publishing = Publishing.ENABLED // <.>
+ , objectType = "demo.DomainObjectPublishingEnabledMetaAnnotOverriddenJdo"
+ , publishing = Publishing.ENABLED // <.>
, bounding = Bounding.BOUNDED
)
@DomainObjectLayout(
- describedAs =
- "@DomainObject(publishing=ENABLED)"
+ describedAs =
+ "@DomainObjectPublishingDisabledMetaAnnotation " +
+ "@DomainObject(publishing=ENABLED)"
)
-public class DomainObjectPublishingEnabledJdo implements DomainObjectPublishingJdo {
+public class DomainObjectPublishingEnabledMetaAnnotOverriddenJdo implements DomainObjectPublishingJdo {
// ...
//end::class[]
- public DomainObjectPublishingEnabledJdo(String initialValue) {
+ public DomainObjectPublishingEnabledMetaAnnotOverriddenJdo(String initialValue) {
this.property = initialValue;
this.propertyUpdatedByAction = initialValue;
}
-//tag::class[]
@Title(sequence = "1.0")
@Getter @Setter
private String property;
@@ -71,5 +69,6 @@ public class DomainObjectPublishingEnabledJdo implements DomainObjectPublishingJ
@Title(sequence = "2.0", prepend = " / ")
private String propertyUpdatedByAction;
+//tag::class[]
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.layout.xml
similarity index 100%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdo.layout.xml
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.layout.xml
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities.java
new file mode 100644
index 0000000..9f83119
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities.java
@@ -0,0 +1,41 @@
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.services.repository.RepositoryService;
+
+import demoapp.dom.annotDomain.DomainObject.publishing.metaAnnot.enabled.DomainObjectPublishingEnabledMetaAnnotatedJdo;
+
+@Service
+public class DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities {
+
+ public Optional<DomainObjectPublishingEnabledMetaAnnotOverriddenJdo> find(final String value) {
+ return repositoryService.firstMatch(DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.class, x -> Objects.equals(x.getProperty(), value));
+ }
+
+ public List<DomainObjectPublishingEnabledMetaAnnotOverriddenJdo> all() {
+ return repositoryService.allInstances(DomainObjectPublishingEnabledMetaAnnotOverriddenJdo.class);
+ }
+
+ public DomainObjectPublishingEnabledMetaAnnotOverriddenJdo first() {
+ return all().stream().findFirst().get();
+ }
+
+ public DomainObjectPublishingEnabledMetaAnnotOverriddenJdo create(String newValue) {
+ return repositoryService.persistAndFlush(new DomainObjectPublishingEnabledMetaAnnotOverriddenJdo(newValue));
+ }
+
+ public void remove(DomainObjectPublishingEnabledMetaAnnotOverriddenJdo enabledJdo) {
+ repositoryService.removeAndFlush(enabledJdo);
+ }
+
+ @Inject
+ RepositoryService repositoryService;
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoSeedService.java
similarity index 72%
rename from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java
rename to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoSeedService.java
index 3880748..fe3e27f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/DomainObjectPublishingEnabledJdoSeedService.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingEnabledMetaAnnotOverriddenJdoSeedService.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.DomainObject.publishing;
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled;
import javax.inject.Inject;
@@ -11,9 +11,9 @@ import demoapp.dom._infra.seed.SeedServiceAbstract;
import demoapp.dom.types.Samples;
@Service
-public class DomainObjectPublishingEnabledJdoSeedService extends SeedServiceAbstract {
+public class DomainObjectPublishingEnabledMetaAnnotOverriddenJdoSeedService extends SeedServiceAbstract {
- public DomainObjectPublishingEnabledJdoSeedService() {
+ public DomainObjectPublishingEnabledMetaAnnotOverriddenJdoSeedService() {
super(PropertyPublishingJdoEntityFixture::new);
}
@@ -22,7 +22,7 @@ public class DomainObjectPublishingEnabledJdoSeedService extends SeedServiceAbst
@Override
protected void execute(ExecutionContext executionContext) {
samples.stream()
- .map(DomainObjectPublishingEnabledJdo::new)
+ .map(DomainObjectPublishingEnabledMetaAnnotOverriddenJdo::new)
.forEach(domainObject -> {
repositoryService.persist(domainObject);
executionContext.addResult(this, domainObject);
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotOverriddenEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotOverriddenEntities.java
new file mode 100644
index 0000000..9e5627c
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/metaAnnotOverridden/enabled/DomainObjectPublishingVm_publishingEnabledMetaAnnotOverriddenEntities.java
@@ -0,0 +1,26 @@
+package demoapp.dom.annotDomain.DomainObject.publishing.metaAnnotOverridden.enabled;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Collection;
+
+import demoapp.dom.annotDomain.DomainObject.publishing.DomainObjectPublishingVm;
+
+@Collection()
+public class DomainObjectPublishingVm_publishingEnabledMetaAnnotOverriddenEntities {
+
+ private final DomainObjectPublishingVm domainObjectPublishingVm;
+
+ public DomainObjectPublishingVm_publishingEnabledMetaAnnotOverriddenEntities(DomainObjectPublishingVm domainObjectPublishingVm) {
+ this.domainObjectPublishingVm = domainObjectPublishingVm;
+ }
+
+ public List<DomainObjectPublishingEnabledMetaAnnotOverriddenJdo> coll() {
+ return publishingEnabledJdoEntities.all();
+ }
+
+ @Inject
+ DomainObjectPublishingEnabledMetaAnnotOverriddenJdoEntities publishingEnabledJdoEntities;
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/spiimpl/PublisherServiceSpiForDomainObject.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/spiimpl/PublisherServiceSpiForDomainObject.java
index ccb27bf..265f574 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/spiimpl/PublisherServiceSpiForDomainObject.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/DomainObject/publishing/spiimpl/PublisherServiceSpiForDomainObject.java
@@ -20,7 +20,9 @@ public class PublisherServiceSpiForDomainObject implements PublisherService {
private final List<ChangesDto> publishedObjects = new ArrayList<>();
@Override
- public void publish(PublishedObjects publishedObjects) {
+ public void publish(
+ PublishedObjects publishedObjects // <.>
+ ) {
val dto = publishedObjects.getDto();
this.publishedObjects.add(dto);
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo-description.adoc
index 6d1403f..dcf4afb 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo-description.adoc
@@ -92,3 +92,19 @@ include::spiimpl/PropertyPublishingJdo_interactionExecutions.java[tags=class]
include::spiimpl/PropertyPublishingJdo_clearInteractionExecutions.java[tags=class]
----
+
+
+== Configuration
+
+By default, publishing of property edits is disabled.
+This can be configured globally:
+
+[source,yaml]
+.application.yml
+----
+isis:
+ applib:
+ annotation:
+ property:
+ publishing: none
+----
diff --git a/examples/demo/domain/src/main/resources/application.yml b/examples/demo/domain/src/main/resources/application.yml
index 2c67478..b24f0c1 100644
--- a/examples/demo/domain/src/main/resources/application.yml
+++ b/examples/demo/domain/src/main/resources/application.yml
@@ -23,6 +23,7 @@ isis:
annotation:
action:
explicit: true
+ publishing: none
action-layout:
css-class-fa:
patterns:
@@ -38,6 +39,9 @@ isis:
delete.*:btn-danger
domain-object:
editing: false
+ publishing: none
+ property:
+ publishing: none
property-layout:
label-position: LEFT
parameter-layout:
diff --git a/examples/demo/domain/src/main/resources/static/css/application.css b/examples/demo/domain/src/main/resources/static/css/application.css
index a20b144..71f3d23 100644
--- a/examples/demo/domain/src/main/resources/static/css/application.css
+++ b/examples/demo/domain/src/main/resources/static/css/application.css
@@ -211,6 +211,11 @@ div.sectionbody > div.ulist > ul {
margin-left: -23px;
}
+div.sectionbody > div.listingblock > div.title {
+ font-style: italic;
+ color: #c7254e;
+}
+
header.navbar-fixed-top {
position: sticky;
}
@@ -249,3 +254,4 @@ table.tableblock.grid-all th.tableblock {
table.tableblock.grid-all td.tableblock {
padding: 5px;
}
+
diff --git a/examples/demo/domain/src/main/resources/static/scripts/application.js b/examples/demo/domain/src/main/resources/static/scripts/application.js
index de6c2c4..49fa3a8 100644
--- a/examples/demo/domain/src/main/resources/static/scripts/application.js
+++ b/examples/demo/domain/src/main/resources/static/scripts/application.js
@@ -8,6 +8,7 @@ $(document).ready(function() {
/// and instead, if on a link, then clicks it
window.addEventListener('keydown', function(e) {
if (e.keyCode === 32) {
+ console.log(e.target)
if (e.target === document.body) {
e.preventDefault();
} else if (e.target.tagName.toLowerCase() === 'a') {
[isis] 02/02: ISIS-2222: wip Action#command
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit f537ae484bd66555f1bea826d4d63f6283a42d8b
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Aug 23 17:49:54 2020 +0100
ISIS-2222: wip Action#command
---
.../demoapp/dom/annotDomain/Action/ActionMenu.java | 14 ++-
.../dom/annotDomain/Action/command/.gitkeep | 0
.../ActionCommandDisabledMetaAnnotation.java} | 8 +-
.../ActionCommandEnabledMetaAnnotation.java} | 8 +-
.../command/ActionCommandJdo-description.adoc | 140 +++++++++++++++++++++
.../ActionCommandJdo.java} | 61 ++++++---
.../ActionCommandJdo.layout.xml} | 5 +-
.../Action/command/ActionCommandJdoEntities.java | 31 +++++
.../command/ActionCommandJdoSeedService.java | 39 ++++++
.../ActionCommandJdo_mixinUpdateProperty.java | 38 ++++++
...mmandJdo_mixinUpdatePropertyMetaAnnotation.java | 37 ++++++
...ixinUpdatePropertyMetaAnnotationOverridden.java | 41 ++++++
.../ActionCommandJdo_backgroundCommands.java | 39 ++++++
.../ActionCommandJdo_clearBackgroundCommands.java | 38 ++++++
.../ActionCommandJdo_clearForegroundCommands.java | 38 ++++++
...ActionCommandJdo_executeBackgroundCommands.java | 39 ++++++
.../ActionCommandJdo_foregroundCommands.java | 39 ++++++
.../spiimpl/CommandServiceSpiForActions.java | 95 ++++++++++++++
.../ActionPublishingDisabledMetaAnnotation.java | 3 +-
.../Action/publishing/ActionPublishingJdo.java | 6 +-
.../publishing/ActionPublishingJdo.layout.xml | 1 -
.../Property/publishing/PropertyPublishingJdo.java | 4 +-
.../publishing/PropertyPublishingJdo.layout.xml | 1 -
.../annotLayout/ActionLayout/ActionLayoutMenu.java | 2 +-
.../src/main/java/demoapp/dom/menubars.layout.xml | 1 +
25 files changed, 693 insertions(+), 35 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/ActionMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/ActionMenu.java
index e64750a..14c7cde 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/ActionMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/ActionMenu.java
@@ -35,6 +35,8 @@ import lombok.extern.log4j.Log4j2;
import demoapp.dom._infra.samples.NameSamples;
import demoapp.dom.annotDomain.Action.associateWith.ActionAssociateWithVm;
import demoapp.dom.annotDomain.Action.associateWith.child.ActionAssociateWithChildVm;
+import demoapp.dom.annotDomain.Action.command.ActionCommandJdo;
+import demoapp.dom.annotDomain.Action.command.ActionCommandJdoEntities;
import demoapp.dom.annotDomain.Action.domainEvent.ActionDomainEventVm;
import demoapp.dom.annotDomain.Action.hidden.ActionHiddenVm;
import demoapp.dom.annotDomain.Action.publishing.ActionPublishingJdo;
@@ -67,6 +69,13 @@ public class ActionMenu {
}
@Action(semantics = SemanticsOf.SAFE)
+ @ActionLayout(cssClassFa="fa-terminal", describedAs = "Action invocation intentions as XML")
+ public ActionCommandJdo command(){
+ return actionCommandJdoEntities.first();
+ }
+
+
+ @Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa="fa-asterisk", describedAs = "Decouples interaction of actions")
public ActionDomainEventVm domainEvent(){
return new ActionDomainEventVm("value");
@@ -79,7 +88,7 @@ public class ActionMenu {
}
@Action(semantics = SemanticsOf.SAFE)
- @ActionLayout(cssClassFa="fa-book", describedAs = "Property changed events as XML")
+ @ActionLayout(cssClassFa="fa-book", describedAs = "Action invocation events as XML")
public ActionPublishingJdo publishing(){
return actionPublishingJdoEntities.first();
}
@@ -101,6 +110,9 @@ public class ActionMenu {
ActionPublishingJdoEntities actionPublishingJdoEntities;
@Inject
+ ActionCommandJdoEntities actionCommandJdoEntities;
+
+ @Inject
NameSamples samples;
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/.gitkeep b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandDisabledMetaAnnotation.java
similarity index 62%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandDisabledMetaAnnotation.java
index 542c723..5cf894b 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandDisabledMetaAnnotation.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.Action.publishing;
+package demoapp.dom.annotDomain.Action.command;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -6,17 +6,19 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.CommandReification;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.Publishing;
//tag::class[]
-@Property(publishing = Publishing.DISABLED) // <.>
+@Action(command = CommandReification.DISABLED) // <.>
@Inherited
@Target({
ElementType.TYPE, ElementType.METHOD // <.>
})
@Retention(RetentionPolicy.RUNTIME)
-public @interface ActionPublishingDisabledMetaAnnotation {
+public @interface ActionCommandDisabledMetaAnnotation {
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandEnabledMetaAnnotation.java
similarity index 65%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandEnabledMetaAnnotation.java
index 542c723..62e0d52 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandEnabledMetaAnnotation.java
@@ -1,4 +1,4 @@
-package demoapp.dom.annotDomain.Action.publishing;
+package demoapp.dom.annotDomain.Action.command;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -6,17 +6,17 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.Publishing;
//tag::class[]
-@Property(publishing = Publishing.DISABLED) // <.>
+@Action(publishing = Publishing.ENABLED) // <.>
@Inherited
@Target({
ElementType.TYPE, ElementType.METHOD // <.>
})
@Retention(RetentionPolicy.RUNTIME)
-public @interface ActionPublishingDisabledMetaAnnotation {
+public @interface ActionCommandEnabledMetaAnnotation {
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo-description.adoc
new file mode 100644
index 0000000..673c469
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo-description.adoc
@@ -0,0 +1,140 @@
+CAUTION: TODO - to document
+
+//The `publishing` semantic specifies that the invocation of an object action should be published to registered implementation(s) of link:https://isis.apache.org/refguide/2.0.0-M3/applib-svc/PublisherService.html#spi[`PublisherService` SPI].
+//This is performed _after_ the action has been invoked.
+//
+//The publishing from the framework to the SPI is in-memory.
+//A typical SPI implementation would then publish over the network, or perhaps store in a database.
+//(Note that the framework provides an link:https://isis.apache.org/mappings/2.0.0-M3/outbox-publisher/about.html[out-of-the-box implementation] of the link:https://microservices.io/patterns/data/transactional-outbox.html[outbox pattern]).
+//
+//The semantic can be specified using either the `@Action` annotation, or through a meta-annotation.
+//
+//NOTE: The demo shows publishing of entities, as this is much more common use case than publishing a view model.
+//
+//== Annotated
+//
+//The `publisher` semantic can be specified explicitly using an annotation through `@Action#publishing()`:
+//
+//* it can be applied to an action:
+//+
+//[source,java,indent=0]
+//----
+//include::ActionPublishingJdo.java[tags=annotation]
+//----
+//<.> explicitly specifies that invoking the action should be published.
+//
+//* or to a mixin:
+//+
+//[source,java,indent=0]
+//----
+//include::ActionPublishingJdo_mixinUpdateProperty.java[tags=class]
+//----
+//<.> explicitly specifies that invoking the mixin action should be published.
+//
+//
+//== Meta-annotated
+//
+//The `publishing` semantic can also be specified using a custom meta-annotation:
+//
+//* the meta-annotation is defined as:
+//+
+//[source,java,indent=0]
+//----
+//include::ActionPublishingEnabledMetaAnnotation.java[tags=class]
+//----
+//<.> annotated for an action
+//<.> annotation can be applied to an action method or to a mixin
+//
+//* and can be applied to an action:
+//+
+//[source,java,indent=0]
+//----
+//include::ActionPublishingJdo.java[tags=meta-annotation]
+//----
+//<.> semantic is inherited from the meta-annotation
+//
+//* or to a mixin:
+//+
+//[source,java,indent=0]
+//----
+//include::ActionPublishingJdo_mixinUpdatePropertyMetaAnnotation.java[tags=class]
+//----
+//<.> semantic is inherited from the meta-annotation
+//
+//
+//=== Meta-annotated Overridden
+//
+//The meta-annotation can itself be overridden:
+//
+//* for an action:
+//+
+//[source,java,indent=0]
+//----
+//include::ActionPublishingJdo.java[tags=meta-annotation-overridden]
+//----
+//<.> semantic from meta-annotation ...
+//<.> \... is overridden by the `@Action` annotation
+//
+//* or on a mixin:
+//+
+//[source,java,indent=0]
+//----
+//include::ActionPublishingJdo_mixinUpdatePropertyMetaAnnotationOverridden.java[tags=class]
+//----
+//<.> semantic from meta-annotation ...
+//<.> \... is overridden by the `@Action` annotation
+//
+//
+//== PublisherService
+//
+//The demo provides a simple implementation of `PublisherService` that just stores the DTOs in memory:
+//
+//[source,java]
+//----
+//include::spiimpl/PublisherServiceSpiForActions.java[tags=class]
+//----
+//<.> serializes to `InteractionDto`, as defined by the link:https://isis.apache.org/refguide/2.0.0-M3/schema/ixn.html[Apache Isis schema].
+//
+//The demo implementation also provides a way to query these executions:
+//
+//[source,java,indent=0]
+//----
+//include::spiimpl/PublisherServiceSpiForActions.java[tags=demo]
+//----
+//
+//Supporting mixins surface this list as contributions on the object:
+//
+//* `interactionExecutions` collection:
+//+
+//[source,java,indent=0]
+//----
+//include::spiimpl/ActionPublishingJdo_interactionExecutions.java[tags=class]
+//----
+//
+//* `clearInteractionExecutions` action:
+//+
+//[source,java,indent=0]
+//----
+//include::spiimpl/ActionPublishingJdo_clearInteractionExecutions.java[tags=class]
+//----
+//
+//
+//== Configuration
+//
+//By default, publishing of action invocations is disabled.
+//This can be configured globally:
+//
+//[source,yaml]
+//.application.yml
+//----
+//isis:
+// applib:
+// annotation:
+// action:
+// publishing: none
+//----
+//
+//In addition to globally enabling or disabling action publishing, it is also possible to specify `ignore_safe`.
+//
+//This enables publishing for all actions except those that have safe (that is, query-only) semantics.
+//In other words actions are published except for those that don't change (aren't declared as changing) the state of the system.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo.java
similarity index 66%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo.java
index 1556229..3d1745d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package demoapp.dom.annotDomain.Action.publishing;
+package demoapp.dom.annotDomain.Action.command;
import javax.jdo.annotations.DatastoreIdentity;
import javax.jdo.annotations.IdGeneratorStrategy;
@@ -25,6 +25,9 @@ import javax.jdo.annotations.PersistenceCapable;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.CommandExecuteIn;
+import org.apache.isis.applib.annotation.CommandPersistence;
+import org.apache.isis.applib.annotation.CommandReification;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.Editing;
import org.apache.isis.applib.annotation.MemberOrder;
@@ -43,21 +46,22 @@ import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
@DomainObject(
nature=Nature.JDO_ENTITY
- , objectType = "demo.ActionPublishingJdo"
+ , objectType = "demo.ActionCommandJdo"
, editing = Editing.DISABLED
)
-public class ActionPublishingJdo implements HasAsciiDocDescription {
+public class ActionCommandJdo implements HasAsciiDocDescription {
// ...
//end::class[]
- public ActionPublishingJdo(String initialValue) {
+ public ActionCommandJdo(String initialValue) {
this.property = initialValue;
this.propertyMetaAnnotated = initialValue;
this.propertyMetaAnnotatedOverridden = initialValue;
+ this.propertyUpdateInBackground = initialValue;
}
public String title() {
- return "Action#publishing";
+ return "Action#command";
}
//tag::property[]
@@ -75,31 +79,35 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
@MemberOrder(name = "meta-annotated-overridden", sequence = "1")
@Getter @Setter
private String propertyMetaAnnotatedOverridden;
+
+ @Property()
+ @MemberOrder(name = "background", sequence = "1")
+ @Getter @Setter
+ private String propertyUpdateInBackground;
//end::property[]
//tag::annotation[]
@Action(
- publishing = Publishing.ENABLED // <.>
+ command = CommandReification.ENABLED // <.>
, semantics = SemanticsOf.IDEMPOTENT
, associateWith = "property"
, associateWithSequence = "1"
)
@ActionLayout(
named = "Update Property"
- , describedAs = "@Action(publishing = ENABLED)"
+ , describedAs = "@Action(command = ENABLED)"
)
- public ActionPublishingJdo updatePropertyUsingAnnotation(final String value) {
+ public ActionCommandJdo updatePropertyUsingAnnotation(final String value) {
setProperty(value);
return this;
}
public String default0UpdatePropertyUsingAnnotation() {
return getProperty();
}
-
//end::annotation[]
//tag::meta-annotation[]
- @ActionPublishingEnabledMetaAnnotation // <.>
+ @ActionCommandEnabledMetaAnnotation // <.>
@Action(
semantics = SemanticsOf.IDEMPOTENT
, associateWith = "propertyMetaAnnotated"
@@ -107,9 +115,9 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
)
@ActionLayout(
named = "Update Property"
- , describedAs = "@PublishingEnabledMetaAnnotation"
+ , describedAs = "@ActionCommandEnabledMetaAnnotation"
)
- public ActionPublishingJdo updatePropertyUsingMetaAnnotation(final String value) {
+ public ActionCommandJdo updatePropertyUsingMetaAnnotation(final String value) {
setPropertyMetaAnnotated(value);
return this;
}
@@ -119,9 +127,9 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
//end::meta-annotation[]
//tag::meta-annotation-overridden[]
- @ActionPublishingDisabledMetaAnnotation // <.>
+ @ActionCommandDisabledMetaAnnotation // <.>
@Action(
- publishing = Publishing.ENABLED // <.>
+ command = CommandReification.ENABLED // <.>
, semantics = SemanticsOf.IDEMPOTENT
, associateWith = "propertyMetaAnnotatedOverridden"
, associateWithSequence = "1"
@@ -129,9 +137,9 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
@ActionLayout(
named = "Update Property"
, describedAs =
- "@PublishingEnabledMetaAnnotation @Action(publishing = ENABLED)"
+ "@ActionCommandDisabledMetaAnnotation @Action(publishing = ENABLED)"
)
- public ActionPublishingJdo updatePropertyUsingMetaAnnotationButOverridden(final String value) {
+ public ActionCommandJdo updatePropertyUsingMetaAnnotationButOverridden(final String value) {
setPropertyMetaAnnotatedOverridden(value);
return this;
}
@@ -140,6 +148,27 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
}
//end::meta-annotation-overridden[]
+//tag::background[]
+ @Action(
+ command = CommandReification.ENABLED // <.>
+ , commandExecuteIn = CommandExecuteIn.BACKGROUND // <.>
+ , semantics = SemanticsOf.IDEMPOTENT
+ , associateWith = "propertyUpdateInBackground"
+ , associateWithSequence = "1"
+ )
+ @ActionLayout(
+ describedAs =
+ "@Action(command = ENABLED, commandExecuteIn = BACKGROUND)"
+ )
+ public ActionCommandJdo updatePropertyInBackground(final String value) {
+ setPropertyUpdateInBackground(value);
+ return this;
+ }
+ public String default0UpdatePropertyInBackground() {
+ return getPropertyUpdateInBackground();
+ }
+//end::background[]
+
//tag::class[]
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo.layout.xml
similarity index 93%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.layout.xml
copy to examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo.layout.xml
index f3edfb0..8b34302 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo.layout.xml
@@ -23,12 +23,13 @@
<cpt:fieldSet name="Contributed" id="contributed"/>
<cpt:fieldSet name="Meta-annotated" id="meta-annotated"/>
<cpt:fieldSet name="Meta-annotated Overridden" id="meta-annotated-overridden"/>
+ <cpt:fieldSet name="Background" id="background"/>
</bs3:col>
</bs3:row>
<bs3:row>
<bs3:col span="12">
- <cpt:collection id="interactionExecutions"/>
- <cpt:collection id="publishedObjects"/>
+ <cpt:collection id="foregroundCommands"/>
+ <cpt:collection id="backgroundCommands"/>
</bs3:col>
</bs3:row>
<bs3:row>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdoEntities.java
new file mode 100644
index 0000000..19cf0a7
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdoEntities.java
@@ -0,0 +1,31 @@
+package demoapp.dom.annotDomain.Action.command;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.services.repository.RepositoryService;
+
+@Service
+public class ActionCommandJdoEntities {
+
+ public Optional<ActionCommandJdo> find(final String value) {
+ return repositoryService.firstMatch(ActionCommandJdo.class, x -> Objects.equals(x.getProperty(), value));
+ }
+
+ public List<ActionCommandJdo> all() {
+ return repositoryService.allInstances(ActionCommandJdo.class);
+ }
+
+ public ActionCommandJdo first() {
+ return all().stream().findFirst().get();
+ }
+
+ @Inject
+ RepositoryService repositoryService;
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdoSeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdoSeedService.java
new file mode 100644
index 0000000..0e704d8
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdoSeedService.java
@@ -0,0 +1,39 @@
+package demoapp.dom.annotDomain.Action.command;
+
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.services.repository.RepositoryService;
+import org.apache.isis.testing.fixtures.applib.fixturescripts.FixtureScript;
+
+import demoapp.dom._infra.seed.SeedServiceAbstract;
+import demoapp.dom.types.Samples;
+
+@Service
+public class ActionCommandJdoSeedService extends SeedServiceAbstract {
+
+ public ActionCommandJdoSeedService() {
+ super(PropertyPublishingJdoEntityFixture::new);
+ }
+
+ static class PropertyPublishingJdoEntityFixture extends FixtureScript {
+
+ @Override
+ protected void execute(ExecutionContext executionContext) {
+ samples.stream()
+ .map(ActionCommandJdo::new)
+ .forEach(domainObject -> {
+ repositoryService.persist(domainObject);
+ executionContext.addResult(this, domainObject);
+ });
+
+ }
+
+ @Inject
+ RepositoryService repositoryService;
+
+ @Inject
+ Samples<String> samples;
+ }
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdateProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdateProperty.java
new file mode 100644
index 0000000..349b825
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdateProperty.java
@@ -0,0 +1,38 @@
+package demoapp.dom.annotDomain.Action.command;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Publishing;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+//tag::class[]
+@Action(
+ publishing = Publishing.ENABLED // <.>
+ , semantics = SemanticsOf.IDEMPOTENT
+ , associateWith = "property"
+ , associateWithSequence = "2"
+)
+@ActionLayout(
+ named = "Mixin Update Property"
+ , describedAs = "@Action(publishing = ENABLED)"
+)
+public class ActionCommandJdo_mixinUpdateProperty {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+
+ public ActionCommandJdo_mixinUpdateProperty(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+//tag::class[]
+ public ActionCommandJdo act(final String value) {
+ actionCommandJdo.setProperty(value);
+ return actionCommandJdo;
+ }
+ public String default0Act() {
+ return actionCommandJdo.getProperty();
+ }
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotation.java
new file mode 100644
index 0000000..5d3e7e7
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotation.java
@@ -0,0 +1,37 @@
+package demoapp.dom.annotDomain.Action.command;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+//tag::class[]
+@ActionCommandEnabledMetaAnnotation // <.>
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT
+ , associateWith = "propertyMetaAnnotated"
+ , associateWithSequence = "2"
+)
+@ActionLayout(
+ named = "Mixin Update Property"
+ , describedAs = "@ActionPublishingEnabledMetaAnnotation"
+)
+public class ActionCommandJdo_mixinUpdatePropertyMetaAnnotation {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+
+ public ActionCommandJdo_mixinUpdatePropertyMetaAnnotation(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+//tag::class[]
+ public ActionCommandJdo act(final String value) {
+ actionCommandJdo.setPropertyMetaAnnotated(value);
+ return actionCommandJdo;
+ }
+ public String default0Act() {
+ return actionCommandJdo.getPropertyMetaAnnotated();
+ }
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotationOverridden.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotationOverridden.java
new file mode 100644
index 0000000..52f6ac7
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/ActionCommandJdo_mixinUpdatePropertyMetaAnnotationOverridden.java
@@ -0,0 +1,41 @@
+package demoapp.dom.annotDomain.Action.command;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Publishing;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+//tag::class[]
+@ActionCommandDisabledMetaAnnotation // <.>
+@Action(
+ publishing = Publishing.ENABLED // <.>
+ , semantics = SemanticsOf.IDEMPOTENT
+ , associateWith = "propertyMetaAnnotatedOverridden"
+ , associateWithSequence = "2"
+)
+@ActionLayout(
+ named = "Mixin Update Property"
+ , describedAs =
+ "@ActionPublishingDisabledMetaAnnotation " +
+ "@Action(publishing = ENABLED)"
+)
+public class ActionCommandJdo_mixinUpdatePropertyMetaAnnotationOverridden {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+
+ public ActionCommandJdo_mixinUpdatePropertyMetaAnnotationOverridden(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+//tag::class[]
+ public ActionCommandJdo act(final String value) {
+ actionCommandJdo.setPropertyMetaAnnotatedOverridden(value);
+ return actionCommandJdo;
+ }
+ public String default0Act() {
+ return actionCommandJdo.getPropertyMetaAnnotatedOverridden();
+ }
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_backgroundCommands.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_backgroundCommands.java
new file mode 100644
index 0000000..ab695e5
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_backgroundCommands.java
@@ -0,0 +1,39 @@
+package demoapp.dom.annotDomain.Action.command.spiimpl;
+
+import java.util.LinkedList;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Collection;
+import org.apache.isis.applib.services.command.CommandWithDto;
+import org.apache.isis.schema.cmd.v2.CommandDto;
+
+import lombok.val;
+
+import demoapp.dom.annotDomain.Action.command.ActionCommandJdo;
+
+//tag::class[]
+@Collection
+public class ActionCommandJdo_backgroundCommands {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+ public ActionCommandJdo_backgroundCommands(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+ //tag::class[]
+ public LinkedList<CommandDto> coll() {
+ val list = new LinkedList<CommandDto>();
+ commandServiceSpiForActions
+ .streamBackgroundCommands()
+ .map(CommandWithDto::asDto)
+ .forEach(list::push); // reverse order
+ return list;
+ }
+
+ @Inject
+ private CommandServiceSpiForActions commandServiceSpiForActions;
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearBackgroundCommands.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearBackgroundCommands.java
new file mode 100644
index 0000000..410674f
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearBackgroundCommands.java
@@ -0,0 +1,38 @@
+package demoapp.dom.annotDomain.Action.command.spiimpl;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import demoapp.dom.annotDomain.Action.command.ActionCommandJdo;
+
+//tag::class[]
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT
+ , associateWith = "backgroundCommands"
+)
+@ActionLayout(
+ named = "Clear"
+)
+public class ActionCommandJdo_clearBackgroundCommands {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+ public ActionCommandJdo_clearBackgroundCommands(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+
+ //tag::class[]
+ public ActionCommandJdo act() {
+ commandServiceSpiForActions.clearBackgroundCommands();
+ return actionCommandJdo;
+ }
+
+ @Inject
+ private CommandServiceSpiForActions commandServiceSpiForActions;
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearForegroundCommands.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearForegroundCommands.java
new file mode 100644
index 0000000..3485421
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_clearForegroundCommands.java
@@ -0,0 +1,38 @@
+package demoapp.dom.annotDomain.Action.command.spiimpl;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import demoapp.dom.annotDomain.Action.command.ActionCommandJdo;
+
+//tag::class[]
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT
+ , associateWith = "foregroundCommands"
+)
+@ActionLayout(
+ named = "Clear"
+)
+public class ActionCommandJdo_clearForegroundCommands {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+ public ActionCommandJdo_clearForegroundCommands(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+
+ //tag::class[]
+ public ActionCommandJdo act() {
+ commandServiceSpiForActions.clearForegroundCommands();
+ return actionCommandJdo;
+ }
+
+ @Inject
+ private CommandServiceSpiForActions commandServiceSpiForActions;
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_executeBackgroundCommands.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_executeBackgroundCommands.java
new file mode 100644
index 0000000..43b0dbc
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_executeBackgroundCommands.java
@@ -0,0 +1,39 @@
+package demoapp.dom.annotDomain.Action.command.spiimpl;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import demoapp.dom.annotDomain.Action.command.ActionCommandJdo;
+
+//tag::class[]
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT
+ , associateWith = "backgroundCommands"
+ , associateWithSequence = "2"
+)
+@ActionLayout(
+ named = "Execute"
+)
+public class ActionCommandJdo_executeBackgroundCommands {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+ public ActionCommandJdo_executeBackgroundCommands(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+
+ //tag::class[]
+ public ActionCommandJdo act() {
+ commandServiceSpiForActions.clearBackgroundCommands();
+ return actionCommandJdo;
+ }
+
+ @Inject
+ private CommandServiceSpiForActions commandServiceSpiForActions;
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_foregroundCommands.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_foregroundCommands.java
new file mode 100644
index 0000000..5c57292
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/ActionCommandJdo_foregroundCommands.java
@@ -0,0 +1,39 @@
+package demoapp.dom.annotDomain.Action.command.spiimpl;
+
+import java.util.LinkedList;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Collection;
+import org.apache.isis.applib.services.command.CommandWithDto;
+import org.apache.isis.schema.cmd.v2.CommandDto;
+
+import lombok.val;
+
+import demoapp.dom.annotDomain.Action.command.ActionCommandJdo;
+
+//tag::class[]
+@Collection
+public class ActionCommandJdo_foregroundCommands {
+ // ...
+//end::class[]
+
+ private final ActionCommandJdo actionCommandJdo;
+ public ActionCommandJdo_foregroundCommands(ActionCommandJdo actionCommandJdo) {
+ this.actionCommandJdo = actionCommandJdo;
+ }
+
+ //tag::class[]
+ public LinkedList<CommandDto> coll() {
+ val list = new LinkedList<CommandDto>();
+ commandServiceSpiForActions
+ .streamForegroundCommands()
+ .map(CommandWithDto::asDto)
+ .forEach(list::push); // reverse order
+ return list;
+ }
+
+ @Inject
+ private CommandServiceSpiForActions commandServiceSpiForActions;
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/CommandServiceSpiForActions.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/CommandServiceSpiForActions.java
new file mode 100644
index 0000000..af62cf8
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/command/spiimpl/CommandServiceSpiForActions.java
@@ -0,0 +1,95 @@
+package demoapp.dom.annotDomain.Action.command.spiimpl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Stream;
+
+import javax.inject.Inject;
+
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.annotation.CommandExecuteIn;
+import org.apache.isis.applib.annotation.OrderPrecedence;
+import org.apache.isis.applib.services.background.BackgroundCommandService;
+import org.apache.isis.applib.services.clock.ClockService;
+import org.apache.isis.applib.services.command.Command;
+import org.apache.isis.applib.services.command.CommandDefault;
+import org.apache.isis.applib.services.command.CommandWithDto;
+import org.apache.isis.applib.services.command.spi.CommandService;
+import org.apache.isis.applib.util.schema.CommandDtoUtils;
+import org.apache.isis.core.runtimeservices.background.BackgroundCommandExecution;
+import org.apache.isis.core.security.authentication.standard.SimpleSession;
+import org.apache.isis.schema.cmd.v2.CommandDto;
+
+import lombok.val;
+
+@Service
+@Order(OrderPrecedence.EARLY) // <.>
+public class CommandServiceSpiForActions implements CommandService {
+
+ public static class CommandWithDtoDefault extends CommandDefault implements CommandWithDto {
+ @Override
+ public CommandDto asDto() {
+ return CommandDtoUtils.fromXml(getMemento());
+ }
+ }
+
+ private List<CommandWithDto> foregroundCommands = new ArrayList<>();
+ private List<CommandWithDto> backgroundCommands = new ArrayList<>();
+
+ @Override
+ public Command create() {
+ return new CommandWithDtoDefault();
+ }
+
+ @Override
+ public boolean persistIfPossible(Command command) {
+ return true;
+ }
+
+ @Override
+ public void complete(Command command) {
+ final CommandWithDtoDefault cwdd = (CommandWithDtoDefault) command;
+ if(command.isPersistHint()) {
+ final CommandExecuteIn executeIn = command.getExecuteIn();
+ switch (executeIn) {
+ case FOREGROUND:
+ foregroundCommands.add((CommandWithDto) command);
+ case BACKGROUND:
+ backgroundCommands.add((CommandWithDto) command);
+ }
+ }
+ }
+
+ public Stream<CommandWithDto> streamForegroundCommands() {
+ return foregroundCommands.stream();
+ }
+
+ public void clearForegroundCommands() {
+ foregroundCommands.clear();
+ }
+
+ public Stream<CommandWithDto> streamBackgroundCommands() {
+ return backgroundCommands.stream();
+ }
+
+ public void clearBackgroundCommands() {
+ backgroundCommands.clear();
+ }
+
+ public void executeBackgroundCommands() {
+ val execution = new BackgroundCommandExecution() {
+ @Override
+ protected List<? extends Command> findBackgroundCommandsToExecute() {
+ return backgroundCommands;
+ }
+ };
+ val simpleSession = new SimpleSession("sven", Collections.emptyList(), "");
+
+ execution.execute(simpleSession, null);
+ clearBackgroundCommands();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java
index 542c723..1a7d8ef 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingDisabledMetaAnnotation.java
@@ -6,11 +6,12 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.Publishing;
//tag::class[]
-@Property(publishing = Publishing.DISABLED) // <.>
+@Action(publishing = Publishing.DISABLED) // <.>
@Inherited
@Target({
ElementType.TYPE, ElementType.METHOD // <.>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.java
index 1556229..526dbae 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.java
@@ -107,7 +107,7 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
)
@ActionLayout(
named = "Update Property"
- , describedAs = "@PublishingEnabledMetaAnnotation"
+ , describedAs = "@ActionPublishingEnabledMetaAnnotation"
)
public ActionPublishingJdo updatePropertyUsingMetaAnnotation(final String value) {
setPropertyMetaAnnotated(value);
@@ -129,7 +129,8 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
@ActionLayout(
named = "Update Property"
, describedAs =
- "@PublishingEnabledMetaAnnotation @Action(publishing = ENABLED)"
+ "@ActionPublishingDisabledMetaAnnotation " +
+ "@Action(publishing = ENABLED)"
)
public ActionPublishingJdo updatePropertyUsingMetaAnnotationButOverridden(final String value) {
setPropertyMetaAnnotatedOverridden(value);
@@ -140,7 +141,6 @@ public class ActionPublishingJdo implements HasAsciiDocDescription {
}
//end::meta-annotation-overridden[]
-
//tag::class[]
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.layout.xml
index f3edfb0..a9500e1 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Action/publishing/ActionPublishingJdo.layout.xml
@@ -28,7 +28,6 @@
<bs3:row>
<bs3:col span="12">
<cpt:collection id="interactionExecutions"/>
- <cpt:collection id="publishedObjects"/>
</bs3:col>
</bs3:row>
<bs3:row>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.java
index 56b6481..5f0ebee 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.java
@@ -76,7 +76,7 @@ public class PropertyPublishingJdo implements HasAsciiDocDescription {
@PropertyPublishingEnabledMetaAnnotation // <.>
@Property()
@PropertyLayout(
- describedAs = "@PublishingEnabledMetaAnnotation"
+ describedAs = "@PropertyPublishingEnabledMetaAnnotation"
)
@MemberOrder(name = "meta-annotated", sequence = "1")
@XmlElement(required = true)
@@ -91,7 +91,7 @@ public class PropertyPublishingJdo implements HasAsciiDocDescription {
)
@PropertyLayout(
describedAs =
- "@PublishingDisabledMetaAnnotation " +
+ "@PropertyPublishingDisabledMetaAnnotation " +
"@Property(publishing = ENABLED)"
)
@MemberOrder(name = "meta-annotated-overridden", sequence = "1")
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.layout.xml
index f3edfb0..a9500e1 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/publishing/PropertyPublishingJdo.layout.xml
@@ -28,7 +28,6 @@
<bs3:row>
<bs3:col span="12">
<cpt:collection id="interactionExecutions"/>
- <cpt:collection id="publishedObjects"/>
</bs3:col>
</bs3:row>
<bs3:row>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotLayout/ActionLayout/ActionLayoutMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/annotLayout/ActionLayout/ActionLayoutMenu.java
index 8c0b93a..73c0282 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotLayout/ActionLayout/ActionLayoutMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotLayout/ActionLayout/ActionLayoutMenu.java
@@ -37,7 +37,7 @@ public class ActionLayoutMenu {
}
@Action(semantics = SemanticsOf.SAFE)
- @ActionLayout(cssClassFa="fa-terminal", describedAs = "Location and style of action's prompt dialog")
+ @ActionLayout(cssClassFa="fa-question-circle", describedAs = "Location and style of action's prompt dialog")
public demoapp.dom.annotLayout.ActionLayout.promptStyle.ActionLayoutPromptStyleVm promptStyle(){
return new demoapp.dom.annotLayout.ActionLayout.promptStyle.ActionLayoutPromptStyleVm();
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
index b4b89e6..a306b18 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
@@ -113,6 +113,7 @@ as a replacement for
<mb3:section>
<mb3:named>@Action</mb3:named>
<mb3:serviceAction objectType="demo.ActionMenu" id="associateWith"/>
+ <mb3:serviceAction objectType="demo.ActionMenu" id="command"/>
<mb3:serviceAction objectType="demo.ActionMenu" id="domainEvent"/>
<mb3:serviceAction objectType="demo.ActionMenu" id="hidden"/>
<mb3:serviceAction objectType="demo.ActionMenu" id="publishing"/>