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/03/17 17:27:02 UTC
[isis] branch master updated (70a8ce7 -> 0892d9b)
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 70a8ce7 ISIS-2158: mitigates sonar bug
new f087a44 ISIS-2062: adds copy link to home page
new 59142e7 ISIS-2062: docs
new b5ed6c4 ISIS-2062: updates docs
new 0843325 ISIS-2062: docs for annotations
new 619cd7d ISIS-2062: ant docs
new a521d2a ISIS-2278: adds some unit tests for AsyncControl and SyncControl.
new 0892d9b ISIS-2062: more docs
The 7 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:
antora/supplemental-ui/css/home/style.css | 7 +-
antora/supplemental-ui/css/site-custom.css | 12 +
antora/supplemental-ui/img/home/clipboard-copy.png | Bin 0 -> 3415 bytes
antora/supplemental-ui/index.html | 37 +++-
.../programming-model/view-models/non-jaxb.adoc | 2 +-
.../applib-ant/examples/annotation/Action.java | 159 +++++++------
.../examples/annotation/ActionLayout.java | 66 +++---
.../applib-ant/examples/annotation/Collection.java | 30 ++-
.../examples/annotation/CollectionLayout.java | 36 +--
.../examples/annotation/CommandReification.java | 5 -
.../examples/annotation/DomainObject.java | 156 ++++++++-----
.../examples/annotation/DomainObjectLayout.java | 123 +++++++----
.../examples/annotation/DomainService.java | 19 +-
.../examples/annotation/DomainServiceLayout.java | 49 ++--
.../examples/annotation/MemberOrder.java | 5 +-
.../applib-ant/examples/annotation/Mixin.java | 3 +-
.../applib-ant/examples/annotation/Parameter.java | 54 +++--
.../examples/annotation/ParameterLayout.java | 24 +-
.../examples/annotation/PromptStyle.java | 8 -
.../applib-ant/examples/annotation/Property.java | 193 ++++++++--------
.../examples/annotation/PropertyLayout.java | 58 +++--
.../applib-ant/examples/annotation/Redirect.java | 4 -
.../applib-ant/examples/annotation/ViewModel.java | 3 +-
.../main/adoc/modules/applib-ant/pages/Action.adoc | 122 ++++------
.../modules/applib-ant/pages/Action/command.adoc | 6 +-
.../modules/applib-ant/pages/ActionLayout.adoc | 93 ++++----
.../applib-ant/pages/ActionLayout/cssClass.adoc | 1 -
.../applib-ant/pages/ActionLayout/cssClassFa.adoc | 2 +-
.../applib-ant/pages/ActionLayout/describedAs.adoc | 1 -
.../applib-ant/pages/ActionLayout/named.adoc | 1 -
.../adoc/modules/applib-ant/pages/Collection.adoc | 70 ++----
...notPersisted.adoc => mementoSerialization.adoc} | 34 +--
.../modules/applib-ant/pages/CollectionLayout.adoc | 100 +++------
.../pages/CollectionLayout/cssClass.adoc | 1 -
.../pages/CollectionLayout/describedAs.adoc | 2 +-
.../applib-ant/pages/CollectionLayout/named.adoc | 1 -
.../applib-ant/pages/CollectionLayout/paged.adoc | 1 -
.../main/adoc/modules/applib-ant/pages/Column.adoc | 38 ++--
.../modules/applib-ant/pages/Discriminator.adoc | 24 +-
.../modules/applib-ant/pages/DomainObject.adoc | 165 +++++++-------
.../applib-ant/pages/DomainObjectLayout.adoc | 118 ++++------
.../pages/DomainObjectLayout/bookmarking.adoc | 4 -
.../pages/DomainObjectLayout/cssClass.adoc | 1 -
.../pages/DomainObjectLayout/cssClassFa.adoc | 1 -
.../pages/DomainObjectLayout/cssClassUiEvent.adoc | 4 -
.../pages/DomainObjectLayout/describedAs.adoc | 1 -
.../pages/DomainObjectLayout/iconUiEvent.adoc | 4 -
.../pages/DomainObjectLayout/layoutUiEvent.adoc | 4 -
.../applib-ant/pages/DomainObjectLayout/named.adoc | 1 -
.../applib-ant/pages/DomainObjectLayout/paged.adoc | 1 -
.../pages/DomainObjectLayout/plural.adoc | 4 -
.../pages/DomainObjectLayout/titleUiEvent.adoc | 3 -
.../modules/applib-ant/pages/DomainService.adoc | 49 +---
.../pages/DomainService/repositoryFor.adoc | 25 ---
.../applib-ant/pages/DomainServiceLayout.adoc | 54 ++---
.../pages/DomainServiceLayout/menuOrder.adoc | 68 ------
.../pages/DomainServiceLayout/named.adoc | 1 -
.../main/adoc/modules/applib-ant/pages/Facets.adoc | 4 +-
.../adoc/modules/applib-ant/pages/HomePage.adoc | 3 +-
.../main/adoc/modules/applib-ant/pages/Inject.adoc | 27 +--
.../applib-ant/pages/MemberGroupLayout.adoc | 17 --
.../adoc/modules/applib-ant/pages/MemberOrder.adoc | 18 +-
.../adoc/modules/applib-ant/pages/MinLength.adoc | 4 +
.../main/adoc/modules/applib-ant/pages/Mixin.adoc | 23 +-
.../modules/applib-ant/pages/NotPersistent.adoc | 6 +-
.../adoc/modules/applib-ant/pages/Nullable.adoc | 18 +-
.../adoc/modules/applib-ant/pages/Parameter.adoc | 75 +++----
.../applib-ant/pages/Parameter/fileAccept.adoc | 1 -
.../applib-ant/pages/Parameter/maxLength.adoc | 1 -
.../applib-ant/pages/Parameter/mustSatisfy.adoc | 1 -
.../applib-ant/pages/Parameter/regexPattern.adoc | 1 -
.../modules/applib-ant/pages/ParameterLayout.adoc | 83 +++----
.../applib-ant/pages/ParameterLayout/cssClass.adoc | 1 -
.../pages/ParameterLayout/describedAs.adoc | 2 +-
.../applib-ant/pages/ParameterLayout/named.adoc | 1 -
.../applib-ant/pages/PersistenceCapable.adoc | 25 +--
.../adoc/modules/applib-ant/pages/PreDestroy.adoc | 2 +-
.../modules/applib-ant/pages/Programmatic.adoc | 4 +-
.../adoc/modules/applib-ant/pages/Property.adoc | 166 ++++++--------
.../applib-ant/pages/Property/maxLength.adoc | 1 -
.../mementoSerialization.adoc} | 33 +--
.../applib-ant/pages/Property/notPersisted.adoc | 69 ------
.../modules/applib-ant/pages/PropertyLayout.adoc | 130 +++++------
.../applib-ant/pages/PropertyLayout/cssClass.adoc | 1 -
.../pages/PropertyLayout/describedAs.adoc | 2 +-
.../applib-ant/pages/PropertyLayout/named.adoc | 1 -
.../{unchanging.adoc => repainting.adoc} | 6 +-
.../main/adoc/modules/applib-ant/pages/Title.adoc | 12 +-
.../adoc/modules/applib-ant/pages/ViewModel.adoc | 10 +-
.../modules/applib-ant/pages/ViewModelLayout.adoc | 123 -----------
.../pages/ViewModelLayout/bookmarking.adoc | 11 -
.../applib-ant/pages/ViewModelLayout/cssClass.adoc | 10 -
.../pages/ViewModelLayout/cssClassFa.adoc | 12 -
.../pages/ViewModelLayout/cssClassUiEvent.adoc | 11 -
.../pages/ViewModelLayout/describedAs.adoc | 10 -
.../pages/ViewModelLayout/iconUiEvent.adoc | 14 --
.../pages/ViewModelLayout/layoutUiEvent.adoc | 11 -
.../applib-ant/pages/ViewModelLayout/named.adoc | 10 -
.../applib-ant/pages/ViewModelLayout/paged.adoc | 9 -
.../applib-ant/pages/ViewModelLayout/plural.adoc | 14 --
.../pages/ViewModelLayout/titleUiEvent.adoc | 11 -
.../applib-ant/pages/XmlJavaTypeAdapter.adoc | 3 +-
.../modules/applib-ant/pages/XmlRootElement.adoc | 6 +-
.../adoc/modules/applib-ant/pages/about/main.adoc | 5 -
.../modules/applib-ant/partials/module-nav.adoc | 2 -
.../applib-cm/examples/security/RoleMemento.java | 65 ------
.../applib-cm/examples/security/UserMemento.java | 144 ------------
.../applib-cm/examples/security/package-info.java | 36 ---
.../examples}/services/MethodReferences.java | 0
.../services/command/CommandExecutorService.java | 11 +-
.../examples/services/health/Health.java | 2 +-
.../examples/services/iactn/Interaction.java | 8 +-
.../examples/services/menu/MenuBarsService.java | 2 +
.../services/repository/RepositoryService.java | 20 ++
.../services/session/SessionLoggingService.java | 23 --
.../session/SessionLoggingServiceLogging.java | 0
.../services/urlencoding/UrlEncodingService.java | 4 +-
.../examples/services/user/package-info.java | 14 +-
.../examples/services/wrapper/AsyncWrap.java | 119 ----------
.../services/wrapper/InteractionException.java | 2 +-
.../examples/services/wrapper/WrapperFactory.java | 246 ++++++---------------
.../examples/services/wrapper/WrappingObject.java | 9 +-
.../services/wrapper/control/AsyncControl.java | 30 ++-
.../wrapper/control/AsyncControlService.java | 0
.../services/wrapper/control/ControlAbstract.java | 44 ++--
.../services/wrapper/control/ExceptionHandler.java | 0
.../wrapper/control/ExceptionHandlerAbstract.java | 0
.../services/wrapper/control/ExecutionMode.java | 2 +-
.../services/wrapper/control/SyncControl.java | 17 +-
.../examples/services/xml/XmlService.java | 4 +-
.../xmlsnapshot/XmlSnapshotServiceAbstract.java | 0
.../modules/applib-svc/pages/LayoutService.adoc | 6 +-
.../modules/applib-svc/pages/WrapperFactory.adoc | 210 ++++++++++--------
.../adoc/modules/applib-svc/pages/XmlService.adoc | 10 +-
.../org/apache/isis/applib/annotation/Action.java | 159 +++++++------
.../isis/applib/annotation/ActionLayout.java | 66 +++---
.../apache/isis/applib/annotation/Collection.java | 30 ++-
.../isis/applib/annotation/CollectionLayout.java | 36 +--
.../isis/applib/annotation/CommandReification.java | 5 -
.../isis/applib/annotation/DomainObject.java | 156 ++++++++-----
.../isis/applib/annotation/DomainObjectLayout.java | 123 +++++++----
.../isis/applib/annotation/DomainService.java | 19 +-
.../applib/annotation/DomainServiceLayout.java | 49 ++--
.../apache/isis/applib/annotation/MemberOrder.java | 5 +-
.../org/apache/isis/applib/annotation/Mixin.java | 3 +-
.../apache/isis/applib/annotation/Parameter.java | 54 +++--
.../isis/applib/annotation/ParameterLayout.java | 24 +-
.../apache/isis/applib/annotation/PromptStyle.java | 8 -
.../apache/isis/applib/annotation/Property.java | 193 ++++++++--------
.../isis/applib/annotation/PropertyLayout.java | 58 +++--
.../apache/isis/applib/annotation/Redirect.java | 4 -
.../apache/isis/applib/annotation/ViewModel.java | 3 +-
.../services/urlencoding/UrlEncodingService.java | 4 +-
.../applib/services/wrapper/WrapperFactory.java | 26 ++-
.../services/wrapper/control/AsyncControl.java | 30 ++-
.../services/wrapper/control/ControlAbstract.java | 44 ++--
.../services/wrapper/control/ExecutionMode.java | 2 +-
.../services/wrapper/control/SyncControl.java | 17 +-
.../isis/applib/services/xml/XmlService.java | 4 +-
.../wrapper/control/AsyncControl_Test.java | 101 +++++++++
.../services/wrapper/control/SyncControl_Test.java | 89 ++++++++
core/config/generateConfigDocs.groovy | 4 +-
.../adoc/modules/config/pages/sections/Other.adoc | 4 +-
.../modules/config/pages/sections/isis.applib.adoc | 30 +--
.../pages/sections/isis.core.meta-model.adoc | 6 +-
.../isis.core.meta-model.introspector.adoc | 6 +-
.../sections/isis.core.meta-model.validator.adoc | 10 +-
.../pages/sections/isis.core.runtime-services.adoc | 26 +--
.../config/pages/sections/isis.core.runtime.adoc | 8 +-
.../config/pages/sections/isis.extensions.adoc | 8 +-
.../modules/config/pages/sections/isis.legacy.adoc | 8 +-
.../sections/isis.persistence.jdo-datanucleus.adoc | 4 +-
.../isis.persistence.jdo-datanucleus.impl.adoc | 60 ++---
.../config/pages/sections/isis.security.shiro.adoc | 6 +-
.../config/pages/sections/isis.testing.adoc | 6 +-
.../config/pages/sections/isis.value-types.adoc | 22 +-
.../pages/sections/isis.viewer.restfulobjects.adoc | 26 +--
.../config/pages/sections/isis.viewer.wicket.adoc | 58 ++---
.../modules/config/pages/sections/resteasy.adoc | 33 +--
.../wrapper/WrapperFactoryDefault.java | 4 +-
.../demoapp/dom/events/DemoEventSubscriber.java | 2 +-
.../testdomain/auditing/AuditerServiceTest.java | 4 +-
.../commandexecution/WrapperAsyncTest.java | 2 +-
.../publishing/PublisherServiceTest.java | 4 +-
preview.sh | 66 +++++-
scripts/ci/_build-site.sh | 23 +-
186 files changed, 2598 insertions(+), 3240 deletions(-)
create mode 100644 antora/supplemental-ui/img/home/clipboard-copy.png
rename api/applib/src/main/adoc/modules/applib-ant/pages/Collection/{notPersisted.adoc => mementoSerialization.adoc} (54%)
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/DomainService/repositoryFor.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/menuOrder.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/MemberGroupLayout.adoc
copy api/applib/src/main/adoc/modules/applib-ant/pages/{Action/typeOf.adoc => Property/mementoSerialization.adoc} (54%)
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/Property/notPersisted.adoc
rename api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/{unchanging.adoc => repainting.adoc} (93%)
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/bookmarking.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClass.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassFa.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassUiEvent.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/describedAs.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/iconUiEvent.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/layoutUiEvent.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/named.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/paged.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/plural.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/titleUiEvent.adoc
delete mode 100644 api/applib/src/main/adoc/modules/applib-cm/examples/security/RoleMemento.java
delete mode 100644 api/applib/src/main/adoc/modules/applib-cm/examples/security/UserMemento.java
delete mode 100644 api/applib/src/main/adoc/modules/applib-cm/examples/security/package-info.java
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/MethodReferences.java (100%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/session/SessionLoggingServiceLogging.java (100%)
delete mode 100644 api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/AsyncWrap.java
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/wrapper/control/AsyncControl.java (79%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/wrapper/control/AsyncControlService.java (100%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/wrapper/control/ControlAbstract.java (80%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/wrapper/control/ExceptionHandler.java (100%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/wrapper/control/ExceptionHandlerAbstract.java (100%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/wrapper/control/ExecutionMode.java (83%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/wrapper/control/SyncControl.java (81%)
copy api/applib/src/main/{java/org/apache/isis/applib => adoc/modules/applib-svc/examples}/services/xmlsnapshot/XmlSnapshotServiceAbstract.java (100%)
create mode 100644 api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/AsyncControl_Test.java
create mode 100644 api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/SyncControl_Test.java
[isis] 05/07: ISIS-2062: ant docs
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 619cd7df349c95a63293990d6f7ccd9d71c38b51
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Mar 17 13:59:54 2020 +0000
ISIS-2062: ant docs
---
.../applib-ant/examples/annotation/Action.java | 26 +--
.../examples/annotation/ActionLayout.java | 22 +--
.../examples/annotation/DomainObjectLayout.java | 43 ++---
.../examples/annotation/DomainService.java | 19 +-
.../examples/annotation/DomainServiceLayout.java | 49 ++----
.../applib-ant/examples/annotation/Parameter.java | 54 +++---
.../examples/annotation/ParameterLayout.java | 24 ++-
.../applib-ant/examples/annotation/Property.java | 193 +++++++++++----------
.../examples/annotation/PropertyLayout.java | 58 +++++--
.../applib-ant/examples/annotation/ViewModel.java | 3 +-
.../applib-ant/pages/ActionLayout/cssClass.adoc | 1 -
.../applib-ant/pages/ActionLayout/cssClassFa.adoc | 2 +-
.../applib-ant/pages/ActionLayout/describedAs.adoc | 1 -
.../applib-ant/pages/ActionLayout/named.adoc | 1 -
.../pages/CollectionLayout/cssClass.adoc | 1 -
.../pages/CollectionLayout/describedAs.adoc | 2 +-
.../applib-ant/pages/CollectionLayout/named.adoc | 1 -
.../applib-ant/pages/CollectionLayout/paged.adoc | 1 -
.../applib-ant/pages/DomainObjectLayout.adoc | 125 ++++++-------
.../pages/DomainObjectLayout/bookmarking.adoc | 4 -
.../pages/DomainObjectLayout/cssClass.adoc | 1 -
.../pages/DomainObjectLayout/cssClassFa.adoc | 1 -
.../pages/DomainObjectLayout/cssClassUiEvent.adoc | 4 -
.../pages/DomainObjectLayout/describedAs.adoc | 1 -
.../pages/DomainObjectLayout/iconUiEvent.adoc | 4 -
.../pages/DomainObjectLayout/layoutUiEvent.adoc | 4 -
.../applib-ant/pages/DomainObjectLayout/named.adoc | 1 -
.../applib-ant/pages/DomainObjectLayout/paged.adoc | 1 -
.../pages/DomainObjectLayout/plural.adoc | 4 -
.../pages/DomainObjectLayout/titleUiEvent.adoc | 3 -
.../modules/applib-ant/pages/DomainService.adoc | 35 +---
.../applib-ant/pages/DomainServiceLayout.adoc | 41 ++---
.../pages/DomainServiceLayout/menuOrder.adoc | 68 --------
.../pages/DomainServiceLayout/named.adoc | 1 -
.../adoc/modules/applib-ant/pages/Parameter.adoc | 67 +++----
.../modules/applib-ant/pages/ParameterLayout.adoc | 76 +++-----
.../applib-ant/pages/ParameterLayout/cssClass.adoc | 1 -
.../pages/ParameterLayout/describedAs.adoc | 2 +-
.../applib-ant/pages/ParameterLayout/named.adoc | 1 -
.../adoc/modules/applib-ant/pages/Property.adoc | 178 ++++++++-----------
.../modules/applib-ant/pages/PropertyLayout.adoc | 125 +++++--------
.../applib-ant/pages/PropertyLayout/cssClass.adoc | 1 -
.../pages/PropertyLayout/describedAs.adoc | 2 +-
.../applib-ant/pages/PropertyLayout/named.adoc | 1 -
.../{unchanging.adoc => repainting.adoc} | 6 +-
.../modules/applib-ant/pages/ViewModelLayout.adoc | 113 ------------
.../pages/ViewModelLayout/bookmarking.adoc | 11 --
.../applib-ant/pages/ViewModelLayout/cssClass.adoc | 10 --
.../pages/ViewModelLayout/cssClassFa.adoc | 12 --
.../pages/ViewModelLayout/cssClassUiEvent.adoc | 11 --
.../pages/ViewModelLayout/describedAs.adoc | 10 --
.../pages/ViewModelLayout/iconUiEvent.adoc | 14 --
.../pages/ViewModelLayout/layoutUiEvent.adoc | 11 --
.../applib-ant/pages/ViewModelLayout/named.adoc | 10 --
.../applib-ant/pages/ViewModelLayout/paged.adoc | 9 -
.../applib-ant/pages/ViewModelLayout/plural.adoc | 14 --
.../pages/ViewModelLayout/titleUiEvent.adoc | 11 --
.../adoc/modules/applib-ant/pages/about/main.adoc | 5 -
.../modules/applib-ant/partials/module-nav.adoc | 1 -
.../org/apache/isis/applib/annotation/Action.java | 161 +++++++++--------
.../isis/applib/annotation/ActionLayout.java | 66 ++++---
.../apache/isis/applib/annotation/Collection.java | 30 ++--
.../isis/applib/annotation/CollectionLayout.java | 36 ++--
.../isis/applib/annotation/CommandReification.java | 5 -
.../isis/applib/annotation/DomainObject.java | 156 +++++++++++------
.../isis/applib/annotation/DomainObjectLayout.java | 123 +++++++------
.../isis/applib/annotation/DomainService.java | 19 +-
.../applib/annotation/DomainServiceLayout.java | 49 ++----
.../apache/isis/applib/annotation/Parameter.java | 54 +++---
.../isis/applib/annotation/ParameterLayout.java | 24 ++-
.../apache/isis/applib/annotation/Property.java | 193 +++++++++++----------
.../isis/applib/annotation/PropertyLayout.java | 58 +++++--
.../apache/isis/applib/annotation/ViewModel.java | 3 +-
73 files changed, 1067 insertions(+), 1411 deletions(-)
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
index f7968c2..b054030 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
@@ -69,7 +69,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- String associateWith() <.>
+ String associateWith() // <.>
default "";
// end::refguide[]
@@ -86,7 +86,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- String associateWithSequence() <.>
+ String associateWithSequence() // <.>
default "1";
// end::refguide[]
@@ -94,7 +94,7 @@ public @interface Action {
* Whether the action invocation should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
*/
// tag::refguide[]
- CommandReification command() <.>
+ CommandReification command() // <.>
default CommandReification.NOT_SPECIFIED;
// end::refguide[]
@@ -103,7 +103,7 @@ public @interface Action {
* {@link org.apache.isis.applib.services.command.CommandContext CommandContext} domain service should be persisted.
*/
// tag::refguide[]
- CommandPersistence commandPersistence() <.>
+ CommandPersistence commandPersistence() // <.>
default CommandPersistence.PERSISTED;
// end::refguide[]
@@ -117,7 +117,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- CommandExecuteIn commandExecuteIn() <.>
+ CommandExecuteIn commandExecuteIn() // <.>
default CommandExecuteIn.FOREGROUND;
// end::refguide[]
@@ -136,7 +136,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- Class<? extends CommandDtoProcessor> commandDtoProcessor() <.>
+ Class<? extends CommandDtoProcessor> commandDtoProcessor() // <.>
default CommandDtoProcessor.class;
// end::refguide[]
@@ -163,7 +163,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- Class<? extends ActionDomainEvent<?>> domainEvent() <.>
+ Class<? extends ActionDomainEvent<?>> domainEvent() // <.>
default ActionDomainEvent.Default.class;
// end::refguide[]
@@ -177,7 +177,7 @@ public @interface Action {
* @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
// tag::refguide[]
- String fileAccept() <.>
+ String fileAccept() // <.>
default "";
// end::refguide[]
@@ -195,7 +195,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- Where hidden() <.>
+ Where hidden() // <.>
default Where.NOT_SPECIFIED;
// end::refguide[]
@@ -208,7 +208,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- Publishing publishing() <.>
+ Publishing publishing() // <.>
default Publishing.NOT_SPECIFIED;
// end::refguide[]
@@ -220,7 +220,7 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- RestrictTo restrictTo() <.>
+ RestrictTo restrictTo() // <.>
default RestrictTo.NOT_SPECIFIED;
// end::refguide[]
@@ -230,7 +230,7 @@ public @interface Action {
* {@link SemanticsOf#NON_IDEMPOTENT non-idempotent}.
*/
// tag::refguide[]
- SemanticsOf semantics() <.>
+ SemanticsOf semantics() // <.>
default SemanticsOf.NOT_SPECIFIED;
// end::refguide[]
@@ -239,7 +239,7 @@ public @interface Action {
* @return
*/
// tag::refguide[]
- Class<?> typeOf() <.>
+ Class<?> typeOf() // <.>
default Object.class;
}
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java
index f488a72..53cd053 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java
@@ -54,7 +54,7 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- BookmarkPolicy bookmarking() <.>
+ BookmarkPolicy bookmarking() // <.>
default BookmarkPolicy.NOT_SPECIFIED;
// end::refguide[]
@@ -69,7 +69,7 @@ public @interface ActionLayout {
* </p>
*/
@Deprecated
- Contributed contributed() <.>
+ Contributed contributed() // <.>
default Contributed.NOT_SPECIFIED;
// tag::refguide[]
@@ -82,7 +82,7 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- String cssClass() <.>
+ String cssClass() // <.>
default "";
// end::refguide[]
@@ -91,7 +91,7 @@ public @interface ActionLayout {
* action (button or menu item).
*/
// tag::refguide[]
- String cssClassFa() <.>
+ String cssClassFa() // <.>
default "";
// end::refguide[]
@@ -100,7 +100,7 @@ public @interface ActionLayout {
* icon. The icon could be rendered on the left or the right of the action button
*/
// tag::refguide[]
- CssClassFaPosition cssClassFaPosition() <.>
+ CssClassFaPosition cssClassFaPosition() // <.>
default CssClassFaPosition.LEFT;
// end::refguide[]
@@ -108,7 +108,7 @@ public @interface ActionLayout {
* Description of this action, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() <.>
+ String describedAs() // <.>
default "";
// end::refguide[]
@@ -116,7 +116,7 @@ public @interface ActionLayout {
* Indicates where in the UI the action should <i>not</i>not be visible.
*/
// tag::refguide[]
- Where hidden() <.>
+ Where hidden() // <.>
default Where.NOT_SPECIFIED;
// end::refguide[]
@@ -124,7 +124,7 @@ public @interface ActionLayout {
* Name of this action (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() <.>
+ String named() // <.>
default "";
// end::refguide[]
@@ -137,7 +137,7 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- Position position() <.>
+ Position position() // <.>
default Position.NOT_SPECIFIED;
// end::refguide[]
@@ -154,7 +154,7 @@ public @interface ActionLayout {
* How this parameters for this action are prompted, either {@link PromptStyle#DIALOG dialog} or {@link PromptStyle#INLINE inline}.
*/
// tag::refguide[]
- PromptStyle promptStyle() <.>
+ PromptStyle promptStyle() // <.>
default PromptStyle.AS_CONFIGURED;
// end::refguide[]
@@ -163,7 +163,7 @@ public @interface ActionLayout {
* instead to redirect (forcing a re-rendering of a new page).
*/
// tag::refguide[]
- Redirect redirectPolicy() <.>
+ Redirect redirectPolicy() // <.>
default Redirect.AS_CONFIGURED;
}
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java
index 8913b92..f7490c8 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java
@@ -48,6 +48,14 @@ public @interface DomainObjectLayout {
// ...
// end::refguide-ui-events[]
/**
+ * Whether (and how) this domain object can be bookmarked in the UI.
+ */
+ // tag::refguide[]
+ BookmarkPolicy bookmarking() // <.>
+ default BookmarkPolicy.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
* Indicates the css class that a domain class (type) should have.
*/
// tag::refguide[]
@@ -119,24 +127,16 @@ public @interface DomainObjectLayout {
// end::refguide[]
/**
- * Whether (and how) this domain object can be bookmarked in the UI.
- */
- // tag::refguide[]
- BookmarkPolicy bookmarking() // <.>
- default BookmarkPolicy.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * Which subclass of {@link TitleUiEvent} should be used to obtain a title.
+ * Which subclass of {@link CssClassUiEvent} should be used to obtain a CSS class.
*
* <p>
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
// tag::refguide-ui-events[]
- Class<? extends TitleUiEvent<?>>
- titleUiEvent() // <.>
- default TitleUiEvent.Default.class;
+ Class<? extends CssClassUiEvent<?>>
+ cssClassUiEvent() // <.>
+ default CssClassUiEvent.Default.class;
// end::refguide-ui-events[]
/**
@@ -153,32 +153,35 @@ public @interface DomainObjectLayout {
// end::refguide-ui-events[]
/**
- * Which subclass of {@link CssClassUiEvent} should be used to obtain a CSS class.
+ * Which subclass of {@link LayoutUiEvent} should be used to obtain a layout.
*
* <p>
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
// tag::refguide-ui-events[]
- Class<? extends CssClassUiEvent<?>>
- cssClassUiEvent() // <.>
- default CssClassUiEvent.Default.class;
+ Class<? extends LayoutUiEvent<?>>
+ layoutUiEvent() // <.>
+ default LayoutUiEvent.Default.class;
// end::refguide-ui-events[]
/**
- * Which subclass of {@link LayoutUiEvent} should be used to obtain a layout.
+ * Which subclass of {@link TitleUiEvent} should be used to obtain a title.
*
* <p>
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
// tag::refguide-ui-events[]
- Class<? extends LayoutUiEvent<?>>
- layoutUiEvent() // <.>
- default LayoutUiEvent.Default.class;
+ Class<? extends TitleUiEvent<?>>
+ titleUiEvent() // <.>
+ default TitleUiEvent.Default.class;
+
+ // end::refguide-ui-events[]
// tag::refguide[]
// ...
// tag::refguide-ui-events[]
}
// end::refguide[]
+// end::refguide-ui-events[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainService.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainService.java
index a57ab75..84e234a 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainService.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainService.java
@@ -53,20 +53,22 @@ public @interface DomainService {
// end::refguide[]
/**
- * Provides the (first part of the) unique identifier (OID) for the service (the instanceId is always "1").
- *
- * <p>
- * If not specified then either the optional "getId()" is used, otherwise the class' name.
+ * The nature of this service, eg for menus, contributed actions, repository.
*/
// tag::refguide[]
- String objectType() default "";
+ NatureOfService nature() // <.>
+ default NatureOfService.VIEW;
// end::refguide[]
/**
- * The nature of this service, eg for menus, contributed actions, repository.
+ * Provides the (first part of the) unique identifier (OID) for the service (the instanceId is always "1").
+ *
+ * <p>
+ * If not specified then either the optional "getId()" is used, otherwise the class' name.
*/
// tag::refguide[]
- NatureOfService nature() default NatureOfService.VIEW;
+ String objectType() // <.>
+ default "";
// end::refguide[]
/**
@@ -74,7 +76,8 @@ public @interface DomainService {
* @deprecated was never implemented
*/
@Deprecated
- Class<?> repositoryFor() default Object.class;
+ Class<?> repositoryFor() // <.>
+ default Object.class;
// tag::refguide[]
}
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainServiceLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainServiceLayout.java
index a3342fe..bedfcdb 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainServiceLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainServiceLayout.java
@@ -43,52 +43,31 @@ public @interface DomainServiceLayout {
// end::refguide[]
/**
+ * The menubar in which the menu that holds this service's actions should reside.
+ */
+ // tag::refguide[]
+ MenuBar menuBar() // <.>
+ default MenuBar.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
* Name of this class (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
+
+ // end::refguide[]
+ // tag::refguide-menu-bar[]
public enum MenuBar {
PRIMARY,
SECONDARY,
TERTIARY,
NOT_SPECIFIED
}
-
- // end::refguide[]
- /**
- * The menubar in which the menu that holds this service's actions should reside.
- */
- // tag::refguide[]
- MenuBar menuBar() default MenuBar.NOT_SPECIFIED;
-
- // end::refguide[]
- //TODO[2140] DomainServiceLayout
- // /**
- // * Number in Dewey Decimal format representing the order.
- // *
- // * <p>
- // * Same convention as {@link org.apache.isis.applib.annotation.MemberOrder#sequence()}. If not specified, placed after any named.
- // * </p>
- // *
- // * <p>
- // * Either this attribute or {@link DomainService#menuOrder()} can be used; they are equivalent.
- // * Typically this attribute is used for services with a {@link DomainService#nature() nature} of
- // * {@link NatureOfService#VIEW_MENU_ONLY} (these are visible in the UI) whereas
- // * {@link DomainService#menuOrder()} is used for services with a nature of
- // * {@link NatureOfService#DOMAIN domain} (which do not appear in the UI).
- // * </p>
- // *
- // * <p>
- // * The default value is set to "Integer.MAX_VALUE - 100" so that any domain services intended to override the
- // * default implementations provided by the framework itself will do so without having to specify the
- // * menuOrder (with the exception of <tt>EventBusServiceJdo</tt>, all framework implementations have a
- // * default order greater than Integer.MAX_VALUE - 50).
- // * </p>
- // */
- // String menuOrder() default Constants.MENU_ORDER_DEFAULT;
+ // end::refguide-menu-bar[]
// tag::refguide[]
-
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Parameter.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Parameter.java
index 149a336..725fbfd 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Parameter.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Parameter.java
@@ -43,26 +43,29 @@ public @interface Parameter {
// end::refguide[]
/**
- * The maximum entry length of a field.
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
*
* <p>
- * The default value (<code>-1</code>) indicates that no maxLength has been specified.
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
* </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
// tag::refguide[]
- int maxLength() default -1;
+ String fileAccept() // <.>
+ default "";
// end::refguide[]
/**
- * Whether this parameter is optional or is mandatory (ie required).
+ * The maximum entry length of a field.
*
* <p>
- * For parameters the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, is taken
- * to mean that the parameter is required.
+ * The default value (<code>-1</code>) indicates that no maxLength has been specified.
* </p>
*/
// tag::refguide[]
- Optionality optionality() default Optionality.NOT_SPECIFIED;
+ int maxLength() // <.>
+ default -1;
// end::refguide[]
/**
@@ -73,14 +76,29 @@ public @interface Parameter {
* </p>
*/
// tag::refguide[]
- Class<? extends Specification>[] mustSatisfy() default {};
+ Class<? extends Specification>[] mustSatisfy() // <.>
+ default {};
+
+ // end::refguide[]
+ /**
+ * Whether this parameter is optional or is mandatory (ie required).
+ *
+ * <p>
+ * For parameters the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, is taken
+ * to mean that the parameter is required.
+ * </p>
+ */
+ // tag::refguide[]
+ Optionality optionality() // <.>
+ default Optionality.NOT_SPECIFIED;
// end::refguide[]
/**
* Regular expression pattern that a value should conform to, and can be formatted as.
*/
// tag::refguide[]
- String regexPattern() default "";
+ String regexPattern() // <.>
+ default "";
// end::refguide[]
/**
@@ -91,27 +109,17 @@ public @interface Parameter {
* </p>
*/
// tag::refguide[]
- int regexPatternFlags() default 0;
+ int regexPatternFlags() // <.>
+ default 0;
// end::refguide[]
/**
* Replacement text for the pattern in generated error message.
*/
// tag::refguide[]
- String regexPatternReplacement() default "Doesn't match pattern";
+ String regexPatternReplacement() // <.>
+ default "Doesn't match pattern";
- // end::refguide[]
- /**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
- *
- * <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
- * </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
- */
- // tag::refguide[]
- String fileAccept() default "";
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ParameterLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ParameterLayout.java
index 782b3a6..04b7ee3 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ParameterLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ParameterLayout.java
@@ -44,14 +44,16 @@ public @interface ParameterLayout {
* Indicates the css class that a parameter should have.
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
* Description of this property, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
@@ -62,28 +64,32 @@ public @interface ParameterLayout {
* </p>
*/
// tag::refguide[]
- LabelPosition labelPosition() default LabelPosition.NOT_SPECIFIED;
+ LabelPosition labelPosition() // <.>
+ default LabelPosition.NOT_SPECIFIED;
// end::refguide[]
/**
* Name of this action parameter.
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
* A flag indicating whether the value of {@linkplain #named()} should be HTML escaped or not.
*/
// tag::refguide[]
- boolean namedEscaped() default true;
+ boolean namedEscaped() // <.>
+ default true;
// end::refguide[]
/**
* For string parameters (and properties), whether to render as a text area over multiple lines.
*/
// tag::refguide[]
- int multiLine() default -1;
+ int multiLine() // <.>
+ default -1;
// end::refguide[]
/**
@@ -111,14 +117,16 @@ public @interface ParameterLayout {
* </p>
*/
// tag::refguide[]
- RenderDay renderDay() default RenderDay.NOT_SPECIFIED;
+ RenderDay renderDay() // <.>
+ default RenderDay.NOT_SPECIFIED;
// end::refguide[]
/**
* The typical entry length of a field, use to determine the optimum width for display
*/
// tag::refguide[]
- int typicalLength() default -1;
+ int typicalLength() // <.>
+ default -1;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Property.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Property.java
index df31640..ac40f2d 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Property.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Property.java
@@ -52,51 +52,77 @@ public @interface Property {
// end::refguide[]
/**
- * Indicates that changes to the property that should be posted to the
- * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
- * {@link org.apache.isis.applib.events.domain.PropertyDomainEvent}.
- *
- * <p>For example:
- * </p>
- *
- * <pre>
- * public static class StartDateChanged extends PropertyDomainEvent { ... }
- *
- * @Property(domainEvent=StartDateChanged.class)
- * public LocalDate getStartDate() { ...}
- * </pre>
+ * Whether the property edit should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
+ */
+ // tag::refguide[]
+ CommandReification command() // <.>
+ default CommandReification.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * How the {@link org.apache.isis.applib.services.command.Command Command} object provided by the
+ * {@link org.apache.isis.applib.services.command.CommandContext CommandContext} domain service should be persisted.
+ */
+ // tag::refguide[]
+ CommandPersistence commandPersistence() // <.>
+ default CommandPersistence.PERSISTED;
+
+ // end::refguide[]
+ /**
+ * How the command/property edit should be executed.
*
* <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * If the corresponding {@link org.apache.isis.applib.services.command.Command Command} object is persisted,
+ * then its {@link org.apache.isis.applib.services.command.Command#getExecuteIn() invocationType} property
+ * will be set to this value.
* </p>
*/
// tag::refguide[]
- Class<? extends PropertyDomainEvent<?,?>> domainEvent() default PropertyDomainEvent.Default.class;
+ CommandExecuteIn commandExecuteIn() // <.>
+ default CommandExecuteIn.FOREGROUND;
// end::refguide[]
/**
- * Indicates where the property is not visible to the user.
+ * The {@link CommandDtoProcessor} to process this command's DTO.
+ *
+ * <p>
+ * Specifying a processor requires that the implementation of {@link CommandService} provides a
+ * custom implementation of {@link org.apache.isis.applib.services.command.Command} that additional extends
+ * from {@link CommandWithDto}.
+ * </p>
+ *
+ * <p>
+ * Tprocessor itself is used by {@link ContentMappingServiceForCommandDto} and
+ * {@link ContentMappingServiceForCommandsDto} to dynamically transform the DTOs.
+ * </p>
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Class<? extends CommandDtoProcessor> commandDtoProcessor() // <.>
+ default CommandDtoProcessor.class;
// end::refguide[]
/**
- * If set to {@link Projecting#PROJECTED projected}, then indicates that the owner of this property is a view model
- * which is a projection of some other entity, and that the property holds a reference to that
- * "underlying".
+ * Indicates that changes to the property that should be posted to the
+ * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
+ * {@link org.apache.isis.applib.events.domain.PropertyDomainEvent}.
*
- * <p>
- * This is used to automatically redirect any bookmarks to the view model (projection) to instead be directed
- * at the underlying entity.
+ * <p>For example:
* </p>
*
+ * <pre>
+ * public static class StartDateChanged extends PropertyDomainEvent { ... }
+ *
+ * @Property(domainEvent=StartDateChanged.class)
+ * public LocalDate getStartDate() { ...}
+ * </pre>
+ *
* <p>
- * Only one such property should be marked as being a projection with a view model.
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
// tag::refguide[]
- Projecting projecting() default Projecting.NOT_SPECIFIED;
+ Class<? extends PropertyDomainEvent<?,?>> domainEvent() // <.>
+ default PropertyDomainEvent.Default.class;
// end::refguide[]
/**
@@ -107,7 +133,8 @@ public @interface Property {
* </p>
*/
// tag::refguide[]
- Editing editing() default Editing.NOT_SPECIFIED;
+ Editing editing() // <.>
+ default Editing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -115,118 +142,121 @@ public @interface Property {
* then the reason to provide to the user as to why this property cannot be edited.
*/
// tag::refguide[]
- String editingDisabledReason() default "";
+ String editingDisabledReason() // <.>
+ default "";
// end::refguide[]
/**
- * Whether the property edit should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
+ *
+ * <p>
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
+ * </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
- CommandReification command() default CommandReification.NOT_SPECIFIED;
+ // tag::refguide[]
+ String fileAccept() // <.>
+ default "";
// end::refguide[]
/**
- * How the {@link org.apache.isis.applib.services.command.Command Command} object provided by the
- * {@link org.apache.isis.applib.services.command.CommandContext CommandContext} domain service should be persisted.
+ * Indicates where the property is not visible to the user.
*/
// tag::refguide[]
- CommandPersistence commandPersistence() default CommandPersistence.PERSISTED;
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
- * How the command/property edit should be executed.
+ * The maximum entry length of a field.
*
* <p>
- * If the corresponding {@link org.apache.isis.applib.services.command.Command Command} object is persisted,
- * then its {@link org.apache.isis.applib.services.command.Command#getExecuteIn() invocationType} property
- * will be set to this value.
+ * The default value (<code>-1</code>) indicates that no maxLength has been specified.
* </p>
*/
// tag::refguide[]
- CommandExecuteIn commandExecuteIn() default CommandExecuteIn.FOREGROUND;
+ int maxLength() // <.>
+ default -1;
// end::refguide[]
/**
- * Whether the property edit should be published.
+ * Indicates whether the property should be included or excluded from mementos.
*
* <p>
- * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
- * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
+ * To ensure that the property is actually not persisted in the objectstore, also annotate with the JDO annotation
+ * <code>javax.jdo.annotations.NotPersistent</code>
* </p>
*/
// tag::refguide[]
- Publishing publishing() default Publishing.NOT_SPECIFIED;
+ MementoSerialization mementoSerialization() // <.>
+ default MementoSerialization.NOT_SPECIFIED;
// end::refguide[]
/**
- * The {@link CommandDtoProcessor} to process this command's DTO.
- *
- * <p>
- * Specifying a processor requires that the implementation of {@link CommandService} provides a
- * custom implementation of {@link org.apache.isis.applib.services.command.Command} that additional extends
- * from {@link CommandWithDto}.
- * </p>
+ * The {@link org.apache.isis.applib.spec.Specification}(s) to be satisfied by this property.
*
* <p>
- * Tprocessor itself is used by {@link ContentMappingServiceForCommandDto} and
- * {@link ContentMappingServiceForCommandsDto} to dynamically transform the DTOs.
+ * If more than one is provided, then all must be satisfied (in effect "AND"ed together).
* </p>
*/
// tag::refguide[]
- Class<? extends CommandDtoProcessor> commandDtoProcessor() default CommandDtoProcessor.class;
+ Class<? extends Specification>[] mustSatisfy() // <.>
+ default {};
// end::refguide[]
/**
- * The maximum entry length of a field.
+ * Whether this property is optional or is mandatory (ie required).
*
* <p>
- * The default value (<code>-1</code>) indicates that no maxLength has been specified.
+ * For properties the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, usually
+ * means that the property is required unless it has been overridden by {@link javax.jdo.annotations.Column}
+ * with its <code>javax.jdo.annotations.Column#allowsNull()</code> attribute set to true.
* </p>
*/
// tag::refguide[]
- int maxLength() default -1;
+ Optionality optionality() // <.>
+ default Optionality.NOT_SPECIFIED;
// end::refguide[]
/**
- * The {@link org.apache.isis.applib.spec.Specification}(s) to be satisfied by this property.
+ * If set to {@link Projecting#PROJECTED projected}, then indicates that the owner of this property is a view model
+ * which is a projection of some other entity, and that the property holds a reference to that
+ * "underlying".
*
* <p>
- * If more than one is provided, then all must be satisfied (in effect "AND"ed together).
+ * This is used to automatically redirect any bookmarks to the view model (projection) to instead be directed
+ * at the underlying entity.
* </p>
- */
- // tag::refguide[]
- Class<? extends Specification>[] mustSatisfy() default {};
-
- // end::refguide[]
- /**
- * Indicates whether the property should be included or excluded from mementos.
*
* <p>
- * To ensure that the property is actually not persisted in the objectstore, also annotate with the JDO annotation
- * <code>javax.jdo.annotations.NotPersistent</code>
+ * Only one such property should be marked as being a projection with a view model.
* </p>
*/
// tag::refguide[]
- MementoSerialization mementoSerialization() default MementoSerialization.NOT_SPECIFIED;
+ Projecting projecting() // <.>
+ default Projecting.NOT_SPECIFIED;
// end::refguide[]
/**
- * Whether this property is optional or is mandatory (ie required).
+ * Whether the property edit should be published.
*
* <p>
- * For properties the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, usually
- * means that the property is required unless it has been overridden by {@link javax.jdo.annotations.Column}
- * with its <code>javax.jdo.annotations.Column#allowsNull()</code> attribute set to true.
+ * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
+ * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
* </p>
*/
// tag::refguide[]
- Optionality optionality() default Optionality.NOT_SPECIFIED;
+ Publishing publishing() // <.>
+ default Publishing.NOT_SPECIFIED;
// end::refguide[]
/**
* Regular expression pattern that a value should conform to, and can be formatted as.
*/
// tag::refguide[]
- String regexPattern() default "";
+ String regexPattern() // <.>
+ default "";
// end::refguide[]
/**
@@ -237,27 +267,16 @@ public @interface Property {
* </p>
*/
// tag::refguide[]
- int regexPatternFlags() default 0;
+ int regexPatternFlags() // <.>
+ default 0;
// end::refguide[]
/**
* Replacement text for the pattern in generated error message.
*/
// tag::refguide[]
- String regexPatternReplacement() default "Doesn't match pattern";
-
- // end::refguide[]
- /**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
- *
- * <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
- * </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
- */
- // tag::refguide[]
- String fileAccept() default "";
+ String regexPatternReplacement() // <.>
+ default "Doesn't match pattern";
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PropertyLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PropertyLayout.java
index 11f965b..f6e241a 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PropertyLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PropertyLayout.java
@@ -42,21 +42,24 @@ public @interface PropertyLayout {
* Indicates the css class that a property should have.
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
* Description of this property, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
* Indicates where in the UI the property should <i>not</i>not be visible.
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -67,38 +70,54 @@ public @interface PropertyLayout {
* </p>
*/
// tag::refguide[]
- LabelPosition labelPosition() default LabelPosition.NOT_SPECIFIED;
+ LabelPosition labelPosition() // <.>
+ default LabelPosition.NOT_SPECIFIED;
// end::refguide[]
/**
* For string properties (and parameters), render as a text area over specified number of lines.
*/
// tag::refguide[]
- int multiLine() default -1;
+ int multiLine() // <.>
+ default -1;
// end::refguide[]
/**
* Name of this property (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
* A flag indicating whether the value of {@linkplain #named()} should be HTML escaped or not.
*/
// tag::refguide[]
- boolean namedEscaped() default true;
+ boolean namedEscaped() // <.>
+ default true;
+ // end::refguide[]
+ /**
+ * Whether this property should be used to construct the navigable chain of breadcrumbs in the UI.
+ *
+ * <p>
+ * Only one property can be annotated as such per domain class.
+ * </p>
+ *
+ * @return
+ */
// tag::refguide[]
- Navigable navigable() default Navigable.NOT_SPECIFIED;
+ Navigable navigable() // <.>
+ default Navigable.NOT_SPECIFIED;
// end::refguide[]
/**
* How the properties of this domain object are be edited, either {@link PromptStyle#DIALOG dialog} or {@link PromptStyle#INLINE inline}.
*/
// tag::refguide[]
- PromptStyle promptStyle() default PromptStyle.NOT_SPECIFIED;
+ PromptStyle promptStyle() // <.>
+ default PromptStyle.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -127,14 +146,8 @@ public @interface PropertyLayout {
* </p>
*/
// tag::refguide[]
- RenderDay renderDay() default RenderDay.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * The typical entry length of a field, use to determine the optimum width for display
- */
- // tag::refguide[]
- int typicalLength() default -1;
+ RenderDay renderDay() // <.>
+ default RenderDay.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -160,7 +173,16 @@ public @interface PropertyLayout {
* </p>
*/
// tag::refguide[]
- Repainting repainting() default Repainting.NOT_SPECIFIED;
+ Repainting repainting() // <.>
+ default Repainting.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * The typical entry length of a field, use to determine the optimum width for display
+ */
+ // tag::refguide[]
+ int typicalLength() // <.>
+ default -1;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ViewModel.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ViewModel.java
index 1520574..7bd1ce3 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ViewModel.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ViewModel.java
@@ -54,11 +54,12 @@ import org.springframework.stereotype.Component;
* annotated type.
* For more details see <code>org.apache.isis.core.config.beans.IsisBeanFactoryPostProcessorForSpring</code>.
*/
+// tag::refguide[]
@Inherited
@Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Component @Scope("prototype")
public @interface ViewModel {
-
}
+// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClass.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClass.adoc
index 5019f8b..a3cf257 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClass.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClass.adoc
@@ -36,7 +36,6 @@ As an alternative to using the annotation, the dynamic xref:vw:ROOT:layout.adoc#
This attribute can also be applied to:
* xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClass[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#cssClass[view models]
* xref:refguide:applib-ant:PropertyLayout.adoc#cssClass[properties]
* xref:refguide:applib-ant:CollectionLayout.adoc#cssClass[collections]
* xref:refguide:applib-ant:ParameterLayout.adoc#cssClass[parameters].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClassFa.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClassFa.adoc
index 5ed2da0..bdb2a00 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClassFa.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/cssClassFa.adoc
@@ -6,7 +6,7 @@
The `cssClassFa` attribute is used to specify the name of a link:http://fortawesome.github.io/Font-Awesome/icons/[Font Awesome icon] name, to be rendered on the action's representation as a button or menu item. The related `cssClassFaPosition` attribute specifies the positioning of the icon, to the left or the right of the text.
-These attributes can also be applied to xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassFa[domain objects] and to xref:refguide:applib-ant:ViewModelLayout.adoc#cssClassFa[view models] to specify the object's icon.
+These attributes can also be applied to xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassFa[domain objects] to specify the object's icon.
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/describedAs.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/describedAs.adoc
index 44edcd7..75a85b4 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/describedAs.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/describedAs.adoc
@@ -35,5 +35,4 @@ This attribute can also be specified for:
* xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[properties]
* xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[parameters]
* xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#describedAs[view models].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/named.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/named.adoc
index 0c9f1df..013c7a8 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/named.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout/named.adoc
@@ -43,5 +43,4 @@ This attribute can also be specified for:
* xref:refguide:applib-ant:PropertyLayout.adoc#named[properties]
* xref:refguide:applib-ant:ParameterLayout.adoc#named[parameters]
* xref:refguide:applib-ant:DomainObjectLayout.adoc#named[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#named[view models]
* xref:refguide:applib-ant:DomainServiceLayout.adoc#named[domain services].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/cssClass.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/cssClass.adoc
index 363ff4a..af9eaea 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/cssClass.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/cssClass.adoc
@@ -34,7 +34,6 @@ As an alternative to using the annotation, the dynamic xref:vw:ROOT:layout.adoc#
This attribute can also be applied to:
* xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClass[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#cssClass[view models]
* xref:refguide:applib-ant:ActionLayout.adoc#cssClass[actions]
* xref:refguide:applib-ant:PropertyLayout.adoc#cssClass[properties]
* xref:refguide:applib-ant:ParameterLayout.adoc#cssClass[parameters].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/describedAs.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/describedAs.adoc
index a15376c..b47d7df 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/describedAs.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/describedAs.adoc
@@ -6,7 +6,7 @@
The `describedAs` attribute is used to provide a short description of the collection to the user. In the xref:vw:ROOT:about.adoc[Wicket viewer] it is displayed as a 'tool tip'.
-The `describedAs` attribute can also be specified for xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[properties], xref:refguide:applib-ant:ActionLayout.adoc#describedAs[actions], xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[parameters], xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[domain objects] and xref:refguide:applib-ant:ViewModelLayout.adoc#describedAs[view models].
+The `describedAs` attribute can also be specified for xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[properties], xref:refguide:applib-ant:ActionLayout.adoc#describedAs[actions], xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[parameters] and xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[domain objects].
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/named.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/named.adoc
index b25c959..68765cb 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/named.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/named.adoc
@@ -50,5 +50,4 @@ This attribute can also be specified for:
* xref:refguide:applib-ant:PropertyLayout.adoc#named[properties]
* xref:refguide:applib-ant:ParameterLayout.adoc#named[parameters]
* xref:refguide:applib-ant:DomainObjectLayout.adoc#named[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#named[view models]
* xref:refguide:applib-ant:DomainServiceLayout.adoc#named[domain services].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/paged.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/paged.adoc
index 2657800..8462e90 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/paged.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout/paged.adoc
@@ -42,4 +42,3 @@ As an alternative to using the annotation, the dynamic xref:vw:ROOT:layout.adoc#
This attribute can also be applied to:
* xref:refguide:applib-ant:DomainObjectLayout.adoc#paged[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#paged[view models].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
index 98df34b..599ecf1 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
@@ -6,96 +6,51 @@
The `@DomainObjectLayout` annotation applies to domain classes, collecting together all UI hints within a single annotation.
-[source,java]
-----
-include::refguide:applib-ant:example$annotation/DomainObjectLayout.java[tags="refguide"]
-----
+
+== Main API
[source,java]
----
-include::refguide:applib-ant:example$annotation/DomainObjectLayout.java[tags="refguide-ui-events"]
+include::refguide:applib-ant:example$annotation/DomainObjectLayout.java[tags="refguide"]
----
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#bookmarking[`bookmarking`]
++
+Whether (and how) this domain object should be automatically bookmarked
-[NOTE]
-====
-For view models that have been annotated with `@ViewModel` the equivalent xref:refguide:applib-ant:ViewModelLayout.adoc[`@ViewModelLayout`] can be used.
-====
-
-The table below summarizes the annotation's attributes.
-
-.`@DomainObjectLayout` attributes
-[cols="2,2,4a",options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#bookmarking[`bookmarking`]
-|`AS_ROOT`, `AS_CHILD`, `NEVER` +
-(`NEVER`)
-|whether (and how) this domain object should be automatically bookmarked
-
-
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#cssclass[`cssClass`]
-|Any string valid as a CSS class
-|the css class that a domain class (type) should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#cssclass[`cssClass`]
++
+The css class that a domain class (type) should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassFa[`cssClassFa`]
-|Any valid link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon name
-|specify a font awesome icon for the action's menu link or icon. +
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassFa[`cssClassFa`]
++
+Any valid link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon name for the domain object's menu link or icon. +
+<.> `cssClassFaPosition()`
++
+Currently unused.
-|`cssClassFaPosition()`
-|`LEFT`, `RIGHT` +
-(`LEFT`)
-|Currently unused.
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassUiEvent[`cssClassUiEvent`]
-|subtype of `CssClassUiEvent` +
-(`CssClassUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain a CSS class for the domain object.
-
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[`describedAs`]
-|String.
-|description of this class, eg to be rendered in a tooltip.
-
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#iconUiEvent[`iconUiEvent`]
-|subtype of `IconUiEvent` +
-(`IconUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain the icon (name) for the domain object.
-
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#layoutUiEvent[`layoutUiEvent`]
-|subtype of `LayoutUiEvent` +
-(`LayoutUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain the layout (name) for the domain object.
-
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#named[`named`]
-|String.
-|to override the name inferred from the action's name in code. +
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[`describedAs`]
++
+Description of this class, eg to be rendered in a tooltip.
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#named[`named`]
++
+To override the name inferred from the action's name in code. +
++
A typical use case is if the desired name is a reserved Java keyword, such as `default` or `package`.
-
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#paged[`paged`]
-|Positive integer
-|the page size for instances of this class when rendered within a table (as returned from an action invocation)
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#paged[`paged`]
++
+The page size for instances of this class when rendered within a table (as returned from an action invocation)
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#plural[`plural`]
-|String.
-|the plural name of the class
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#plural[`plural`]
++
+The plural name of the class
-|xref:refguide:applib-ant:DomainObjectLayout.adoc#titleUiEvent[`titleUiEvent`]
-|subtype of `TitleUiEvent` +
-(`TitleUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain the title for the domain object.
-
-|===
For example:
@@ -119,6 +74,30 @@ public class ToDoItem {
Note that there is (currently) no support for specifying UI hints for domain objects through the dynamic xref:vw:ROOT:layout.adoc#file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
====
+== UI Events API
+
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainObjectLayout.java[tags="refguide-ui-events"]
+----
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassUiEvent[`cssClassUiEvent`]
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain a CSS class for the domain object.
+
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#iconUiEvent[`iconUiEvent`]
++
+The event type to be posted to obtain the icon (name) for the domain object.
+
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#layoutUiEvent[`layoutUiEvent`]
++
+The event type to be posted to obtain the layout (name) for the domain object.
+
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#titleUiEvent[`titleUiEvent`]
++
+The event type to be posted to obtain the title for the domain object.
+
+
+
include::DomainObjectLayout/bookmarking.adoc[leveloffset=+1]
include::DomainObjectLayout/cssClass.adoc[leveloffset=+1]
include::DomainObjectLayout/cssClassFa.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/bookmarking.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/bookmarking.adoc
index 19753da..b00ce82 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/bookmarking.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/bookmarking.adoc
@@ -64,7 +64,3 @@ The nesting can be done to any level; the Estatio screenshot also shows a bookma
-== See also
-
-This attribute can also be applied to xref:refguide:applib-ant:ViewModelLayout.adoc#bookmarking[view models].
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClass.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClass.adoc
index a296477..3293550 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClass.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClass.adoc
@@ -34,7 +34,6 @@ The similar xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassFa[`@Domain
This attribute can also be applied to:
-* xref:refguide:applib-ant:ViewModelLayout.adoc#cssClass[view models]
* xref:refguide:applib-ant:ActionLayout.adoc#cssClass[actions]
* xref:refguide:applib-ant:PropertyLayout.adoc#cssClass[properties],
* xref:refguide:applib-ant:CollectionLayout.adoc#cssClass[collections]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassFa.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassFa.adoc
index 8c08fc6..cb110fb 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassFa.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassFa.adoc
@@ -39,6 +39,5 @@ The similar xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClass[`@DomainOb
These attributes can also be applied to:
-* xref:refguide:applib-ant:ViewModelLayout.adoc#cssClassFa[view models] to specify the object's icon, and
* xref:refguide:applib-ant:ActionLayout.adoc#cssClassFa[actions] to specify an icon for the action's representation as a button or menu item.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassUiEvent.adoc
index b50f706..6aac47d 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassUiEvent.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/cssClassUiEvent.adoc
@@ -119,7 +119,3 @@ Normally events are only raised for interactions through the UI.
However, events can be raised programmatically either by calling the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] API directly.
-== See also
-
-This attribute can also be applied to xref:refguide:applib-ant:ViewModelLayout.adoc#cssClassUiEvent[view models].
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/describedAs.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/describedAs.adoc
index d45071d..b187ed6 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/describedAs.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/describedAs.adoc
@@ -29,5 +29,4 @@ The attribute can also be specified for:
* xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[properties]
* xref:refguide:applib-ant:ActionLayout.adoc#describedAs[actions]
* xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[parameters] and
-* xref:refguide:applib-ant:ViewModelLayout.adoc#describedAs[view models].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/iconUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/iconUiEvent.adoc
index 9577a91..ee89863 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/iconUiEvent.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/iconUiEvent.adoc
@@ -114,7 +114,3 @@ Normally events are only raised for interactions through the UI.
However, events can be raised programmatically by calling the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] API directly.
-== See also
-
-This attribute can also be applied to xref:refguide:applib-ant:ViewModelLayout.adoc#iconNameUiEvent[view models].
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/layoutUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/layoutUiEvent.adoc
index 1efd68d..aabecc8 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/layoutUiEvent.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/layoutUiEvent.adoc
@@ -113,7 +113,3 @@ However, events can be raised programmatically by calling the xref:refguide:appl
-== See also
-
-This attribute can also be applied to xref:refguide:applib-ant:ViewModelLayout.adoc#layoutUiEvent[view models].
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/named.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/named.adoc
index 8d7c116..b6e1d25 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/named.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/named.adoc
@@ -44,5 +44,4 @@ The attribute can also be specified for:
* xref:refguide:applib-ant:CollectionLayout.adoc#named[collections]
* xref:refguide:applib-ant:PropertyLayout.adoc#named[properties]
* xref:refguide:applib-ant:ParameterLayout.adoc#named[parameters]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#named[view models]
* xref:refguide:applib-ant:DomainServiceLayout.adoc#named[domain services].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/paged.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/paged.adoc
index b2b20ea..0c4f196 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/paged.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/paged.adoc
@@ -37,5 +37,4 @@ It is also possible to specify a global default for the page size of standalone
This attribute can also be applied to:
-* xref:refguide:applib-ant:ViewModelLayout.adoc#paged[view models], and
* xref:refguide:applib-ant:CollectionLayout.adoc#paged[collections]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/plural.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/plural.adoc
index d434626..6b5115e 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/plural.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/plural.adoc
@@ -20,7 +20,3 @@ public class Child {
----
-== See also
-
-This attribute is also supported for xref:refguide:applib-ant:ViewModelLayout.adoc#plural[view models].
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/titleUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/titleUiEvent.adoc
index e8ec63e..fe73c1c 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/titleUiEvent.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout/titleUiEvent.adoc
@@ -113,6 +113,3 @@ Normally events are only raised for interactions through the UI.
However, events can be raised programmatically either by calling the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] API directly, or as a result of calling the xref:refguide:applib-svc:TitleService.adoc[`TitleService`]'s `titleOf(...)` method.
-== See also
-
-This attribute can also be applied to xref:refguide:applib-ant:ViewModelLayout.adoc#titleUiEvent[view models].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
index 8942197..a59ebe1 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
@@ -11,36 +11,17 @@ The `@DomainService` annotation indicates that the (concrete) class should be au
include::refguide:applib-ant:example$annotation/DomainService.java[tags="refguide"]
----
-The table below summarizes the annotation's attributes.
-
-.`@DomainService` attributes
-[cols="2,2,4a",options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:DomainService.adoc#nature[`nature()`]
-|`VIEW`, `VIEW_MENU_ONLY`, `VIEW_CONTRIBUTIONS_ONLY`, `VIEW_REST_ONLY`, `DOMAIN` (`VIEW`)
-|the nature of this service: providing actions for menus, or as contributed actions, or for the xref:vro:ROOT:about.adoc[RestfulObjects REST API], or neither
-
-
-|xref:refguide:applib-ant:DomainService.adoc#objectType[`objectType()`]
-|
-|equivalent to xref:refguide:applib-ant:DomainObject.adoc#objectType[`@DomainObject#objectType()`], specifies the objectType of the service.
-
+<.> xref:refguide:applib-ant:DomainService.adoc#nature[`nature()`]
++
+Whether the actions of this domain service should be rendered in UI menus only, or the xref:vro:ROOT:about.adoc[RestfulObjects] REST API only, or both
+
+<.> xref:refguide:applib-ant:DomainService.adoc#objectType[`objectType()`]
++
+Equivalent to xref:refguide:applib-ant:DomainObject.adoc#objectType[`@DomainObject#objectType()`], specifies the objectType of the service.
++
The instanceId for services is always "1".
-|xref:refguide:applib-ant:DomainService.adoc#repositoryFor[`repositoryFor()`]
-|
-|if this domain service acts as a repository for an entity type, specify that entity type. This is used to determine an icon to use for the service (eg as shown in action prompts).
-
-
-|===
-
For example:
[source,java]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
index c432616..c9fe676 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
@@ -17,31 +17,19 @@ The annotation is:
----
include::refguide:applib-ant:example$annotation/DomainServiceLayout.java[tags="refguide"]
----
+<.> xref:refguide:applib-ant:DomainServiceLayout.adoc#menuBar[`menuBar()`]
++
+The menubar in which the menu that holds this service's actions should reside:
++
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainServiceLayout.java[tags="refguide-menu-bar",indent=0]
+----
+<.> xref:refguide:applib-ant:DomainServiceLayout.adoc#named[`named()`]
++
+Name of this class (overriding the name derived from its name in code)
-The table below summarizes the annotation's attributes.
-
-.`@DomainServiceLayout` attributes
-[cols="2,2,4a",options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:DomainServiceLayout.adoc#menuBar[`menuBar()`]
-|`PRIMARY`, `SECONDARY`, `TERTIARY` (`PRIMARY`).
-|the menubar in which the menu that holds this service's actions should reside.
-
-
-|xref:refguide:applib-ant:DomainServiceLayout.adoc#named[`named()`]
-|string, eg "Customers"
-|name of this class (overriding the name derived from its name in code)
-
-
-
-|===
For example:
@@ -50,7 +38,6 @@ For example:
@DomainService
@DomainServiceLayout(
menuBar=MenuBar.PRIMARY,
- menuOrder="100",
named="ToDos"
)
public class ToDoItems {
@@ -58,11 +45,5 @@ public class ToDoItems {
}
----
-[NOTE]
-====
-Note that there is (currently) no support for specifying UI hints for domain services through the dynamic xref:vw:ROOT:layout.adoc#file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
-====
-
include::DomainServiceLayout/menuBar.adoc[leveloffset=+1]
-include::DomainServiceLayout/menuOrder.adoc[leveloffset=+1]
include::DomainServiceLayout/named.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/menuOrder.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/menuOrder.adoc
deleted file mode 100644
index fca80f8f..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/menuOrder.adoc
+++ /dev/null
@@ -1,68 +0,0 @@
-= `menuOrder`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-The `menuOrder` attribute determines the ordering of a domain service's actions as menu items within a specified menu bar and top-level menu.
-
-
-The algorithm works as follows:
-
-* first, the xref:refguide:applib-ant:DomainServiceLayout.adoc#menuBar[`menuBar()`] determines which of the three menu bars the service's actions should be rendered
-* then, the domain service's top-level name (typically explicitly specified using xref:refguide:applib-ant:DomainServiceLayout.adoc#named[`named()`]) is used to determine the top-level menu item to be rendered on the menu bar
-* finally, if there is more than domain service that has the same name, then the `menuOrder` attribute is used to order those actions on the menu item drop-down.
-
-For example, the screenshot below shows the "prototyping" menu from the http://github.com/apache/isis-app-todoapp[TodoApp]:
-
-image::reference-annotations/DomainServiceLayout/menuOrder.png[width="500px",link="{imagesdir}/reference-annotations/DomainServiceLayout/menuOrder.png"]
-
-
-The xref:vw:ROOT:about.adoc[Wicket viewer] automatically places separators between actions from different domain services. From this we can infer that there are actually five different domain services that are all rendered on the "prototyping" top-level menu.
-
-One of these is the todoapp's `DemoDomainEventSubscriptions` service:
-
-[source,java]
-----
-@DomainService(
- nature = NatureOfService.VIEW_MENU_ONLY
-)
-@DomainServiceLayout(
- menuBar = MenuBar.SECONDARY,
- named = "Prototyping", // <1>
- menuOrder = "500.20") // <2>
-public class DemoDomainEventSubscriptions {
- @ActionLayout(named="Set subscriber behaviour")
- @MemberOrder(sequence = "500.20.1") // <3>
- public void subscriberBehaviour(...) { /* ... */ }
- ...
-}
-----
-<1> render on the "Prototyping" menu
-<2> positioning relative to other service's on the "Prototyping" menu
-<3> by convention (nothing more) the `@MemberOrder#sequence` attribute continues the same Dewey decimal sequence format (a simple string "1" could in fact have been used instead)
-
-
-while others come from services provided by Apache Isis itself, eg:
-
-[source,java]
-----
-@DomainServiceLayout(
- named = "Prototyping", // <1>
- menuBar = MenuBar.SECONDARY,
- menuOrder = "500.500" // <2>
-)
-public class MetaModelServiceMenu {
- @MemberOrder(sequence="500.500.1") // <3>
- public Clob downloadMetaModel( ... ) { /* ... */ }
- ...
-}
-----
-<1> render on the "Prototyping" menu
-<2> positioning relative to other service's on the "Prototyping" menu; this appears after the `DemoDomainEventSubscriptions` service shown above
-<3> by convention (nothing more) the `@MemberOrder#sequence` attribute continues the same Dewey decimal sequence format (a simple string "1", "2", "3", ... could in fact have been used instead)
-
-
-
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/named.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/named.adoc
index 730c09d..cc41768 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/named.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout/named.adoc
@@ -30,4 +30,3 @@ This attribute can also be specified for:
* xref:refguide:applib-ant:PropertyLayout.adoc#named[properties]
* xref:refguide:applib-ant:ParameterLayout.adoc#named[parameters]
* xref:refguide:applib-ant:DomainObjectLayout.adoc#named[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#named[view models].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
index 69582fa..1d308b7 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
@@ -9,60 +9,37 @@ The `@Parameter` annotation applies to action parameters collecting together all
----
include::refguide:applib-ant:example$annotation/Parameter.java[tags="refguide"]
----
-
-The table below summarizes the annotation's attributes.
-
-.`@Parameter` attributes
-[cols="2,2,4a",options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:Parameter.adoc#fileAccept[`fileAccept()`]
-|Media type or file extension
-|Hints the file type to be uploaded for xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]
+<.> xref:refguide:applib-ant:Parameter.adoc#fileAccept[`fileAccept()`]
++
+Hints the file type (media type or file extension) to be uploaded for xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]
or xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]. +
+
- Note that this does not prevent the user from uploading some other file type; rather it merely defaults the file type in the file open dialog.
-
-
-
-|xref:refguide:applib-ant:Parameter.adoc#maxLength[`maxLength()`]
-|Positive integer
-|maximum number of characters for string parameters; ignored otherwise
-
-
-
-|xref:refguide:applib-ant:Parameter.adoc#mustSatisfy[`mustSatisfy()`]
-|implementation of `o.a.i.applib.spec.Specification`
-|allows arbitrary validation to be applied
-
-
-|xref:refguide:applib-ant:Parameter.adoc#optionality[`optionality()`]
-|`MANDATORY`, `OPTIONAL` (`MANDATORY`)
-|specifies a parameter is optional rather than mandatory
-
+Note that this does not prevent the user from uploading some other file type; rather it merely defaults the file type in the file open dialog.
-|xref:refguide:applib-ant:Parameter.adoc#regexPattern[regexPattern]
-|regular expression
-|validates the contents of a string parameter against the regular expression pattern
+<.> xref:refguide:applib-ant:Parameter.adoc#maxLength[`maxLength()`]
++
+Maximum number of characters for string parameters; ignored otherwise
+<.> xref:refguide:applib-ant:Parameter.adoc#mustSatisfy[`mustSatisfy()`]
++
+Implementation of `o.a.i.applib.spec.Specification`, allowing arbitrary validation to be applied.
-|`regexPatternFlags()`
-|value of flags as normally passed to `java.util.regex.` +
-`Pattern#compile(...)`
-|modifies the compilation of the regular expression
+<.> xref:refguide:applib-ant:Parameter.adoc#optionality[`optionality()`]
++
+Specifies a parameter is optional rather than mandatory
+<.> xref:refguide:applib-ant:Parameter.adoc#regexPattern[regexPattern()]
++
+Validates the contents of a string parameter against the regular expression pattern
-|`regexPatternReplacement()`
-|
-|Unused.
+<.> `regexPatternFlags()`
++
+Value of flags as normally passed to `java.util.regex.Pattern#compile(...)`, modifying the compilation of the regular expression
+<.> `regexPatternReplacement()`
++
+Unused.
-|===
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
index 295aa9d..9b87278 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
@@ -10,48 +10,29 @@ The `@ParameterLayout` annotation applies to action parameters, collecting toget
----
include::refguide:applib-ant:example$annotation/ParameterLayout.java[tags="refguide"]
----
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#cssClass[`cssClass()`]
++The css class that a parameter should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-The table below summarizes the annotation's attributes.
-
-.`@ParameterLayout` attributes
-[cols="2,2,4a", options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:ParameterLayout.adoc#cssClass[`cssClass()`]
-|Any string valid as a CSS class
-|the css class that a parameter should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-
-
-|xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[`describedAs()`]
-|String
-|description of this parameter, eg to be rendered in a tooltip.
-
-
-|xref:refguide:applib-ant:ParameterLayout.adoc#labelPosition[`labelPosition()`]
-|`LEFT`, `TOP`, `RIGHT`, `NONE` +
-(`LEFT`)
-|in forms, the positioning of the label relative to the property value. +
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[`describedAs()`]
++
+Description of this parameter, eg to be rendered in a tooltip.
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#labelPosition[`labelPosition()`]
+In forms, the positioning of the label relative to the property value. +
+=
Default is `LEFT`, unless xref:refguide:applib-ant:ParameterLayout.adoc#multiLine[`multiLine`] in which case `TOP`.
The value `RIGHT` is only supported for boolean parameters.
-
-|xref:refguide:applib-ant:ParameterLayout.adoc#multiLine[`multiLine()`]
-|Positive integer
-|for string parameters, render as a text area over multiple lines. +
-
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#multiLine[`multiLine()`]
++
+For string parameters, render as a text area over specified number of lines.
++
If set > 1, then then xref:refguide:applib-ant:ParameterLayout.adoc#labelPosition[`labelPosition`] defaults to `TOP`.
-
-|xref:refguide:applib-ant:ParameterLayout.adoc#named[`named()`]
-|String
-|the name of this parameter.
-
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#named[`named()`]
++
+The name of this parameter.
++
[TIP]
====
There's no need to name the action parameters if the code is compiled using the `-parameters` flag to the Java compiler (javac); the framework will then use the name of the parameter itself.
@@ -59,24 +40,17 @@ There's no need to name the action parameters if the code is compiled using the
The only reason then to name the parameter is if the desired name is a reserved Java keyword, such as `default` or `package`.
====
+<.> `namedEscaped()`
++
+Whether to HTML escape the name of this parameter.
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#renderedAsDayBefore[`renderedAsDayBefore()`]
++
+For date parameters only, render the date as one day prior to the actually stored date (eg the end date of an open interval into a closed interval)
-|`namedEscaped()`
-|`true`, `false` (`true`)
-|whether to HTML escape the name of this parameter.
-
-
-|xref:refguide:applib-ant:ParameterLayout.adoc#renderedAsDayBefore[`renderedAsDayBefore()`]
-|
-|for date parameters only, render the date as one day prior to the actually stored date (eg the end date of an open interval into a closed interval)
-
-
-|xref:refguide:applib-ant:ParameterLayout.adoc#typicalLength[`typicalLength()`]
-|
-|the typical entry length of a field, use to determine the optimum width for display
-
-|===
-
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#typicalLength[`typicalLength()`]
++
+The typical entry length of a field, use to determine the optimum width for display
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/cssClass.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/cssClass.adoc
index 949ae7a..2bd9f6b 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/cssClass.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/cssClass.adoc
@@ -32,7 +32,6 @@ public class ToDoItem {
This attribute can also be applied to:
* xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClass[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#cssClass[view models]
* xref:refguide:applib-ant:ActionLayout.adoc#cssClass[actions]
* xref:refguide:applib-ant:PropertyLayout.adoc#cssClass[properties],
* xref:refguide:applib-ant:CollectionLayout.adoc#cssClass[collections]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/describedAs.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/describedAs.adoc
index def27b4..5eac374 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/describedAs.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/describedAs.adoc
@@ -4,7 +4,7 @@
:page-partial:
-The `describedAs` attribute is used to provide a short description of the action parameter to the user. In the xref:vw:ROOT:about.adoc[Wicket viewer] it is displayed as a 'tool tip'. The `describedAs` attribute can also be specified for xref:refguide:applib-ant:CollectionLayout.adoc#describedAs[collections], xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[properties], xref:refguide:applib-ant:ActionLayout.adoc#describedAs[actions], xref:refguide:applib-ant:DomainObjectLayout. [...]
+The `describedAs` attribute is used to provide a short description of the action parameter to the user. In the xref:vw:ROOT:about.adoc[Wicket viewer] it is displayed as a 'tool tip'. The `describedAs` attribute can also be specified for xref:refguide:applib-ant:CollectionLayout.adoc#describedAs[collections], xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[properties], xref:refguide:applib-ant:ActionLayout.adoc#describedAs[actions] and xref:refguide:applib-ant:DomainObjectLayo [...]
Descriptions may be provided for objects, members (properties, collections and actions), and for individual parameters within an action method.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/named.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/named.adoc
index 1b89a1f..28d6618 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/named.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout/named.adoc
@@ -54,6 +54,5 @@ This attribute can also be specified for:
* xref:refguide:applib-ant:CollectionLayout.adoc#named[collections]
* xref:refguide:applib-ant:PropertyLayout.adoc#named[properties]
* xref:refguide:applib-ant:DomainObjectLayout.adoc#named[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#named[view models]
* xref:refguide:applib-ant:DomainServiceLayout.adoc#named[domain services].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
index f3410bf..f548a1a 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
@@ -11,126 +11,86 @@ It is also possible to apply the annotation to actions of domain services that a
----
include::refguide:applib-ant:example$annotation/Property.java[tags="refguide"]
----
-
-
-.`@Property` attributes
-[cols="2,2,4a", options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:Property.adoc#command[`command()`]
-|`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
-(`AS_CONFIGURED`)
-|whether the property edit should be reified into a `o.a.i.applib.` +
+<.> xref:refguide:applib-ant:Property.adoc#command[`command()`]
++
+Whether the property edit should be reified into a `o.a.i.applib.` +
`services.command.Command` object through the xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] service.
+<.> `commandPersistence()`
++
+Whether the reified `Command` (as provided by the `CommandContext` domain service) should actually be persisted (assuming an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured).
-|`commandExecuteIn()`
-|`FOREGROUND`,`BACKGROUND` +
-(`FOREGROUND`)
-|whether to execute the command immediately, or to persist it (assuming that an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured) such that a background scheduler can execute the command asynchronously
-
-
-|`commandPersistence()`
-|`PERSISTED`, `NOT_PERSISTED`, `IF_HINTED` +
-(`PERSISTED`)
-|whether the reified `Command` (as provided by the `CommandContext` domain service) should actually be persisted (assuming an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured).
-
-
-
-|`commandDtoProcessor()`
-|Implementation of `CommandDtoProcessor` interface +
-(null)
-|If the `Command` also implements `CommandWithDto` (meaning that it can return a `CommandDto`, in other words be converted into an XML memento), then optionally specifies a processor that can refine this XML.
+<.> `commandExecuteIn()`
++
+Whether to execute the command immediately, or to persist it (assuming that an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured) such that a background scheduler can execute the command asynchronously
+<.> `commandDtoProcessor()`
++
+If the `Command` also implements `CommandWithDto` (meaning that it can return a `CommandDto`, in other words be converted into an XML memento), then optionally specifies the implementation of a `CommandDtoProcessor` that can refine this XML.
+<.> xref:refguide:applib-ant:Property.adoc#domainEvent[`domainEvent()`]
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the property's business rule checking (hide, disable, validate) and its modification (before and after).
-|xref:refguide:applib-ant:Property.adoc#domainEvent[`domainEvent()`]
-|subtype of `PropertyDomainEvent` +
-(`PropertyDomainEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the property's business rule checking (hide, disable, validate) and its modification (before and after).
+<.> xref:refguide:applib-ant:Property.adoc#editing[`editing()`]
++
+Whether a property can be modified or cleared from within the UI
+<.> `editingDisabledReason()`
++
+The reason that this property cannot be modified.
-|xref:refguide:applib-ant:Property.adoc#editing[`editing()`]
-|`ENABLED`, `DISABLED`, `AS_CONFIGURED` +
-(`AS_CONFIGURED`)
-|whether a property can be modified or cleared from within the UI
-
-
-|xref:refguide:applib-ant:Property.adoc#fileAccept[`fileAccept()`]
-|Media type or file extension
-|Hints the files to be uploaded to a xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]
+<.> xref:refguide:applib-ant:Property.adoc#fileAccept[`fileAccept()`]
++
+Hints the file type (media type or file extension) to be uploaded to a xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]
or xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]. +
- +
++
Note that this does not prevent the user from uploading some other file type; rather it merely defaults the file type in the file open dialog.
-
-|xref:refguide:applib-ant:Property.adoc#hidden[`hidden()`]
-|`EVERYWHERE`, `OBJECT_FORMS`, `PARENTED_TABLES`, `STANDALONE_TABLES`, `ALL_TABLES`, `NOWHERE` +
-(`NOWHERE`)
-|indicates where (in the UI) the property should be hidden from the user.
-
-
-|xref:refguide:applib-ant:Property.adoc#maxLength[`maxLength()`]
-|
-|maximum number of characters for string parameters; ignored otherwise +
-
-In many/most cases you should however use xref:refguide:applib-ant:Column.adoc[`@Column#length()`]
-
-
-|xref:refguide:applib-ant:Property.adoc#mustSatisfy[`mustSatisfy()`]
-|implementation of `o.a.i.applib.spec.Specification`
-|allows arbitrary validation to be applied
-
-
-|xref:refguide:applib-ant:Property.adoc#mementoSerialization[`mementoSerialization()`]
-|`true`, `false` +
-(`false`)
-|whether to exclude from snapshots. +
-
-[WARNING]
-====
-Property must also be annotated with `@javax.jdo.annotations.NotPersistent` in order to not be persisted.
-====
-
-
-|xref:refguide:applib-ant:Property.adoc#optionality[`optionality()`]
-|
-|specifies a property is optional rather than mandatory +
-
-In many/most cases you should however use xref:refguide:applib-ant:Column.adoc[`@Column#allowsNull()`]
-
-
-
-|xref:refguide:applib-ant:Property.adoc#projecting[`projecting()`]
-|
-|indicates that owning object is a view model that is acting as a projection of the underlying entity referenced by this property.
-
-
-
-|xref:refguide:applib-ant:Property.adoc#publishing[`publishing()`]
-|
-|determines whether the editing of a property should be published.
-
-
-
-
-|xref:refguide:applib-ant:Property.adoc#regexPattern[`regexPattern()`]
-|regular expression
-|validates the contents of a string parameter against the regular expression pattern
-
-
-|`regexPatternFlags()`
-|value of flags as normally passed to `java.util.regex.` +
-`Pattern#compile(...)`
-|modifies the compilation of the regular expression
-
-
-|===
+<.> xref:refguide:applib-ant:Property.adoc#hidden[`hidden()`]
++
+Indicates where (in the UI) the property should be hidden from the user.
+
+<.> xref:refguide:applib-ant:Property.adoc#maxLength[`maxLength()`]
++
+Maximum number of characters for string parameters; ignored otherwise +
++
+TIP: In many/most cases you should however use xref:refguide:applib-ant:Column.adoc[`@Column#length()`]
+
+<.> xref:refguide:applib-ant:Property.adoc#mementoSerialization[`mementoSerialization()`]
++
+Whether to exclude from snapshots. +
+
+<.> xref:refguide:applib-ant:Property.adoc#mustSatisfy[`mustSatisfy()`]
++
+Implementation of `o.a.i.applib.spec.Specification` that allows arbitrary validation to be applied.
+
+<.> xref:refguide:applib-ant:Property.adoc#optionality[`optionality()`]
++
+Specifies a property is optional rather than mandatory
++
+TIP: In many/most cases you should however use xref:refguide:applib-ant:Column.adoc[`@Column#allowsNull()`]
+
+<.> xref:refguide:applib-ant:Property.adoc#projecting[`projecting()`]
++
+Indicates that owning object is a view model that is acting as a projection of the underlying entity referenced by this property.
+
+<.> xref:refguide:applib-ant:Property.adoc#publishing[`publishing()`]
++
+Determines whether the editing of a property should be published.
+
+<.> xref:refguide:applib-ant:Property.adoc#regexPattern[`regexPattern()`]
++
+Validates the contents of a string parameter against the regular expression pattern
+
+<.> `regexPatternFlags()`
++
+Value of flags as normally passed to `java.util.regex.` +
+`Pattern#compile(...)`, modifying the compilation of the regular expression
+
+<.> `regexPatternReplacement()`
++
+Unused.
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
index 618e65d..a57d331 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
@@ -9,95 +9,64 @@ The `@PropertyLayout` annotation applies to properties collecting together all U
----
include::refguide:applib-ant:example$annotation/PropertyLayout.java[tags="refguide"]
----
-
-
-The table below summarizes the annotation's attributes.
-
-.`@PropertyLayout` attributes
-[cols="2,2,4a", options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#cssClass[`cssClass()`]
-|Any string valid as a CSS class
-|the css class that a property should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[`describedAs()`]
-|String
-|description of this property, eg to be rendered in a tooltip.
-
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#hidden[`hidden()`]
-|`EVERYWHERE`, `OBJECT_FORMS`, `PARENTED_TABLES`, `STANDALONE_TABLES`, `ALL_TABLES`, `NOWHERE` +
-(`NOWHERE`)
-|indicates where (in the UI) the property should be hidden from the user.
-
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#labelPosition[`labelPosition()`]
-|`LEFT`, `TOP`, `RIGHT`, `NONE` +
-(`LEFT`)
-|in forms, the positioning of the label relative to the property value. +
-
-Defaults is `LEFT`, unless xref:refguide:applib-ant:PropertyLayout.adoc#multiLine[`multiLine`] in which case `TOP`. The value `RIGHT` is only supported for boolean properties. +
-
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#cssClass[`cssClass()`]
++
+The css class that a property should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
+
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[`describedAs()`]
++
+Description of this property, eg to be rendered in a tooltip.
+
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#hidden[`hidden()`]
++
+Indicates where (in the UI) the property should be hidden from the user.
+
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#labelPosition[`labelPosition()`]
++
+In forms, the positioning of the label relative to the property value. +
++
+Defaults is `LEFT`, unless xref:refguide:applib-ant:PropertyLayout.adoc#multiLine[`multiLine`] in which case `TOP`.
+The value `RIGHT` is only supported for boolean properties.
++
It is also possible to change the default through a xref:refguide:config:configuring-core.adoc#isis-viewers-propertyLayout-labelPosition[configuration property]
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#multiLine[`multiLine()`]
-|Positive integer
-|for string properties, render as a text area over multiple lines. +
-
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#multiLine[`multiLine()`]
++
+For string properties, render as a text area over multiple lines. +
++
If set > 1, then xref:refguide:applib-ant:PropertyLayout.adoc#labelPosition[`labelPosition`] defaults to TOP.
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#named[`named()`]
-|String
-|to override the name inferred from the collection's name in code. +
-
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#named[`named()`]
++
+To override the name inferred from the collection's name in code. +
++
A typical use case is if the desired name is a reserved Java keyword, such as `default` or `package`.
+<.> `namedEscaped()`
++
+Whether to HTML escape the name of this property.
-|`namedEscaped()`
-|`true`, `false` +
-(`true`)
-|whether to HTML escape the name of this property.
-
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#navigable[`navigable()`]
-|`PARENT`, `IGNORE`, `NOT_CONFIGURED` +
-(`NOT_CONFIGURED`)
-|whether a property should be used as the navigable parent (parent breadcrumb) of this object
-
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#promptStyle[`promptStyle()`]
-|`DIALOG`, `INLINE`, `AS_CONFIGURED` +
-(`AS_CONFIGURED`)
-|how a property prompt should be displayed within the UI
-
-
-|xref:refguide:applib-ant:PropertyLayout.adoc#renderedAsDayBefore[`renderedAsDayBefore()`]
-|`true`, `false` +
-(`false`)
-|for date properties only, render the date as one day prior to the actually stored date.
-
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#navigable[`navigable()`]
++
+Whether a property should be used as the navigable parent (parent breadcrumb) of this object
-|xref:refguide:applib-ant:PropertyLayout.adoc#typicalLength[`typicalLength()`]
-|Positive integer.
-|the typical entry length of a field, use to determine the optimum width for display
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#promptStyle[`promptStyle()`]
++
+How a property prompt should be displayed within the UI
-|xref:refguide:applib-ant:PropertyLayout.adoc#unchanging[`unchanging()`]
-|`false`, `true` +
-(`false`)
-|indicates that the value held by the property never changes over time (even if other properties of the object do change).
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#renderedAsDayBefore[`renderedAsDayBefore()`]
++
+For date properties only, render the date as one day prior to the actually stored date.
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#repainting[`repainting()`]
++
+Indicates that the value held by the property never changes over time (even if other properties of the object do change).
++
Used as a hint to the viewer not to redraw the property if possible after an AJAX update.
-|===
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#typicalLength[`typicalLength()`]
++
+The typical entry length of a field, use to determine the optimum width for display
@@ -155,4 +124,4 @@ include::PropertyLayout/navigable.adoc[leveloffset=+1]
include::PropertyLayout/promptStyle.adoc[leveloffset=+1]
include::PropertyLayout/renderedAsDayBefore.adoc[leveloffset=+1]
include::PropertyLayout/typicalLength.adoc[leveloffset=+1]
-include::PropertyLayout/unchanging.adoc[leveloffset=+1]
+include::PropertyLayout/repainting.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/cssClass.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/cssClass.adoc
index 8d8e61c..6e40b4e 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/cssClass.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/cssClass.adoc
@@ -30,7 +30,6 @@ As an alternative to using the annotation, the dynamic xref:vw:ROOT:layout.adoc#
This attribute can also be applied to:
* xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClass[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#cssClass[view models]
* xref:refguide:applib-ant:ActionLayout.adoc#cssClass[actions]
* xref:refguide:applib-ant:CollectionLayout.adoc#cssClass[collections]
* xref:refguide:applib-ant:ParameterLayout.adoc#cssClass[parameters].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/describedAs.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/describedAs.adoc
index 0be6703..2b10016 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/describedAs.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/describedAs.adoc
@@ -5,7 +5,7 @@
-The `describedAs` attribute is used to provide a short description of the property to the user. In the xref:vw:ROOT:about.adoc[Wicket viewer] it is displayed as a 'tool tip'. The attribute can also be specified for xref:refguide:applib-ant:CollectionLayout.adoc#describedAs[collections], xref:refguide:applib-ant:ActionLayout.adoc#describedAs[actions], xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[parameters], xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[domai [...]
+The `describedAs` attribute is used to provide a short description of the property to the user. In the xref:vw:ROOT:about.adoc[Wicket viewer] it is displayed as a 'tool tip'. The attribute can also be specified for xref:refguide:applib-ant:CollectionLayout.adoc#describedAs[collections], xref:refguide:applib-ant:ActionLayout.adoc#describedAs[actions], xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[parameters] and xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[do [...]
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/named.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/named.adoc
index f62903d..ae89139 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/named.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/named.adoc
@@ -48,6 +48,5 @@ This attribute can also be specified for:
* xref:refguide:applib-ant:CollectionLayout.adoc#named[collections]
* xref:refguide:applib-ant:ParameterLayout.adoc#named[parameters]
* xref:refguide:applib-ant:DomainObjectLayout.adoc#named[domain objects]
-* xref:refguide:applib-ant:ViewModelLayout.adoc#named[view models]
* xref:refguide:applib-ant:DomainServiceLayout.adoc#named[domain services].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/unchanging.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/repainting.adoc
similarity index 93%
rename from api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/unchanging.adoc
rename to api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/repainting.adoc
index 5562d2d..c1d2928 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/unchanging.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout/repainting.adoc
@@ -1,10 +1,10 @@
-= `unchanging`
+= `repainting()`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-partial:
-The `unchanging` attribute is used to indicate that the value held by the property never changes over time, even when other properties of the object do change.
+The `repainting` attribute is used to indicate that the value held by the property never changes over time, even when other properties of the object do change.
Setting this attribute to `true` is used as a hint to the viewer to not redraw the property after an AJAX update of some other property/ies of the object have changed.
This is primarily for performance, eg can improve the user experience when rendering PDFs/blobs.
@@ -24,7 +24,7 @@ For example:
----
public class Document {
@PropertyLayout(
- unchanging=true
+ repainting=Repainting.NO_REPAINT
)
public Blob getBlob(){ /* ... */ }
public void setBlob(Blob blob) { /* ... */ }
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc
deleted file mode 100644
index a976088..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc
+++ /dev/null
@@ -1,113 +0,0 @@
-= `@ViewModelLayout`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-
-
-The `@ViewModelLayout` annotation is identical to the xref:refguide:applib-ant:DomainObjectLayout.adoc[`@DomainObjectLayout`], but is provided for symmetry with domain objects that have been annotated using xref:refguide:applib-ant:ViewModel.adoc[`@ViewModel`] (rather than xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject(nature=VIEW_MODEL)`]).
-
-[source,java]
-----
-include::refguide:applib-ant:example$annotation/ViewModelLayout.java[tags="refguide"]
-----
-
-The table below summarizes the annotation's attributes.
-
-.`@ViewModel` attributes
-[cols="2,2,4a",options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#cssclass[`cssClass()`]
-|Any string valid as a CSS class
-|the css class that a domain class (type) should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#cssClassFa[`cssClassFa()`]
-|Any valid link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon name
-|specify a font awesome icon for the action's menu link or icon. +
-
-
-|`cssClassFaPosition()`
-|`LEFT`, `RIGHT` +
-(`LEFT`)
-|Currently unused.
-
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#cssClassUiEvent[`cssClassUiEvent()`]
-|subtype of `CssClassUiEvent` +
-(`CssClassUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain a CSS class for the domain object.
-
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#describedAs[`describedAs()`]
-|String.
-|description of this class, eg to be rendered in a tooltip.
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#iconUiEvent[`iconUiEvent()`]
-|subtype of `IconUiEvent` +
-(`IconUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain the icon (name) for the domain object.
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#layoutUiEvent[`layoutUiEvent()`]
-|subtype of `LayoutUiEvent` +
-(`LayoutUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain the layout (name) for the domain object.
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#named[`named()`]
-|String.
-|to override the name inferred from the action's name in code. +
-
-A typical use case is if the desired name is a reserved Java keyword, such as `default` or `package`.
-
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#paged[`paged()`]
-|Positive integer
-|the page size for instances of this class when rendered within a table (as returned from an action invocation)
-
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#plural[`plural()`]
-|String.
-|the plural name of the class
-
-
-|xref:refguide:applib-ant:ViewModelLayout.adoc#titleUiEvent[`titleUiEvent()`]
-|subtype of `TitleUiEvent` +
-(`TitleUiEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain the title for the domain object.
-
-|===
-
-For example:
-
-[source,java]
-----
-@ViewModel // <1>
-@ViewModelLayout(
- cssClass="x-analysis",
- cssClassFa="fa-piechart",
- describedAs="Analysis of todo items by category"
-)
-public class CategoryPieChart { /* ... */ }
-----
-<1> this annotation is intended for use with `@ViewModel`.
-If a view model has been specified using the equivalent xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject(nature=Nature.VIEW_MODEL)`], then we recommend you use xref:refguide:applib-ant:DomainObjectLayout.adoc[`@DomainObjectLayout`] instead.
-
-[NOTE]
-====
-Note that there is (currently) no support for specifying UI hints for view models through the dynamic xref:vw:ROOT:layout.adoc#file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
-====
-
-include::ViewModelLayout/cssClass.adoc[leveloffset=+1]
-include::ViewModelLayout/cssClassFa.adoc[leveloffset=+1]
-include::ViewModelLayout/cssClassUiEvent.adoc[leveloffset=+1]
-include::ViewModelLayout/describedAs.adoc[leveloffset=+1]
-include::ViewModelLayout/iconUiEvent.adoc[leveloffset=+1]
-include::ViewModelLayout/layoutUiEvent.adoc[leveloffset=+1]
-include::ViewModelLayout/named.adoc[leveloffset=+1]
-include::ViewModelLayout/paged.adoc[leveloffset=+1]
-include::ViewModelLayout/plural.adoc[leveloffset=+1]
-include::ViewModelLayout/titleUiEvent.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/bookmarking.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/bookmarking.adoc
deleted file mode 100644
index 7c1f0d8..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/bookmarking.adoc
+++ /dev/null
@@ -1,11 +0,0 @@
-= `bookmarking`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-The `bookmarking` attribute indicates that a view model is automatically bookmarked.
-
-This is equivalent to xref:refguide:applib-ant:DomainObjectLayout.adoc#bookmarking[`@DomainObjectLayout#bookmarking()`], but for view models instead of entities.
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClass.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClass.adoc
deleted file mode 100644
index f4d5a49..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClass.adoc
+++ /dev/null
@@ -1,10 +0,0 @@
-= `cssClass`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-The `cssClass` attribute can be used to render additional CSS classes in the HTML (a wrapping `<div>`) that represents the view model. xref:refguide:config:application-specific/application-css.adoc[Application-specific CSS] can then be used to target and adjust the UI representation of that particular element.
-
-This is equivalent to xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClass[`@DomainObjectLayout#cssClass`], but for view models instead of entities.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassFa.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassFa.adoc
deleted file mode 100644
index 98e6a68..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassFa.adoc
+++ /dev/null
@@ -1,12 +0,0 @@
-= `cssClassFa`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-
-The `cssClassFa` attribute is used to specify the name of a link:http://fortawesome.github.io/Font-Awesome/icons/[Font Awesome icon] name, to be rendered as the domain object's icon.
-
-This is equivalent to xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassFa[`@DomainObjectLayout#cssClassFa()`], but for view models instead of entities.
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassUiEvent.adoc
deleted file mode 100644
index 77845d6..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/cssClassUiEvent.adoc
+++ /dev/null
@@ -1,11 +0,0 @@
-= `cssClassUiEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Whenever a view model is to be rendered, the framework fires off an CSS class UI event to obtain a CSS class to use in any wrapping ``<div>``s and ``<span>``s that render the domain object.
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClass[`@DomainObjectLayout#cssClass()`], but for view models instead of entities.
-
-A default event that is emitted if none specified, unless the `isis.reflector.facet.viewModelLayoutAnnotation.cssClassUiEvent.postForDefault` configuration property is set to "false".
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/describedAs.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/describedAs.adoc
deleted file mode 100644
index 9aa0479..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/describedAs.adoc
+++ /dev/null
@@ -1,10 +0,0 @@
-= `describedAs`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-The `describedAs` attribute is used to provide a short description of the view model to the user; in the xref:vw:ROOT:about.adoc[Wicket viewer] it is displayed as a 'tool tip'.
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[`@DomainObjectLayout#describedAs`], but for view models instead of entities.
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/iconUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/iconUiEvent.adoc
deleted file mode 100644
index 16ab00f..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/iconUiEvent.adoc
+++ /dev/null
@@ -1,14 +0,0 @@
-= `iconUiEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Whenever a view model is to be rendered, the framework fires off an icon UI event to obtain an icon (name) for the object (if possible).
-This is as an alternative to implementing xref:refguide:applib-cm:methods.adoc#iconName[`iconName()`] reserved method.
-(If `iconName()` is present, then it will take precedence).
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#iconUiEvent[`@DomainObjectLayout#iconUiEvent()`], but for view models instead of entities.
-
-A default event that is emitted if none specified, unless the `isis.reflector.facet.viewModelLayoutAnnotation.iconUiEvent.postForDefault` configuration property is set to "false".
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/layoutUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/layoutUiEvent.adoc
deleted file mode 100644
index a57e892..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/layoutUiEvent.adoc
+++ /dev/null
@@ -1,11 +0,0 @@
-= `layoutUiEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Whenever a view model is to be rendered, the framework fires off an layout UI event to obtain an alternative layout name with which to render the domain object.
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#layoutUiEvent[`@DomainObjectLayout#layoutUiEvent`], but for view models instead of entities.
-
-A default event that is emitted if none specified, unless the `isis.reflector.facet.viewModelLayoutAnnotation.layoutUiEvent.postForDefault` configuration property is set to "false".
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/named.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/named.adoc
deleted file mode 100644
index 5e46bdb..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/named.adoc
+++ /dev/null
@@ -1,10 +0,0 @@
-= `named`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-The `named` attribute explicitly specifies the view model's name, overriding the name that would normally be inferred from the Java source code.
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#named[`@DomainObjectLayout#named`], but for view models instead of entities.
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/paged.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/paged.adoc
deleted file mode 100644
index ecbc2e6..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/paged.adoc
+++ /dev/null
@@ -1,9 +0,0 @@
-= `paged`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-The `paged` attribute specifies the number of rows to display in a standalone collection, as returned from an action invocation.
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#paged[`@DomainObjectLayout#paged`], but for view models instead of entities.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/plural.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/plural.adoc
deleted file mode 100644
index 8f74333..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/plural.adoc
+++ /dev/null
@@ -1,14 +0,0 @@
-= `plural`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-
-When Apache Isis displays a standalone collection of several objects, it will label the collection using the plural form of the object type.
-By default the plural name will be derived from the end of the singular name, with support for some basic English language defaults (eg using "ies" for names ending with a "y").
-The `plural` attribute allows the plural form of the class name to be specified explicitly.
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#plural[`@DomainObjectLayout#plural`], but for view models instead of entities.
-
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/titleUiEvent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/titleUiEvent.adoc
deleted file mode 100644
index 823c98c..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout/titleUiEvent.adoc
+++ /dev/null
@@ -1,11 +0,0 @@
-= `titleUiEvent`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-Whenever a view model is to be rendered, the framework fires off a title UI event to obtain a title for the object.
-
-This attribute is the same as xref:refguide:applib-ant:DomainObjectLayout.adoc#titleUiEvent[`@DomainObjectLayout#titleUiEvent`], but for view models instead of entities.
-
-A default event that is emitted if none specified, unless the `isis.reflector.facet.viewModelLayoutAnnotation.titleUiEvent.postForDefault` configuration property is set to "false".
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/about/main.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/about/main.adoc
index 58ec795..bac418c 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/about/main.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/about/main.adoc
@@ -90,11 +90,6 @@ The table below summarizes these most commonly used annotations in Apache Isis.
|Domain, Persistence
|
-|xref:refguide:applib-ant:ViewModelLayout.adoc[`@ViewModelLayout`]
-|User interface hints for view models.
-For use with `@ViewModel`. If specifying view models using `@DomainObject(nature=VIEW_MODEL)` then use `@DomainObjectLayout`)
-|UI
-|Yes
|===
diff --git a/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc b/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc
index dc471f6..7733b27 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc
@@ -35,7 +35,6 @@
** xref:refguide:applib-ant:IsisSessionScope.adoc[RequestScoped]
** xref:refguide:applib-ant:Title.adoc[Title]
** xref:refguide:applib-ant:ViewModel.adoc[ViewModel]
-** xref:refguide:applib-ant:ViewModelLayout.adoc[ViewModelLayout]
** xref:refguide:applib-ant:XmlJavaTypeAdapter.adoc[XmlJavaTypeAdapter]
** xref:refguide:applib-ant:XmlRootElement.adoc[XmlRootElement]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
index 4549519..b054030 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
@@ -50,62 +50,52 @@ public @interface Action {
// end::refguide[]
/**
- * Indicates that an invocation of the action should be posted to the
- * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
- * {@link org.apache.isis.applib.events.domain.ActionDomainEvent}.
+ * Associates this action with a property or collection, specifying its id.
*
- * <p>For example:
+ * <p>
+ * This is an alternative to using {@link MemberOrder#name()}. To specify the order (equivalent to
+ * {@link MemberOrder#sequence()}}), use {@link #associateWithSequence()}.
* </p>
*
- * <pre>
- * public class SomeObject{
- * public static class ChangeStartDateDomainEvent extends ActionDomainEvent<SomeObject> { ... }
- *
- * @Action(domainEvent=ChangedStartDateDomainEvent.class)
- * public void changeStartDate(final Date startDate) { ...}
- * ...
- * }
- * </pre>
+ * <p>
+ * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
+ * </p>
*
* <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * If an action is associated with a collection, then any matching parameters will have
+ * their choices automatically inferred from the collection (if not otherwise specified)
+ * and any collection parameter defaults can be specified using checkboxes
+ * (in the Wicket UI, at least).
* </p>
*/
// tag::refguide[]
- Class<? extends ActionDomainEvent<?>> domainEvent() default ActionDomainEvent.Default.class;
+ String associateWith() // <.>
+ default "";
// end::refguide[]
/**
- * Indicates where (in the UI) the action is not visible to the user.
+ * Specifies the sequence/order in the UI for an action that's been associated with a property or collection.
*
* <p>
- * It is also possible to suppress an action's visibility using {@link ActionLayout#hidden()}.
+ * This is an alternative to using {@link MemberOrder#sequence()}, but is ignored if
+ * {@link Action#associateWith()} isn't also specified.
* </p>
*
* <p>
- * For {@link DomainService domain service} actions, the action's visibility is dependent upon its
- * {@link DomainService#nature() nature} and for contributed actions on how it is
- * {@link ActionLayout#contributed()}.
+ * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
* </p>
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * The action semantics, either {@link SemanticsOf#SAFE_AND_REQUEST_CACHEABLE cached}, {@link SemanticsOf#SAFE safe} (query-only),
- * {@link SemanticsOf#IDEMPOTENT idempotent} or
- * {@link SemanticsOf#NON_IDEMPOTENT non-idempotent}.
- */
- // tag::refguide[]
- SemanticsOf semantics() default SemanticsOf.NOT_SPECIFIED;
+ String associateWithSequence() // <.>
+ default "1";
// end::refguide[]
/**
* Whether the action invocation should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
*/
// tag::refguide[]
- CommandReification command() default CommandReification.NOT_SPECIFIED;
+ CommandReification command() // <.>
+ default CommandReification.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -113,7 +103,8 @@ public @interface Action {
* {@link org.apache.isis.applib.services.command.CommandContext CommandContext} domain service should be persisted.
*/
// tag::refguide[]
- CommandPersistence commandPersistence() default CommandPersistence.PERSISTED;
+ CommandPersistence commandPersistence() // <.>
+ default CommandPersistence.PERSISTED;
// end::refguide[]
/**
@@ -126,7 +117,8 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- CommandExecuteIn commandExecuteIn() default CommandExecuteIn.FOREGROUND;
+ CommandExecuteIn commandExecuteIn() // <.>
+ default CommandExecuteIn.FOREGROUND;
// end::refguide[]
/**
@@ -144,90 +136,111 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- Class<? extends CommandDtoProcessor> commandDtoProcessor() default CommandDtoProcessor.class;
+ Class<? extends CommandDtoProcessor> commandDtoProcessor() // <.>
+ default CommandDtoProcessor.class;
// end::refguide[]
/**
- * Whether the action invocation should be published.
+ * Indicates that an invocation of the action should be posted to the
+ * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
+ * {@link org.apache.isis.applib.events.domain.ActionDomainEvent}.
+ *
+ * <p>For example:
+ * </p>
+ *
+ * <pre>
+ * public class SomeObject{
+ * public static class ChangeStartDateDomainEvent extends ActionDomainEvent<SomeObject> { ... }
+ *
+ * @Action(domainEvent=ChangedStartDateDomainEvent.class)
+ * public void changeStartDate(final Date startDate) { ...}
+ * ...
+ * }
+ * </pre>
*
* <p>
- * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
- * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
// tag::refguide[]
- Publishing publishing() default Publishing.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * The type-of the elements returned by the action.
- * @return
- */
- // tag::refguide[]
- Class<?> typeOf() default Object.class;
+ Class<? extends ActionDomainEvent<?>> domainEvent() // <.>
+ default ActionDomainEvent.Default.class;
// end::refguide[]
/**
- * Whether the action is restricted to prototyping.
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
*
* <p>
- * By default there are no restrictions, with the action being available in all environments.
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
* </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
// tag::refguide[]
- RestrictTo restrictTo() default RestrictTo.NOT_SPECIFIED;
+ String fileAccept() // <.>
+ default "";
// end::refguide[]
/**
- * Associates this action with a property or collection, specifying its id.
- *
- * <p>
- * This is an alternative to using {@link MemberOrder#name()}. To specify the order (equivalent to
- * {@link MemberOrder#sequence()}}), use {@link #associateWithSequence()}.
- * </p>
+ * Indicates where (in the UI) the action is not visible to the user.
*
* <p>
- * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
+ * It is also possible to suppress an action's visibility using {@link ActionLayout#hidden()}.
* </p>
*
* <p>
- * If an action is associated with a collection, then any matching parameters will have
- * their choices automatically inferred from the collection (if not otherwise specified)
- * and any collection parameter defaults can be specified using checkboxes
- * (in the Wicket UI, at least).
+ * For {@link DomainService domain service} actions, the action's visibility is dependent upon its
+ * {@link DomainService#nature() nature} and for contributed actions on how it is
+ * {@link ActionLayout#contributed()}.
* </p>
*/
// tag::refguide[]
- String associateWith() default "";
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
- * Specifies the sequence/order in the UI for an action that's been associated with a property or collection.
- *
- * <p>
- * This is an alternative to using {@link MemberOrder#sequence()}, but is ignored if
- * {@link Action#associateWith()} isn't also specified.
- * </p>
+ * Whether the action invocation should be published.
*
* <p>
- * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
+ * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
+ * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
* </p>
*/
// tag::refguide[]
- String associateWithSequence() default "1";
+ Publishing publishing() // <.>
+ default Publishing.NOT_SPECIFIED;
// end::refguide[]
/**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
+ * Whether the action is restricted to prototyping.
*
* <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
+ * By default there are no restrictions, with the action being available in all environments.
* </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
// tag::refguide[]
- String fileAccept() default "";
+ RestrictTo restrictTo() // <.>
+ default RestrictTo.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * The action semantics, either {@link SemanticsOf#SAFE_AND_REQUEST_CACHEABLE cached}, {@link SemanticsOf#SAFE safe} (query-only),
+ * {@link SemanticsOf#IDEMPOTENT idempotent} or
+ * {@link SemanticsOf#NON_IDEMPOTENT non-idempotent}.
+ */
+ // tag::refguide[]
+ SemanticsOf semantics() // <.>
+ default SemanticsOf.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * The type-of the elements returned by the action.
+ * @return
+ */
+ // tag::refguide[]
+ Class<?> typeOf() // <.>
+ default Object.class;
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
index 8a6f370..53cd053 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
@@ -54,10 +54,27 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- BookmarkPolicy bookmarking() default BookmarkPolicy.NOT_SPECIFIED;
+ BookmarkPolicy bookmarking() // <.>
+ default BookmarkPolicy.NOT_SPECIFIED;
// end::refguide[]
/**
+ * For actions of domain services that can be viewed and contributed (that is, whose
+ * {@link DomainService#nature() nature} is either {@link org.apache.isis.applib.annotation.NatureOfService#VIEW}
+ * or {@link org.apache.isis.applib.annotation.NatureOfService#VIEW_CONTRIBUTIONS_ONLY}), specifies how the
+ * contribution should be implemented, as an action, as an association, or as both.
+ *
+ * <p>
+ * Has no meaning for actions of domain entities.
+ * </p>
+ */
+ @Deprecated
+ Contributed contributed() // <.>
+ default Contributed.NOT_SPECIFIED;
+
+ // tag::refguide[]
+ // end::refguide[]
+ /**
* Indicates the css class that an action should have.
*
* <p>
@@ -65,7 +82,8 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
@@ -73,7 +91,8 @@ public @interface ActionLayout {
* action (button or menu item).
*/
// tag::refguide[]
- String cssClassFa() default "";
+ String cssClassFa() // <.>
+ default "";
// end::refguide[]
/**
@@ -81,28 +100,32 @@ public @interface ActionLayout {
* icon. The icon could be rendered on the left or the right of the action button
*/
// tag::refguide[]
- CssClassFaPosition cssClassFaPosition() default CssClassFaPosition.LEFT;
+ CssClassFaPosition cssClassFaPosition() // <.>
+ default CssClassFaPosition.LEFT;
// end::refguide[]
/**
* Description of this action, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
* Indicates where in the UI the action should <i>not</i>not be visible.
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
* Name of this action (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
@@ -114,11 +137,11 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- Position position() default Position.NOT_SPECIFIED;
+ Position position() // <.>
+ default Position.NOT_SPECIFIED;
- @XmlType(
- namespace = "http://isis.apache.org/applib/layout/component"
- )
+ // end::refguide[]
+ @XmlType(namespace = "http://isis.apache.org/applib/layout/component")
enum Position {
BELOW,
RIGHT,
@@ -127,12 +150,12 @@ public @interface ActionLayout {
NOT_SPECIFIED
}
- // end::refguide[]
/**
* How this parameters for this action are prompted, either {@link PromptStyle#DIALOG dialog} or {@link PromptStyle#INLINE inline}.
*/
// tag::refguide[]
- PromptStyle promptStyle() default PromptStyle.AS_CONFIGURED;
+ PromptStyle promptStyle() // <.>
+ default PromptStyle.AS_CONFIGURED;
// end::refguide[]
/**
@@ -140,21 +163,8 @@ public @interface ActionLayout {
* instead to redirect (forcing a re-rendering of a new page).
*/
// tag::refguide[]
- Redirect redirectPolicy() default Redirect.AS_CONFIGURED;
-
- // end::refguide[]
- /**
- * For actions of domain services that can be viewed and contributed (that is, whose
- * {@link DomainService#nature() nature} is either {@link org.apache.isis.applib.annotation.NatureOfService#VIEW}
- * or {@link org.apache.isis.applib.annotation.NatureOfService#VIEW_CONTRIBUTIONS_ONLY}), specifies how the
- * contribution should be implemented, as an action, as an association, or as both.
- *
- * <p>
- * Has no meaning for actions of domain entities.
- * </p>
- */
- // tag::refguide[]
- Contributed contributed() default Contributed.NOT_SPECIFIED;
+ Redirect redirectPolicy() // <.>
+ default Redirect.AS_CONFIGURED;
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
index 38a7d19..28fdd31 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Collection.java
@@ -64,14 +64,8 @@ public @interface Collection {
* </p>
*/
// tag::refguide[]
- Class<? extends CollectionDomainEvent<?,?>> domainEvent() default CollectionDomainEvent.Default.class;
-
- // end::refguide[]
- /**
- * Indicates when the collection is not visible to the user.
- */
- // tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Class<? extends CollectionDomainEvent<?,?>> domainEvent() // <.>
+ default CollectionDomainEvent.Default.class;
// end::refguide[]
/**
@@ -82,7 +76,8 @@ public @interface Collection {
* </p>
*/
// tag::refguide[]
- Editing editing() default Editing.NOT_SPECIFIED;
+ Editing editing() // <.>
+ default Editing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -90,7 +85,16 @@ public @interface Collection {
* then the reason to provide to the user as to why this property cannot be edited.
*/
// tag::refguide[]
- String editingDisabledReason() default "";
+ String editingDisabledReason() // <.>
+ default "";
+
+ // end::refguide[]
+ /**
+ * Indicates when the collection is not visible to the user.
+ */
+ // tag::refguide[]
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -102,7 +106,8 @@ public @interface Collection {
* </p>
*/
// tag::refguide[]
- MementoSerialization mementoSerialization() default MementoSerialization.NOT_SPECIFIED;
+ MementoSerialization mementoSerialization() // <.>
+ default MementoSerialization.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -111,7 +116,8 @@ public @interface Collection {
* @return
*/
// tag::refguide[]
- Class<?> typeOf() default Object.class;
+ Class<?> typeOf() // <.>
+ default Object.class;
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
index c061cbb..fe1512b 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
@@ -46,14 +46,8 @@ public @interface CollectionLayout {
* Indicates the css class that a collection should have.
*/
// tag::refguide[]
- String cssClass() default "";
-
- // end::refguide[]
- /**
- * Description of this collection, eg to be rendered in a tooltip.
- */
- // tag::refguide[]
- String describedAs() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
@@ -68,7 +62,16 @@ public @interface CollectionLayout {
* </p>
*/
// tag::refguide[]
- String defaultView() default "";
+ String defaultView() // <.>
+ default "";
+
+ // end::refguide[]
+ /**
+ * Description of this collection, eg to be rendered in a tooltip.
+ */
+ // tag::refguide[]
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
@@ -80,21 +83,24 @@ public @interface CollectionLayout {
* </p>
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
* Name of this collection (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
* A flag indicating whether the value of {@linkplain #named()} should be HTML escaped or not.
*/
// tag::refguide[]
- boolean namedEscaped() default true;
+ boolean namedEscaped() // <.>
+ default true;
// end::refguide[]
/**
@@ -110,7 +116,8 @@ public @interface CollectionLayout {
* collections (eg as returned from a repository query).
*/
// tag::refguide[]
- int paged() default -1;
+ int paged() // <.>
+ default -1;
// end::refguide[]
/**
@@ -133,7 +140,8 @@ public @interface CollectionLayout {
*/
@SuppressWarnings("rawtypes")
// tag::refguide[]
- Class sortedBy() default Comparator.class;
+ Class sortedBy() // <.>
+ default Comparator.class;
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java
index 32bef90..a2b8b68 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/CommandReification.java
@@ -23,7 +23,6 @@ package org.apache.isis.applib.annotation;
*/
// tag::refguide[]
public enum CommandReification {
-
// end::refguide[]
/**
* Whether the action should be handled as a command as per the default command configured in <tt>applicationp.properties</tt>.
@@ -34,21 +33,18 @@ public enum CommandReification {
*/
// tag::refguide[]
AS_CONFIGURED,
-
// end::refguide[]
/**
* Handle the action as a command, irrespective of any configuration settings.
*/
// tag::refguide[]
ENABLED,
-
// end::refguide[]
/**
* Do not handle the action as a command, irrespective of any configuration settings.
*/
// tag::refguide[]
DISABLED,
-
// end::refguide[]
/**
* Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta
@@ -56,6 +52,5 @@ public enum CommandReification {
*/
// tag::refguide[]
NOT_SPECIFIED
-
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
index 66ece7f..b38efb7 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
@@ -53,9 +53,15 @@ import org.apache.isis.applib.events.lifecycle.ObjectUpdatingEvent;
})
@Retention(RetentionPolicy.RUNTIME)
@Component @Scope("prototype")
+// tag::refguide-lifecycle-events[]
+// tag::refguide-domain-events[]
public @interface DomainObject {
// end::refguide[]
+ // ...
+
+ // end::refguide-lifecycle-events[]
+ // end::refguide-domain-events[]
/**
* Whether the entity should be audited (note: does not apply to view models or other recreatable objects.
*
@@ -65,19 +71,8 @@ public @interface DomainObject {
* </p>
*/
// tag::refguide[]
- Auditing auditing() default Auditing.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * Whether changes to the object should be published.
- *
- * <p>
- * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService} is
- * registered with the framework.
- * </p>
- */
- // tag::refguide[]
- Publishing publishing() default Publishing.NOT_SPECIFIED;
+ Auditing auditing() // <.>
+ default Auditing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -87,7 +82,8 @@ public @interface DomainObject {
* It is sufficient to specify an interface rather than a concrete type.
*/
// tag::refguide[]
- Class<?> autoCompleteRepository() default Object.class;
+ Class<?> autoCompleteRepository() // <.>
+ default Object.class;
// end::refguide[]
/**
@@ -98,7 +94,8 @@ public @interface DomainObject {
* The method is required to accept a single string parameter, and must return a list of the domain type.
*/
// tag::refguide[]
- String autoCompleteAction() default "autoComplete";
+ String autoCompleteAction() // <.>
+ default "autoComplete";
// end::refguide[]
/**
@@ -114,7 +111,8 @@ public @interface DomainObject {
*
*/
// tag::refguide[]
- Bounding bounding() default Bounding.NOT_SPECIFIED;
+ Bounding bounding() // <.>
+ default Bounding.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -125,7 +123,8 @@ public @interface DomainObject {
* </p>
*/
// tag::refguide[]
- Editing editing() default Editing.NOT_SPECIFIED;
+ Editing editing() // <.>
+ default Editing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -133,39 +132,57 @@ public @interface DomainObject {
* then the reason to provide to the user as to why the object's properties cannot be edited/collections modified.
*/
// tag::refguide[]
- String editingDisabledReason() default "Disabled";
+ String editingDisabledReason() // <.>
+ default "Disabled";
// end::refguide[]
/**
- * Provides a unique abbreviation for the object type, eg "customer.Customer" for Customer.
+ * Equivalent to {@link Mixin#method()}.
*
* <p>
- * This value, if specified, is used in the serialized form of the object's OID. An OID is
- * used by the framework to unique identify an object over time (same concept as a URN).
+ * Applicable only if {@link #nature()} is {@link Nature#MIXIN}.
* </p>
*/
// tag::refguide[]
- String objectType() default "";
+ String mixinMethod() // <.>
+ default Mixin.DEFAULT_METHOD_NAME;
// end::refguide[]
/**
* The nature of this domain object.
*/
// tag::refguide[]
- Nature nature() default Nature.NOT_SPECIFIED;
+ Nature nature() // <.>
+ default Nature.NOT_SPECIFIED;
// end::refguide[]
/**
- * Equivalent to {@link Mixin#method()}.
+ * Provides a unique abbreviation for the object type, eg "customer.Customer" for Customer.
*
* <p>
- * Applicable only if {@link #nature()} is {@link Nature#MIXIN}.
+ * This value, if specified, is used in the serialized form of the object's OID. An OID is
+ * used by the framework to unique identify an object over time (same concept as a URN).
+ * </p>
+ */
+ // tag::refguide[]
+ String objectType() // <.>
+ default "";
+
+ // end::refguide[]
+ /**
+ * Whether changes to the object should be published.
+ *
+ * <p>
+ * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService} is
+ * registered with the framework.
* </p>
*/
// tag::refguide[]
- String mixinMethod() default Mixin.DEFAULT_METHOD_NAME;
+ Publishing publishing() // <.>
+ default Publishing.NOT_SPECIFIED;
// end::refguide[]
+
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -175,10 +192,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectCreatedEvent<?>> createdLifecycleEvent() default ObjectCreatedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectCreatedEvent<?>>
+ createdLifecycleEvent() // <.>
+ default ObjectCreatedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -188,10 +207,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectPersistingEvent<?>> persistingLifecycleEvent() default ObjectPersistingEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectPersistingEvent<?>>
+ persistingLifecycleEvent() // <.>
+ default ObjectPersistingEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -201,10 +222,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectPersistedEvent<?>> persistedLifecycleEvent() default ObjectPersistedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectPersistedEvent<?>>
+ persistedLifecycleEvent() // <.>
+ default ObjectPersistedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -214,10 +237,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectLoadedEvent<?>> loadedLifecycleEvent() default ObjectLoadedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectLoadedEvent<?>>
+ loadedLifecycleEvent() // <.>
+ default ObjectLoadedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -227,10 +252,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectUpdatingEvent<?>> updatingLifecycleEvent() default ObjectUpdatingEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectUpdatingEvent<?>>
+ updatingLifecycleEvent() // <.>
+ default ObjectUpdatingEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -240,10 +267,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectUpdatedEvent<?>> updatedLifecycleEvent() default ObjectUpdatedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectUpdatedEvent<?>>
+ updatedLifecycleEvent() // <.>
+ default ObjectUpdatedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -253,10 +282,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectRemovingEvent<?>> removingLifecycleEvent() default ObjectRemovingEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectRemovingEvent<?>>
+ removingLifecycleEvent() // <.>
+ default ObjectRemovingEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that an invocation of <i>any</i> action of the domain object (that do not themselves specify their own
* <tt>@Action(domainEvent=...)</tt> should be posted to the
@@ -284,10 +315,12 @@ public @interface DomainObject {
* It must also use <tt>Object</tt> as its generic type. This is to allow mixins to also emit the same event.
* </p>
*/
- // tag::refguide[]
- Class<? extends ActionDomainEvent<?>> actionDomainEvent() default ActionDomainEvent.Default.class;
+ // tag::refguide-domain-events[]
+ Class<? extends ActionDomainEvent<?>>
+ actionDomainEvent() // <.>
+ default ActionDomainEvent.Default.class;
- // end::refguide[]
+ // end::refguide-domain-events[]
/**
* Indicates that changes to <i>any</i> property of the domain object (that do not themselves specify their own
* <tt>@Property(domainEvent=...)</tt> should be posted to the
@@ -310,10 +343,12 @@ public @interface DomainObject {
* It must also use <tt>Object</tt> as its generic type. This is to allow mixins to also emit the same event.
* </p>
*/
- // tag::refguide[]
- Class<? extends PropertyDomainEvent<?,?>> propertyDomainEvent() default PropertyDomainEvent.Default.class;
+ // tag::refguide-domain-events[]
+ Class<? extends PropertyDomainEvent<?,?>>
+ propertyDomainEvent() // <.>
+ default PropertyDomainEvent.Default.class;
- // end::refguide[]
+ // end::refguide-domain-events[]
/**
* Indicates that changes to <i>any</i> collection of the domain object (that do not themselves specify their own
* <tt>@Collection(domainEvent=...)</tt> should be posted to the
@@ -335,8 +370,17 @@ public @interface DomainObject {
* It must also use <tt>Object</tt> as its generic type. This is to allow mixins to also emit the same event.
* </p>
*/
- // tag::refguide[]
- Class<? extends CollectionDomainEvent<?,?>> collectionDomainEvent() default CollectionDomainEvent.Default.class;
+ // tag::refguide-domain-events[]
+ Class<? extends CollectionDomainEvent<?,?>>
+ collectionDomainEvent() // <.>
+ default CollectionDomainEvent.Default.class;
+ // end::refguide-domain-events[]
+ // tag::refguide[]
+ // tag::refguide-lifecycle-events[]
+ // ...
+ // tag::refguide-domain-events[]
}
-// end::refguide[]
\ No newline at end of file
+// end::refguide[]
+// end::refguide-lifecycle-events[]
+// end::refguide-domain-events[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java
index b1360a8..f7490c8 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObjectLayout.java
@@ -41,58 +41,26 @@ import org.apache.isis.applib.layout.component.CssClassFaPosition;
ElementType.ANNOTATION_TYPE
})
@Retention(RetentionPolicy.RUNTIME)
+// tag::refguide-ui-events[]
public @interface DomainObjectLayout {
// end::refguide[]
+ // ...
+ // end::refguide-ui-events[]
/**
- * Which subclass of {@link TitleUiEvent} should be used to obtain a title.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
- */
- // tag::refguide[]
- Class<? extends TitleUiEvent<?>> titleUiEvent() default TitleUiEvent.Default.class;
-
- // end::refguide[]
- /**
- * Which subclass of {@link IconUiEvent} should be used to obtain an icon.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
- */
- // tag::refguide[]
- Class<? extends IconUiEvent<?>> iconUiEvent() default IconUiEvent.Default.class;
-
- // end::refguide[]
- /**
- * Which subclass of {@link CssClassUiEvent} should be used to obtain a CSS class.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
- */
- // tag::refguide[]
- Class<? extends CssClassUiEvent<?>> cssClassUiEvent() default CssClassUiEvent.Default.class;
-
- // end::refguide[]
- /**
- * Which subclass of {@link LayoutUiEvent} should be used to obtain a layout.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
+ * Whether (and how) this domain object can be bookmarked in the UI.
*/
// tag::refguide[]
- Class<? extends LayoutUiEvent<?>> layoutUiEvent() default LayoutUiEvent.Default.class;
+ BookmarkPolicy bookmarking() // <.>
+ default BookmarkPolicy.NOT_SPECIFIED;
// end::refguide[]
/**
* Indicates the css class that a domain class (type) should have.
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
@@ -100,7 +68,8 @@ public @interface DomainObjectLayout {
* domain object.
*/
// tag::refguide[]
- String cssClassFa() default "";
+ String cssClassFa() // <.>
+ default "";
// end::refguide[]
/**
@@ -112,21 +81,24 @@ public @interface DomainObjectLayout {
* </p>
*/
// tag::refguide[]
- CssClassFaPosition cssClassFaPosition() default CssClassFaPosition.LEFT;
+ CssClassFaPosition cssClassFaPosition() // <.>
+ default CssClassFaPosition.LEFT;
// end::refguide[]
/**
* Description of this class, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
* Name of this class (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
@@ -142,21 +114,74 @@ public @interface DomainObjectLayout {
* collections (eg as returned from a repository query).
*/
// tag::refguide[]
- int paged() default -1;
+ int paged() // <.>
+ default -1;
// end::refguide[]
/**
* The plural name of the class.
*/
// tag::refguide[]
- String plural() default "";
+ String plural() // <.>
+ default "";
// end::refguide[]
/**
- * Whether (and how) this domain object can be bookmarked in the UI.
+ * Which subclass of {@link CssClassUiEvent} should be used to obtain a CSS class.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
*/
- // tag::refguide[]
- BookmarkPolicy bookmarking() default BookmarkPolicy.NOT_SPECIFIED;
+ // tag::refguide-ui-events[]
+ Class<? extends CssClassUiEvent<?>>
+ cssClassUiEvent() // <.>
+ default CssClassUiEvent.Default.class;
+
+ // end::refguide-ui-events[]
+ /**
+ * Which subclass of {@link IconUiEvent} should be used to obtain an icon.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
+ */
+ // tag::refguide-ui-events[]
+ Class<? extends IconUiEvent<?>>
+ iconUiEvent() // <.>
+ default IconUiEvent.Default.class;
+
+ // end::refguide-ui-events[]
+ /**
+ * Which subclass of {@link LayoutUiEvent} should be used to obtain a layout.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
+ */
+ // tag::refguide-ui-events[]
+ Class<? extends LayoutUiEvent<?>>
+ layoutUiEvent() // <.>
+ default LayoutUiEvent.Default.class;
+ // end::refguide-ui-events[]
+ /**
+ * Which subclass of {@link TitleUiEvent} should be used to obtain a title.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
+ */
+ // tag::refguide-ui-events[]
+ Class<? extends TitleUiEvent<?>>
+ titleUiEvent() // <.>
+ default TitleUiEvent.Default.class;
+
+ // end::refguide-ui-events[]
+
+ // tag::refguide[]
+ // ...
+ // tag::refguide-ui-events[]
}
// end::refguide[]
+// end::refguide-ui-events[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java
index a57ab75..84e234a 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java
@@ -53,20 +53,22 @@ public @interface DomainService {
// end::refguide[]
/**
- * Provides the (first part of the) unique identifier (OID) for the service (the instanceId is always "1").
- *
- * <p>
- * If not specified then either the optional "getId()" is used, otherwise the class' name.
+ * The nature of this service, eg for menus, contributed actions, repository.
*/
// tag::refguide[]
- String objectType() default "";
+ NatureOfService nature() // <.>
+ default NatureOfService.VIEW;
// end::refguide[]
/**
- * The nature of this service, eg for menus, contributed actions, repository.
+ * Provides the (first part of the) unique identifier (OID) for the service (the instanceId is always "1").
+ *
+ * <p>
+ * If not specified then either the optional "getId()" is used, otherwise the class' name.
*/
// tag::refguide[]
- NatureOfService nature() default NatureOfService.VIEW;
+ String objectType() // <.>
+ default "";
// end::refguide[]
/**
@@ -74,7 +76,8 @@ public @interface DomainService {
* @deprecated was never implemented
*/
@Deprecated
- Class<?> repositoryFor() default Object.class;
+ Class<?> repositoryFor() // <.>
+ default Object.class;
// tag::refguide[]
}
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainServiceLayout.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainServiceLayout.java
index a3342fe..bedfcdb 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainServiceLayout.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainServiceLayout.java
@@ -43,52 +43,31 @@ public @interface DomainServiceLayout {
// end::refguide[]
/**
+ * The menubar in which the menu that holds this service's actions should reside.
+ */
+ // tag::refguide[]
+ MenuBar menuBar() // <.>
+ default MenuBar.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
* Name of this class (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
+
+ // end::refguide[]
+ // tag::refguide-menu-bar[]
public enum MenuBar {
PRIMARY,
SECONDARY,
TERTIARY,
NOT_SPECIFIED
}
-
- // end::refguide[]
- /**
- * The menubar in which the menu that holds this service's actions should reside.
- */
- // tag::refguide[]
- MenuBar menuBar() default MenuBar.NOT_SPECIFIED;
-
- // end::refguide[]
- //TODO[2140] DomainServiceLayout
- // /**
- // * Number in Dewey Decimal format representing the order.
- // *
- // * <p>
- // * Same convention as {@link org.apache.isis.applib.annotation.MemberOrder#sequence()}. If not specified, placed after any named.
- // * </p>
- // *
- // * <p>
- // * Either this attribute or {@link DomainService#menuOrder()} can be used; they are equivalent.
- // * Typically this attribute is used for services with a {@link DomainService#nature() nature} of
- // * {@link NatureOfService#VIEW_MENU_ONLY} (these are visible in the UI) whereas
- // * {@link DomainService#menuOrder()} is used for services with a nature of
- // * {@link NatureOfService#DOMAIN domain} (which do not appear in the UI).
- // * </p>
- // *
- // * <p>
- // * The default value is set to "Integer.MAX_VALUE - 100" so that any domain services intended to override the
- // * default implementations provided by the framework itself will do so without having to specify the
- // * menuOrder (with the exception of <tt>EventBusServiceJdo</tt>, all framework implementations have a
- // * default order greater than Integer.MAX_VALUE - 50).
- // * </p>
- // */
- // String menuOrder() default Constants.MENU_ORDER_DEFAULT;
+ // end::refguide-menu-bar[]
// tag::refguide[]
-
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java
index 149a336..725fbfd 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java
@@ -43,26 +43,29 @@ public @interface Parameter {
// end::refguide[]
/**
- * The maximum entry length of a field.
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
*
* <p>
- * The default value (<code>-1</code>) indicates that no maxLength has been specified.
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
* </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
// tag::refguide[]
- int maxLength() default -1;
+ String fileAccept() // <.>
+ default "";
// end::refguide[]
/**
- * Whether this parameter is optional or is mandatory (ie required).
+ * The maximum entry length of a field.
*
* <p>
- * For parameters the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, is taken
- * to mean that the parameter is required.
+ * The default value (<code>-1</code>) indicates that no maxLength has been specified.
* </p>
*/
// tag::refguide[]
- Optionality optionality() default Optionality.NOT_SPECIFIED;
+ int maxLength() // <.>
+ default -1;
// end::refguide[]
/**
@@ -73,14 +76,29 @@ public @interface Parameter {
* </p>
*/
// tag::refguide[]
- Class<? extends Specification>[] mustSatisfy() default {};
+ Class<? extends Specification>[] mustSatisfy() // <.>
+ default {};
+
+ // end::refguide[]
+ /**
+ * Whether this parameter is optional or is mandatory (ie required).
+ *
+ * <p>
+ * For parameters the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, is taken
+ * to mean that the parameter is required.
+ * </p>
+ */
+ // tag::refguide[]
+ Optionality optionality() // <.>
+ default Optionality.NOT_SPECIFIED;
// end::refguide[]
/**
* Regular expression pattern that a value should conform to, and can be formatted as.
*/
// tag::refguide[]
- String regexPattern() default "";
+ String regexPattern() // <.>
+ default "";
// end::refguide[]
/**
@@ -91,27 +109,17 @@ public @interface Parameter {
* </p>
*/
// tag::refguide[]
- int regexPatternFlags() default 0;
+ int regexPatternFlags() // <.>
+ default 0;
// end::refguide[]
/**
* Replacement text for the pattern in generated error message.
*/
// tag::refguide[]
- String regexPatternReplacement() default "Doesn't match pattern";
+ String regexPatternReplacement() // <.>
+ default "Doesn't match pattern";
- // end::refguide[]
- /**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
- *
- * <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
- * </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
- */
- // tag::refguide[]
- String fileAccept() default "";
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java
index 782b3a6..04b7ee3 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/ParameterLayout.java
@@ -44,14 +44,16 @@ public @interface ParameterLayout {
* Indicates the css class that a parameter should have.
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
* Description of this property, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
@@ -62,28 +64,32 @@ public @interface ParameterLayout {
* </p>
*/
// tag::refguide[]
- LabelPosition labelPosition() default LabelPosition.NOT_SPECIFIED;
+ LabelPosition labelPosition() // <.>
+ default LabelPosition.NOT_SPECIFIED;
// end::refguide[]
/**
* Name of this action parameter.
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
* A flag indicating whether the value of {@linkplain #named()} should be HTML escaped or not.
*/
// tag::refguide[]
- boolean namedEscaped() default true;
+ boolean namedEscaped() // <.>
+ default true;
// end::refguide[]
/**
* For string parameters (and properties), whether to render as a text area over multiple lines.
*/
// tag::refguide[]
- int multiLine() default -1;
+ int multiLine() // <.>
+ default -1;
// end::refguide[]
/**
@@ -111,14 +117,16 @@ public @interface ParameterLayout {
* </p>
*/
// tag::refguide[]
- RenderDay renderDay() default RenderDay.NOT_SPECIFIED;
+ RenderDay renderDay() // <.>
+ default RenderDay.NOT_SPECIFIED;
// end::refguide[]
/**
* The typical entry length of a field, use to determine the optimum width for display
*/
// tag::refguide[]
- int typicalLength() default -1;
+ int typicalLength() // <.>
+ default -1;
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
index df31640..ac40f2d 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
@@ -52,51 +52,77 @@ public @interface Property {
// end::refguide[]
/**
- * Indicates that changes to the property that should be posted to the
- * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
- * {@link org.apache.isis.applib.events.domain.PropertyDomainEvent}.
- *
- * <p>For example:
- * </p>
- *
- * <pre>
- * public static class StartDateChanged extends PropertyDomainEvent { ... }
- *
- * @Property(domainEvent=StartDateChanged.class)
- * public LocalDate getStartDate() { ...}
- * </pre>
+ * Whether the property edit should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
+ */
+ // tag::refguide[]
+ CommandReification command() // <.>
+ default CommandReification.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * How the {@link org.apache.isis.applib.services.command.Command Command} object provided by the
+ * {@link org.apache.isis.applib.services.command.CommandContext CommandContext} domain service should be persisted.
+ */
+ // tag::refguide[]
+ CommandPersistence commandPersistence() // <.>
+ default CommandPersistence.PERSISTED;
+
+ // end::refguide[]
+ /**
+ * How the command/property edit should be executed.
*
* <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * If the corresponding {@link org.apache.isis.applib.services.command.Command Command} object is persisted,
+ * then its {@link org.apache.isis.applib.services.command.Command#getExecuteIn() invocationType} property
+ * will be set to this value.
* </p>
*/
// tag::refguide[]
- Class<? extends PropertyDomainEvent<?,?>> domainEvent() default PropertyDomainEvent.Default.class;
+ CommandExecuteIn commandExecuteIn() // <.>
+ default CommandExecuteIn.FOREGROUND;
// end::refguide[]
/**
- * Indicates where the property is not visible to the user.
+ * The {@link CommandDtoProcessor} to process this command's DTO.
+ *
+ * <p>
+ * Specifying a processor requires that the implementation of {@link CommandService} provides a
+ * custom implementation of {@link org.apache.isis.applib.services.command.Command} that additional extends
+ * from {@link CommandWithDto}.
+ * </p>
+ *
+ * <p>
+ * Tprocessor itself is used by {@link ContentMappingServiceForCommandDto} and
+ * {@link ContentMappingServiceForCommandsDto} to dynamically transform the DTOs.
+ * </p>
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Class<? extends CommandDtoProcessor> commandDtoProcessor() // <.>
+ default CommandDtoProcessor.class;
// end::refguide[]
/**
- * If set to {@link Projecting#PROJECTED projected}, then indicates that the owner of this property is a view model
- * which is a projection of some other entity, and that the property holds a reference to that
- * "underlying".
+ * Indicates that changes to the property that should be posted to the
+ * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
+ * {@link org.apache.isis.applib.events.domain.PropertyDomainEvent}.
*
- * <p>
- * This is used to automatically redirect any bookmarks to the view model (projection) to instead be directed
- * at the underlying entity.
+ * <p>For example:
* </p>
*
+ * <pre>
+ * public static class StartDateChanged extends PropertyDomainEvent { ... }
+ *
+ * @Property(domainEvent=StartDateChanged.class)
+ * public LocalDate getStartDate() { ...}
+ * </pre>
+ *
* <p>
- * Only one such property should be marked as being a projection with a view model.
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
// tag::refguide[]
- Projecting projecting() default Projecting.NOT_SPECIFIED;
+ Class<? extends PropertyDomainEvent<?,?>> domainEvent() // <.>
+ default PropertyDomainEvent.Default.class;
// end::refguide[]
/**
@@ -107,7 +133,8 @@ public @interface Property {
* </p>
*/
// tag::refguide[]
- Editing editing() default Editing.NOT_SPECIFIED;
+ Editing editing() // <.>
+ default Editing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -115,118 +142,121 @@ public @interface Property {
* then the reason to provide to the user as to why this property cannot be edited.
*/
// tag::refguide[]
- String editingDisabledReason() default "";
+ String editingDisabledReason() // <.>
+ default "";
// end::refguide[]
/**
- * Whether the property edit should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
+ *
+ * <p>
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
+ * </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
- CommandReification command() default CommandReification.NOT_SPECIFIED;
+ // tag::refguide[]
+ String fileAccept() // <.>
+ default "";
// end::refguide[]
/**
- * How the {@link org.apache.isis.applib.services.command.Command Command} object provided by the
- * {@link org.apache.isis.applib.services.command.CommandContext CommandContext} domain service should be persisted.
+ * Indicates where the property is not visible to the user.
*/
// tag::refguide[]
- CommandPersistence commandPersistence() default CommandPersistence.PERSISTED;
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
- * How the command/property edit should be executed.
+ * The maximum entry length of a field.
*
* <p>
- * If the corresponding {@link org.apache.isis.applib.services.command.Command Command} object is persisted,
- * then its {@link org.apache.isis.applib.services.command.Command#getExecuteIn() invocationType} property
- * will be set to this value.
+ * The default value (<code>-1</code>) indicates that no maxLength has been specified.
* </p>
*/
// tag::refguide[]
- CommandExecuteIn commandExecuteIn() default CommandExecuteIn.FOREGROUND;
+ int maxLength() // <.>
+ default -1;
// end::refguide[]
/**
- * Whether the property edit should be published.
+ * Indicates whether the property should be included or excluded from mementos.
*
* <p>
- * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
- * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
+ * To ensure that the property is actually not persisted in the objectstore, also annotate with the JDO annotation
+ * <code>javax.jdo.annotations.NotPersistent</code>
* </p>
*/
// tag::refguide[]
- Publishing publishing() default Publishing.NOT_SPECIFIED;
+ MementoSerialization mementoSerialization() // <.>
+ default MementoSerialization.NOT_SPECIFIED;
// end::refguide[]
/**
- * The {@link CommandDtoProcessor} to process this command's DTO.
- *
- * <p>
- * Specifying a processor requires that the implementation of {@link CommandService} provides a
- * custom implementation of {@link org.apache.isis.applib.services.command.Command} that additional extends
- * from {@link CommandWithDto}.
- * </p>
+ * The {@link org.apache.isis.applib.spec.Specification}(s) to be satisfied by this property.
*
* <p>
- * Tprocessor itself is used by {@link ContentMappingServiceForCommandDto} and
- * {@link ContentMappingServiceForCommandsDto} to dynamically transform the DTOs.
+ * If more than one is provided, then all must be satisfied (in effect "AND"ed together).
* </p>
*/
// tag::refguide[]
- Class<? extends CommandDtoProcessor> commandDtoProcessor() default CommandDtoProcessor.class;
+ Class<? extends Specification>[] mustSatisfy() // <.>
+ default {};
// end::refguide[]
/**
- * The maximum entry length of a field.
+ * Whether this property is optional or is mandatory (ie required).
*
* <p>
- * The default value (<code>-1</code>) indicates that no maxLength has been specified.
+ * For properties the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, usually
+ * means that the property is required unless it has been overridden by {@link javax.jdo.annotations.Column}
+ * with its <code>javax.jdo.annotations.Column#allowsNull()</code> attribute set to true.
* </p>
*/
// tag::refguide[]
- int maxLength() default -1;
+ Optionality optionality() // <.>
+ default Optionality.NOT_SPECIFIED;
// end::refguide[]
/**
- * The {@link org.apache.isis.applib.spec.Specification}(s) to be satisfied by this property.
+ * If set to {@link Projecting#PROJECTED projected}, then indicates that the owner of this property is a view model
+ * which is a projection of some other entity, and that the property holds a reference to that
+ * "underlying".
*
* <p>
- * If more than one is provided, then all must be satisfied (in effect "AND"ed together).
+ * This is used to automatically redirect any bookmarks to the view model (projection) to instead be directed
+ * at the underlying entity.
* </p>
- */
- // tag::refguide[]
- Class<? extends Specification>[] mustSatisfy() default {};
-
- // end::refguide[]
- /**
- * Indicates whether the property should be included or excluded from mementos.
*
* <p>
- * To ensure that the property is actually not persisted in the objectstore, also annotate with the JDO annotation
- * <code>javax.jdo.annotations.NotPersistent</code>
+ * Only one such property should be marked as being a projection with a view model.
* </p>
*/
// tag::refguide[]
- MementoSerialization mementoSerialization() default MementoSerialization.NOT_SPECIFIED;
+ Projecting projecting() // <.>
+ default Projecting.NOT_SPECIFIED;
// end::refguide[]
/**
- * Whether this property is optional or is mandatory (ie required).
+ * Whether the property edit should be published.
*
* <p>
- * For properties the default value, {@link org.apache.isis.applib.annotation.Optionality#DEFAULT}, usually
- * means that the property is required unless it has been overridden by {@link javax.jdo.annotations.Column}
- * with its <code>javax.jdo.annotations.Column#allowsNull()</code> attribute set to true.
+ * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
+ * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
* </p>
*/
// tag::refguide[]
- Optionality optionality() default Optionality.NOT_SPECIFIED;
+ Publishing publishing() // <.>
+ default Publishing.NOT_SPECIFIED;
// end::refguide[]
/**
* Regular expression pattern that a value should conform to, and can be formatted as.
*/
// tag::refguide[]
- String regexPattern() default "";
+ String regexPattern() // <.>
+ default "";
// end::refguide[]
/**
@@ -237,27 +267,16 @@ public @interface Property {
* </p>
*/
// tag::refguide[]
- int regexPatternFlags() default 0;
+ int regexPatternFlags() // <.>
+ default 0;
// end::refguide[]
/**
* Replacement text for the pattern in generated error message.
*/
// tag::refguide[]
- String regexPatternReplacement() default "Doesn't match pattern";
-
- // end::refguide[]
- /**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
- *
- * <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
- * </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
- */
- // tag::refguide[]
- String fileAccept() default "";
+ String regexPatternReplacement() // <.>
+ default "Doesn't match pattern";
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java
index 11f965b..f6e241a 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/PropertyLayout.java
@@ -42,21 +42,24 @@ public @interface PropertyLayout {
* Indicates the css class that a property should have.
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
* Description of this property, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
* Indicates where in the UI the property should <i>not</i>not be visible.
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -67,38 +70,54 @@ public @interface PropertyLayout {
* </p>
*/
// tag::refguide[]
- LabelPosition labelPosition() default LabelPosition.NOT_SPECIFIED;
+ LabelPosition labelPosition() // <.>
+ default LabelPosition.NOT_SPECIFIED;
// end::refguide[]
/**
* For string properties (and parameters), render as a text area over specified number of lines.
*/
// tag::refguide[]
- int multiLine() default -1;
+ int multiLine() // <.>
+ default -1;
// end::refguide[]
/**
* Name of this property (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
* A flag indicating whether the value of {@linkplain #named()} should be HTML escaped or not.
*/
// tag::refguide[]
- boolean namedEscaped() default true;
+ boolean namedEscaped() // <.>
+ default true;
+ // end::refguide[]
+ /**
+ * Whether this property should be used to construct the navigable chain of breadcrumbs in the UI.
+ *
+ * <p>
+ * Only one property can be annotated as such per domain class.
+ * </p>
+ *
+ * @return
+ */
// tag::refguide[]
- Navigable navigable() default Navigable.NOT_SPECIFIED;
+ Navigable navigable() // <.>
+ default Navigable.NOT_SPECIFIED;
// end::refguide[]
/**
* How the properties of this domain object are be edited, either {@link PromptStyle#DIALOG dialog} or {@link PromptStyle#INLINE inline}.
*/
// tag::refguide[]
- PromptStyle promptStyle() default PromptStyle.NOT_SPECIFIED;
+ PromptStyle promptStyle() // <.>
+ default PromptStyle.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -127,14 +146,8 @@ public @interface PropertyLayout {
* </p>
*/
// tag::refguide[]
- RenderDay renderDay() default RenderDay.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * The typical entry length of a field, use to determine the optimum width for display
- */
- // tag::refguide[]
- int typicalLength() default -1;
+ RenderDay renderDay() // <.>
+ default RenderDay.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -160,7 +173,16 @@ public @interface PropertyLayout {
* </p>
*/
// tag::refguide[]
- Repainting repainting() default Repainting.NOT_SPECIFIED;
+ Repainting repainting() // <.>
+ default Repainting.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * The typical entry length of a field, use to determine the optimum width for display
+ */
+ // tag::refguide[]
+ int typicalLength() // <.>
+ default -1;
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
index 1520574..7bd1ce3 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/ViewModel.java
@@ -54,11 +54,12 @@ import org.springframework.stereotype.Component;
* annotated type.
* For more details see <code>org.apache.isis.core.config.beans.IsisBeanFactoryPostProcessorForSpring</code>.
*/
+// tag::refguide[]
@Inherited
@Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Component @Scope("prototype")
public @interface ViewModel {
-
}
+// end::refguide[]
[isis] 03/07: ISIS-2062: updates docs
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 b5ed6c4f97988be34772d88520973df1ddfee54d
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Mar 17 11:09:29 2020 +0000
ISIS-2062: updates docs
---
.../examples/services/wrapper/WrapperFactory.java | 14 +-
.../services/wrapper/control/AsyncControl.java | 28 +++-
.../services/wrapper/control/ControlAbstract.java | 38 +++--
.../services/wrapper/control/SyncControl.java | 12 +-
.../modules/applib-svc/pages/WrapperFactory.adoc | 183 +++++++++++++--------
.../applib/services/wrapper/WrapperFactory.java | 14 +-
.../services/wrapper/control/AsyncControl.java | 28 +++-
.../services/wrapper/control/ControlAbstract.java | 38 +++--
.../services/wrapper/control/SyncControl.java | 12 +-
9 files changed, 238 insertions(+), 129 deletions(-)
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java
index 92da4a8..e930670 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java
@@ -69,11 +69,13 @@ import org.apache.isis.core.commons.collections.ImmutableEnumSet;
* then should just return the object back unchanged.
*/
// tag::refguide[]
+// tag::refguide-unwrap[]
// tag::refguide-async[]
// tag::refguide-listeners[]
public interface WrapperFactory {
// end::refguide[]
+ // end::refguide-unwrap[]
// end::refguide-async[]
// end::refguide-listeners[]
/**
@@ -139,22 +141,22 @@ public interface WrapperFactory {
* If the object {@link #isWrapper(Object) is not wrapped}, then
* should just return the object back unchanged.
*/
- // tag::refguide[]
+ // tag::refguide-unwrap[]
<T> T unwrap(T possibleWrappedDomainObject); // <.>
- // end::refguide[]
+ // end::refguide-unwrap[]
/**
- * Whether the supplied object has been wrapped.
+ * Whether the supplied object is a wrapper around a domain object.
*
* @param <T>
* @param possibleWrappedDomainObject
* - object that might or might not be a wrapper.
* @return
*/
- // tag::refguide[]
+ // tag::refguide-unwrap[]
<T> boolean isWrapper(T possibleWrappedDomainObject); // <.>
- // end::refguide[]
+ // end::refguide-unwrap[]
//
@@ -246,10 +248,12 @@ public interface WrapperFactory {
void notifyListeners(InteractionEvent ev); // <.>
// tag::refguide-async[]
+ // tag::refguide-unwrap[]
// tag::refguide[]
// ...
}
// end::refguide[]
+// end::refguide-unwrap[]
// end::refguide-async[]
// end::refguide-listeners[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
index f6c3106..db508c5 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
@@ -51,25 +51,29 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class AsyncControl<R> extends ControlAbstract<AsyncControl<R>> {
- public static AsyncControl<Void> control() {
+ public static AsyncControl<Void> control() { // <.>
return new AsyncControl<>();
}
- public static <X> AsyncControl<X> control(final Class<X> clazz) {
+ public static <X> AsyncControl<X> control(final Class<X> clazz) { // <.>
return new AsyncControl<>();
}
private AsyncControl() {
- with(exception -> {
+ with(exception -> { // <.>
log.error(logMessage(), exception);
return null;
});
}
@Getter @NonNull
- private ExecutorService executorService = ForkJoinPool.commonPool();
+ private ExecutorService executorService = // <.>
+ ForkJoinPool.commonPool();
public AsyncControl<R> with(ExecutorService executorService) {
+ // end::refguide[]
this.executorService = executorService;
return this;
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
@@ -78,10 +82,13 @@ public class AsyncControl<R> extends ControlAbstract<AsyncControl<R>> {
*/
// tag::refguide[]
@Getter
- private String user;
+ private String user; // <.>
public AsyncControl<R> withUser(final String user) {
+ // end::refguide[]
this.user = user;
return this;
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
@@ -90,13 +97,19 @@ public class AsyncControl<R> extends ControlAbstract<AsyncControl<R>> {
*/
// tag::refguide[]
@Getter
- private List<String> roles;
+ private List<String> roles; // <.>
public AsyncControl<R> withRoles(final List<String> roles) {
+ // end::refguide[]
this.roles = Collections.unmodifiableList(roles);
return this;
+ // tag::refguide[]
+ // ...
}
public AsyncControl<R> withRoles(String... roles) {
+ // end::refguide[]
return withRoles(Arrays.asList(roles));
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
@@ -109,7 +122,7 @@ public class AsyncControl<R> extends ControlAbstract<AsyncControl<R>> {
@Setter(AccessLevel.PACKAGE)
// tag::refguide[]
@Getter
- private Future<R> future;
+ private Future<R> future; // <.>
// end::refguide[]
private String logMessage() {
@@ -128,6 +141,5 @@ public class AsyncControl<R> extends ControlAbstract<AsyncControl<R>> {
}
// tag::refguide[]
// ...
-
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
index 8886d26..dc796a1 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
@@ -47,32 +47,49 @@ public class ControlAbstract<T extends ControlAbstract<T>> {
* Set by framework.
*/
@Setter(AccessLevel.PACKAGE)
- // tag::refguide[]
@Getter(AccessLevel.PACKAGE)
private Method method;
- // end::refguide[]
/**
* Set by framework.
*/
@Setter(AccessLevel.PACKAGE)
- // tag::refguide[]
@Getter(AccessLevel.PACKAGE)
private Bookmark bookmark;
- // end::refguide[]
- private boolean checkRules = true;
+ // tag::refguide[]
+ private boolean checkRules = true; // <.>
public T withCheckRules() {
+ // end::refguide[]
checkRules = true;
return (T)this;
+ // tag::refguide[]
+ // ...
}
public T withSkipRules() {
+ // end::refguide[]
checkRules = false;
return (T)this;
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
+ /**
+ * Initialized in constructor.
+ */
+ // tag::refguide[]
+ @Getter @NonNull
+ private ExceptionHandler exceptionHandler; // <.>
+ public T with(ExceptionHandler exceptionHandler) {
+ // end::refguide[]
+ this.exceptionHandler = exceptionHandler;
+ return (T)this;
+ // tag::refguide[]
+ // ...
+ }
+ // end::refguide[]
/**
* Not API.
*/
@@ -84,15 +101,6 @@ public class ControlAbstract<T extends ControlAbstract<T>> {
return ImmutableEnumSet.from(modes);
}
- /**
- * Initialized in constructor.
- */
- @Getter @NonNull
- private ExceptionHandler exceptionHandler;
- public T with(ExceptionHandler exceptionHandler) {
- this.exceptionHandler = exceptionHandler;
- return (T)this;
- }
// tag::refguide[]
-
}
+// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
index 5c9b91c..c2d433c 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
@@ -46,26 +46,31 @@ public class SyncControl extends ControlAbstract<SyncControl> {
}
private SyncControl() {
- with(exception -> {
+ with(exception -> { // <.>
throw exception;
});
}
- private boolean execute = true;
+ private boolean execute = true; // <.>
public SyncControl withExecute() {
+ // end::refguide[]
execute = true;
return this;
+ // tag::refguide[]
+ // ...
}
public SyncControl withNoExecute() {
+ // end::refguide[]
execute = false;
return this;
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
/**
* Not API.
*/
- // tag::refguide[]
public ImmutableEnumSet<ExecutionMode> getExecutionModes() {
EnumSet<ExecutionMode> modes = EnumSet.copyOf(super.getExecutionModes().toEnumSet());
if(!execute) {
@@ -73,6 +78,7 @@ public class SyncControl extends ControlAbstract<SyncControl> {
}
return ImmutableEnumSet.from(modes);
}
+ // tag::refguide[]
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc
index 1687025..38f108d 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc
@@ -24,11 +24,11 @@ This capability is frequently used within xref:testing:integtestsupport:about.ad
== API
-The API breaks into three.
+The API breaks into four parts, along with a number of supporting control classes.
-=== Main API
+=== Synchronous API
-The main API provided by the service is:
+The synchronous API provided by the service is:
[source,java]
----
@@ -36,33 +36,20 @@ include::refguide:applib-svc:example$services/wrapper/WrapperFactory.java[tags="
----
<.> wraps the underlying domain object so it can invoked (through its wrapper) synchronously in the same thread.
+
-The `SyncControl` modifies the way in which the wrapper interacts with the underlying domain object, discussed xref:#synccontrol-and-asynccontrol[below].
+The `SyncControl` modifies the way in which the wrapper interacts with the underlying domain object, discussed xref:#synccontrol[below].
<.> overload that wraps the underlying domain object with a wrapper that will validate all business rules and then execute if they pass.
<.> instantiates and wraps a mixin so that it can be invoked (through its wrapper) synchronously in the same thread.
-Again `SyncControl` modifies the way in which the wrapper interacts with the underlying domain object, discussed xref:#synccontrol-and-asynccontrol[below]..
+Again `SyncControl` modifies the way in which the wrapper interacts with the underlying domain object, discussed xref:#synccontrol[below]..
-<.> Obtains the underlying domain object, if wrapped.
-+
-If the object is not wrapped, returns back unchanged.
-
-<.> whether the supplied object has been wrapped.
-
-
-=== `SyncControl` and `AsyncControl`
-
-The `SyncControl` and `AsyncControl` classes control the way that the wrapper works, for both synchronous calls using `wrap(...)`, and asynchronous calls using `asyncWrap`.
-
-[source,java]
-----
-include::refguide:applib-svc:example$services/wrapper/control/SyncControl.java[tags="refguide"]
-----
+<.> overload that instantiates and wraps a mixin with a wrapper that will validate all business rules and then execute the action if they pass.
+The service works by returning a "wrapper" around a supplied domain object (using link:https://bytebuddy.net/[byte buddy]), and it is this wrapper that ensures that the hide/disable/validate rules implies by the Apache Isis programming model are enforced.
+==== Domain Objects
-The service works by returning a "wrapper" around a supplied domain object (using link:https://bytebuddy.net/[byte buddy]), and it is this wrapper that ensures that the hide/disable/validate rules implies by the Apache Isis programming model are enforced.
-The wrapper can be interacted with as follows:
+For domain objects (not mixins), the wrapper can be interacted with as follows:
* a `get...()` method for properties or collections
* a `set...()` method for properties
@@ -70,8 +57,8 @@ The wrapper can be interacted with as follows:
* any action
Calling any of the above methods may result in a (subclass of) `InteractionException` if the object disallows it.
-For example, if a property is annotated with `@Hidden` then a `HiddenException` will be thrown.
-Similarly if an action has a `validateXxx()` method and the supplied arguments are invalid then an `InvalidException` will be thrown.
+For example, if a property is annotated with xref:refguide:applib-ant:ActionLayout.adoc#hidden[`@ActionLayout#hidden`] then a `HiddenException` will be thrown.
+Similarly if an action has a xref:refguide:applib-cm:methods/prefixes/validate.adoc[`validateXxx()`] method and the supplied arguments are invalid then an `InvalidException` will be thrown.
In addition, the following methods may also be called:
@@ -82,33 +69,130 @@ An exception will be thrown if any other methods are thrown.
If the interface is performed (action invoked or property set), then - irrespective of whether the business rules were checked or skipped - a xref:refguide:applib-ant:Action.adoc#command[command] will be created and pre- and post-execute xref:refguide:applib-ant:Action.adoc#domainEvent[domain event]s) will be fired.
+==== Mixins
+For mixins, the behaviour of the wrapper is similar but simpler.
+Mixin wrappers only apply to actions, and so the wrapper will enforce the hidden/disable/validate rules before executing.
+In addition, any xref:refguide:applib-cm:methods.adoc#default[`default...()`], xref:refguide:applib-cm:methods.adoc#choices[`choices...()`] or xref:refguide:applib-cm:methods.adoc#autoComplete[`autoComplete...()`] methods can be called.
-=== `AsyncWrap` API
+==== `SyncControl`
-The `WrapperFactory` also allows domain objects to be interacted with in an asynchronous fashion:
+The `SyncControl` class controls the way that a (synchronous) wrapper works.
+Its superclass `ControlAbstract` is:
+
+[source,java]
+.ControlAbstract.java
+----
+include::refguide:applib-svc:example$services/wrapper/control/ControlAbstract.java[tags="refguide"]
+----
+<.> whether to check business rules (hide/disable/validate) before executing the underlying property or action
+<.> how to handle exceptions if they occur, using `ExceptionHandler`:
++
+[source,java]
+.SyncControl.java
+----
+include::refguide:applib-svc:example$services/wrapper/control/ExceptionHandler.java[tags="refguide"]
+----
++
+Exceptions can be rethrown or ignored.
+If ignored, the handler can instead return a value; this must be compatible with the expected return value of the underlying action.
+
+
+\... and the `SyncControl` class itself is:
+
+[source,java]
+----
+include::refguide:applib-svc:example$services/wrapper/control/SyncControl.java[tags="refguide"]
+----
+<.> Default exception handler is to rethrow the exception.
+<.> Don't actually execute the action (for example, just check the rules as in a "dry-run").
+
+
+
+=== Asynchronous API
+
+The `WrapperFactory` also allows domain objects to be interacted with in an asynchronous fashion, in other words executed in a separate thread:
[source,java]
----
include::refguide:applib-svc:example$services/wrapper/WrapperFactory.java[tags="refguide-async"]
----
-<.> x
-<.> x
-<.> x
-<.> x
+<.> Wraps the underlying domain object so it can be invoked (through its wrapper) asynchronously in a separate thread.
+The `AsyncControl` modifies the way in which the wrapper interacts with the underlying domain object, discussed xref:#asynccontrol[below].
+
+<.> instantiates and wraps a mixin so that it can be invoked (through its wrapper) asynchronously in a separate thread.
+Again `AsyncControl` modifies the way this is done.
+
+Executing in a separate thread means that the target and arguments are used in a new session.
+If any of these are entities, they are retrieved from the database afresh; it isn't possible to pass domain entity references from the foreground calling thread to the background threads.
+
+
+==== `AsyncControl`
+
+The `AsyncControl` class controls the way that an asynchronous wrapper -- as obtained by `asyncWrapXxx(...)` -- works.
+The class inherits from `ControlAbstract` (see above), to allow the rules checking to be skipped and to configure the `ExceptionHandler`.
+It extends with the following behaviour:
+
+[source,java]
+.AsyncControl.java
+----
+include::refguide:applib-svc:example$services/wrapper/control/AsyncControl.java[tags="refguide"]
+----
+<.> instantiate for a void action or property edit (where there is no need or intention to provide a return value through the `Future`, discussed below).
+<.> instantiate for an action returning a value of `<R>` (where this value will be returned through the `Future`, discussed below).
+<.> Default exception handler is just to log the exception, though this can be overridden.
+<.> Default executor service is the common pool.
+<.> Specify the user for the session used to execute the command asynchronously, in the background.
+If not specified, then the user of the current foreground session is used.
+<.> Specify the roles of the user for the session used to execute the command asynchronously, in the background.
+If not specified, then the roles of the current user foreground user are used.
+<.> Provides access to a `Future` representing the result of the background command.
+This may or may not hold a value.
+
+The `AsyncControl` can therefore be used to check business rules or to skip them.
+If business rules are checked, note that they are performed in the context of the _foreground_ session.
+
+
+=== Unwrap API
+
+The unwrap API provided by the service is:
+[source,java]
+----
+include::refguide:applib-svc:example$services/wrapper/WrapperFactory.java[tags="refguide-unwrap"]
+----
+<.> Obtains the underlying domain object or mixin, if wrapped.
++
+If the object is not wrapped, returns back unchanged.
+
+<.> whether the supplied object is a wrapper around a domain object or mixin.
-WARNING: TODO: there are some caveats to using this approach.
=== Listener API
+The listener API allows the interactions between the wrapper and the underlying domain object to be observed:
+
[source,java]
----
include::refguide:applib-svc:example$services/wrapper/WrapperFactory.java[tags="refguide-listeners"]
----
+<.> all ``InteractionListener``s that have been registered.
+<.> registers an `InteractionListener`, to be notified of interactions on all wrappers.
+The listener will be notified of interactions even on wrappers created before the listener was installed.
+(From an implementation perspective this is because the wrappers delegate back to the container to fire the events).
+<.> remove an `InteractionListener`, to no longer be notified of interactions on wrappers.
+<.> used by the framework itself
+This API isn't (currently) used by the framework itself.
-== Usage
+[TIP]
+====
+One possible use case would be to autogenerate documentation, for example a sequence diagram from tests.
+Such a feature would probably also use xref:refguide:applib-svc:InteractionContext.adoc[`InteractionContext`], which builds up an execution call graph of interactions between (wrapped) objects.
+====
+
+
+== Typical Usage
The caller will typically obtain the target object (eg from some repository) and then use the injected `WrapperFactory` to wrap it before interacting with it.
@@ -137,42 +221,7 @@ public class CustomerAgent {
<1> if any constraints on the `Order`'s `refund()` action would be violated, then ...
<2> ... these will be trapped and raised to the user as a warning.
-[NOTE]
-====
-It ought to be possible to implement an xref:refguide:applib-svc:ExceptionRecognizerService.adoc[`ExceptionRecognizer`]s that would allow the above boilerplate to be removed.
-This recognizer service would recognize the `InteractionException` and convert to a suitable message.
-
-At the time of writing Apache Isis does not provide an out-of-the-box implementation of such an `ExceptionRecognizer`; but it should be simple enough to write one…
-====
-
-== Listener API
-
-The `WrapperFactory` also provides a listener API to allow other services to listen in on interactions.
-
-[source,java]
-----
-public interface WrapperFactory {
- ...
- @Programmatic
- List<InteractionListener> getListeners(); // <1>
- @Programmatic
- public boolean addInteractionListener(InteractionListener listener); // <2>
- @Programmatic
- public boolean removeInteractionListener(InteractionListener listener); // <3>
- @Programmatic
- public void notifyListeners(InteractionEvent ev); // <4>
-}
-----
-<1> all ``InteractionListener``s that have been registered.
-<2> registers an `InteractionListener`, to be notified of interactions on all wrappers.
-The listener will be notified of interactions even on wrappers created before the listener was installed.
-(From an implementation perspective this is because the wrappers delegate back to the container to fire the events).
-<3> remove an `InteractionListener`, to no longer be notified of interactions on wrappers.
-<4> used by the framework itself
-
-One possible use case for this API is to enable test transcripts to be captured (in a BDD-like fashion) from integration tests.
-As the time of writing, no such feature has yet been implemented.
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
index 92da4a8..e930670 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
@@ -69,11 +69,13 @@ import org.apache.isis.core.commons.collections.ImmutableEnumSet;
* then should just return the object back unchanged.
*/
// tag::refguide[]
+// tag::refguide-unwrap[]
// tag::refguide-async[]
// tag::refguide-listeners[]
public interface WrapperFactory {
// end::refguide[]
+ // end::refguide-unwrap[]
// end::refguide-async[]
// end::refguide-listeners[]
/**
@@ -139,22 +141,22 @@ public interface WrapperFactory {
* If the object {@link #isWrapper(Object) is not wrapped}, then
* should just return the object back unchanged.
*/
- // tag::refguide[]
+ // tag::refguide-unwrap[]
<T> T unwrap(T possibleWrappedDomainObject); // <.>
- // end::refguide[]
+ // end::refguide-unwrap[]
/**
- * Whether the supplied object has been wrapped.
+ * Whether the supplied object is a wrapper around a domain object.
*
* @param <T>
* @param possibleWrappedDomainObject
* - object that might or might not be a wrapper.
* @return
*/
- // tag::refguide[]
+ // tag::refguide-unwrap[]
<T> boolean isWrapper(T possibleWrappedDomainObject); // <.>
- // end::refguide[]
+ // end::refguide-unwrap[]
//
@@ -246,10 +248,12 @@ public interface WrapperFactory {
void notifyListeners(InteractionEvent ev); // <.>
// tag::refguide-async[]
+ // tag::refguide-unwrap[]
// tag::refguide[]
// ...
}
// end::refguide[]
+// end::refguide-unwrap[]
// end::refguide-async[]
// end::refguide-listeners[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java
index 096aea5..2f7ba81 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java
@@ -39,25 +39,29 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
public class AsyncControl<R> extends ControlAbstract {
- public static AsyncControl<Void> control() {
+ public static AsyncControl<Void> control() { // <.>
return new AsyncControl<>();
}
- public static <X> AsyncControl<X> control(final Class<X> clazz) {
+ public static <X> AsyncControl<X> control(final Class<X> clazz) { // <.>
return new AsyncControl<>();
}
private AsyncControl() {
- with(exception -> {
+ with(exception -> { // <.>
log.error(logMessage(), exception);
return null;
});
}
@Getter @NonNull
- private ExecutorService executorService = ForkJoinPool.commonPool();
+ private ExecutorService executorService = // <.>
+ ForkJoinPool.commonPool();
public AsyncControl<R> with(ExecutorService executorService) {
+ // end::refguide[]
this.executorService = executorService;
return this;
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
@@ -66,10 +70,13 @@ public class AsyncControl<R> extends ControlAbstract {
*/
// tag::refguide[]
@Getter
- private String user;
+ private String user; // <.>
public AsyncControl<R> withUser(final String user) {
+ // end::refguide[]
this.user = user;
return this;
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
@@ -78,13 +85,19 @@ public class AsyncControl<R> extends ControlAbstract {
*/
// tag::refguide[]
@Getter
- private List<String> roles;
+ private List<String> roles; // <.>
public AsyncControl<R> withRoles(final List<String> roles) {
+ // end::refguide[]
this.roles = Collections.unmodifiableList(roles);
return this;
+ // tag::refguide[]
+ // ...
}
public AsyncControl<R> withRoles(String... roles) {
+ // end::refguide[]
return withRoles(Arrays.asList(roles));
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
@@ -97,7 +110,7 @@ public class AsyncControl<R> extends ControlAbstract {
@Setter(AccessLevel.PACKAGE)
// tag::refguide[]
@Getter
- private Future<R> future;
+ private Future<R> future; // <.>
// end::refguide[]
private String logMessage() {
@@ -116,6 +129,5 @@ public class AsyncControl<R> extends ControlAbstract {
}
// tag::refguide[]
// ...
-
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java
index 630420e..944146a 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java
@@ -41,32 +41,49 @@ public class ControlAbstract {
* Set by framework.
*/
@Setter(AccessLevel.PACKAGE)
- // tag::refguide[]
@Getter(AccessLevel.PACKAGE)
private Method method;
- // end::refguide[]
/**
* Set by framework.
*/
@Setter(AccessLevel.PACKAGE)
- // tag::refguide[]
@Getter(AccessLevel.PACKAGE)
private Bookmark bookmark;
- // end::refguide[]
- private boolean checkRules = true;
+ // tag::refguide[]
+ private boolean checkRules = true; // <.>
public <T extends ControlAbstract> T withCheckRules() {
+ // end::refguide[]
checkRules = true;
return _Casts.uncheckedCast(this);
+ // tag::refguide[]
+ // ...
}
public <T extends ControlAbstract> T withSkipRules() {
+ // end::refguide[]
checkRules = false;
return _Casts.uncheckedCast(this);
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
+ /**
+ * Initialized in constructor.
+ */
+ // tag::refguide[]
+ @Getter @NonNull
+ private ExceptionHandler exceptionHandler; // <.>
+ public <T extends ControlAbstract> T with(ExceptionHandler exceptionHandler) {
+ // end::refguide[]
+ this.exceptionHandler = exceptionHandler;
+ return (T)this;
+ // tag::refguide[]
+ // ...
+ }
+ // end::refguide[]
/**
* Not API.
*/
@@ -78,15 +95,6 @@ public class ControlAbstract {
return ImmutableEnumSet.from(modes);
}
- /**
- * Initialized in constructor.
- */
- @Getter
- private ExceptionHandler exceptionHandler;
- public <T extends ControlAbstract> T with(@NonNull ExceptionHandler exceptionHandler) {
- this.exceptionHandler = exceptionHandler;
- return _Casts.uncheckedCast(this);
- }
// tag::refguide[]
-
}
+// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
index 9fe06ed..efe2767 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
@@ -32,26 +32,31 @@ public class SyncControl extends ControlAbstract {
}
private SyncControl() {
- with(exception -> {
+ with(exception -> { // <.>
throw exception;
});
}
- private boolean execute = true;
+ private boolean execute = true; // <.>
public SyncControl withExecute() {
+ // end::refguide[]
execute = true;
return this;
+ // tag::refguide[]
+ // ...
}
public SyncControl withNoExecute() {
+ // end::refguide[]
execute = false;
return this;
+ // tag::refguide[]
+ // ...
}
// end::refguide[]
/**
* Not API.
*/
- // tag::refguide[]
public ImmutableEnumSet<ExecutionMode> getExecutionModes() {
EnumSet<ExecutionMode> modes = EnumSet.copyOf(super.getExecutionModes().toEnumSet());
if(!execute) {
@@ -59,6 +64,7 @@ public class SyncControl extends ControlAbstract {
}
return ImmutableEnumSet.from(modes);
}
+ // tag::refguide[]
}
// end::refguide[]
[isis] 04/07: ISIS-2062: docs for annotations
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 08433253281900f55cda8648e50a8626dd6cb1ff
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Mar 17 12:47:18 2020 +0000
ISIS-2062: docs for annotations
---
.../programming-model/view-models/non-jaxb.adoc | 2 +-
.../applib-ant/examples/annotation/Action.java | 161 +++++++++++----------
.../examples/annotation/ActionLayout.java | 66 +++++----
.../applib-ant/examples/annotation/Collection.java | 30 ++--
.../examples/annotation/CollectionLayout.java | 36 +++--
.../examples/annotation/CommandReification.java | 5 -
.../examples/annotation/DomainObject.java | 156 +++++++++++++-------
.../examples/annotation/DomainObjectLayout.java | 126 +++++++++-------
.../main/adoc/modules/applib-ant/pages/Action.adoc | 124 ++++++----------
.../modules/applib-ant/pages/Action/command.adoc | 4 +-
.../modules/applib-ant/pages/ActionLayout.adoc | 85 ++++-------
.../adoc/modules/applib-ant/pages/Collection.adoc | 70 +++------
...notPersisted.adoc => mementoSerialization.adoc} | 34 +----
.../modules/applib-ant/pages/CollectionLayout.adoc | 100 ++++---------
.../main/adoc/modules/applib-ant/pages/Column.adoc | 38 ++---
.../modules/applib-ant/pages/Discriminator.adoc | 24 ++-
.../modules/applib-ant/pages/DomainObject.adoc | 157 ++++++++++----------
.../applib-ant/pages/DomainObjectLayout.adoc | 23 ++-
.../modules/applib-ant/pages/DomainService.adoc | 16 +-
.../applib-ant/pages/DomainServiceLayout.adoc | 19 +--
.../main/adoc/modules/applib-ant/pages/Facets.adoc | 4 +-
.../adoc/modules/applib-ant/pages/HomePage.adoc | 3 +-
.../main/adoc/modules/applib-ant/pages/Inject.adoc | 27 +---
.../applib-ant/pages/MemberGroupLayout.adoc | 17 ---
.../adoc/modules/applib-ant/pages/MemberOrder.adoc | 5 +-
.../adoc/modules/applib-ant/pages/MinLength.adoc | 4 +
.../main/adoc/modules/applib-ant/pages/Mixin.adoc | 7 +-
.../modules/applib-ant/pages/NotPersistent.adoc | 6 +-
.../adoc/modules/applib-ant/pages/Nullable.adoc | 18 +--
.../adoc/modules/applib-ant/pages/Parameter.adoc | 14 +-
.../modules/applib-ant/pages/ParameterLayout.adoc | 5 +
.../applib-ant/pages/PersistenceCapable.adoc | 25 ++--
.../adoc/modules/applib-ant/pages/PreDestroy.adoc | 2 +-
.../modules/applib-ant/pages/Programmatic.adoc | 4 +-
.../adoc/modules/applib-ant/pages/Property.adoc | 8 +-
...notPersisted.adoc => mementoSerialization.adoc} | 38 +----
.../modules/applib-ant/pages/PropertyLayout.adoc | 5 +
.../main/adoc/modules/applib-ant/pages/Title.adoc | 12 +-
.../adoc/modules/applib-ant/pages/ViewModel.adoc | 10 +-
.../modules/applib-ant/pages/ViewModelLayout.adoc | 22 +--
.../applib-ant/pages/XmlJavaTypeAdapter.adoc | 3 +-
.../modules/applib-ant/pages/XmlRootElement.adoc | 6 +-
.../modules/applib-ant/partials/module-nav.adoc | 1 -
.../modules/applib-svc/pages/LayoutService.adoc | 6 +-
44 files changed, 704 insertions(+), 824 deletions(-)
diff --git a/api/adoc/userguide/modules/fun/pages/programming-model/view-models/non-jaxb.adoc b/api/adoc/userguide/modules/fun/pages/programming-model/view-models/non-jaxb.adoc
index 95a6c0b..4133484 100644
--- a/api/adoc/userguide/modules/fun/pages/programming-model/view-models/non-jaxb.adoc
+++ b/api/adoc/userguide/modules/fun/pages/programming-model/view-models/non-jaxb.adoc
@@ -32,7 +32,7 @@ They are:
@DomainObject(nature=Nature.EXTERNAL_ENTITY)
public class CustomerRecordOnSAP { /* ... */ }
----
-|Annotated with xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject#nature`] and a nature of `EXTERNAL_ENTITY`, with memento derived automatically from the properties of the domain object. Collections are ignored, as are any properties annotated as xref:refguide:applib-ant:Property.adoc#notPersisted[not persisted].
+|Annotated with xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject#nature`] and a nature of `EXTERNAL_ENTITY`, with memento derived automatically from the properties of the domain object. Collections are ignored, as are any properties annotated as xref:refguide:applib-ant:Property.adoc#mementoSerialization[memento serialization].
| In-memory entity
|[source,java]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
index 4549519..f7968c2 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
@@ -50,62 +50,52 @@ public @interface Action {
// end::refguide[]
/**
- * Indicates that an invocation of the action should be posted to the
- * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
- * {@link org.apache.isis.applib.events.domain.ActionDomainEvent}.
+ * Associates this action with a property or collection, specifying its id.
*
- * <p>For example:
+ * <p>
+ * This is an alternative to using {@link MemberOrder#name()}. To specify the order (equivalent to
+ * {@link MemberOrder#sequence()}}), use {@link #associateWithSequence()}.
* </p>
*
- * <pre>
- * public class SomeObject{
- * public static class ChangeStartDateDomainEvent extends ActionDomainEvent<SomeObject> { ... }
- *
- * @Action(domainEvent=ChangedStartDateDomainEvent.class)
- * public void changeStartDate(final Date startDate) { ...}
- * ...
- * }
- * </pre>
+ * <p>
+ * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
+ * </p>
*
* <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * If an action is associated with a collection, then any matching parameters will have
+ * their choices automatically inferred from the collection (if not otherwise specified)
+ * and any collection parameter defaults can be specified using checkboxes
+ * (in the Wicket UI, at least).
* </p>
*/
// tag::refguide[]
- Class<? extends ActionDomainEvent<?>> domainEvent() default ActionDomainEvent.Default.class;
+ String associateWith() <.>
+ default "";
// end::refguide[]
/**
- * Indicates where (in the UI) the action is not visible to the user.
+ * Specifies the sequence/order in the UI for an action that's been associated with a property or collection.
*
* <p>
- * It is also possible to suppress an action's visibility using {@link ActionLayout#hidden()}.
+ * This is an alternative to using {@link MemberOrder#sequence()}, but is ignored if
+ * {@link Action#associateWith()} isn't also specified.
* </p>
*
* <p>
- * For {@link DomainService domain service} actions, the action's visibility is dependent upon its
- * {@link DomainService#nature() nature} and for contributed actions on how it is
- * {@link ActionLayout#contributed()}.
+ * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
* </p>
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * The action semantics, either {@link SemanticsOf#SAFE_AND_REQUEST_CACHEABLE cached}, {@link SemanticsOf#SAFE safe} (query-only),
- * {@link SemanticsOf#IDEMPOTENT idempotent} or
- * {@link SemanticsOf#NON_IDEMPOTENT non-idempotent}.
- */
- // tag::refguide[]
- SemanticsOf semantics() default SemanticsOf.NOT_SPECIFIED;
+ String associateWithSequence() <.>
+ default "1";
// end::refguide[]
/**
* Whether the action invocation should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
*/
// tag::refguide[]
- CommandReification command() default CommandReification.NOT_SPECIFIED;
+ CommandReification command() <.>
+ default CommandReification.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -113,7 +103,8 @@ public @interface Action {
* {@link org.apache.isis.applib.services.command.CommandContext CommandContext} domain service should be persisted.
*/
// tag::refguide[]
- CommandPersistence commandPersistence() default CommandPersistence.PERSISTED;
+ CommandPersistence commandPersistence() <.>
+ default CommandPersistence.PERSISTED;
// end::refguide[]
/**
@@ -126,7 +117,8 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- CommandExecuteIn commandExecuteIn() default CommandExecuteIn.FOREGROUND;
+ CommandExecuteIn commandExecuteIn() <.>
+ default CommandExecuteIn.FOREGROUND;
// end::refguide[]
/**
@@ -144,90 +136,111 @@ public @interface Action {
* </p>
*/
// tag::refguide[]
- Class<? extends CommandDtoProcessor> commandDtoProcessor() default CommandDtoProcessor.class;
+ Class<? extends CommandDtoProcessor> commandDtoProcessor() <.>
+ default CommandDtoProcessor.class;
// end::refguide[]
/**
- * Whether the action invocation should be published.
+ * Indicates that an invocation of the action should be posted to the
+ * {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
+ * {@link org.apache.isis.applib.events.domain.ActionDomainEvent}.
+ *
+ * <p>For example:
+ * </p>
+ *
+ * <pre>
+ * public class SomeObject{
+ * public static class ChangeStartDateDomainEvent extends ActionDomainEvent<SomeObject> { ... }
+ *
+ * @Action(domainEvent=ChangedStartDateDomainEvent.class)
+ * public void changeStartDate(final Date startDate) { ...}
+ * ...
+ * }
+ * </pre>
*
* <p>
- * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
- * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
// tag::refguide[]
- Publishing publishing() default Publishing.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * The type-of the elements returned by the action.
- * @return
- */
- // tag::refguide[]
- Class<?> typeOf() default Object.class;
+ Class<? extends ActionDomainEvent<?>> domainEvent() <.>
+ default ActionDomainEvent.Default.class;
// end::refguide[]
/**
- * Whether the action is restricted to prototyping.
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
*
* <p>
- * By default there are no restrictions, with the action being available in all environments.
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
* </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
// tag::refguide[]
- RestrictTo restrictTo() default RestrictTo.NOT_SPECIFIED;
+ String fileAccept() <.>
+ default "";
// end::refguide[]
/**
- * Associates this action with a property or collection, specifying its id.
- *
- * <p>
- * This is an alternative to using {@link MemberOrder#name()}. To specify the order (equivalent to
- * {@link MemberOrder#sequence()}}), use {@link #associateWithSequence()}.
- * </p>
+ * Indicates where (in the UI) the action is not visible to the user.
*
* <p>
- * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
+ * It is also possible to suppress an action's visibility using {@link ActionLayout#hidden()}.
* </p>
*
* <p>
- * If an action is associated with a collection, then any matching parameters will have
- * their choices automatically inferred from the collection (if not otherwise specified)
- * and any collection parameter defaults can be specified using checkboxes
- * (in the Wicket UI, at least).
+ * For {@link DomainService domain service} actions, the action's visibility is dependent upon its
+ * {@link DomainService#nature() nature} and for contributed actions on how it is
+ * {@link ActionLayout#contributed()}.
* </p>
*/
// tag::refguide[]
- String associateWith() default "";
+ Where hidden() <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
- * Specifies the sequence/order in the UI for an action that's been associated with a property or collection.
- *
- * <p>
- * This is an alternative to using {@link MemberOrder#sequence()}, but is ignored if
- * {@link Action#associateWith()} isn't also specified.
- * </p>
+ * Whether the action invocation should be published.
*
* <p>
- * For example <code>@Action(associateWith="items", associateWithSequence="2.1")</code>
+ * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService}
+ * or {@link org.apache.isis.applib.services.publish.PublisherService} is registered with the framework.
* </p>
*/
// tag::refguide[]
- String associateWithSequence() default "1";
+ Publishing publishing() <.>
+ default Publishing.NOT_SPECIFIED;
// end::refguide[]
/**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
+ * Whether the action is restricted to prototyping.
*
* <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
+ * By default there are no restrictions, with the action being available in all environments.
* </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
*/
// tag::refguide[]
- String fileAccept() default "";
+ RestrictTo restrictTo() <.>
+ default RestrictTo.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * The action semantics, either {@link SemanticsOf#SAFE_AND_REQUEST_CACHEABLE cached}, {@link SemanticsOf#SAFE safe} (query-only),
+ * {@link SemanticsOf#IDEMPOTENT idempotent} or
+ * {@link SemanticsOf#NON_IDEMPOTENT non-idempotent}.
+ */
+ // tag::refguide[]
+ SemanticsOf semantics() <.>
+ default SemanticsOf.NOT_SPECIFIED;
+
+ // end::refguide[]
+ /**
+ * The type-of the elements returned by the action.
+ * @return
+ */
+ // tag::refguide[]
+ Class<?> typeOf() <.>
+ default Object.class;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java
index 8a6f370..f488a72 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/ActionLayout.java
@@ -54,10 +54,27 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- BookmarkPolicy bookmarking() default BookmarkPolicy.NOT_SPECIFIED;
+ BookmarkPolicy bookmarking() <.>
+ default BookmarkPolicy.NOT_SPECIFIED;
// end::refguide[]
/**
+ * For actions of domain services that can be viewed and contributed (that is, whose
+ * {@link DomainService#nature() nature} is either {@link org.apache.isis.applib.annotation.NatureOfService#VIEW}
+ * or {@link org.apache.isis.applib.annotation.NatureOfService#VIEW_CONTRIBUTIONS_ONLY}), specifies how the
+ * contribution should be implemented, as an action, as an association, or as both.
+ *
+ * <p>
+ * Has no meaning for actions of domain entities.
+ * </p>
+ */
+ @Deprecated
+ Contributed contributed() <.>
+ default Contributed.NOT_SPECIFIED;
+
+ // tag::refguide[]
+ // end::refguide[]
+ /**
* Indicates the css class that an action should have.
*
* <p>
@@ -65,7 +82,8 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() <.>
+ default "";
// end::refguide[]
/**
@@ -73,7 +91,8 @@ public @interface ActionLayout {
* action (button or menu item).
*/
// tag::refguide[]
- String cssClassFa() default "";
+ String cssClassFa() <.>
+ default "";
// end::refguide[]
/**
@@ -81,28 +100,32 @@ public @interface ActionLayout {
* icon. The icon could be rendered on the left or the right of the action button
*/
// tag::refguide[]
- CssClassFaPosition cssClassFaPosition() default CssClassFaPosition.LEFT;
+ CssClassFaPosition cssClassFaPosition() <.>
+ default CssClassFaPosition.LEFT;
// end::refguide[]
/**
* Description of this action, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() <.>
+ default "";
// end::refguide[]
/**
* Indicates where in the UI the action should <i>not</i>not be visible.
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Where hidden() <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
* Name of this action (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() <.>
+ default "";
// end::refguide[]
/**
@@ -114,11 +137,11 @@ public @interface ActionLayout {
* </p>
*/
// tag::refguide[]
- Position position() default Position.NOT_SPECIFIED;
+ Position position() <.>
+ default Position.NOT_SPECIFIED;
- @XmlType(
- namespace = "http://isis.apache.org/applib/layout/component"
- )
+ // end::refguide[]
+ @XmlType(namespace = "http://isis.apache.org/applib/layout/component")
enum Position {
BELOW,
RIGHT,
@@ -127,12 +150,12 @@ public @interface ActionLayout {
NOT_SPECIFIED
}
- // end::refguide[]
/**
* How this parameters for this action are prompted, either {@link PromptStyle#DIALOG dialog} or {@link PromptStyle#INLINE inline}.
*/
// tag::refguide[]
- PromptStyle promptStyle() default PromptStyle.AS_CONFIGURED;
+ PromptStyle promptStyle() <.>
+ default PromptStyle.AS_CONFIGURED;
// end::refguide[]
/**
@@ -140,21 +163,8 @@ public @interface ActionLayout {
* instead to redirect (forcing a re-rendering of a new page).
*/
// tag::refguide[]
- Redirect redirectPolicy() default Redirect.AS_CONFIGURED;
-
- // end::refguide[]
- /**
- * For actions of domain services that can be viewed and contributed (that is, whose
- * {@link DomainService#nature() nature} is either {@link org.apache.isis.applib.annotation.NatureOfService#VIEW}
- * or {@link org.apache.isis.applib.annotation.NatureOfService#VIEW_CONTRIBUTIONS_ONLY}), specifies how the
- * contribution should be implemented, as an action, as an association, or as both.
- *
- * <p>
- * Has no meaning for actions of domain entities.
- * </p>
- */
- // tag::refguide[]
- Contributed contributed() default Contributed.NOT_SPECIFIED;
+ Redirect redirectPolicy() <.>
+ default Redirect.AS_CONFIGURED;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java
index 38a7d19..28fdd31 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Collection.java
@@ -64,14 +64,8 @@ public @interface Collection {
* </p>
*/
// tag::refguide[]
- Class<? extends CollectionDomainEvent<?,?>> domainEvent() default CollectionDomainEvent.Default.class;
-
- // end::refguide[]
- /**
- * Indicates when the collection is not visible to the user.
- */
- // tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Class<? extends CollectionDomainEvent<?,?>> domainEvent() // <.>
+ default CollectionDomainEvent.Default.class;
// end::refguide[]
/**
@@ -82,7 +76,8 @@ public @interface Collection {
* </p>
*/
// tag::refguide[]
- Editing editing() default Editing.NOT_SPECIFIED;
+ Editing editing() // <.>
+ default Editing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -90,7 +85,16 @@ public @interface Collection {
* then the reason to provide to the user as to why this property cannot be edited.
*/
// tag::refguide[]
- String editingDisabledReason() default "";
+ String editingDisabledReason() // <.>
+ default "";
+
+ // end::refguide[]
+ /**
+ * Indicates when the collection is not visible to the user.
+ */
+ // tag::refguide[]
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -102,7 +106,8 @@ public @interface Collection {
* </p>
*/
// tag::refguide[]
- MementoSerialization mementoSerialization() default MementoSerialization.NOT_SPECIFIED;
+ MementoSerialization mementoSerialization() // <.>
+ default MementoSerialization.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -111,7 +116,8 @@ public @interface Collection {
* @return
*/
// tag::refguide[]
- Class<?> typeOf() default Object.class;
+ Class<?> typeOf() // <.>
+ default Object.class;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CollectionLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CollectionLayout.java
index c061cbb..fe1512b 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CollectionLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CollectionLayout.java
@@ -46,14 +46,8 @@ public @interface CollectionLayout {
* Indicates the css class that a collection should have.
*/
// tag::refguide[]
- String cssClass() default "";
-
- // end::refguide[]
- /**
- * Description of this collection, eg to be rendered in a tooltip.
- */
- // tag::refguide[]
- String describedAs() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
@@ -68,7 +62,16 @@ public @interface CollectionLayout {
* </p>
*/
// tag::refguide[]
- String defaultView() default "";
+ String defaultView() // <.>
+ default "";
+
+ // end::refguide[]
+ /**
+ * Description of this collection, eg to be rendered in a tooltip.
+ */
+ // tag::refguide[]
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
@@ -80,21 +83,24 @@ public @interface CollectionLayout {
* </p>
*/
// tag::refguide[]
- Where hidden() default Where.NOT_SPECIFIED;
+ Where hidden() // <.>
+ default Where.NOT_SPECIFIED;
// end::refguide[]
/**
* Name of this collection (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
* A flag indicating whether the value of {@linkplain #named()} should be HTML escaped or not.
*/
// tag::refguide[]
- boolean namedEscaped() default true;
+ boolean namedEscaped() // <.>
+ default true;
// end::refguide[]
/**
@@ -110,7 +116,8 @@ public @interface CollectionLayout {
* collections (eg as returned from a repository query).
*/
// tag::refguide[]
- int paged() default -1;
+ int paged() // <.>
+ default -1;
// end::refguide[]
/**
@@ -133,7 +140,8 @@ public @interface CollectionLayout {
*/
@SuppressWarnings("rawtypes")
// tag::refguide[]
- Class sortedBy() default Comparator.class;
+ Class sortedBy() // <.>
+ default Comparator.class;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CommandReification.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CommandReification.java
index 32bef90..a2b8b68 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CommandReification.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/CommandReification.java
@@ -23,7 +23,6 @@ package org.apache.isis.applib.annotation;
*/
// tag::refguide[]
public enum CommandReification {
-
// end::refguide[]
/**
* Whether the action should be handled as a command as per the default command configured in <tt>applicationp.properties</tt>.
@@ -34,21 +33,18 @@ public enum CommandReification {
*/
// tag::refguide[]
AS_CONFIGURED,
-
// end::refguide[]
/**
* Handle the action as a command, irrespective of any configuration settings.
*/
// tag::refguide[]
ENABLED,
-
// end::refguide[]
/**
* Do not handle the action as a command, irrespective of any configuration settings.
*/
// tag::refguide[]
DISABLED,
-
// end::refguide[]
/**
* Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta
@@ -56,6 +52,5 @@ public enum CommandReification {
*/
// tag::refguide[]
NOT_SPECIFIED
-
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObject.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObject.java
index 66ece7f..b38efb7 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObject.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObject.java
@@ -53,9 +53,15 @@ import org.apache.isis.applib.events.lifecycle.ObjectUpdatingEvent;
})
@Retention(RetentionPolicy.RUNTIME)
@Component @Scope("prototype")
+// tag::refguide-lifecycle-events[]
+// tag::refguide-domain-events[]
public @interface DomainObject {
// end::refguide[]
+ // ...
+
+ // end::refguide-lifecycle-events[]
+ // end::refguide-domain-events[]
/**
* Whether the entity should be audited (note: does not apply to view models or other recreatable objects.
*
@@ -65,19 +71,8 @@ public @interface DomainObject {
* </p>
*/
// tag::refguide[]
- Auditing auditing() default Auditing.NOT_SPECIFIED;
-
- // end::refguide[]
- /**
- * Whether changes to the object should be published.
- *
- * <p>
- * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService} is
- * registered with the framework.
- * </p>
- */
- // tag::refguide[]
- Publishing publishing() default Publishing.NOT_SPECIFIED;
+ Auditing auditing() // <.>
+ default Auditing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -87,7 +82,8 @@ public @interface DomainObject {
* It is sufficient to specify an interface rather than a concrete type.
*/
// tag::refguide[]
- Class<?> autoCompleteRepository() default Object.class;
+ Class<?> autoCompleteRepository() // <.>
+ default Object.class;
// end::refguide[]
/**
@@ -98,7 +94,8 @@ public @interface DomainObject {
* The method is required to accept a single string parameter, and must return a list of the domain type.
*/
// tag::refguide[]
- String autoCompleteAction() default "autoComplete";
+ String autoCompleteAction() // <.>
+ default "autoComplete";
// end::refguide[]
/**
@@ -114,7 +111,8 @@ public @interface DomainObject {
*
*/
// tag::refguide[]
- Bounding bounding() default Bounding.NOT_SPECIFIED;
+ Bounding bounding() // <.>
+ default Bounding.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -125,7 +123,8 @@ public @interface DomainObject {
* </p>
*/
// tag::refguide[]
- Editing editing() default Editing.NOT_SPECIFIED;
+ Editing editing() // <.>
+ default Editing.NOT_SPECIFIED;
// end::refguide[]
/**
@@ -133,39 +132,57 @@ public @interface DomainObject {
* then the reason to provide to the user as to why the object's properties cannot be edited/collections modified.
*/
// tag::refguide[]
- String editingDisabledReason() default "Disabled";
+ String editingDisabledReason() // <.>
+ default "Disabled";
// end::refguide[]
/**
- * Provides a unique abbreviation for the object type, eg "customer.Customer" for Customer.
+ * Equivalent to {@link Mixin#method()}.
*
* <p>
- * This value, if specified, is used in the serialized form of the object's OID. An OID is
- * used by the framework to unique identify an object over time (same concept as a URN).
+ * Applicable only if {@link #nature()} is {@link Nature#MIXIN}.
* </p>
*/
// tag::refguide[]
- String objectType() default "";
+ String mixinMethod() // <.>
+ default Mixin.DEFAULT_METHOD_NAME;
// end::refguide[]
/**
* The nature of this domain object.
*/
// tag::refguide[]
- Nature nature() default Nature.NOT_SPECIFIED;
+ Nature nature() // <.>
+ default Nature.NOT_SPECIFIED;
// end::refguide[]
/**
- * Equivalent to {@link Mixin#method()}.
+ * Provides a unique abbreviation for the object type, eg "customer.Customer" for Customer.
*
* <p>
- * Applicable only if {@link #nature()} is {@link Nature#MIXIN}.
+ * This value, if specified, is used in the serialized form of the object's OID. An OID is
+ * used by the framework to unique identify an object over time (same concept as a URN).
+ * </p>
+ */
+ // tag::refguide[]
+ String objectType() // <.>
+ default "";
+
+ // end::refguide[]
+ /**
+ * Whether changes to the object should be published.
+ *
+ * <p>
+ * Requires that an implementation of the {@link org.apache.isis.applib.services.publish.PublisherService} is
+ * registered with the framework.
* </p>
*/
// tag::refguide[]
- String mixinMethod() default Mixin.DEFAULT_METHOD_NAME;
+ Publishing publishing() // <.>
+ default Publishing.NOT_SPECIFIED;
// end::refguide[]
+
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -175,10 +192,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectCreatedEvent<?>> createdLifecycleEvent() default ObjectCreatedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectCreatedEvent<?>>
+ createdLifecycleEvent() // <.>
+ default ObjectCreatedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -188,10 +207,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectPersistingEvent<?>> persistingLifecycleEvent() default ObjectPersistingEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectPersistingEvent<?>>
+ persistingLifecycleEvent() // <.>
+ default ObjectPersistingEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -201,10 +222,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectPersistedEvent<?>> persistedLifecycleEvent() default ObjectPersistedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectPersistedEvent<?>>
+ persistedLifecycleEvent() // <.>
+ default ObjectPersistedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -214,10 +237,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectLoadedEvent<?>> loadedLifecycleEvent() default ObjectLoadedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectLoadedEvent<?>>
+ loadedLifecycleEvent() // <.>
+ default ObjectLoadedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -227,10 +252,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectUpdatingEvent<?>> updatingLifecycleEvent() default ObjectUpdatingEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectUpdatingEvent<?>>
+ updatingLifecycleEvent() // <.>
+ default ObjectUpdatingEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -240,10 +267,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectUpdatedEvent<?>> updatedLifecycleEvent() default ObjectUpdatedEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectUpdatedEvent<?>>
+ updatedLifecycleEvent() // <.>
+ default ObjectUpdatedEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that the loading of the domain object should be posted to the
* {@link org.apache.isis.applib.services.eventbus.EventBusService event bus} using a custom (subclass of)
@@ -253,10 +282,12 @@ public @interface DomainObject {
* This subclass must provide a no-arg constructor; the fields are set reflectively.
* </p>
*/
- // tag::refguide[]
- Class<? extends ObjectRemovingEvent<?>> removingLifecycleEvent() default ObjectRemovingEvent.Default.class;
+ // tag::refguide-lifecycle-events[]
+ Class<? extends ObjectRemovingEvent<?>>
+ removingLifecycleEvent() // <.>
+ default ObjectRemovingEvent.Default.class;
- // end::refguide[]
+ // end::refguide-lifecycle-events[]
/**
* Indicates that an invocation of <i>any</i> action of the domain object (that do not themselves specify their own
* <tt>@Action(domainEvent=...)</tt> should be posted to the
@@ -284,10 +315,12 @@ public @interface DomainObject {
* It must also use <tt>Object</tt> as its generic type. This is to allow mixins to also emit the same event.
* </p>
*/
- // tag::refguide[]
- Class<? extends ActionDomainEvent<?>> actionDomainEvent() default ActionDomainEvent.Default.class;
+ // tag::refguide-domain-events[]
+ Class<? extends ActionDomainEvent<?>>
+ actionDomainEvent() // <.>
+ default ActionDomainEvent.Default.class;
- // end::refguide[]
+ // end::refguide-domain-events[]
/**
* Indicates that changes to <i>any</i> property of the domain object (that do not themselves specify their own
* <tt>@Property(domainEvent=...)</tt> should be posted to the
@@ -310,10 +343,12 @@ public @interface DomainObject {
* It must also use <tt>Object</tt> as its generic type. This is to allow mixins to also emit the same event.
* </p>
*/
- // tag::refguide[]
- Class<? extends PropertyDomainEvent<?,?>> propertyDomainEvent() default PropertyDomainEvent.Default.class;
+ // tag::refguide-domain-events[]
+ Class<? extends PropertyDomainEvent<?,?>>
+ propertyDomainEvent() // <.>
+ default PropertyDomainEvent.Default.class;
- // end::refguide[]
+ // end::refguide-domain-events[]
/**
* Indicates that changes to <i>any</i> collection of the domain object (that do not themselves specify their own
* <tt>@Collection(domainEvent=...)</tt> should be posted to the
@@ -335,8 +370,17 @@ public @interface DomainObject {
* It must also use <tt>Object</tt> as its generic type. This is to allow mixins to also emit the same event.
* </p>
*/
- // tag::refguide[]
- Class<? extends CollectionDomainEvent<?,?>> collectionDomainEvent() default CollectionDomainEvent.Default.class;
+ // tag::refguide-domain-events[]
+ Class<? extends CollectionDomainEvent<?,?>>
+ collectionDomainEvent() // <.>
+ default CollectionDomainEvent.Default.class;
+ // end::refguide-domain-events[]
+ // tag::refguide[]
+ // tag::refguide-lifecycle-events[]
+ // ...
+ // tag::refguide-domain-events[]
}
-// end::refguide[]
\ No newline at end of file
+// end::refguide[]
+// end::refguide-lifecycle-events[]
+// end::refguide-domain-events[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java
index b1360a8..8913b92 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/DomainObjectLayout.java
@@ -41,58 +41,18 @@ import org.apache.isis.applib.layout.component.CssClassFaPosition;
ElementType.ANNOTATION_TYPE
})
@Retention(RetentionPolicy.RUNTIME)
+// tag::refguide-ui-events[]
public @interface DomainObjectLayout {
// end::refguide[]
- /**
- * Which subclass of {@link TitleUiEvent} should be used to obtain a title.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
- */
- // tag::refguide[]
- Class<? extends TitleUiEvent<?>> titleUiEvent() default TitleUiEvent.Default.class;
-
- // end::refguide[]
- /**
- * Which subclass of {@link IconUiEvent} should be used to obtain an icon.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
- */
- // tag::refguide[]
- Class<? extends IconUiEvent<?>> iconUiEvent() default IconUiEvent.Default.class;
-
- // end::refguide[]
- /**
- * Which subclass of {@link CssClassUiEvent} should be used to obtain a CSS class.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
- */
- // tag::refguide[]
- Class<? extends CssClassUiEvent<?>> cssClassUiEvent() default CssClassUiEvent.Default.class;
-
- // end::refguide[]
- /**
- * Which subclass of {@link LayoutUiEvent} should be used to obtain a layout.
- *
- * <p>
- * This subclass must provide a no-arg constructor; the fields are set reflectively.
- * </p>
- */
- // tag::refguide[]
- Class<? extends LayoutUiEvent<?>> layoutUiEvent() default LayoutUiEvent.Default.class;
-
- // end::refguide[]
+ // ...
+ // end::refguide-ui-events[]
/**
* Indicates the css class that a domain class (type) should have.
*/
// tag::refguide[]
- String cssClass() default "";
+ String cssClass() // <.>
+ default "";
// end::refguide[]
/**
@@ -100,7 +60,8 @@ public @interface DomainObjectLayout {
* domain object.
*/
// tag::refguide[]
- String cssClassFa() default "";
+ String cssClassFa() // <.>
+ default "";
// end::refguide[]
/**
@@ -112,21 +73,24 @@ public @interface DomainObjectLayout {
* </p>
*/
// tag::refguide[]
- CssClassFaPosition cssClassFaPosition() default CssClassFaPosition.LEFT;
+ CssClassFaPosition cssClassFaPosition() // <.>
+ default CssClassFaPosition.LEFT;
// end::refguide[]
/**
* Description of this class, eg to be rendered in a tooltip.
*/
// tag::refguide[]
- String describedAs() default "";
+ String describedAs() // <.>
+ default "";
// end::refguide[]
/**
* Name of this class (overriding the name derived from its name in code).
*/
// tag::refguide[]
- String named() default "";
+ String named() // <.>
+ default "";
// end::refguide[]
/**
@@ -142,21 +106,79 @@ public @interface DomainObjectLayout {
* collections (eg as returned from a repository query).
*/
// tag::refguide[]
- int paged() default -1;
+ int paged() // <.>
+ default -1;
// end::refguide[]
/**
* The plural name of the class.
*/
// tag::refguide[]
- String plural() default "";
+ String plural() // <.>
+ default "";
// end::refguide[]
/**
* Whether (and how) this domain object can be bookmarked in the UI.
*/
// tag::refguide[]
- BookmarkPolicy bookmarking() default BookmarkPolicy.NOT_SPECIFIED;
+ BookmarkPolicy bookmarking() // <.>
+ default BookmarkPolicy.NOT_SPECIFIED;
+ // end::refguide[]
+ /**
+ * Which subclass of {@link TitleUiEvent} should be used to obtain a title.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
+ */
+ // tag::refguide-ui-events[]
+ Class<? extends TitleUiEvent<?>>
+ titleUiEvent() // <.>
+ default TitleUiEvent.Default.class;
+
+ // end::refguide-ui-events[]
+ /**
+ * Which subclass of {@link IconUiEvent} should be used to obtain an icon.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
+ */
+ // tag::refguide-ui-events[]
+ Class<? extends IconUiEvent<?>>
+ iconUiEvent() // <.>
+ default IconUiEvent.Default.class;
+
+ // end::refguide-ui-events[]
+ /**
+ * Which subclass of {@link CssClassUiEvent} should be used to obtain a CSS class.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
+ */
+ // tag::refguide-ui-events[]
+ Class<? extends CssClassUiEvent<?>>
+ cssClassUiEvent() // <.>
+ default CssClassUiEvent.Default.class;
+
+ // end::refguide-ui-events[]
+ /**
+ * Which subclass of {@link LayoutUiEvent} should be used to obtain a layout.
+ *
+ * <p>
+ * This subclass must provide a no-arg constructor; the fields are set reflectively.
+ * </p>
+ */
+ // tag::refguide-ui-events[]
+ Class<? extends LayoutUiEvent<?>>
+ layoutUiEvent() // <.>
+ default LayoutUiEvent.Default.class;
+
+ // tag::refguide[]
+ // ...
+ // tag::refguide-ui-events[]
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc
index b764016..0bda359 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc
@@ -5,100 +5,62 @@
The `@Action` annotation groups together all domain-specific metadata for an invokable action on a domain object or domain service.
-The table below summarizes the annotation's attributes.
-
-.`@Action` attributes
-[cols="2,2,4a", options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:Action.adoc#associateWith[`associateWith()`]
-|_memberId_ +
-("")
-|associates an action with another property or collection of the action.
-
-|xref:refguide:applib-ant:Action.adoc#associateWith[`associateWith-Sequence()`]
-|_memberId_ +
-("")
-|associates an action with another property or collection of the action.
-
-|xref:refguide:applib-ant:Action.adoc#command[`command()`]
-|`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
-(`AS_CONFIGURED`)
-|whether the action invocation should be reified into a `o.a.i.applib.` +
-`services.command.Command` object through the xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] service.
-
-
-|`commandExecuteIn()`
-|`FOREGROUND`,`BACKGROUND` +
-(`FOREGROUND`)
-|whether to execute the command immediately, or to persist it (assuming that an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured) such that a background scheduler can execute the command asynchronously
-
-
-|`commandPersistence()`
-|`PERSISTED`, `NOT_PERSISTED`, `IF_HINTED` +
-(`PERSISTED`)
-|whether the reified `Command` (as provided by the `CommandContext` domain service) should actually be persisted (assuming an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured).
-
-
-|`commandDtoProcessor()`
-|Implementation of `CommandDtoProcessor` interface +
-(null)
-|If the `Command` also implements `CommandWithDto` (meaning that it can return a `CommandDto`, in other words be converted into an XML memento), then optionally specifies a processor that can refine this XML.
-
-
-|xref:refguide:applib-ant:Action.adoc#domainEvent[`domainEvent()`]
-|subtype of `ActionDomainEvent` +
-(`ActionDomainEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to
-broadcast the action's business rule checking (hide, disable, validate) and its invocation (pre-execute and
-post-execute).
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/Action.java[tags="refguide"]
+----
+<.> xref:refguide:applib-ant:Action.adoc#associateWith[`associateWith()`]
++
+associates an action with another property or collection of the action.
+<.> xref:refguide:applib-ant:Action.adoc#associateWith[`associateWith()`]
++
+associates an action with another property or collection of the action.
-|xref:refguide:applib-ant:Action.adoc#hidden[`hidden()`]
-|`EVERYWHERE`, `NOWHERE` +
-(`NOWHERE`)
-|indicates where (in the UI) the action should be hidden from the user.
+<.> xref:refguide:applib-ant:Action.adoc#associateWith[`associateWithSequence()`]
+associates an action with another property or collection of the action.
+<.> xref:refguide:applib-ant:Action.adoc#command[`command()`]
+whether the action invocation should be reified into a `o.a.i.applib.` +
+`services.command.Command` object through the xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] service:
-|xref:refguide:applib-ant:Action.adoc#invokeOn[`invokeOn()`]
-|`OBJECT_ONLY`, `COLLECTION_ONLY`, `OBJECT_AND_COLLECTION` +
-(`OBJECT_ONLY`)
-|(deprecated - use view models and associated actions instead).
+<.> `commandExecuteIn()`
++
+Whether to execute the command immediately, or to persist it (assuming that an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured) such that a background scheduler can execute the command asynchronously
-whether an action can be invoked on a single object and/or on many objects in a collection.
+<.> `commandPersistence()`
++
+Whether the reified `Command` (as provided by the `CommandContext` domain service) should actually be persisted (assuming an appropriate implementation of xref:refguide:applib-svc:CommandService.adoc[`CommandService`] has been configured).
-Currently this is only supported for no-arg actions.
+<.> `commandDtoProcessor()`
++
+If the `Command` also implements `CommandWithDto` (meaning that it can return a `CommandDto`, in other words be converted into an XML memento), then optionally specifies a processor that can refine this XML.
+<.> xref:refguide:applib-ant:Action.adoc#domainEvent[`domainEvent()`]
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the action's business rule checking (hide, disable, validate) and its invocation (pre-execute and post-execute).
-|xref:refguide:applib-ant:Action.adoc#publishing[`publishing()`]
-|`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
-(`AS_CONFIGURED`)
-|whether the action invocation should be published to the registered xref:refguide:applib-svc:PublisherService.adoc[`PublisherService`].
+<.> xref:refguide:applib-ant:Action.adoc#hidden[`hidden()`]
++
+Indicates where (in the UI) the action should be hidden from the user.
-|xref:refguide:applib-ant:Action.adoc#restrictTo[`restrictTo()`]
-|`NO_RESTRICTIONS`,`PROTOTYPING` +
-(`NO_RESTRICTIONS`)
-|whether the action is only available in prototyping mode, or whether it is available also in production mode.
+<.> xref:refguide:applib-ant:Action.adoc#publishing[`publishing()`]
++
+Whether the action invocation should be published to the registered xref:refguide:applib-svc:PublisherService.adoc[`PublisherService`].
-|xref:refguide:applib-ant:Action.adoc#semantics[`semantics()`]
-|`SAFE_AND_REQUEST_CACHEABLE`, `SAFE`, +
-`IDEMPOTENT`, `IDEMPOTENT_ARE_YOU_SURE` +
-`NON_IDEMPOTENT`, `NON_IDEMPOTENT_ARE_YOU_SURE` + +
-(`NON_IDEMPOTENT`)
-|the action's semantics (ie whether objects are modified as the result of invoking this action, and if so whether reinvoking the action would result in no further change; if not whether the results can be cached for the remainder of the request).
+<.> xref:refguide:applib-ant:Action.adoc#restrictTo[`restrictTo()`]
++
+Whether the action is only available in prototyping mode, or whether it is available also in production mode.
+<.> xref:refguide:applib-ant:Action.adoc#semantics[`semantics()`]
++
+The action's semantics (ie whether objects are modified as the result of invoking this action, and if so whether reinvoking the action would result in no further change; if not whether the results can be cached for the remainder of the request).
++
The `...ARE_YOU_SURE` variants cause a confirmation dialog to be displayed in the xref:vw:ROOT:about.adoc[Wicket viewer].
-|xref:refguide:applib-ant:Action.adoc#typeOf[`typeOf()`]
-|(none)
-|if the action returns a collection, hints as to the run-time type of the objects within that collection (as a fallback)
-
-|===
+<.> xref:refguide:applib-ant:Action.adoc#typeOf[`typeOf()`]
++
+If the action returns a collection, hints as to the run-time type of the objects within that collection (as a fallback)
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc
index 4e4ef51..7959904 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc
@@ -26,7 +26,9 @@ The annotation works with (and is influenced by the behaviour of) a number of do
Each action invocation is automatically reified by the xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] service into a `Command` object, capturing details of the target object, the action, the parameter arguments, the user, a timestamp and so on.
-If an appropriate `CommandService` is configured (for example using (non-ASF) link:https://platform.incode.org/modules/spi/command/spi-command.html[Incode Platform's command] module), then the `Command` itself is persisted.
+If an appropriate `CommandService` is configured
+//(for example using (non-ASF) link:https://platform.incode.org/modules/spi/command/spi-command.html[Incode Platform's command] module),
+then the `Command` itself is persisted.
By default, actions are invoked in directly in the thread of the invocation.
//If there is an implementation of `BackgroundCommandService` (as the (non-ASF) link:https://platform.incode.org[Incode Platform^]'s command module does provide), then this means in turn that the `BackgroundService` can be used by the domain object code to programmatically create background ``Command``s.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc
index d363879..936ed89 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc
@@ -5,72 +5,43 @@
The `@ActionLayout` annotation applies to actions, collecting together all UI hints within a single annotation.
-The table below summarizes the annotation's attributes.
-
-.`@ActionLayout` attributes
-[cols="2,2,4a", options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:ActionLayout.adoc#bookmarking[`bookmarking`]
-|`AS_ROOT`, `NEVER` +
-(`NEVER`)
-|indicates if an action (with safe xref:refguide:applib-ant:Action.adoc#semantics[action semantics]) is automatically bookmarked.
-
-
-|xref:refguide:applib-ant:ActionLayout.adoc#contributedAs[`contributedAs`]
-|`AS_BOTH`, `AS_ACTION`, `AS_ASSOCIATION`, `AS_NEITHER` +
-(`AS_BOTH`)
-|for a domain service action that can be contributed, whether to contribute as an action or as an association (ie a property or collection). +
-
-For a domain service action to be contributed, the domain services must have a xref:refguide:applib-ant:DomainService.adoc#nature[nature] nature of either `VIEW` or `VIEW_CONTRIBUTIONS_ONLY`, and the action must have xref:refguide:applib-ant:Action.adoc#semantics[safe action semantics], and takes a single argument, namely the contributee domain object.
-
-
-|xref:refguide:applib-ant:ActionLayout.adoc#cssClass[`cssClass`]
-|Any string valid as a CSS class
-|an additional CSS class around the HTML that represents for the action, to allow targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]. +
-
-Supported by the xref:vw:ROOT:about.adoc[Wicket viewer] but currently ignored by the xref:vro:ROOT:about.adoc[RestfulObjects viewer].
-
-
-|xref:refguide:applib-ant:ActionLayout.adoc#cssClassFa[`cssClassFa`]
-|Any valid link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon name
-|specify a font awesome icon for the action's menu link or icon. +
-
-
-|`cssClassFaPosition()`
-|`LEFT`, `RIGHT` +
-(`LEFT`)
-|Positioning of the icon on the button/menu item.
-
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/ActionLayout.java[tags="refguide"]
+----
+<.> xref:refguide:applib-ant:ActionLayout.adoc#bookmarking[`bookmarking()`]
++
+Indicates if an action (with safe xref:refguide:applib-ant:Action.adoc#semantics[action semantics]) is automatically bookmarked.
-|xref:refguide:applib-ant:ActionLayout.adoc#describedAs[`describedAs`]
-|String.
-|provides a short description of the action, eg for rendering as a 'tool tip'.
+<.> xref:refguide:applib-ant:ActionLayout.adoc#cssClass[`cssClass()`]
++
+An additional CSS class around the HTML that represents for the action, to allow targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]. +
+<.> xref:refguide:applib-ant:ActionLayout.adoc#cssClassFa[`cssClassFa()`]
++
+Specify a link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon name for the action's menu link or icon.
-|xref:refguide:applib-ant:ActionLayout.adoc#hidden[`hidden`]
-|`EVERYWHERE`, `NOWHERE` +
-(`NOWHERE`)
-|indicates where (in the UI) the action should be hidden from the user.
+<.> `cssClassFaPosition()`
++
+Positioning of the icon on the button/menu item.
+<.> xref:refguide:applib-ant:ActionLayout.adoc#describedAs[`describedAs()`]
++
+Provides a short description of the action, eg for rendering as a 'tool tip'.
-|xref:refguide:applib-ant:ActionLayout.adoc#named[`named`]
-|String.
-|to override the name inferred from the action's name in code. +
+<.> xref:refguide:applib-ant:ActionLayout.adoc#hidden[`hidden()`]
++
+Indicates where (in the UI) the action should be hidden from the user.
+<.> xref:refguide:applib-ant:ActionLayout.adoc#named[`named()`]
++
+To override the name inferred from the action's name in code. +
A typical use case is if the desired name is a reserved Java keyword, such as `default` or `package`.
-|xref:refguide:applib-ant:ActionLayout.adoc#position[`position`]
-|`BELOW`, `RIGHT`, `PANEL`, `PANEL_DROPDOWN` (`BELOW`)
-|for actions associated (using xref:refguide:applib-ant:MemberOrder.adoc[`@MemberOrder#named`]) with properties, the positioning of the action's button with respect to the property
-
+<.> xref:refguide:applib-ant:ActionLayout.adoc#position[`position()`]
++
+For actions associated (using xref:refguide:applib-ant:MemberOrder.adoc[`@MemberOrder#named`]) with properties, the positioning of the action's button with respect to the property
-|===
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
index 370aa18..51e4c4e 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
@@ -5,57 +5,33 @@
The `@Collection` annotation applies to collections collecting together all domain semantics within a single annotation.
-The table below summarizes the annotation's attributes.
-
-.`@Collection` attributes
-[cols="2,2,4a", options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:Collection.adoc#domainEvent[`domainEvent`]
-|subtype of `CollectionDomainEvent` +
-(`CollectionDomainEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the collection's business rule checking (hide, disable, validate) and its modification (before and after).
-
-
-|xref:refguide:applib-ant:Collection.adoc#editing[`editing`]
-|`ENABLED`, `DISABLED`, `AS_CONFIGURED` +
-(`AS_CONFIGURED`)
-|whether a collection can be added to or removed from within the UI
-
-
-|`editingDisabledReason()`
-|String value
-|if `editing()` is `DISABLED`, provides a reason as to why.
-
-
-|xref:refguide:applib-ant:Collection.adoc#hidden[`hidden`]
-|`EVERYWHERE`, `OBJECT_FORMS`, `NOWHERE` +
-(`NOWHERE`)
-|indicates where (in the UI) the collection should be hidden from the user.
-
-
-|xref:refguide:applib-ant:Collection.adoc#notPersisted[`notPersisted`]
-|`true`, `false` +
-(`false`)
-|whether to exclude from snapshots. +
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/Collection.java[tags="refguide"]
+----
+<.> xref:refguide:applib-ant:Collection.adoc#domainEvent[`domainEvent()`]
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the collection's business rule checking (hide, disable, validate) and its modification (before and after).
-[WARNING]
-====
-Collection must also be annotated with `@javax.jdo.annotations.NotPersistent` in order to not be persisted.
-====
+<.> xref:refguide:applib-ant:Collection.adoc#editing[`editing()`]
++
+Whether a collection can be added to or removed from within the UI
+<.> `editingDisabledReason()`
++
+If `editing()` is `DISABLED`, provides a reason as to why.
+<.> xref:refguide:applib-ant:Collection.adoc#hidden[`hidden()`]
++
+Indicates where (in the UI) the collection should be hidden from the user.
-|xref:refguide:applib-ant:Collection.adoc#typeOf[`typeOf`]
-|
-|hints as to the run-time type of the objects within that collection (as a fallback)
+<.> xref:refguide:applib-ant:Collection.adoc#mementoSerialization[`mementoSerialization()`]
++
+Whether to include/exclude in snapshots. +
-|===
+<.> xref:refguide:applib-ant:Collection.adoc#typeOf[`typeOf()`]
++
+Hints as to the run-time type of the objects within that collection (as a fallback)
For example:
@@ -99,5 +75,5 @@ so that boilerplate-busting tools such as link:https://projectlombok.org/[Projec
include::Collection/domainEvent.adoc[leveloffset=+1]
include::Collection/editing.adoc[leveloffset=+1]
include::Collection/hidden.adoc[leveloffset=+1]
-include::Collection/notPersisted.adoc[leveloffset=+1]
+include::Collection/mementoSerialization.adoc[leveloffset=+1]
include::Collection/typeOf.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection/notPersisted.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection/mementoSerialization.adoc
similarity index 54%
rename from api/applib/src/main/adoc/modules/applib-ant/pages/Collection/notPersisted.adoc
rename to api/applib/src/main/adoc/modules/applib-ant/pages/Collection/mementoSerialization.adoc
index 23dd429..af4f1b7 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection/notPersisted.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection/mementoSerialization.adoc
@@ -1,49 +1,24 @@
-= `notPersisted`
+= `mementoSerialization`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-partial:
-The (somewhat misnamed) `notPersisted` attribute indicates that the collection should be excluded from any snapshots generated by the xref:refguide:applib-svc:XmlSnapshotService.adoc[`XmlSnapshotService`].
-
-
-[WARNING]
-====
-This annotation does _not_ specify that a collection is not persisted in the JDO/DataNucleus objectstore. See below for details as to how to additionally annotate the collection for this.
-====
-
+The `mementoSerialization` attribute indicates that the collection should be included or excluded from any snapshots generated by the xref:refguide:applib-svc:XmlSnapshotService.adoc[`XmlSnapshotService`].
For example:
[source,java]
----
public class Customer {
- @Collection(notPersisted=true)
+ @Collection(mementoSerialization=EXCLUDED)
public SortedSet<Order> getPreviousOrders() {...}
public void setPreviousOrder(SortedSet<Order> previousOrders) {...}
...
}
----
-Historically this annotation also hinted as to whether the collection's contents should be persisted in the object store. However, the JDO/DataNucleus objectstore does not recognize this annotation. Thus, to ensure that a collection is actually not persisted, it should *also* be annotated with `@javax.jdo.annotations.NotPersistent`.
-
-For example:
-
-[source,java]
-----
-public class Customer {
- @Collection(notPersisted=true) // <1>
- @javax.jdo.annotations.NotPersistent // <2>
- public SortedSet<Order> getPreviousOrders() {...}
- public void setPreviousOrder(SortedSet<Order> previousOrders) {...}
- ...
-}
-----
-<1> ignored by Apache Isis
-<2> ignored by JDO/DataNucleus
-
-
Alternatively, if the collection is derived, then providing only a "getter" will also work:
@@ -55,8 +30,7 @@ public class Customer {
}
----
-
== See also
-This attribute is also supported for xref:refguide:applib-ant:Property.adoc#notPersisted[properties].
+This attribute is also supported for xref:refguide:applib-ant:Property.adoc#mementoSerialization[properties].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc
index 72a4d06..08a88f2 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc
@@ -3,68 +3,45 @@
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-The `@CollectionLayout` annotation applies to collections, collecting together all UI hints within a single
-annotation. It is also possible to apply the annotation to actions of domain services that are acting as contributed collections.
-
-The table below summarizes the annotation's attributes.
-
-.`@CollectionLayout` attributes
-[cols="2,2,4a", options="header"]
-|===
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:CollectionLayout.adoc#cssClass[`cssClass()`]
-|Any string valid as a CSS class
-|the css class that a collection should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-
-
-|xref:refguide:applib-ant:CollectionLayout.adoc#defaultView[`defaultView()`]
-|`table`, `excel`, `calendar`, `map`, ...
-|Which view is selected by default, if multiple views are available.
-
-See the (non-ASF) link:https://platform.incode.org[Incode Platform^] for further Wicket components providing views.
-
-
-
-|xref:refguide:applib-ant:CollectionLayout.adoc#describedAs[`describedAs()`]
-|String.
-|description of this collection, eg to be rendered in a tooltip.
+The `@CollectionLayout` annotation applies to collections, collecting together all UI hints within a single annotation.
+It is also possible to apply the annotation to actions of domain services that are acting as contributed collections.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/CollectionLayout.java[tags="refguide"]
+----
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#cssClass[`cssClass()`]
++
+The css class that a collection should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-|xref:refguide:applib-ant:CollectionLayout.adoc#hidden[`hidden()`]
-|`EVERYWHERE`, `OBJECT_FORMS`, `NOWHERE` +
-(`NOWHERE`)
-|indicates where (in the UI) the collection should be hidden from the user.
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#defaultView[`defaultView()`]
++
+Which view is selected by default, if multiple views are available.
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#describedAs[`describedAs()`]
++
+Description of this collection, eg to be rendered in a tooltip.
-|xref:refguide:applib-ant:CollectionLayout.adoc#named[`named`]
-|String.
-|to override the name inferred from the collection's name in code. +
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#hidden[`hidden()`]
++
+Indicates where (in the UI) the collection should be hidden from the user.
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#named[`named()`]
++
+To override the name inferred from the collection's name in code. +
A typical use case is if the desired name is a reserved Java keyword, such as `default` or `package`.
+<.> `namedEscaped()`
++
+Whether to HTML escape the name of this property.
-|namedEscaped()
-|`true`,`false` (`true`)
-|whether to HTML escape the name of this property.
-
-
-|xref:refguide:applib-ant:CollectionLayout.adoc#paged[`paged()`]
-|Positive integer
-|the page size for instances of this class when rendered within a table.
-
-
-|xref:refguide:applib-ant:CollectionLayout.adoc#sortedBy[`sortedBy()`]
-|Subclass of `java.util.Comparator` for element type
-|indicates that the elements in the `java.util.SortedSet` collection should be sorted according to a specified `Comparator` rather than their natural sort order.
-
-|===
-
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#paged[`paged()`]
++
+The page size for instances of this class when rendered within a table.
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#sortedBy[`sortedBy()`]
++
+Indicates that the elements in the `java.util.SortedSet` collection should be sorted according to a specified `Comparator` rather than their natural sort order.
For example:
@@ -84,30 +61,17 @@ public class ToDoItem {
}
----
-
-
[TIP]
====
As an alternative to using the `@CollectionLayout` annotation, a xref:vw:ROOT:layout.adoc#file-based[file-based layout] can be used (and is generally to be preferred since it is more flexible/powerful).
====
-
-
-
-
[TIP]
====
-The annotation is one of a handful (others including xref:refguide:applib-ant:Collection.adoc[`@Collection`], xref:refguide:applib-ant:Property.adoc[`@Property`] and xref:refguide:applib-ant:PropertyLayout.adoc[`@PropertyLayout`]) that can also be applied to the field, rather than the getter method. This is specifically
-so that boilerplate-busting tools such as link:https://projectlombok.org/[Project Lombok] can be used.
+The annotation is one of a handful (others including xref:refguide:applib-ant:Collection.adoc[`@Collection`], xref:refguide:applib-ant:Property.adoc[`@Property`] and xref:refguide:applib-ant:PropertyLayout.adoc[`@PropertyLayout`]) that can also be applied to the field, rather than the getter method.
+This is specifically so that boilerplate-busting tools such as link:https://projectlombok.org/[Project Lombok] can be used.
====
-
-
-
-
-
-
-
include::CollectionLayout/cssClass.adoc[leveloffset=+1]
include::CollectionLayout/defaultView.adoc[leveloffset=+1]
include::CollectionLayout/describedAs.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Column.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Column.adoc
index c4672a1..ed1eb4a 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Column.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Column.adoc
@@ -9,14 +9,15 @@ Apache Isis also parses and interprets this annotation in order to build up aspe
[NOTE]
====
-Isis parses the `@Column` annotation from the Java source code; it does not query the JDO metamodel. This means that it the `@Column` annotation must be used rather than the equivalent `<column>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/orm/schema_mapping.html[XML metadata].
+Apache Isis parses the `@Column` annotation from the Java source code; it does not query the JDO metamodel.
+This means that it the `@Column` annotation must be used rather than the equivalent `<column>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/orm/schema_mapping.html[XML metadata].
-Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method. Therefore ensure that the annotation is placed there.
+Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method.
+Therefore ensure that the annotation is placed there.
====
This section identifies which attributes of `@Column` are recognized and used by Apache Isis.
-
== Nullability
The `allowsNull` attribute is used to specify if a property is mandatory or is optional.
@@ -31,12 +32,16 @@ public class Customer {
public void setMiddleInitial(String middleInitial) { /* ... */ }
----
-Isis also provides xref:refguide:applib-ant:Property.adoc#optionality[`@Property#optionality`] attribute. If both are specified, Apache Isis will check when it initializes for any contradictions, and will fail-fast with an appropriate error message in the log if there are.
-
-You should also be aware that in the lack of either the `@Column#allowsNull` or the `@Property#optionality` attributes, that the JDO and Apache Isis defaults differ. Apache Isis rule is straight-forward: properties are assumed to be required. JDO on the other hand specifies that only primitive types are mandatory; everything else is assumed to be optional. Therefore a lack of either annotation can also trigger the fail-fast validation check.
+Isis also provides xref:refguide:applib-ant:Property.adoc#optionality[`@Property#optionality`] attribute.
+If both are specified, Apache Isis will check when it initializes for any contradictions, and will fail-fast with an appropriate error message in the log if there are.
-In the vast majority of cases you should be fine just to add the `@Column#allowsNull` attribute to the getter. But see the documentation for xref:refguide:applib-ant:Property.adoc#optionality[`@Property#optionality`] attribute for discussion on one or two minor edge cases.
+You should also be aware that in the lack of either the `@Column#allowsNull` or the `@Property#optionality` attributes, that the JDO and Apache Isis defaults differ.
+Apache Isis rule is straight-forward: properties are assumed to be required.
+JDO on the other hand specifies that only primitive types are mandatory; everything else is assumed to be optional.
+Therefore a lack of either annotation can also trigger the fail-fast validation check.
+In the vast majority of cases you should be fine just to add the `@Column#allowsNull` attribute to the getter.
+But see the documentation for xref:refguide:applib-ant:Property.adoc#optionality[`@Property#optionality`] attribute for discussion on one or two minor edge cases.
== Length for ``String``s
@@ -61,11 +66,8 @@ public class Customer {
Apache Isis also provides xref:refguide:applib-ant:Property.adoc#maxLength[`@Property#maxLength`] attribute.
If both are specified, Apache Isis will check when it initializes for any contradictions, and will fail-fast with an appropriate error message in the log if there are.
-
-
== Length/scale for ``BigDecimal``s
-
The `length()` and `scale` attributes are used to infer the precision/scale of `java.math.BigDecimal` property types as they map to `decimal(n,p)` columns.
For example:
@@ -83,17 +85,17 @@ There is a subtle difference here: while `@Column#scale()` corresponds to `@Digi
If both are specified, Apache Isis will check when it initializes for any contradictions, and will fail-fast with an appropriate error message in the log if there are.
-
-
[[rg-ant-hints-and-tips]]
== Hints and Tips
-This seems to be a good place to describe some additional common mappings that use `@Column`. Unlike the sections above, the attributes specified in these hints and tips aren't actually part of Apache Isis metamodel.
-
+This seems to be a good place to describe some additional common mappings that use `@Column`.
+Unlike the sections above, the attributes specified in these hints and tips aren't actually part of Apache Isis metamodel.
=== Mapping foreign keys
-The `name` attribute can be used to override the name of the column. References to other objects are generally mapped as foreign key columns. If there are multiple references to a given type, then you will want to override the name that JDO/DataNucleus would otherwise default.
+The `name` attribute can be used to override the name of the column.
+References to other objects are generally mapped as foreign key columns.
+If there are multiple references to a given type, then you will want to override the name that JDO/DataNucleus would otherwise default.
For example (taken from link:http://github.com/estatio/estatio[estatio] app):
@@ -110,11 +112,11 @@ public class PartyRelationship {
}
----
-
-
=== Mapping ``Blob``s and ``Clob``s
-Isis provides custom value types for xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]s and xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]s. These value types have multiple internal fields, meaning that they corresponding to multiple columns in the database. Mapping this correctly requires using `@Column` within JDO's `@Persistent` annotation.
+Isis provides custom value types for xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]s and xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]s.
+These value types have multiple internal fields, meaning that they corresponding to multiple columns in the database.
+Mapping this correctly requires using `@Column` within JDO's `@Persistent` annotation.
For example, here's how to map a `Blob` (taken from http://github.com/apache/isis-app-todoapp[TodoApp]):
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Discriminator.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Discriminator.adoc
index 7b65cfa..748cdf8 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Discriminator.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Discriminator.adoc
@@ -6,28 +6,29 @@
The `@javax.jdo.annotation.Discriminator` is used by JDO/DataNucleus to specify how to discriminate between subclasses of an inheritance hierarchy.
-It is valid to add a `@Discriminator` for any class, even those not part of an explicitly mapped inheritance hierarchy. Apache Isis also checks for this annotation, and if present will use the `@Discriminator#value()` as the object type, a unique alias for the object's class name.
+It is valid to add a `@Discriminator` for any class, even those not part of an explicitly mapped inheritance hierarchy.
+Apache Isis also checks for this annotation, and if present will use the `@Discriminator#value()` as the object type, a unique alias for the object's class name.
[NOTE]
====
-Isis parses the `@Discriminator` annotation from the Java source code; it does not query the JDO metamodel. This means that it the `@Discriminator` annotation must be used rather than the equivalent `<discriminator>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/orm/inheritance.html[XML metadata].
+Isis parses the `@Discriminator` annotation from the Java source code; it does not query the JDO metamodel.
+This means that it the `@Discriminator` annotation must be used rather than the equivalent `<discriminator>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/orm/inheritance.html[XML metadata].
-Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method. Therefore ensure that the annotation is placed there.
+Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method.
+Therefore ensure that the annotation is placed there.
====
This value is used internally to generate a string representation of an objects identity (the `Oid`).
This can appear in several contexts, including:
* as the value of `Bookmark#getObjectType()` and in the `toString()` value of `Bookmark`
- (see xref:refguide:applib-svc:BookmarkService.adoc[`BookmarkService`])
- ** and thus in the "table-of-two-halves" pattern, as per the (non-ASF) link:https://platform.incode.org[Incode Platform^]'s poly module
+(see xref:refguide:applib-svc:BookmarkService.adoc[`BookmarkService`])
+** and thus in the "table-of-two-halves" pattern, as per the (non-ASF) link:https://platform.incode.org[Incode Platform^]'s poly module
* in the serialization of `OidDto` in the xref:refguide:schema:cmd[command] and xref:refguide:schema:about.adoc#ixn.adoc[interaction] schemas
* in the URLs of the xref:vro:ROOT:about.adoc[RestfulObjects viewer]
* in the URLs of the xref:vw:ROOT:about.adoc[Wicket viewer] (in general and in particular if xref:vw:ROOT:features.adoc#hints-and-copy-url[copying URLs])
* in XML snapshots generated by the xref:refguide:applib-svc:XmlSnapshotService.adoc[`XmlSnapshotService`]
-
-
== Examples
For example:
@@ -42,7 +43,6 @@ public class Customer {
has an object type of `custmgmt.Customer`.
-
== Precedence
The rules of precedence for determining a domain object's object type are:
@@ -50,13 +50,11 @@ The rules of precedence for determining a domain object's object type are:
1. xref:refguide:applib-ant:Discriminator.adoc[`@Discriminator`]
2. `@DomainObject#objectType`
3. xref:refguide:applib-ant:PersistenceCapable.adoc[`@PersistenceCapable`], if at least the `schema` attribute is defined. +
-+
-If both `schema` and `table` are defined, then the value is "`schema.table`".
++ If both `schema` and `table` are defined, then the value is "`schema.table`".
If only `schema` is defined, then the value is "`schema.className`".
4. Fully qualified class name of the entity.
-
[TIP]
====
This might be obvious, but to make explicit: we recommend that you always specify an object type for your domain objects.
@@ -65,8 +63,8 @@ Otherwise, if you refactor your code (change class name or move package), then a
At best this will require a data migration in the database; at worst it could cause external clients accessing data through the xref:vro:ROOT:about.adoc[Restful Objects] viewer to break.
====
-
[NOTE]
====
-If the object type is not unique across all domain classes then the framework will fail-fast and fail to boot. An error message will be printed in the log to help you determine which classes have duplicate object tyoes.
+If the object type is not unique across all domain classes then the framework will fail-fast and fail to boot.
+An error message will be printed in the log to help you determine which classes have duplicate object tyoes.
====
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc
index 1e0093b..19545ce 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc
@@ -6,109 +6,118 @@
The `@DomainObject` annotation applies to domain objects, collecting together all domain semantics within a single annotation.
-The table below summarizes the annotation's attributes.
+== Main API
-.`@DomainObject` attributes
-[cols="2,2,4a", options="header"]
-|===
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainObject.java[tags="refguide"]
+----
+<.> xref:refguide:applib-ant:DomainObject.adoc#auditing[`auditing()`]
++
+Indicates whether each of the changed properties of an object should be submitted to the registered
+xref:refguide:applib-svc:AuditerService.adoc[`AuditerService`](s)
-| Attribute
-| Values (default)
-| Description
+<.> xref:refguide:applib-ant:DomainObject.adoc#autoCompleteRepository[`autoCompleteRepository()`]
++
+Nominate a method on a domain service to be used for looking up instances of the domain object
+<.> `autoCompleteAction()`
++
+Override the method name to use on the auto-complete repository
-|xref:refguide:applib-ant:DomainObject.adoc#auditing[`auditing()`]
-|`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
-(`AS_CONFIGURED`)
-|indicates whether each of the changed properties of an object should be submitted to the registered
-xref:refguide:applib-svc:AuditerService.adoc[`AuditerService`](s)
+<.> xref:refguide:applib-ant:DomainObject.adoc#bounding[`bounding()`]
++
+Whether the number of instances of this domain class is relatively small (a "bounded" set), such that instances could be selected from a drop-down list box or similar.
+<.> xref:refguide:applib-ant:DomainObject.adoc#editing[`editing()`]
++
+Whether the object's properties and collections can be edited or not (ie whether the instance should be considered to be immutable)
-|xref:refguide:applib-ant:DomainObject.adoc#autoCompleteRepository[`autoCompleteRepository()`]
-|Domain service class
-|nominate a method on a domain service to be used for looking up instances of the domain object
+<.> `editingDisabledReason()`
++
+The default reason why the object's properties and collections cannot be edited.
+<.> xref:refguide:applib-ant:DomainObject.adoc#mixinMethod[`mixinMethod()`]
++
+How to recognize the "reserved" method name, meaning that the mixin's own name will be inferred from the mixin type.
+Typical examples are "exec", "execute", "invoke", "apply" and so on.
+The default "reserved" method name is `$$`.
-|`autoCompleteAction()`
-|Method name +
-(`autoComplete()`)
-|override the method name to use on the auto-complete repository
+<.> xref:refguide:applib-ant:DomainObject.adoc#nature[`nature()`]
++
+Whether the domain object logically is an entity (part of the domain layer) or is a view model (part of the application layer); or is a mixin.
+If an entity, indicates how its persistence is managed.
+<.> xref:refguide:applib-ant:DomainObject.adoc#objectType[`objectType()`]
++
+Specify an alias for the domain class used to uniquely identify the object both within the Apache Isis runtime and externally
-|xref:refguide:applib-ant:DomainObject.adoc#bounding[`bounding()`]
-|`true`, `false` +
-(`false`)
-|Whether the number of instances of this domain class is relatively small (a "bounded" set), such that instances could be selected from a drop-down list box or similar.
+<.> xref:refguide:applib-ant:DomainObject.adoc#publishing[`publishing()`]
++
+Whether changes to the object should be published to the registered xref:refguide:applib-svc:PublisherService.adoc[`PublisherService`].
-|xref:refguide:applib-ant:DomainObject.adoc#createdLifecycleEvent[`created-` +
-`LifecycleEvent()`]
-|subtype of `ObjectCreatedEvent` +
-(`ObjectCreatedEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance is created
-|xref:refguide:applib-ant:DomainObject.adoc#editing[`editing()`]
-|`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
-(`AS_CONFIGURED`)
-|whether the object's properties and collections can be edited or not (ie whether the instance should be considered to be immutable)
+== Entity Lifecycle API
-|xref:refguide:applib-ant:DomainObject.adoc#mixinMethod[`mixinMethod()`]
-|Method name within the mixin
-|How to recognize the "reserved" method name, meaning that the mixin's own name will be inferred from the mixin type.
-Typical examples are "exec", "execute", "invoke", "apply" and so on.
-The default "reserved" method name is `$$`.
+These attributes define the events to be fired throughout an the persistence lifecycle of a domain entity:
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainObject.java[tags="refguide-lifecycle-events"]
+----
+<.> xref:refguide:applib-ant:DomainObject.adoc#createdLifecycleEvent[`createdLifecycleEvent()`]
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance is created
-|xref:refguide:applib-ant:DomainObject.adoc#nature[`nature()`]
-|`NOT_SPECIFIED`, `JDO_ENTITY`, `EXTERNAL_ENTITY`, `INMEMORY_ENTITY`, `MIXIN`, `VIEW_MODEL` (`NOT_SPECIFIED`)
-|whether the domain object logically is an entity (part of the domain layer) or is a view model (part of the application layer); or is a mixin.
-If an entity, indicates how its persistence is managed.
+<.> xref:refguide:applib-ant:DomainObject.adoc#persistingLifecycleEvent[`persistingLifecycleEvent()`]
++
+The event type to be posted to whenever an instance is about to be persisted
+<.> xref:refguide:applib-ant:DomainObject.adoc#persistedLifecycleEvent[`persistedLifecycleEvent()`]
++
+The event type to be posted whenever an instance has just been persisted
-|xref:refguide:applib-ant:DomainObject.adoc#objectType[`objectType()`]
-|(none, which implies fully qualified class name)
-|specify an alias for the domain class used to uniquely identify the object both within the Apache Isis runtime and externally
+<.> xref:refguide:applib-ant:DomainObject.adoc#loadedLifecycleEvent[`loadedLifecycleEvent()`]
++
+The event type to be posted whenever an instance has just been loaded from the datastore
+<.> xref:refguide:applib-ant:DomainObject.adoc#removingLifecycleEvent[`removingLifecycleEvent()`]
++
+The event type to be posted whenever an instance is about to be deleted
-|xref:refguide:applib-ant:DomainObject.adoc#persistedLifecycleEvent[`persisted-` +
-`LifecycleEvent()`]
-|subtype of `ObjectPersistedEvent` +
-(`ObjectPersistedEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance has just been persisted
+<.> xref:refguide:applib-ant:DomainObject.adoc#updatedLifecycleEvent[`updatedLifecycleEvent()`]
++
+The event type to be posted whenever an instance has just been updated
-|xref:refguide:applib-ant:DomainObject.adoc#persistingLifecycleEvent[`persisting-` +
-`LifecycleEvent()`]
-|subtype of `ObjectPersistingEvent` +
-(`ObjectPersistingEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance is about to be persisted
+<.> xref:refguide:applib-ant:DomainObject.adoc#updatingLifecycleEvent[`updatingLifecycleEvent()`]
++
+The event type to be posted whenever an instance is about to be updated
-|xref:refguide:applib-ant:DomainObject.adoc#publishing[`publishing()`]
-|`AS_CONFIGURED`, `ENABLED`, `DISABLED` +
-(`AS_CONFIGURED`)
-|whether changes to the object should be published to the registered xref:refguide:applib-svc:PublisherService.adoc[`PublisherService`].
+== Domain Events API
+These attributes define the events to be fired when a domain object's members (its actions, properties and collections) are interacted with.
-|xref:refguide:applib-ant:DomainObject.adoc#removingLifecycleEvent[`removing-` +
-`LifecycleEvent()`]
-|subtype of `ObjectRemovingEvent` +
-(`ObjectRemovingEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance is about to be deleted
+These attributes define the default event types; they can be overridden for each specific domain member.
-|xref:refguide:applib-ant:DomainObject.adoc#updatedLifecycleEvent[`updated-` +
-`LifecycleEvent()`]
-|subtype of `ObjectUpdatedEvent` +
-(`ObjectUpdatedEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance has just been updated
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainObject.java[tags="refguide-domain-events"]
+----
+<.> `actionDomainEvent()`
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an action of the domain object is interacted with (if not overridden using xref:refguide:applib-ant:Action.adoc#domainevent[`@Action#domainEvent()]`).
-|xref:refguide:applib-ant:DomainObject.adoc#updatingLifecycleEvent[`updating-` +
-`LifecycleEvent()`]
-|subtype of `ObjectUpdatingEvent` +
-(`ObjectUpdatingEvent.Default`)
-|the event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance is about to be updated
+<.> `propertyDomainEvent()`
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever a property of the domain object is interacted with (if not overridden using xref:refguide:applib-ant:Property.adoc#domainevent[`@Property#domainEvent()]`).
-|===
+<.> `collectionDomainEvent()`
++
+The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever a collection of the domain object is interacted with (if not overridden using xref:refguide:applib-ant:Collection.adoc#domainevent[`@Collection#domainEvent()]`).
+// TODO: v2: currently missing subpages for these attributes.
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
index bdeebe8..98df34b 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
@@ -6,17 +6,25 @@
The `@DomainObjectLayout` annotation applies to domain classes, collecting together all UI hints within a single annotation.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainObjectLayout.java[tags="refguide"]
+----
+
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainObjectLayout.java[tags="refguide-ui-events"]
+----
[NOTE]
====
For view models that have been annotated with `@ViewModel` the equivalent xref:refguide:applib-ant:ViewModelLayout.adoc[`@ViewModelLayout`] can be used.
====
-
The table below summarizes the annotation's attributes.
.`@DomainObjectLayout` attributes
-[cols="2,2,4a", options="header"]
+[cols="2,2,4a",options="header"]
|===
| Attribute
@@ -89,8 +97,6 @@ A typical use case is if the desired name is a reserved Java keyword, such as `d
|===
-
-
For example:
[source,java]
@@ -108,20 +114,11 @@ public class ToDoItem {
}
----
-
-
[NOTE]
====
Note that there is (currently) no support for specifying UI hints for domain objects through the dynamic xref:vw:ROOT:layout.adoc#file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
====
-
-
-
-
-
-
-
include::DomainObjectLayout/bookmarking.adoc[leveloffset=+1]
include::DomainObjectLayout/cssClass.adoc[leveloffset=+1]
include::DomainObjectLayout/cssClassFa.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
index 1b35d9d..8942197 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
@@ -6,13 +6,15 @@
The `@DomainService` annotation indicates that the (concrete) class should be automatically instantiated as a domain service.
-Domain services with this annotation do NOT need to be registered explicitly in `isis.properties`; they will be
-discovered automatically on the CLASSPATH.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainService.java[tags="refguide"]
+----
The table below summarizes the annotation's attributes.
.`@DomainService` attributes
-[cols="2,2,4a", options="header"]
+[cols="2,2,4a",options="header"]
|===
| Attribute
@@ -39,8 +41,6 @@ The instanceId for services is always "1".
|===
-
-
For example:
[source,java]
@@ -55,12 +55,6 @@ public class LoanRepository {
}
----
-
-
-
-
-
-
include::DomainService/nature.adoc[leveloffset=+1]
include::DomainService/objectType.adoc[leveloffset=+1]
include::DomainService/repositoryFor.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
index 39c8844..c432616 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
@@ -11,11 +11,18 @@ The `@DomainServiceLayout` annotation applies to domain services, collecting tog
You will also find some additional material in the xref:vw:ROOT:layout.adoc#application-menu[object layout] chapter.
====
+The annotation is:
+
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/DomainServiceLayout.java[tags="refguide"]
+----
+
The table below summarizes the annotation's attributes.
.`@DomainServiceLayout` attributes
-[cols="2,2,4a", options="header"]
+[cols="2,2,4a",options="header"]
|===
| Attribute
@@ -36,8 +43,6 @@ The table below summarizes the annotation's attributes.
|===
-
-
For example:
[source,java]
@@ -53,19 +58,11 @@ public class ToDoItems {
}
----
-
-
[NOTE]
====
Note that there is (currently) no support for specifying UI hints for domain services through the dynamic xref:vw:ROOT:layout.adoc#file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
====
-
-
-
-
-
-
include::DomainServiceLayout/menuBar.adoc[leveloffset=+1]
include::DomainServiceLayout/menuOrder.adoc[leveloffset=+1]
include::DomainServiceLayout/named.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Facets.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Facets.adoc
index 6bfa700..bd3fea8 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Facets.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Facets.adoc
@@ -4,8 +4,8 @@
-The `@Facets` annotation allows `FacetFactory` implementations and so can be used to run install arbitrary `Facet`s for a type. Generally this is not needed, but can be useful for overriding a custom programming model where a `FacetFactory` is not typically included.
-
+The `@Facets` annotation allows `FacetFactory` implementations and so can be used to run install arbitrary ``Facet``s for a type.
+ Generally this is not needed, but can be useful for overriding a custom programming model where a `FacetFactory` is not typically included.
[NOTE]
====
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/HomePage.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/HomePage.adoc
index b76864c..620e408 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/HomePage.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/HomePage.adoc
@@ -4,7 +4,8 @@
-The `@HomePage` annotation allows a _single_ (no-arg, query-only) action on a _single_ domain service to be nominated as the action to invoke for the default home page. This often returns a view model that acts as some sort of dashboard, presenting key information and makeing the most commonly used actions easy to invoke.
+The `@HomePage` annotation allows a _single_ (no-arg, query-only) action on a _single_ domain service to be nominated as the action to invoke for the default home page.
+This often returns a view model that acts as some sort of dashboard, presenting key information and makeing the most commonly used actions easy to invoke.
For example, the http://github.com/apache/isis-app-todoapp[TodoApp] uses `@HomePage` to return a dashboard of todo items to complete:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Inject.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Inject.adoc
index 4cc79a5..a675894 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Inject.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Inject.adoc
@@ -1,4 +1,4 @@
-= `@Inject` (`javax`)
+r= `@Inject` (`javax`)
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
@@ -7,10 +7,6 @@
Apache Isis automatically injects domain services into other domain services and also into domain objects and view models.
In fact, it also injects domain services into xref:testing:integtestsupport:about.adoc[integration tests] and xref:fixtures:ROOT:about.adoc[fixture scripts].
-[NOTE]
-====
-One omission: Apache Isis (currently) does not inject services into `o.a.i.applib.spec.Specification` instances (as used by xref:refguide:applib-ant:Property.adoc#mustSatisfy[`@Property#mustSatisfy`] and xref:refguide:applib-ant:Parameter.adoc#mustSatisfy[`@Parameter#mustSatisfy`] annotations.
-====
Apache Isis supports several syntaxes for injecting domain services.
The simplest uses the `@javax.inject.Inject` annotation on the field, as defined in link:https://jcp.org/en/jsr/detail?id=330[JSR-330].
@@ -30,8 +26,6 @@ public class Customer {
<1> an alternative implementation would be to implement `findRecentOrders()` as a xref:userguide:fun:programming-model.adoc#contributed-action[contributed action].
<2> we recommend default (rather than `private`) visibility so that unit tests can easily mock out the service
-
-
== Alternative syntaxes
Apache Isis also supports setter-based injection:
@@ -44,20 +38,9 @@ public class Customer {
}
----
-and also supports an additional syntax of using `inject...` as the prefix:
-
-[source,java]
-----
-public class Customer {
- ...
- public void injectOrderRepository(OrderRepository orderRepository) { /* ... */ }
-}
-----
Generally we recommend using `@javax.inject.Inject`; it involves less code, and is more immediately familiar to most Java developers.
-
-
== Injecting collection of services
It can sometimes be useful to have declared multiple implementations of a particular domain service.
@@ -98,10 +81,6 @@ An alternative and almost equivalent design would be to publish an event using t
This alternative design is used in the (non-ASF) link:https://platform.incode.org[Incode Platform^]'s poly module, for example.
====
-
-
-
-
== Manually injecting services
Apache Isis performs dependency injection when domain entities are recreated.
@@ -123,10 +102,8 @@ View models are created identically:
TodoAppDashboard dashboard = repositoryService.instantiate(TodoAppDashboard.class);
----
-
If you prefer, though, you can simply instantiate domain objects using "new" and then inject domain services manually using xref:refguide:applib-svc:ServiceRegistry.adoc[`ServiceRegistry`]:
-
[source,java]
----
Customer cust = new Customer();
@@ -135,8 +112,6 @@ serviceRegistry.injectServicesInto(cust);
repositoryService.persist(cust);
----
-
-
[NOTE]
====
Note that using either `FactoryService#instantiate(...)` or `RepositoryService#instantiate(...)` will also automatically initialize all fields to their default values, and will also fire a "created" lifecycle event.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/MemberGroupLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/MemberGroupLayout.adoc
deleted file mode 100644
index ffeb430..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/MemberGroupLayout.adoc
+++ /dev/null
@@ -1,17 +0,0 @@
-= `@MemberGroupLayout`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-
-
-
-The `@MemberGroupLayout` annotation specifies how an object's properties and collections are grouped together into columns, also specifying the relative positioning of those columns. It works in conjunction with the xref:refguide:applib-ant:MemberOrder.adoc[`@MemberOrder`] annotation.
-
-The annotation defines four attributes:
-
-* `columnSpans()` -- of type `int[]` -- which specifies the relative column sizes of the three columns that render properties as well as a fourth column that renders only collections
-
-* `left()` -- of type `String[]` - that specifies the order of the property groups (inferred from `@MemberOrder#name()`) as applied to properties) in the left-most column
-
-* `middle()` -- of type `String[]` - that specifies the order of the property groups (if any) as applied to properties) in the middle column
-
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc
index 580c001..28d9dcb 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc
@@ -6,8 +6,11 @@
// TODO: v2: replace @MemberOrder#name() with @PropertyLayout#group(); replace @MemberOrder#sequence() with @PropertyLayout#sequence().
The `@MemberOrder` annotation is used to specify the relative order of domain object members, that is: properties, collections and actions.
-It works in conjunction with the xref:refguide:applib-ant:MemberGroupLayout.adoc[`@MemberGroupLayout`] annotation.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/MemberOrder.java[tags="refguide"]
+----
The annotation defines two attributes:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/MinLength.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/MinLength.adoc
index 7a32622..50cdf7e 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/MinLength.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/MinLength.adoc
@@ -5,6 +5,10 @@
The `@MinLength` annotation is used to specify the minimum number of characters in a search of an xref:refguide:applib-cm:methods.adoc#autoComplete[`autoComplete...()`] supporting method.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/MinLength.java[tags="refguide"]
+----
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc
index 972f403..49a4e09 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc
@@ -11,10 +11,15 @@ However, mixins are also a convenient mechanism for grouping functionality even
For further discussion on using mixins, see xref:userguide:fun:building-blocks.adoc#mixins[mixins] in the user guide.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/Mixin.java[tags="refguide"]
+----
+
The table below summarizes the annotation's attributes.
.`@Mixin` attributes
-[cols="2,2,4a", options="header"]
+[cols="2,2,4a",options="header"]
|===
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/NotPersistent.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/NotPersistent.adoc
index fbaf275..701f8fd 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/NotPersistent.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/NotPersistent.adoc
@@ -9,8 +9,10 @@ Apache Isis also uses this annotation, though (currently) only in the very minim
[NOTE]
====
-Isis parses the `@NotPersistent` annotation from the Java source code; it does not query the JDO metamodel. This means that it the `@NotPersistent` annotation must be used rather than the equivalent `<field>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/fields_properties.html[XML metadata].
+Isis parses the `@NotPersistent` annotation from the Java source code; it does not query the JDO metamodel.
+This means that it the `@NotPersistent` annotation must be used rather than the equivalent `<field>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/fields_properties.html[XML metadata].
-Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method. Therefore ensure that the annotation is placed there.
+Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method.
+Therefore ensure that the annotation is placed there.
====
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Nullable.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Nullable.adoc
index e266304..c291b31 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Nullable.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Nullable.adoc
@@ -3,10 +3,8 @@
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-Apache Isis' defaults for properties and parameters is that they are mandatory unless otherwise stated. The
-`@javax.annotation.Nullable` annotation is recognized by Apache Isis for both properties and
-parameters as means to indicate that the property/parameter is not mandatory.
-
+Apache Isis' defaults for properties and parameters is that they are mandatory unless otherwise stated.
+The `@javax.annotation.Nullable` annotation is recognized by Apache Isis for both properties and parameters as means to indicate that the property/parameter is not mandatory.
For example:
@@ -33,20 +31,18 @@ public Customer updateName(@javax.annotation.Nullable final String name) {
Apache Isis does provide several other ways to specify optionality: using the
xref:refguide:applib-ant:Property.adoc#optionality[`@Property#optionality()`] /
-xref:refguide:applib-ant:Parameter.adoc#optionality[`@Parameter#optionality()`] annotation. For properties, the optionality
-can also be inferred from the xref:refguide:applib-ant:Column#allowsNull.adoc[`@Column#allowsNull()`] attribute.
+xref:refguide:applib-ant:Parameter.adoc#optionality[`@Parameter#optionality()`] annotation.
+For properties, the optionality can also be inferred from the xref:refguide:applib-ant:Column#allowsNull.adoc[`@Column#allowsNull()`] attribute.
[TIP]
====
See the
-xref:refguide:applib-ant:Property.adoc#optionality[`@Property#optionality()`] documentation for a much fuller discussion on
-the relationship between using the Apache Isis annotations vs
+xref:refguide:applib-ant:Property.adoc#optionality[`@Property#optionality()`] documentation for a much fuller discussion on the relationship between using the Apache Isis annotations vs
xref:refguide:applib-ant:Column#allowsNull.adoc[`@Column#allowsNull()`].
====
-If more than one method is specified then the framework will validate that there are no incompatibilities (and fail to
-boot otherwise). This can also be verified using the xref:refguide:mvn:validate.adoc[validate goal] of the Apache
-Isis Maven plugin.
+If more than one method is specified then the framework will validate that there are no incompatibilities (and fail to boot otherwise).
+This can also be verified using the xref:refguide:mvn:validate.adoc[validate goal] of the Apache Isis Maven plugin.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
index 896216b..69582fa 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
@@ -5,10 +5,15 @@
The `@Parameter` annotation applies to action parameters collecting together all domain semantics within a single annotation.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/Parameter.java[tags="refguide"]
+----
+
The table below summarizes the annotation's attributes.
-.`@Paramter` attributes
-[cols="2,2,4a", options="header"]
+.`@Parameter` attributes
+[cols="2,2,4a",options="header"]
|===
| Attribute
@@ -19,7 +24,7 @@ The table below summarizes the annotation's attributes.
|xref:refguide:applib-ant:Parameter.adoc#fileAccept[`fileAccept()`]
|Media type or file extension
|Hints the file type to be uploaded for xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]
- or xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]. +
+or xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]. +
+
Note that this does not prevent the user from uploading some other file type; rather it merely defaults the file type in the file open dialog.
@@ -59,9 +64,6 @@ The table below summarizes the annotation's attributes.
|===
-
-
-
For example:
[source,java]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
index ba2bb8a..295aa9d 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
@@ -6,6 +6,11 @@
The `@ParameterLayout` annotation applies to action parameters, collecting together all UI hints within a single annotation.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/ParameterLayout.java[tags="refguide"]
+----
+
The table below summarizes the annotation's attributes.
.`@ParameterLayout` attributes
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PersistenceCapable.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PersistenceCapable.adoc
index 73c6266..cfc3eb0 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PersistenceCapable.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PersistenceCapable.adoc
@@ -10,18 +10,19 @@ Apache Isis also checks for this annotation, and if the `@PersistenceCapable#sch
[NOTE]
====
-Isis parses the `@PersistenceCapable` annotation from the Java source code; it does not query the JDO metamodel. This means that it the `@PersistenceCapable` annotation must be used rather than the equivalent `<class>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/class_mapping.html[XML metadata].
+Isis parses the `@PersistenceCapable` annotation from the Java source code; it does not query the JDO metamodel.
+This means that it the `@PersistenceCapable` annotation must be used rather than the equivalent `<class>` link:http://www.datanucleus.org/products/accessplatform_4_0/jdo/class_mapping.html[XML metadata].
-Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method. Therefore ensure that the annotation is placed there.
+Moreover, while JDO/DataNucleus will recognize annotations on either the field or the getter method, Apache Isis (currently) only inspects the getter method.
+Therefore ensure that the annotation is placed there.
====
-
This value is used internally to generate a string representation of an objects identity (the `Oid`).
This can appear in several contexts, including:
* as the value of `Bookmark#getObjectType()` and in the `toString()` value of `Bookmark`
- (see xref:refguide:applib-svc:BookmarkService.adoc[`BookmarkService`])
- ** and thus in the "table-of-two-halves" pattern, as per the (non-ASF) link:https://platform.incode.org[Incode Platform^]'s poly module
+(see xref:refguide:applib-svc:BookmarkService.adoc[`BookmarkService`])
+** and thus in the "table-of-two-halves" pattern, as per the (non-ASF) link:https://platform.incode.org[Incode Platform^]'s poly module
* in the serialization of `OidDto` in the xref:refguide:schema:cmd[command] and xref:refguide:schema:about.adoc#ixn.adoc[interaction] schemas
* in the URLs of the xref:vro:ROOT:about.adoc[RestfulObjects viewer]
* in the URLs of the xref:vw:ROOT:about.adoc[Wicket viewer] (in general and in particular if xref:vw:ROOT:features.adoc#hints-and-copy-url[copying URLs])
@@ -31,7 +32,6 @@ This can appear in several contexts, including:
The actual format of the object type used by Apache Isis for the concatenation of `schema()` and `@PersistenceCapable#table()`.
If the `table()` is not present, then the class' simple name is used instead.
-
== Examples
For example:
@@ -56,7 +56,6 @@ public class AddressImpl {
has an object type of `custmgmt.Address`.
-
On the other hand:
[source,java]
@@ -69,8 +68,6 @@ public class AddressImpl {
does _not_ correspond to an object type, because the `schema` attribute is missing.
-
-
== Precedence
The rules of precedence for determining a domain object's object type are:
@@ -78,13 +75,11 @@ The rules of precedence for determining a domain object's object type are:
1. xref:refguide:applib-ant:Discriminator.adoc[`@Discriminator`]
2. `@DomainObject#objectType`
3. xref:refguide:applib-ant:PersistenceCapable.adoc[`@PersistenceCapable`], if at least the `schema` attribute is defined. +
-+
-If both `schema` and `table` are defined, then the value is "`schema.table`".
++ If both `schema` and `table` are defined, then the value is "`schema.table`".
If only `schema` is defined, then the value is "`schema.className`".
4. Fully qualified class name of the entity.
-
[TIP]
====
This might be obvious, but to make explicit: we recommend that you always specify an object type for your domain objects.
@@ -93,10 +88,8 @@ Otherwise, if you refactor your code (change class name or move package), then a
At best this will require a data migration in the database; at worst it could cause external clients accessing data through the xref:vro:ROOT:about.adoc[Restful Objects] viewer to break.
====
-
-
-
[NOTE]
====
-If the object type is not unique across all domain classes then the framework will fail-fast and fail to boot. An error message will be printed in the log to help you determine which classes have duplicate object tyoes.
+If the object type is not unique across all domain classes then the framework will fail-fast and fail to boot.
+An error message will be printed in the log to help you determine which classes have duplicate object tyoes.
====
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PreDestroy.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PreDestroy.adoc
index 7a88496..1e67028 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PreDestroy.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PreDestroy.adoc
@@ -16,10 +16,10 @@ The signature of the method is:
@PreDestroy <.>
public void deinit() { /* ... */ } <.>
----
+
<.> It is not necessary to annotate the method with xref:refguide:applib-ant:Programmatic.adoc[`@Programmatic`]; it will be automatically excluded from the Apache Isis metamodel.
<.> the method can have any name, but must have `public` visibility, and accept no arguments.
-
Other use cases include obtaining connections to external datasources, eg subscribing to an ActiveMQ router, say, or initializing/cleaning up a background scheduler such as Quartz.
See also xref:refguide:applib-ant:PostConstruct.adoc[`@PostConstruct`]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Programmatic.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Programmatic.adoc
index 8677aee..fbccefc 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Programmatic.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Programmatic.adoc
@@ -6,7 +6,8 @@
The `@Programmatic` annotation causes the method to be excluded completely from the Apache Isis metamodel.
This means it won't appear in any UI or more generally in serializations obtained using the metamodel, for example xref:refguide:applib-svc:XmlSnapshotService.adoc[snapshot]s.
-A common use-case is to ignore implementation-level artifacts. For example:
+A common use-case is to ignore implementation-level artifacts.
+For example:
[source,java]
----
@@ -20,7 +21,6 @@ public class Customer implements Comparable<Customer> {
}
----
-
Note that `@Programmatic` is not the same as `@Action(hidden=Where.EVERYWHERE)` or `@Property(hidden=Where.EVERYWHERE)` etc; it actually means that the class member will not be part of the Apache Isis metamodel.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
index 58d188d..f3410bf 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
@@ -7,6 +7,10 @@ The `@Property` annotation applies to properties collecting together all domain
It is also possible to apply the annotation to actions of domain services that are acting as contributed properties.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/Property.java[tags="refguide"]
+----
.`@Property` attributes
@@ -83,7 +87,7 @@ In many/most cases you should however use xref:refguide:applib-ant:Column.adoc[`
|allows arbitrary validation to be applied
-|xref:refguide:applib-ant:Property.adoc#notPersisted[`notPersisted()`]
+|xref:refguide:applib-ant:Property.adoc#mementoSerialization[`mementoSerialization()`]
|`true`, `false` +
(`false`)
|whether to exclude from snapshots. +
@@ -176,7 +180,7 @@ include::Property/fileAccept.adoc[leveloffset=+1]
include::Property/hidden.adoc[leveloffset=+1]
include::Property/maxLength.adoc[leveloffset=+1]
include::Property/mustSatisfy.adoc[leveloffset=+1]
-include::Property/notPersisted.adoc[leveloffset=+1]
+include::Property/mementoSerialization.adoc[leveloffset=+1]
include::Property/optionality.adoc[leveloffset=+1]
include::Property/projecting.adoc[leveloffset=+1]
include::Property/publishing.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/notPersisted.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/mementoSerialization.adoc
similarity index 50%
rename from api/applib/src/main/adoc/modules/applib-ant/pages/Property/notPersisted.adoc
rename to api/applib/src/main/adoc/modules/applib-ant/pages/Property/mementoSerialization.adoc
index b5a7e50..adc8b25 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/notPersisted.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/mementoSerialization.adoc
@@ -1,5 +1,4 @@
-[[notPersisted]]
-= `notPersisted()`
+= `mementoSerialization`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-partial:
@@ -7,14 +6,7 @@
-The (somewhat misnamed) `notPersisted` attribute indicates that the collection should be excluded from any snapshots generated by the xref:refguide:applib-svc:XmlSnapshotService.adoc[`XmlSnapshotService`].
-
-
-[WARNING]
-====
-This annotation does _not_ specify that a property is not persisted in the JDO/DataNucleus objectstore.
-See below for details as to how to additionally annotate the property for this.
-====
+The `mementoSerialization` attribute indicates whether the property should be included/excluded from any snapshots generated by the xref:refguide:applib-svc:XmlSnapshotService.adoc[`XmlSnapshotService`].
For example:
@@ -22,35 +14,13 @@ For example:
[source,java]
----
public class Order {
- @Property(notPersisted=true)
+ @Property(mementoSerialization=EXCLUDED)
public Order getPreviousOrder() {...}
public void setPreviousOrder(Order previousOrder) {...}
...
}
----
-Historically this annotation also hinted as to whether the property's value contents should be persisted in the object store.
-However, the JDO/DataNucleus objectstore does not recognize this annotation.
-Thus, to ensure that a property is actually not persisted, it should *also* be annotated with `@javax.jdo.annotations.NotPersistent`.
-
-For example:
-
-[source,java]
-----
-public class Order {
- @Property(notPersisted=true) // <1>
- @javax.jdo.annotations.NotPersistent // <2>
- public Order getPreviousOrder() {...}
- public void setPreviousOrder(Order previousOrder) {...}
- ...
-}
-----
-<1> ignored by Apache Isis
-<2> ignored by JDO/DataNucleus
-
-
-
-
Alternatively, if the property is derived, then providing only a "getter" will also work:
@@ -65,5 +35,5 @@ public class Order {
== See also
-This attribute is also supported for xref:refguide:applib-ant:Collection.adoc#notPersisted[collections].
+This attribute is also supported for xref:refguide:applib-ant:Collection.adoc#mementoSerializationp[collections].
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
index 96a4622..618e65d 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
@@ -5,6 +5,11 @@
The `@PropertyLayout` annotation applies to properties collecting together all UI hints within a single annotation.
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/PropertyLayout.java[tags="refguide"]
+----
+
The table below summarizes the annotation's attributes.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Title.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Title.adoc
index 01135b2..15ad0be 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Title.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Title.adoc
@@ -3,7 +3,13 @@
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-The `@Title` annotation is used to indicate which property or properties make up the object title. If more than one property is used, the order can be specified (using the same Dewey-decimal notation as used by `@MemberOrder`) and the string to use between the components can also be specified.
+The `@Title` annotation is used to indicate which property or properties make up the object title.
+If more than one property is used, the order can be specified (using the same Dewey-decimal notation as used by `@MemberOrder`) and the string to use between the components can also be specified.
+
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/Title.java[tags="refguide"]
+----
For example:
@@ -25,9 +31,7 @@ public void Customer {
could be used to create names of the style "Bloggs, Joe K."
-It is also possible to annotate reference properties; in this case the
-title will return the title of the referenced object (rather than, say,
-its string representation).
+It is also possible to annotate reference properties; in this case the title will return the title of the referenced object (rather than, say, its string representation).
An additional convention for `@Title` properties is that they are hidden in tables (in other words, it implies `@Property(where=Where.ALL_TABLES)`.
For viewers that support this annotation (for example, the Wicket viewer), this convention excludes any properties whose value is already present in the title column.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModel.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModel.adoc
index 75a84b0..29c1fa6 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModel.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModel.adoc
@@ -10,6 +10,11 @@ It's a synonym for using `@DomainObject(nature=VIEW_MODEL)`.
View models are not persisted to the database, instead their state is encoded within their identity (ultimately represented in the URL).
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/ViewModel.java[tags="refguide"]
+----
+
For example:
[source,java]
@@ -44,7 +49,7 @@ See this xref:userguide:btb:about.adoc#view-model-instantiation[tip] for further
View models must have a no-arg constructor; this is used internally by the framework for subsequent "recreation".
The view model's memento will be derived from the value of the view model object's properties.
-Any xref:refguide:applib-ant:Property.adoc#notPersisted[`@Property#notPersisted()`] properties will be excluded from the memento, as will any properties excluded from the metamodel using xref:refguide:applib-ant:Programmatic.adoc[`@Programmatic`].
+Any xref:refguide:applib-ant:Property.adoc#mementoSerialization[`@Property#mementoSerialization`] properties will be excluded from the memento, as will any properties excluded from the metamodel using xref:refguide:applib-ant:Programmatic.adoc[`@Programmatic`].
Properties that are merely xref:refguide:applib-ant:Property.adoc#hidden[hidden] _are_ included in the memento.
View models, as defined by `@ViewModel` (or `@DomainObject(nature=VIEW_MODEL)` for that matter) have some limitations:
@@ -56,7 +61,6 @@ View models, as defined by `@ViewModel` (or `@DomainObject(nature=VIEW_MODEL)` f
However, these limitations do _not_ apply to xref:userguide:fun:programming-model.adoc#jaxb[JAXB] view models.
If you are using view models heavily, you may wish to restrict yourself to just the JAXB flavour.
-
[NOTE]
====
The `@ViewModel` does not allow the objectType to be specified, meaning that it is incompatible with the metamodel validation check ennabled by the xref:refguide:config:configuring-core.adoc#metamodel-validation[`explicitObjectType`] configuration property.
@@ -64,6 +68,4 @@ The `@ViewModel` does not allow the objectType to be specified, meaning that it
Instead, use xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject#nature()`] with `Nature.VIEW_MODEL`, and specify xref:refguide:applib-ant:DomainObject.adoc#objectType[`@DomainObject#objectType()`].
====
-
-
include::ViewModel/objectType.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc
index 6b4537a..a976088 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ViewModelLayout.adoc
@@ -3,14 +3,17 @@
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-The `@ViewModelLayout` annotation is identical to the xref:refguide:applib-ant:DomainObjectLayout.adoc[`@DomainObjectLayout`], but is provided
-for symmetry with domain objects that have been annotated using xref:refguide:applib-ant:ViewModel.adoc[`@ViewModel`] (rather than xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject(nature=VIEW_MODEL)`]).
+The `@ViewModelLayout` annotation is identical to the xref:refguide:applib-ant:DomainObjectLayout.adoc[`@DomainObjectLayout`], but is provided for symmetry with domain objects that have been annotated using xref:refguide:applib-ant:ViewModel.adoc[`@ViewModel`] (rather than xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject(nature=VIEW_MODEL)`]).
+[source,java]
+----
+include::refguide:applib-ant:example$annotation/ViewModelLayout.java[tags="refguide"]
+----
The table below summarizes the annotation's attributes.
.`@ViewModel` attributes
-[cols="2,2,4a", options="header"]
+[cols="2,2,4a",options="header"]
|===
| Attribute
@@ -78,10 +81,6 @@ A typical use case is if the desired name is a reserved Java keyword, such as `d
|===
-
-
-
-
For example:
[source,java]
@@ -97,20 +96,11 @@ public class CategoryPieChart { /* ... */ }
<1> this annotation is intended for use with `@ViewModel`.
If a view model has been specified using the equivalent xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject(nature=Nature.VIEW_MODEL)`], then we recommend you use xref:refguide:applib-ant:DomainObjectLayout.adoc[`@DomainObjectLayout`] instead.
-
[NOTE]
====
Note that there is (currently) no support for specifying UI hints for view models through the dynamic xref:vw:ROOT:layout.adoc#file-based[`.layout.xml`] file (only for properties, collections and actions are supported).
====
-
-
-
-
-
-
-
-
include::ViewModelLayout/cssClass.adoc[leveloffset=+1]
include::ViewModelLayout/cssClassFa.adoc[leveloffset=+1]
include::ViewModelLayout/cssClassUiEvent.adoc[leveloffset=+1]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/XmlJavaTypeAdapter.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/XmlJavaTypeAdapter.adoc
index 1776b72..95ba023 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/XmlJavaTypeAdapter.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/XmlJavaTypeAdapter.adoc
@@ -5,7 +5,8 @@
The JAXB `@XmlJavaTypeAdapter` annotation is used with the framework-provided
`PersistentEntityAdapter` to instruct JAXB to serialize references to persistent entities using the canonical
-`OidDto` complex type: the object's type and its identifier. This is the formal XML equivalent to the `Bookmark`
+`OidDto` complex type: the object's type and its identifier.
+This is the formal XML equivalent to the `Bookmark`
provided by the xref:refguide:applib-svc:BookmarkService.adoc[`BookmarkService`].
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/XmlRootElement.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/XmlRootElement.adoc
index 7965c14..1862fd6 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/XmlRootElement.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/XmlRootElement.adoc
@@ -28,11 +28,9 @@ This adapter converts any references to such domain entities using the `oidDto`
[TIP]
====
The memento string for view models is converted into a form compatible with use within a URL.
-This is performed by the xref:refguide:applib-svc:UrlEncodingService.adoc[`UrlEncodingService`], the default implementation of which simply encodes to base 64.
-If the view model XML graph is too large to be serialized to a string, then an alternative implementation (eg which maps XML strings to a GUID, say) can be configured using the technique described in xref:userguide:btb:about.adoc#replacing-default-service-implementations[here] in the user guide.
+This is performed by the xref:refguide:applib-svc:UrlEncodingService.adoc[`UrlEncodingService`], the default implementation of which simply encodes to base 64. If the view model XML graph is too large to be serialized to a string, then an alternative implementation (eg which maps XML strings to a GUID, say) can be configured using the technique described in xref:userguide:btb:about.adoc#replacing-default-service-implementations[here] in the user guide.
====
-
== Example
This example is taken from the http://github.com/apache/isis-app-todoapp[TodoApp]:
@@ -54,8 +52,6 @@ public class ToDoItemDto implements Dto {
<1> identifies this class as a view model and defines the root element for JAXB serialization
<2> using Project Lombok for getters and setters
-
-
== See also
Although (like any other viewmodel) a JAXB-annotated can have behaviour (actions) and UI hints, you may wish to keep the DTO "clean", just focused on specifying the data contract.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc b/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc
index 3fe625c..dc471f6 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/partials/module-nav.adoc
@@ -17,7 +17,6 @@
** xref:refguide:applib-ant:Facets.adoc[Facets]
** xref:refguide:applib-ant:HomePage.adoc[HomePage]
** xref:refguide:applib-ant:Inject.adoc[Inject]
-** xref:refguide:applib-ant:MemberGroupLayout.adoc[MemberGroupLayout]
** xref:refguide:applib-ant:MemberOrder.adoc[MemberOrder]
** xref:refguide:applib-ant:Mixin.adoc[Mixin]
** xref:refguide:applib-ant:NotPersistent.adoc[NotPersistent.]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/LayoutService.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/LayoutService.adoc
index b49f662..9ab7492 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/LayoutService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/LayoutService.adoc
@@ -29,12 +29,11 @@ The `CURRENT` style corresponds to the layout already loaded for the domain clas
The other three styles allow the developer to choose how much metadata is to be specified in the XML, and how much (if any) will be obtained elsewhere, typically from annotations in the metamodel.
The table below summarises the choices:
-[cols="<.>,^.>,^.>,^.>",options="header"]
+[cols="<.>,^.>,^.>",options="header"]
.Styles
|===
| Style
-|xref:refguide:applib-ant:MemberGroupLayout.adoc[`@MemberGroupLayout`]
| xref:refguide:applib-ant:MemberOrder.adoc[`@MemberOrder`]
| xref:refguide:applib-ant:ActionLayout.adoc[`@ActionLayout`], xref:refguide:applib-ant:PropertyLayout.adoc[`@PropertyLayout`], xref:refguide:applib-ant:CollectionLayout.adoc[`@CollectionLayout`]
@@ -42,17 +41,14 @@ The table below summarises the choices:
|`COMPLETE`
|serialized as XML
|serialized as XML
-|serialized as XML
|`NORMALIZED`
|serialized as XML
-|serialized as XML
|not in the XML
|`MINIMAL`
-|serialized as XML
|not in the XML
|not in the XML
[isis] 02/07: ISIS-2062: docs
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 59142e757b2d628611b776e11683c10d1751055c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Mar 17 10:00:35 2020 +0000
ISIS-2062: docs
---
.../applib-cm/examples/security/RoleMemento.java | 65 ------
.../applib-cm/examples/security/UserMemento.java | 144 -------------
.../examples/services/MethodReferences.java | 95 +++++++++
.../services/command/CommandExecutorService.java | 11 +-
.../examples/services/health/Health.java | 2 +-
.../examples/services/iactn/Interaction.java | 8 +-
.../examples/services/menu/MenuBarsService.java | 2 +
.../services/repository/RepositoryService.java | 20 ++
.../services/session/SessionLoggingService.java | 23 --
.../session/SessionLoggingServiceLogging.java | 51 +++++
.../services/urlencoding/UrlEncodingService.java | 4 +-
.../examples/services/user/package-info.java | 14 +-
.../examples/services/wrapper/AsyncWrap.java | 119 -----------
.../services/wrapper/InteractionException.java | 2 +-
.../examples/services/wrapper/WrapperFactory.java | 232 ++++++---------------
.../examples/services/wrapper/WrappingObject.java | 9 +-
.../services/wrapper/control/AsyncControl.java | 133 ++++++++++++
.../wrapper/control/AsyncControlService.java | 62 ++++++
.../services/wrapper/control/ControlAbstract.java | 98 +++++++++
.../control/ExceptionHandler.java} | 47 ++---
.../wrapper/control/ExceptionHandlerAbstract.java} | 28 ++-
.../services/wrapper/control/ExecutionMode.java | 3 +
.../services/wrapper/control/SyncControl.java | 25 ++-
.../XmlSnapshotServiceAbstract.java} | 25 ++-
.../modules/applib-svc/pages/WrapperFactory.adoc | 53 ++---
.../applib/services/wrapper/WrapperFactory.java | 12 +-
.../services/wrapper/control/ExecutionMode.java | 2 +-
.../services/wrapper/control/SyncControl.java | 5 +-
.../wrapper/WrapperFactoryDefault.java | 4 +-
.../demoapp/dom/events/DemoEventSubscriber.java | 2 +-
.../testdomain/auditing/AuditerServiceTest.java | 4 +-
.../commandexecution/WrapperAsyncTest.java | 2 +-
.../publishing/PublisherServiceTest.java | 4 +-
33 files changed, 665 insertions(+), 645 deletions(-)
diff --git a/api/applib/src/main/adoc/modules/applib-cm/examples/security/RoleMemento.java b/api/applib/src/main/adoc/modules/applib-cm/examples/security/RoleMemento.java
deleted file mode 100644
index a220a2b..0000000
--- a/api/applib/src/main/adoc/modules/applib-cm/examples/security/RoleMemento.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.applib.security;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-
-import lombok.Getter;
-
-// tag::refguide[]
-public final class RoleMemento {
-
- // end::refguide[]
- /**
- * Creates a new role with the specified name. Description is left blank.
- */
- public RoleMemento(final String name) {
- this(name, "");
- }
-
- /**
- * Creates a new role with the specified name and description.
- */
- public RoleMemento(final String name, final String description) {
- if (name == null) {
- throw new IllegalArgumentException("Name not specified");
- }
- this.name = name;
- if (description == null) {
- throw new IllegalArgumentException("Description not specified");
- }
- this.description = description;
- }
-
- // tag::refguide[]
- public String title() {
- return name;
- }
-
- @MemberOrder(sequence = "1.1")
- @Getter
- private final String name;
-
- @MemberOrder(sequence = "1.2")
- @Getter
- private final String description;
-
-}
-// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-cm/examples/security/UserMemento.java b/api/applib/src/main/adoc/modules/applib-cm/examples/security/UserMemento.java
deleted file mode 100644
index bf3bb7a..0000000
--- a/api/applib/src/main/adoc/modules/applib-cm/examples/security/UserMemento.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.applib.security;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-
-import lombok.Getter;
-import lombok.experimental.UtilityClass;
-
-/**
- * Details, obtained from the container, about the user and his roles.
- * Read-only.
- */
-// tag::refguide[]
-public final class UserMemento {
-
- // end::refguide[]
- /**
- * Creates a new user with the specified name and no roles.
- */
- public UserMemento(final String name) {
- this(name, new RoleMemento[0]);
- }
-
- /**
- * Creates a new user with the specified name and assigned roles.
- */
- public UserMemento(final String name, final RoleMemento... roles) {
- this(name, Arrays.asList(roles));
- }
-
- /**
- * Creates a new user with the specified name and assigned roles.
- */
- public UserMemento(final String name, final List<RoleMemento> roles) {
- if (name == null) {
- throw new IllegalArgumentException("Name not specified");
- }
- this.name = name;
- this.roles.addAll(roles);
- }
-
- // tag::refguide[]
- public String title() {
- return name;
- }
-
- // end::refguide[]
- /**
- * The user's login name.
- */
- // tag::refguide[]
- @MemberOrder(sequence = "1.1")
- @Getter
- private final String name;
-
- // end::refguide[]
- /**
- * The roles associated with this user.
- */
- // tag::refguide[]
- @Getter
- @MemberOrder(sequence = "1.1")
- private final List<RoleMemento> roles = new ArrayList<RoleMemento>();
-
- // end::refguide[]
- /**
- * Determine if the specified name is this user.
- *
- * <p>
- *
- * @return true if the names match (is case sensitive).
- */
- public boolean isCurrentUser(final String userName) {
- if (userName == null) {
- throw new IllegalArgumentException("no user name provided");
- }
- return name.equals(userName);
- }
-
- /**
- * Determines if the user fulfills the specified role.
- *
- * @param role the role to search for, regular expressions are allowed
- */
- public boolean hasRole(final RoleMemento role) {
- return hasRole(role.getName());
- }
-
- /**
- * Determines if the user fulfills the specified role. Roles are compared
- * lexically by role name.
- */
- public boolean hasRole(final String roleName) {
- for (final RoleMemento role : roles) {
- if (role.getName().matches(roleName)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public String toString() {
- final StringBuilder buf = new StringBuilder();
- for (final RoleMemento role : roles) {
- buf.append(role.getName()).append(" ");
- }
- return "User [name=" + getName() + ",roles=" + buf.toString() + "]";
- }
-
- @UtilityClass
- public static class NameType {
- @UtilityClass
- public static class Meta {
- public static final int MAX_LEN = 50;
- }
- }
-
- // tag::refguide[]
-
-}
-// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/MethodReferences.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/MethodReferences.java
new file mode 100644
index 0000000..f7ecdea
--- /dev/null
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/MethodReferences.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.applib.services;
+
+import lombok.experimental.UtilityClass;
+
+/**
+ *
+ * @since 2.0
+ *
+ */
+@UtilityClass
+public class MethodReferences {
+
+ // -- METHOD REFERENCE MATCHERS (WITHOUT RETURN VALUE)
+
+ @FunctionalInterface
+ public static interface Run0 {
+ void run();
+ }
+
+ @FunctionalInterface
+ public static interface Run1<A0> {
+ void run(A0 arg0);
+ }
+
+ @FunctionalInterface
+ public static interface Run2<A0, A1> {
+ void run(A0 arg0, A1 arg1);
+ }
+
+ @FunctionalInterface
+ public static interface Run3<A0, A1, A2> {
+ void run(A0 arg0, A1 arg1, A2 arg2);
+ }
+
+ @FunctionalInterface
+ public static interface Run4<A0, A1, A2, A3> {
+ void run(A0 arg0, A1 arg1, A2 arg2, A3 arg3);
+ }
+
+ @FunctionalInterface
+ public static interface Run5<A0, A1, A2, A3, A4> {
+ void run(A0 arg0, A1 arg1, A2 arg2, A3 arg3, A4 arg4);
+ }
+
+ // -- METHOD REFERENCE MATCHERS (WITH RETURN VALUE)
+
+ @FunctionalInterface
+ public static interface Call0<R> {
+ R call();
+ }
+
+ @FunctionalInterface
+ public static interface Call1<R, A0> {
+ R call(A0 arg0);
+ }
+
+ @FunctionalInterface
+ public static interface Call2<R, A0, A1> {
+ R call(A0 arg0, A1 arg1);
+ }
+
+ @FunctionalInterface
+ public static interface Call3<R, A0, A1, A2> {
+ R call(A0 arg0, A1 arg1, A2 arg2);
+ }
+
+ @FunctionalInterface
+ public static interface Call4<R, A0, A1, A2, A3> {
+ R call(A0 arg0, A1 arg1, A2 arg2, A3 arg3);
+ }
+
+ @FunctionalInterface
+ public static interface Call5<R, A0, A1, A2, A3, A4> {
+ R call(A0 arg0, A1 arg1, A2 arg2, A3 arg3, A4 arg4);
+ }
+
+}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/command/CommandExecutorService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/command/CommandExecutorService.java
index 917a4e5..56d029b 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/command/CommandExecutorService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/command/CommandExecutorService.java
@@ -18,6 +18,9 @@
*/
package org.apache.isis.applib.services.command;
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.schema.cmd.v2.CommandDto;
+
// tag::refguide[]
public interface CommandExecutorService {
@@ -50,8 +53,12 @@ public interface CommandExecutorService {
*/
// tag::refguide[]
void executeCommand(
- SudoPolicy sudoPolicy, // <.>
- CommandWithDto commandWithDto // <.>
+ SudoPolicy sudoPolicy, // <.>
+ CommandWithDto commandWithDto // <.>
+ );
+
+ Bookmark executeCommand(
+ CommandDto commandDto // <.>
);
}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/health/Health.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/health/Health.java
index c908630..a125837 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/health/Health.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/health/Health.java
@@ -40,6 +40,6 @@ public class Health {
@Getter
private final Throwable cause;
- public boolean getResult() { return message == null; }
+ public boolean getResult() { return message == null && cause == null; }
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/iactn/Interaction.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/iactn/Interaction.java
index d003734..c97cba3 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/iactn/Interaction.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/iactn/Interaction.java
@@ -206,15 +206,15 @@ public class Interaction implements HasUniqueId {
execution.setReturned(result);
return result;
} catch (Exception ex) {
-
+
//TODO there is an issue with exceptions getting swallowed, unless this is fixed,
// we rather print all of them, no matter whether recognized or not later on
// examples are IllegalArgument- or NullPointer- exceptions being swallowed when using the
// WrapperFactory utilizing async calls
log.error("failed to execute an interaction", ex);
-
- // just because an exception has thrown, does not mean it is that significant;
- // it could be that it is recognized by an ExceptionRecognizer and is not severe
+
+ // just because an exception has thrown, does not mean it is that significant;
+ // it could be that it is recognized by an ExceptionRecognizer and is not severe
// eg. unique index violation in the DB
getCurrentExecution().setThrew(ex);
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/menu/MenuBarsService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/menu/MenuBarsService.java
index 6dac827..042318b 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/menu/MenuBarsService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/menu/MenuBarsService.java
@@ -26,6 +26,7 @@ public interface MenuBarsService {
// end::refguide[]
// tag::refguide-1[]
enum Type {
+
// end::refguide-1[]
/**
* Either derived from annotations or as obtained elsewhere
@@ -34,6 +35,7 @@ public interface MenuBarsService {
*/
// tag::refguide-1[]
DEFAULT,
+
// end::refguide-1[]
/**
* As derived from annotations.
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/repository/RepositoryService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/repository/RepositoryService.java
index a90dd99..9108902 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/repository/RepositoryService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/repository/RepositoryService.java
@@ -258,6 +258,26 @@ public interface RepositoryService {
// tag::refguide[]
<T> Optional<T> firstMatch(Query<T> query); // <.>
// end::refguide[]
+ /**
+ * As {@link #allInstances(Class, long, long)}, but but returning all instances rather than just those
+ * * within the specified range..
+ */
+ // tag::refguide[]
+ <T> T refresh(T pojo); // <.>
+
+ // end::refguide[]
+ /**
+ * Detach the entity from the current persistence session.
+ *
+ * <p>
+ * This allows the entity to be read from even after the PersistenceSession that obtained it has been closed.
+ *
+ * @param entity - to detach
+ */
+ // tag::refguide[]
+ <T> T detach(T entity); // <.>
+
+ // end::refguide[]
// -- DEPRECATIONS
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/session/SessionLoggingService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/session/SessionLoggingService.java
index 3abf398..f10b74d 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/session/SessionLoggingService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/session/SessionLoggingService.java
@@ -49,29 +49,6 @@ public interface SessionLoggingService {
);
// end::refguide[]
- // tag::refguide-1[]
- class Stderr implements SessionLoggingService {
-
- @Override
- public void log(final Type type, final String username, final Date date, final CausedBy causedBy, final String sessionId) {
- final StringBuilder logMessage = new StringBuilder();
- logMessage.append("User '").append(username);
- logMessage.append("' with sessionId '").append(sessionId)
- .append("' has logged ");
- if (type == Type.LOGIN) {
- logMessage.append("in");
- } else {
- logMessage.append("out");
- }
- logMessage.append(" at '").append(date).append("'.");
- if (causedBy == CausedBy.SESSION_EXPIRATION) {
- logMessage.append("Cause: session expiration");
- }
- System.err.println(logMessage);
- }
- }
- // end::refguide-1[]
-
// tag::refguide[]
}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/session/SessionLoggingServiceLogging.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/session/SessionLoggingServiceLogging.java
new file mode 100644
index 0000000..fa7a9b1
--- /dev/null
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/session/SessionLoggingServiceLogging.java
@@ -0,0 +1,51 @@
+package org.apache.isis.applib.services.session;
+
+import java.util.Date;
+
+import javax.inject.Named;
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.annotation.OrderPrecedence;
+
+import lombok.extern.log4j.Log4j2;
+
+@Service
+@Named("isisApplib.SessionLoggingServiceLogging")
+@Order(OrderPrecedence.LATE)
+@Primary
+@Qualifier("logging")
+@Log4j2
+// tag::refguide[]
+public class SessionLoggingServiceLogging implements SessionLoggingService {
+
+ @Override
+ public void log(
+ final Type type,
+ final String username,
+ final Date date,
+ final CausedBy causedBy,
+ final String sessionId) {
+
+ if(log.isDebugEnabled()) {
+ final StringBuilder logMessage = new StringBuilder();
+ logMessage.append("User '").append(username);
+ logMessage.append("' with sessionId '").append(sessionId)
+ .append("' has logged ");
+ if (type == Type.LOGIN) {
+ logMessage.append("in");
+ } else {
+ logMessage.append("out");
+ }
+ logMessage.append(" at '").append(date).append("'.");
+ if (causedBy == CausedBy.SESSION_EXPIRATION) {
+ logMessage.append("Cause: session expiration");
+ }
+ log.debug(logMessage);
+ }
+ }
+}
+// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java
index 33a4870..219d9f9 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java
@@ -28,10 +28,10 @@ import org.apache.isis.core.commons.internal.memento._Mementos.EncoderDecoder;
public interface UrlEncodingService extends EncoderDecoder {
@Override
- String encode(final byte[] bytes); // <.>
+ String encode(final byte[] bytes);
@Override
- byte[] decode(String str); // <.>
+ byte[] decode(String str);
default String encodeString(final String str) {
return encode(_Strings.toBytes(str, StandardCharsets.UTF_8));
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/user/package-info.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/user/package-info.java
index 36c8fc4..3fd69e1 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/user/package-info.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/user/package-info.java
@@ -18,8 +18,20 @@
*/
/**
- * The {@link UserService} allows the domain object to obtain the identity of the user interacting with said object.
+ * This package defines types that represent the
+ * currently logged-in {@link org.apache.isis.applib.services.user.UserMemento user}
+ * and their {@link org.apache.isis.applib.services.user.RoleMemento role}s, as well as
+ * {@link org.apache.isis.applib.services.user.UserService} to obtain the current user.
*
+ * <p>
+ * Typically domain objects do not need to have any knowledge of <i>who</i>
+ * is using them, because authorization is provided declaratively by the
+ * framework and is type-based. However, there are occasions; for example,
+ * only an <tt>Employee</tt> and his superiors might be allowed to view their salary.
*
+ * <p>
+ * The types are suffixed "Memento" because they snapshot the user
+ * and roles at the time that the user logs in, but are not updated after that
+ * point.
*/
package org.apache.isis.applib.services.user;
\ No newline at end of file
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/AsyncWrap.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/AsyncWrap.java
deleted file mode 100644
index f042d97..0000000
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/AsyncWrap.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.applib.services.wrapper;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.function.Consumer;
-
-import org.apache.isis.applib.services.wrapper.WrapperFactory.ExecutionMode;
-import org.apache.isis.core.commons.collections.ImmutableEnumSet;
-import org.apache.isis.core.commons.handler.MethodReferences.Call1;
-import org.apache.isis.core.commons.handler.MethodReferences.Call2;
-import org.apache.isis.core.commons.handler.MethodReferences.Call3;
-import org.apache.isis.core.commons.handler.MethodReferences.Call4;
-import org.apache.isis.core.commons.handler.MethodReferences.Call5;
-import org.apache.isis.core.commons.handler.MethodReferences.Run1;
-import org.apache.isis.core.commons.handler.MethodReferences.Run2;
-import org.apache.isis.core.commons.handler.MethodReferences.Run3;
-import org.apache.isis.core.commons.handler.MethodReferences.Run4;
-import org.apache.isis.core.commons.handler.MethodReferences.Run5;
-
-/**
- * Binds to a domain object, to prepare for type-safe asynchronous action invocation.
- * <p>
- * Get an instance by using {@link WrapperFactory#async(Object)}.
- *
- * @apiNote INCUBATING
- * @since 2.0
- */
-public interface AsyncWrap<T> {
-
- // -- CONFIGURATION
-
- ExecutorService getExecutor();
- AsyncWrap<T> withExecutor(ExecutorService executor);
-
- Consumer<Exception> getExceptionHandler();
- AsyncWrap<T> withExceptionHandler(Consumer<Exception> handler);
-
- ImmutableEnumSet<ExecutionMode> getExecutionMode();
-
- // -- INVOCATION (WITH RETURN VALUE)
-
- <R> Future<R> call(Call1<? extends R, ? super T> action);
-
- <R, A1> Future<R> call(Call2<? extends R, ? super T, A1> action,
- A1 arg1);
-
- <R, A1, A2> Future<R> call(Call3<? extends R, ? super T, A1, A2> action,
- A1 arg1, A2 arg2);
-
- <R, A1, A2, A3> Future<R> call(Call4<? extends R, ? super T, A1, A2, A3> action,
- A1 arg1, A2 arg2, A3 arg3);
-
- <R, A1, A2, A3, A4> Future<R> call(Call5<? extends R, ? super T, A1, A2, A3, A4> action,
- A1 arg1, A2 arg2, A3 arg3, A4 arg4);
-
- // -- INVOCATION (WITHOUT RETURN VALUE)
-
- default Future<Void> run(Run1<? super T> action) {
- return call(obj->{
- action.run(obj);
- return null;
- });
- }
-
- default <A1> Future<Void> run(Run2<? super T, A1> action,
- A1 arg1) {
-
- return call(obj->{
- action.run(obj, arg1);
- return null;
- });
- }
-
- default <A1, A2> Future<Void> run(Run3<? super T, A1, A2> action,
- A1 arg1, A2 arg2) {
-
- return call(obj->{
- action.run(obj, arg1, arg2);
- return null;
- });
- }
-
- default <A1, A2, A3> Future<Void> run(Run4<? super T, A1, A2, A3> action,
- A1 arg1, A2 arg2, A3 arg3) {
-
- return call(obj->{
- action.run(obj, arg1, arg2, arg3);
- return null;
- });
- }
-
- default <A1, A2, A3, A4> Future<Void> run(Run5<? super T, A1, A2, A3, A4> action,
- A1 arg1, A2 arg2, A3 arg3, A4 arg4) {
-
- return call(obj->{
- action.run(obj, arg1, arg2, arg3, arg4);
- return null;
- });
- }
-
-}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/InteractionException.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/InteractionException.java
index ef7005d..23619e9 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/InteractionException.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/InteractionException.java
@@ -30,7 +30,7 @@ public abstract class InteractionException extends RecoverableException {
private final InteractionEvent interactionEvent;
public InteractionException(final InteractionEvent interactionEvent) {
- super(interactionEvent.getReasonMessage());
+ super(interactionEvent.getReason());
this.interactionEvent = interactionEvent;
}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java
index 7d92b96..92da4a8 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrapperFactory.java
@@ -19,24 +19,26 @@
package org.apache.isis.applib.services.wrapper;
-import java.util.EnumSet;
import java.util.List;
import org.apache.isis.applib.services.factory.FactoryService;
+import org.apache.isis.applib.services.wrapper.control.AsyncControl;
+import org.apache.isis.applib.services.wrapper.control.SyncControl;
import org.apache.isis.applib.services.wrapper.events.InteractionEvent;
import org.apache.isis.applib.services.wrapper.listeners.InteractionListener;
import org.apache.isis.core.commons.collections.ImmutableEnumSet;
-import static org.apache.isis.core.commons.collections.ImmutableEnumSet.*;
-
-import lombok.AccessLevel;
-import lombok.RequiredArgsConstructor;
-import lombok.experimental.UtilityClass;
-
/**
* Provides the ability to "wrap" of a domain object such that it can
* be interacted with while enforcing the hide/disable/validate rules implied by
- * the Isis programming model.
+ * the Apache Isis programming model.
+ *
+ * <p>
+ * The wrapper can alternatively also be used to execute the action
+ * asynchronously, through an {@link java.util.concurrent.ExecutorService}.
+ * Any business rules will be invoked synchronously beforehand, however.
+ * hand
+ * </p>
*
* <p>
* The 'wrap' is a runtime-code-generated proxy that wraps the underlying domain
@@ -44,14 +46,13 @@ import lombok.experimental.UtilityClass;
* <ul>
* <li>a <tt>get</tt> method for properties or collections</li>
* <li>a <tt>set</tt> method for properties</li>
- * <li>an <tt>addTo</tt> or <tt>removeFrom</tt> method for collections</li>
* <li>any action</li>
* </ul>
*
* <p>
* Calling any of the above methods may result in a (subclass of)
* {@link InteractionException} if the object disallows it. For example, if a
- * property is annotated with {@link Hidden} then a {@link HiddenException} will
+ * property is annotated as hidden then a {@link HiddenException} will
* be thrown. Similarly if an action has a <tt>validate</tt> method and the
* supplied arguments are invalid then a {@link InvalidException} will be
* thrown.
@@ -64,99 +65,32 @@ import lombok.experimental.UtilityClass;
* </ul>
*
* <p>
- * An exception will be thrown if any other methods are thrown.
- *
- * <p>
- * An implementation of this service (<tt>WrapperFactoryDefault</tt>) can be registered by including
- * <tt>o.a.i.core:isis-core-wrapper</tt> on the classpath; no further configuration is required.
- * </p>
+ * If the object has (see {@link #isWrapper(Object)} already been wrapped),
+ * then should just return the object back unchanged.
*/
// tag::refguide[]
// tag::refguide-async[]
// tag::refguide-listeners[]
public interface WrapperFactory {
- // end::refguide-listeners[]
- // end::refguide-async[]
// end::refguide[]
+ // end::refguide-async[]
+ // end::refguide-listeners[]
/**
- * Whether interactions with the wrapper are actually passed onto the
- * underlying domain object.
+ * Provides the "wrapper" of a domain object against which to invoke the action.
*
- * @see WrapperFactory#wrap(Object, ImmutableEnumSet)
- */
- @RequiredArgsConstructor(access = AccessLevel.PRIVATE)
- // tag::refguide-1[]
- enum ExecutionMode {
- // end::refguide-1[]
- /**
- * Skip all business rules.
- */
- // tag::refguide-1[]
- SKIP_RULE_VALIDATION,
- // end::refguide-1[]
- /**
- * Skip execution.
- */
- // tag::refguide-1[]
- SKIP_EXECUTION,
- // end::refguide-1[]
- /**
- * Don't fail fast, swallow any exception during validation or execution.
- */
- // tag::refguide-1[]
- SWALLOW_EXCEPTIONS,
- }
- // end::refguide-1[]
-
- // tag::refguide-2[]
- @UtilityClass
- class ExecutionModes {
- // end::refguide-2[]
- /**
- * Validate all business rules and then execute. May throw exceptions in order to fail fast.
- */
- // tag::refguide-2[]
- public static final ImmutableEnumSet<ExecutionMode> EXECUTE =
- noneOf(ExecutionMode.class);
- // end::refguide-2[]
- /**
- * Skip all business rules and then execute, does throw an exception if execution fails.
- */
- // tag::refguide-2[]
- public static final ImmutableEnumSet<ExecutionMode> SKIP_RULES =
- of(ExecutionMode.SKIP_RULE_VALIDATION);
- // end::refguide-2[]
- /**
- * Validate all business rules but do not execute, throw an exception if validation
- * fails.
- */
- // tag::refguide-2[]
- public static final ImmutableEnumSet<ExecutionMode> NO_EXECUTE =
- of(ExecutionMode.SKIP_EXECUTION);
- // end::refguide-2[]
- /**
- * Validate all business rules and then execute, but don't throw an exception if validation
- * or execution fails.
- */
- // tag::refguide-2[]
- public static final ImmutableEnumSet<ExecutionMode> TRY =
- of(ExecutionMode.SWALLOW_EXCEPTIONS);
- // end::refguide-2[]
- /**
- * Skips all steps.
- * @since 2.0
- */
- // tag::refguide-2[]
- public static final ImmutableEnumSet<ExecutionMode> NOOP =
- of(ExecutionMode.SKIP_RULE_VALIDATION,
- ExecutionMode.SKIP_EXECUTION);
- }
- // end::refguide-2[]
-
- /**
- * Same as {@link #wrap(Object)}, except the actual execution occurs only if
- * the <tt>execute</tt> parameter indicates.
+ * <p>
+ * The provided {@link SyncControl} determines whether business rules are checked first, and conversely
+ * whether the action is executed. There are therefore three typical cases:
+ * <ul>
+ * <li>check rules, execute action</li>
+ * <li>skip rules, execute action</li>
+ * <li>check rules, skip action</li>
+ * </ul>
+ * <p>
+ * The last logical option (skip rules, skip action) is valid but doesn't make sense, as it's basically a no-op.
+ * </p>
+ * </p>
*
* <p>
* Otherwise, will do all the validations (raise exceptions as required
@@ -164,46 +98,35 @@ public interface WrapperFactory {
*/
// tag::refguide[]
<T> T wrap(T domainObject, // <.>
- ImmutableEnumSet<ExecutionMode> mode);
+ SyncControl syncControl);
// end::refguide[]
/**
- * Provides the "wrapper" of the underlying domain object.
- *
- * <p>
- * If the object has (see {@link #isWrapper(Object)} already been wrapped),
- * then should just return the object back unchanged.
+ * A convenience overload for {@link #wrap(Object, SyncControl)},
+ * returning a wrapper to invoke the action synchronously, enforcing business rules.
+ * Any exceptions will be propagated, not swallowed.
*/
// tag::refguide[]
<T> T wrap(T domainObject); // <.>
// end::refguide[]
/**
- * Convenience method for {@link #wrap(Object, ImmutableEnumSet)} with {@link ExecutionModes#TRY},
- * to make this feature more discoverable.
- */
- // tag::refguide[]
- <T> T wrapTry(T domainObject); // <.>
-
- // end::refguide[]
- /**
- * Convenience method for {@link #wrap(Object, ImmutableEnumSet)} with {@link ExecutionModes#NO_EXECUTE},
- * to make this feature more discoverable.
- */
- // tag::refguide[]
- <T> T wrapNoExecute(T domainObject); // <.>
-
- // end::refguide[]
- /**
- * Convenience method for {@link #wrap(Object, ImmutableEnumSet)} with {@link ExecutionModes#SKIP_RULES},
- * to make this feature more discoverable.
+ * Provides the wrapper for a {@link FactoryService#mixin(Class, Object) mixin}, against which to invoke the action.
+ *
+ * <p>
+ * The provided {@link SyncControl} determines whether business rules are checked first, and conversely
+ * whether the action is executed. See {@link #wrap(Object, SyncControl)} for more details on this.
+ * </p>
*/
// tag::refguide[]
- <T> T wrapSkipRules(T domainObject); // <.>
+ <T> T wrapMixin(Class<T> mixinClass, Object mixedIn, // <.>
+ SyncControl syncControl);
// end::refguide[]
/**
- * {@link #wrap(Object) wraps} a {@link FactoryService#mixin(Class, Object) mixin}.
+ * A convenience overload for {@link #wrapMixin(Class, Object, SyncControl)},
+ * returning a wrapper to invoke the action synchronously, enforcing business rules.
+ * Any exceptions will be propagated, not swallowed.
*/
// tag::refguide[]
<T> T wrapMixin(Class<T> mixinClass, Object mixedIn); // <.>
@@ -238,81 +161,44 @@ public interface WrapperFactory {
// -- ASYNC WRAPPING
//
- /**
- * Returns a {@link AsyncWrap} bound to the provided {@code domainObject},
- * to prepare for type-safe asynchronous action execution.
- *
- * @param <T>
- * @param domainObject
- * @param mode
- *
- * @since 2.0
- */
- // tag::refguide-async[]
- <T> AsyncWrap<T> async(T domainObject, // <.>
- ImmutableEnumSet<ExecutionMode> mode);
- // end::refguide-async[]
/**
- * Shortcut for {@link #async(Object, ImmutableEnumSet)} using execution mode
- * {@link ExecutionModes#EXECUTE}.
- * @param <T>
+ * Returns a proxy object for the provided {@code domainObject},
+ * through which can execute the action asynchronously.
+ *
+ * @param <T> - the type of the domain object
+ * @param <R> - the type of the return of the action
* @param domainObject
+ * @param asyncControl
*
* @since 2.0
*/
// tag::refguide-async[]
- default <T> AsyncWrap<T> async(T domainObject) { // <.>
- // end::refguide-async[]
-
- return async(domainObject, ExecutionModes.EXECUTE);
-
- // tag::refguide-async[]
- // ...
- }
+ <T,R> T asyncWrap(T domainObject, // <.>
+ AsyncControl<R> asyncControl);
// end::refguide-async[]
/**
- * Returns a {@link AsyncWrap} bound to the provided {@code mixinClass},
- * to prepare for type-safe asynchronous action execution.
+ * Returns a proxy object for the provided {@code mixinClass},
+ * through which can execute the action asynchronously.
*
* @param <T>
* @param mixinClass
* @param mixedIn
- * @param mode
- *
- * @since 2.0
- */
- // tag::refguide-async[]
- <T> AsyncWrap<T> asyncMixin( // <.>
- Class<T> mixinClass, Object mixedIn,
- ImmutableEnumSet<ExecutionMode> mode);
-
- // end::refguide-async[]
- /**
- * Shortcut for {@link #asyncMixin(Class, Object, ImmutableEnumSet)} using execution mode
- * {@link ExecutionModes#EXECUTE}.
- * @param <T>
- * @param mixinClass
- * @param mixedIn
+ * @param asyncControl
*
* @since 2.0
*/
// tag::refguide-async[]
- default <T> AsyncWrap<T> asyncMixin( // <.>
- Class<T> mixinClass, Object mixedIn) {
- // end::refguide-async[]
+ <T,R> T asyncWrapMixin( // <.>
+ Class<T> mixinClass, Object mixedIn,
+ AsyncControl<R> asyncControl);
- return asyncMixin(mixinClass, mixedIn, ExecutionModes.EXECUTE);
-
- // tag::refguide-async[]
- // ...
- }
// end::refguide-async[]
//
- // -- ITERACTION EVENT HANDLING
+ // -- INTERACTION EVENT HANDLING
//
/**
@@ -365,5 +251,5 @@ public interface WrapperFactory {
}
// end::refguide[]
-// end::refguide-listeners[]
// end::refguide-async[]
+// end::refguide-listeners[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrappingObject.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrappingObject.java
index 9c936cf..5d4fca6 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrappingObject.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/WrappingObject.java
@@ -21,6 +21,7 @@ package org.apache.isis.applib.services.wrapper;
import java.util.EnumSet;
+import org.apache.isis.applib.services.wrapper.control.ExecutionMode;
import org.apache.isis.core.commons.collections.ImmutableEnumSet;
/**
@@ -65,9 +66,9 @@ public interface WrappingObject {
// end::refguide[]
/**
- * The {@link EnumSet<WrapperFactory.ExecutionMode> execution mode}
- * with which this wrapper was
- * {@link WrapperFactory#wrap(Object, ImmutableEnumSet) created}.
+ * The {@link EnumSet<ExecutionMode> execution modes} inferred from the
+ * {@link org.apache.isis.applib.services.wrapper.control.SyncControl} with which this wrapper was
+ * {@link WrapperFactory#wrap(Object, org.apache.isis.applib.services.wrapper.control.SyncControl) created}.
*
* <p>
* NOTE: domain classes may not have a method with this name. The <tt>__isis_</tt> prefix is
@@ -75,7 +76,7 @@ public interface WrappingObject {
* </p>
*/
// tag::refguide[]
- ImmutableEnumSet<WrapperFactory.ExecutionMode> __isis_executionMode();
+ ImmutableEnumSet<ExecutionMode> __isis_executionModes();
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
new file mode 100644
index 0000000..f6c3106
--- /dev/null
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.applib.services.wrapper.control;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.Future;
+import java.util.function.Consumer;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.user.RoleMemento;
+import org.apache.isis.applib.services.user.UserMemento;
+import org.apache.isis.applib.services.user.UserService;
+import org.apache.isis.core.commons.collections.ImmutableEnumSet;
+import org.apache.isis.schema.common.v2.OidDto;
+
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NonNull;
+import lombok.Setter;
+import lombok.extern.log4j.Log4j2;
+
+/**
+ *
+ * @param <R> - return value.
+ */
+// tag::refguide[]
+@Log4j2
+public class AsyncControl<R> extends ControlAbstract<AsyncControl<R>> {
+
+ public static AsyncControl<Void> control() {
+ return new AsyncControl<>();
+ }
+ public static <X> AsyncControl<X> control(final Class<X> clazz) {
+ return new AsyncControl<>();
+ }
+
+ private AsyncControl() {
+ with(exception -> {
+ log.error(logMessage(), exception);
+ return null;
+ });
+ }
+
+ @Getter @NonNull
+ private ExecutorService executorService = ForkJoinPool.commonPool();
+ public AsyncControl<R> with(ExecutorService executorService) {
+ this.executorService = executorService;
+ return this;
+ }
+
+ // end::refguide[]
+ /**
+ * Defaults to user initiating the action, if not overridden
+ */
+ // tag::refguide[]
+ @Getter
+ private String user;
+ public AsyncControl<R> withUser(final String user) {
+ this.user = user;
+ return this;
+ }
+
+ // end::refguide[]
+ /**
+ * Defaults to roles of user initiating the action, if not overridden
+ */
+ // tag::refguide[]
+ @Getter
+ private List<String> roles;
+ public AsyncControl<R> withRoles(final List<String> roles) {
+ this.roles = Collections.unmodifiableList(roles);
+ return this;
+ }
+ public AsyncControl<R> withRoles(String... roles) {
+ return withRoles(Arrays.asList(roles));
+ }
+
+ // end::refguide[]
+ /**
+ * Set by framework.
+ *
+ * Contains the result of the invocation. However, if an entity is returned, then the object is automatically
+ * detached because the persistence session within which it was obtained will have been closed already.
+ */
+ @Setter(AccessLevel.PACKAGE)
+ // tag::refguide[]
+ @Getter
+ private Future<R> future;
+
+ // end::refguide[]
+ private String logMessage() {
+ StringBuilder buf = new StringBuilder("Failed to execute ");
+ if(getMethod() != null) {
+ buf.append(" ").append(getMethod().getName()).append(" ");
+ if(getBookmark() != null) {
+ buf.append(" on '")
+ .append(getBookmark().getObjectType())
+ .append(":")
+ .append(getBookmark().getIdentifier())
+ .append("'");
+ }
+ }
+ return buf.toString();
+ }
+ // tag::refguide[]
+ // ...
+
+}
+// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControlService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControlService.java
new file mode 100644
index 0000000..51d4459
--- /dev/null
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControlService.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.applib.services.wrapper.control;
+
+import java.lang.reflect.Method;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.Future;
+import java.util.function.Consumer;
+
+import org.springframework.stereotype.Component;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.core.commons.collections.ImmutableEnumSet;
+import org.apache.isis.schema.common.v2.OidDto;
+
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NonNull;
+import lombok.Setter;
+import lombok.val;
+import lombok.extern.log4j.Log4j2;
+
+/**
+ * For framework internal use.
+ */
+@Component
+public class AsyncControlService {
+
+ public <R> AsyncControl<R> init(AsyncControl<R> asyncControl, Method method, Bookmark bookmark) {
+ asyncControl.setMethod(method);
+ asyncControl.setBookmark(bookmark);
+ return asyncControl;
+ }
+
+ public <R> AsyncControl<R> update(AsyncControl<R> asyncControl, Future<R> future) {
+ asyncControl.setFuture(future);
+ return asyncControl;
+ }
+
+ public <R> boolean shouldCheckRules(AsyncControl<R> asyncControl) {
+ val executionModes = asyncControl.getExecutionModes();
+ val skipRules = executionModes.contains(ExecutionMode.SKIP_RULE_VALIDATION);
+ return !skipRules;
+ }
+}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
new file mode 100644
index 0000000..8886d26
--- /dev/null
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.applib.services.wrapper.control;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.concurrent.Future;
+import java.util.function.Consumer;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.iactn.Interaction;
+import org.apache.isis.core.commons.collections.ImmutableEnumSet;
+
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NonNull;
+import lombok.Setter;
+import lombok.extern.log4j.Log4j2;
+
+// tag::refguide[]
+public class ControlAbstract<T extends ControlAbstract<T>> {
+
+ // end::refguide[]
+ protected ControlAbstract() {
+ }
+
+ /**
+ * Set by framework.
+ */
+ @Setter(AccessLevel.PACKAGE)
+ // tag::refguide[]
+ @Getter(AccessLevel.PACKAGE)
+ private Method method;
+
+ // end::refguide[]
+ /**
+ * Set by framework.
+ */
+ @Setter(AccessLevel.PACKAGE)
+ // tag::refguide[]
+ @Getter(AccessLevel.PACKAGE)
+ private Bookmark bookmark;
+ // end::refguide[]
+
+ private boolean checkRules = true;
+ public T withCheckRules() {
+ checkRules = true;
+ return (T)this;
+ }
+ public T withSkipRules() {
+ checkRules = false;
+ return (T)this;
+ }
+
+ // end::refguide[]
+
+ /**
+ * Not API.
+ */
+ public ImmutableEnumSet<ExecutionMode> getExecutionModes() {
+ EnumSet<ExecutionMode> modes = EnumSet.noneOf(ExecutionMode.class);
+ if(!checkRules) {
+ modes.add(ExecutionMode.SKIP_RULE_VALIDATION);
+ }
+ return ImmutableEnumSet.from(modes);
+ }
+
+ /**
+ * Initialized in constructor.
+ */
+ @Getter @NonNull
+ private ExceptionHandler exceptionHandler;
+ public T with(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ return (T)this;
+ }
+ // tag::refguide[]
+
+}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/command/CommandExecutorService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandler.java
similarity index 55%
copy from api/applib/src/main/adoc/modules/applib-svc/examples/services/command/CommandExecutorService.java
copy to api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandler.java
index 917a4e5..651247b 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/command/CommandExecutorService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandler.java
@@ -16,43 +16,32 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.isis.applib.services.command;
+package org.apache.isis.applib.services.wrapper.control;
-// tag::refguide[]
-public interface CommandExecutorService {
-
- // end::refguide[]
- // tag::refguide-2[]
- enum SudoPolicy {
+import java.util.function.Consumer;
- // end::refguide-2[]
- /**
- * For example, regular background commands.
- */
- // tag::refguide-2[]
- NO_SWITCH,
+import lombok.SneakyThrows;
+import lombok.extern.log4j.Log4j2;
- // end::refguide-2[]
- /**
- * For example, replayable commands.
- */
- // tag::refguide-2[]
- SWITCH,
- }
- // end::refguide-2[]
+/**
+ */
+// tag::refguide[]
+@FunctionalInterface
+public interface ExceptionHandler {
+ // end::refguide[]
/**
- * Executes the specified command.
+ * Handle the exception in some way.
+ *
+ * Typically this will log and rethrow the exception. If necessary though it can
+ * return some other value instead (must be compatible with the expected return value of the interaction,
+ * that is, the action invocation or property edit).
*
- * @param sudoPolicy
- * @param commandWithDto
- * @return - any exception raised by the command.
+ * @param ex - the exception that has occurred
+ * @return - optionally, the value to return.
*/
// tag::refguide[]
- void executeCommand(
- SudoPolicy sudoPolicy, // <.>
- CommandWithDto commandWithDto // <.>
- );
+ Object handle(Exception ex) throws Exception;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-cm/examples/security/package-info.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandlerAbstract.java
similarity index 53%
rename from api/applib/src/main/adoc/modules/applib-cm/examples/security/package-info.java
rename to api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandlerAbstract.java
index 23fc47e..c6ae2bd 100644
--- a/api/applib/src/main/adoc/modules/applib-cm/examples/security/package-info.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandlerAbstract.java
@@ -16,21 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.isis.applib.services.wrapper.control;
+
+import org.apache.logging.log4j.Logger;
+
+import lombok.extern.log4j.Log4j2;
/**
- * This package defines types that represent the
- * currently logged-in {@link org.apache.isis.applib.security.UserMemento user}
- * and their {@link org.apache.isis.applib.security.RoleMemento role}s.
- *
- * <p>
- * Typically domain objects do not need to have any knowledge of <i>who</i>
- * is using them, because authorization is provided declaratively by the
- * framework and is type-based. However, there are occasions; for example,
- * only an <tt>Employee</tt> and his superiors might be allowed to view their salary.
- *
- * <p>
- * The types are suffixed "Memento" because they snapshot the user
- * and roles at the time that the user logs in, but are not updated after that
- * point.
*/
-package org.apache.isis.applib.security;
\ No newline at end of file
+// tag::refguide[]
+@Log4j2
+public abstract class ExceptionHandlerAbstract implements ExceptionHandler {
+ public static Logger getLog() {
+ return log;
+ }
+}
+// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ExecutionMode.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExecutionMode.java
similarity index 90%
copy from api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ExecutionMode.java
copy to api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExecutionMode.java
index 8115679..694a1c3 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ExecutionMode.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExecutionMode.java
@@ -1,6 +1,9 @@
package org.apache.isis.applib.services.wrapper.control;
+import java.util.function.Consumer;
+
import org.apache.isis.applib.services.wrapper.WrapperFactory;
+import org.apache.isis.applib.services.wrapper.control.AsyncControl;
import org.apache.isis.core.commons.collections.ImmutableEnumSet;
import lombok.AccessLevel;
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
similarity index 74%
copy from api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
copy to api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
index 0951ff9..5c9b91c 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
@@ -18,14 +18,28 @@
*/
package org.apache.isis.applib.services.wrapper.control;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.EnumSet;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.Future;
+import java.util.function.Consumer;
import org.apache.isis.core.commons.collections.ImmutableEnumSet;
+import org.apache.isis.schema.common.v2.OidDto;
-/**
- */
-// end::refguide[]
-public class SyncControl extends ControlAbstract {
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.NonNull;
+import lombok.Setter;
+import lombok.SneakyThrows;
+import lombok.extern.log4j.Log4j2;
+
+// tag::refguide[]
+public class SyncControl extends ControlAbstract<SyncControl> {
public static SyncControl control() {
return new SyncControl();
@@ -47,9 +61,11 @@ public class SyncControl extends ControlAbstract {
return this;
}
+ // end::refguide[]
/**
* Not API.
*/
+ // tag::refguide[]
public ImmutableEnumSet<ExecutionMode> getExecutionModes() {
EnumSet<ExecutionMode> modes = EnumSet.copyOf(super.getExecutionModes().toEnumSet());
if(!execute) {
@@ -58,6 +74,5 @@ public class SyncControl extends ControlAbstract {
return ImmutableEnumSet.from(modes);
}
-
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/user/package-info.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/xmlsnapshot/XmlSnapshotServiceAbstract.java
similarity index 64%
copy from api/applib/src/main/adoc/modules/applib-svc/examples/services/user/package-info.java
copy to api/applib/src/main/adoc/modules/applib-svc/examples/services/xmlsnapshot/XmlSnapshotServiceAbstract.java
index 36c8fc4..05d3b61 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/user/package-info.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/xmlsnapshot/XmlSnapshotServiceAbstract.java
@@ -16,10 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.isis.applib.services.xmlsnapshot;
-/**
- * The {@link UserService} allows the domain object to obtain the identity of the user interacting with said object.
- *
- *
- */
-package org.apache.isis.applib.services.user;
\ No newline at end of file
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+
+import javax.inject.Inject;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+import org.apache.isis.applib.services.xml.XmlService;
+
+public abstract class XmlSnapshotServiceAbstract implements XmlSnapshotService {
+
+
+}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc
index 9cb52908..1687025 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/WrapperFactory.adoc
@@ -7,14 +7,15 @@ WARNING: Document `WrappingObject`, document `AsyncControl`
The `WrapperFactory` provides the ability to enforce business rules for programmatic interactions between domain objects.
-If there is a (lack-of-) trust boundary between the caller and callee -- eg if they reside in different modules -- then the wrapper factory is a useful mechanism to ensure that any business constraints defined by the callee are honoured.
+If there is a (lack of) trust boundary between the caller and callee -- eg if they reside in different modules -- then the wrapper factory is one mechanism to ensure that any business constraints defined by the callee are honoured.
For example, if the calling object attempts to modify an unmodifiable property on the target object, then an exception will be thrown.
+
Said another way: interactions are performed "as if" they are through the viewer.
[NOTE]
====
-For a discussion of the use of the `WrapperFactory` within integration tests (the primary or at least original use case for this service) can be found xref:testing:integtestsupport:about.adoc#wrapper-factory[here]
+For a discussion of the use of the `WrapperFactory` within integration tests (the primary or at least original use case for this service) can be found xref:testing:integtestsupport:about.adoc#wrapper-factory[here].
====
This capability goes beyond enforcing the (imperative) constraints within the `hideXxx()`, `disableXxx()` and `validateXxx()` supporting methods; it also enforces (declarative) constraints such as those represented by annotations, eg `@Parameter(maxLength=...)` or `@Property(mustSatisfy=...)`.
@@ -33,41 +34,14 @@ The main API provided by the service is:
----
include::refguide:applib-svc:example$services/wrapper/WrapperFactory.java[tags="refguide"]
----
-<.> wraps the underlying domain object with a wrapper configured with the set of ``ExecutionMode``s.
-+
-If the domain object is already wrapped, then wrapping it again does nothing; the wrapper is returned unchanged.
-+
-The `ExecutionMode` modifies the way in which the wrapper interacts with the underlying domain object:
-+
-[source,java]
-----
-include::refguide:applib-svc:example$services/wrapper/WrapperFactory.java[tags="refguide-1",indent=0]
-----
-+
-As a convenience, the `ExecutionModes` class defines some predefined sets of the `ExecutionMode` enum:
-+
-[source,java]
-----
-include::refguide:applib-svc:example$services/wrapper/WrapperFactory.java[tags="refguide-2",indent=0]
-----
-
-<.> wraps the underlying domain object with a wrapper that will validate all business rules and then execute if they pass.
+<.> wraps the underlying domain object so it can invoked (through its wrapper) synchronously in the same thread.
+
-This is the same as invoke `wrap(...)` with `ExecutionModes.EXECUTE`.
+The `SyncControl` modifies the way in which the wrapper interacts with the underlying domain object, discussed xref:#synccontrol-and-asynccontrol[below].
-<.> wraps the underlying domain object with a wrapper that will validate all business rules and then execute if they pass, but will simply skip execution if any of the business rules fail (returning null).
-+
-This is the same as invoke `wrap(...)` with `ExecutionModes.TRY`.
-
-<.> wraps the underlying domain object with a wrapper that will validate all business rules but will not actually perform the interaction.
-+
-This is the same as invoke `wrap(...)` with `ExecuteModes#NO_EXECUTE`.
+<.> overload that wraps the underlying domain object with a wrapper that will validate all business rules and then execute if they pass.
-<.> wraps the underlying domain object with a wrapper that will NOT check any business rules and instead will just perform the interaction.
-+
-This is the same as invoke `wrap(...)` with `ExecuteMode#SKIP_RULES`.
-
-<.> instantiates and wraps a mixin, with no modifiers to the execution.
+<.> instantiates and wraps a mixin so that it can be invoked (through its wrapper) synchronously in the same thread.
+Again `SyncControl` modifies the way in which the wrapper interacts with the underlying domain object, discussed xref:#synccontrol-and-asynccontrol[below]..
<.> Obtains the underlying domain object, if wrapped.
+
@@ -76,6 +50,17 @@ If the object is not wrapped, returns back unchanged.
<.> whether the supplied object has been wrapped.
+=== `SyncControl` and `AsyncControl`
+
+The `SyncControl` and `AsyncControl` classes control the way that the wrapper works, for both synchronous calls using `wrap(...)`, and asynchronous calls using `asyncWrap`.
+
+[source,java]
+----
+include::refguide:applib-svc:example$services/wrapper/control/SyncControl.java[tags="refguide"]
+----
+
+
+
The service works by returning a "wrapper" around a supplied domain object (using link:https://bytebuddy.net/[byte buddy]), and it is this wrapper that ensures that the hide/disable/validate rules implies by the Apache Isis programming model are enforced.
The wrapper can be interacted with as follows:
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
index 09eda7d..92da4a8 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
@@ -119,7 +119,7 @@ public interface WrapperFactory {
* </p>
*/
// tag::refguide[]
- <T> T wrapMixin(Class<T> mixinClass, Object mixedIn, // <.>
+ <T> T wrapMixin(Class<T> mixinClass, Object mixedIn, // <.>
SyncControl syncControl);
// end::refguide[]
@@ -174,8 +174,8 @@ public interface WrapperFactory {
* @since 2.0
*/
// tag::refguide-async[]
- <T,R> T async(T domainObject, // <.>
- AsyncControl<R> asyncControl);
+ <T,R> T asyncWrap(T domainObject, // <.>
+ AsyncControl<R> asyncControl);
// end::refguide-async[]
/**
@@ -190,9 +190,9 @@ public interface WrapperFactory {
* @since 2.0
*/
// tag::refguide-async[]
- <T,R> T asyncMixin( // <.>
- Class<T> mixinClass, Object mixedIn,
- AsyncControl<R> asyncControl);
+ <T,R> T asyncWrapMixin( // <.>
+ Class<T> mixinClass, Object mixedIn,
+ AsyncControl<R> asyncControl);
// end::refguide-async[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ExecutionMode.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ExecutionMode.java
index 8115679..b88159f 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ExecutionMode.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ExecutionMode.java
@@ -26,7 +26,7 @@ public enum ExecutionMode {
* Skip actual execution.
*
* <p>
- * This is not supported for {@link WrapperFactory#async(Object, AsyncControl)}; instead just invoke {@link WrapperFactory#wrap(Object, ImmutableEnumSet)}.
+ * This is not supported for {@link WrapperFactory#asyncWrap(Object, AsyncControl)}; instead just invoke {@link WrapperFactory#wrap(Object, ImmutableEnumSet)}.
*/
// tag::refguide[]
SKIP_EXECUTION,
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
index 0951ff9..9fe06ed 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
@@ -24,7 +24,7 @@ import org.apache.isis.core.commons.collections.ImmutableEnumSet;
/**
*/
-// end::refguide[]
+// tag::refguide[]
public class SyncControl extends ControlAbstract {
public static SyncControl control() {
@@ -47,9 +47,11 @@ public class SyncControl extends ControlAbstract {
return this;
}
+ // end::refguide[]
/**
* Not API.
*/
+ // tag::refguide[]
public ImmutableEnumSet<ExecutionMode> getExecutionModes() {
EnumSet<ExecutionMode> modes = EnumSet.copyOf(super.getExecutionModes().toEnumSet());
if(!execute) {
@@ -58,6 +60,5 @@ public class SyncControl extends ControlAbstract {
return ImmutableEnumSet.from(modes);
}
-
}
// end::refguide[]
diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java
index 190e7fc..c91b102 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/wrapper/WrapperFactoryDefault.java
@@ -230,7 +230,7 @@ public class WrapperFactoryDefault implements WrapperFactory {
@Override
- public <T,R> T async(
+ public <T,R> T asyncWrap(
final T domainObject,
final AsyncControl<R> asyncControl) {
@@ -261,7 +261,7 @@ public class WrapperFactoryDefault implements WrapperFactory {
}
@Override
- public <T, R> T asyncMixin(Class<T> mixinClass, Object mixedIn, AsyncControl<R> asyncControl) {
+ public <T, R> T asyncWrapMixin(Class<T> mixinClass, Object mixedIn, AsyncControl<R> asyncControl) {
T mixin = factoryService.mixin(mixinClass, mixedIn);
val proxyFactory = proxyFactoryService.factory(mixinClass, new Class[]{WrappingObject.class}, new Class[]{mixedIn.getClass()});
diff --git a/examples/demo/src/main/java/demoapp/dom/events/DemoEventSubscriber.java b/examples/demo/src/main/java/demoapp/dom/events/DemoEventSubscriber.java
index 225d443..166d76f 100644
--- a/examples/demo/src/main/java/demoapp/dom/events/DemoEventSubscriber.java
+++ b/examples/demo/src/main/java/demoapp/dom/events/DemoEventSubscriber.java
@@ -55,7 +55,7 @@ public class DemoEventSubscriber {
val eventLogWriter = factoryService.get(EventLogWriter.class); // <-- get a new writer
- wrapper.async(eventLogWriter, AsyncControl.control()).storeEvent(event);
+ wrapper.asyncWrap(eventLogWriter, AsyncControl.control()).storeEvent(event);
}
diff --git a/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java b/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java
index c4a0f17..7ce295b 100644
--- a/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java
+++ b/examples/smoketests/src/test/java/org/apache/isis/testdomain/auditing/AuditerServiceTest.java
@@ -135,7 +135,7 @@ class AuditerServiceTest extends IsisIntegrationTestAbstract {
// when - running within its own background task
AsyncControl<Void> control = control().withSkipRules();
- wrapper.async(book, control.with(new ExceptionHandlerAbstract() {
+ wrapper.asyncWrap(book, control.with(new ExceptionHandlerAbstract() {
@Override
public Object handle(Exception ex) throws Exception {
getLog().error(ex);
@@ -163,7 +163,7 @@ class AuditerServiceTest extends IsisIntegrationTestAbstract {
// when - running within its own background task
assertThrows(DisabledException.class, ()->{
- wrapper.async(book, control()).setName("Book #2");
+ wrapper.asyncWrap(book, control()).setName("Book #2");
control().getFuture().get(1000, TimeUnit.SECONDS);
diff --git a/examples/smoketests/src/test/java/org/apache/isis/testdomain/commandexecution/WrapperAsyncTest.java b/examples/smoketests/src/test/java/org/apache/isis/testdomain/commandexecution/WrapperAsyncTest.java
index f7d4446..01fe199 100644
--- a/examples/smoketests/src/test/java/org/apache/isis/testdomain/commandexecution/WrapperAsyncTest.java
+++ b/examples/smoketests/src/test/java/org/apache/isis/testdomain/commandexecution/WrapperAsyncTest.java
@@ -122,7 +122,7 @@ class WrapperAsyncTest extends IsisIntegrationTestAbstract {
// when
val control = control(JdoProduct.class);
- wrapper.async(inventoryManager, control)
+ wrapper.asyncWrap(inventoryManager, control)
.updateProductPrice(product, 123d);
// then
diff --git a/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java b/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java
index 5d2862f..09a078f 100644
--- a/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java
+++ b/examples/smoketests/src/test/java/org/apache/isis/testdomain/publishing/PublisherServiceTest.java
@@ -146,7 +146,7 @@ class PublisherServiceTest extends IsisIntegrationTestAbstract {
// when - running within its own background task
AsyncControl<Void> control = control().withSkipRules();
- wrapper.async(book, control).setName("Book #2"); // don't enforce rules for this test
+ wrapper.asyncWrap(book, control).setName("Book #2"); // don't enforce rules for this test
control.getFuture().get(10, TimeUnit.SECONDS);
@@ -175,7 +175,7 @@ class PublisherServiceTest extends IsisIntegrationTestAbstract {
// when - running within its own background task
assertThrows(DisabledException.class, ()->{
- wrapper.async(book, control()).setName("Book #2");
+ wrapper.asyncWrap(book, control()).setName("Book #2");
control().getFuture().get(10, TimeUnit.SECONDS);
[isis] 07/07: ISIS-2062: more docs
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 0892d9bb6e7b2f06f3567993b93bd7e30057d2ed
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Mar 17 17:25:44 2020 +0000
ISIS-2062: more docs
---
antora/supplemental-ui/css/home/style.css | 7 ++-
antora/supplemental-ui/css/site-custom.css | 12 ++++
.../applib-ant/examples/annotation/Action.java | 30 +++++-----
.../examples/annotation/MemberOrder.java | 5 +-
.../applib-ant/examples/annotation/Mixin.java | 3 +-
.../examples/annotation/PromptStyle.java | 8 ---
.../applib-ant/examples/annotation/Redirect.java | 4 --
.../main/adoc/modules/applib-ant/pages/Action.adoc | 18 +++---
.../modules/applib-ant/pages/Action/command.adoc | 2 +-
.../modules/applib-ant/pages/ActionLayout.adoc | 16 +++++-
.../adoc/modules/applib-ant/pages/Collection.adoc | 6 +-
.../modules/applib-ant/pages/CollectionLayout.adoc | 8 +--
.../modules/applib-ant/pages/DomainObject.adoc | 28 ++++-----
.../applib-ant/pages/DomainObjectLayout.adoc | 12 ++--
.../modules/applib-ant/pages/DomainService.adoc | 4 +-
.../pages/DomainService/repositoryFor.adoc | 25 --------
.../applib-ant/pages/DomainServiceLayout.adoc | 2 +-
.../adoc/modules/applib-ant/pages/MemberOrder.adoc | 13 +++--
.../main/adoc/modules/applib-ant/pages/Mixin.adoc | 20 +------
.../adoc/modules/applib-ant/pages/Parameter.adoc | 8 +--
.../applib-ant/pages/Parameter/fileAccept.adoc | 1 -
.../applib-ant/pages/Parameter/maxLength.adoc | 1 -
.../applib-ant/pages/Parameter/mustSatisfy.adoc | 1 -
.../applib-ant/pages/Parameter/regexPattern.adoc | 1 -
.../modules/applib-ant/pages/ParameterLayout.adoc | 16 +++---
.../adoc/modules/applib-ant/pages/Property.adoc | 12 ++--
.../applib-ant/pages/Property/maxLength.adoc | 1 -
.../modules/applib-ant/pages/PropertyLayout.adoc | 18 +++---
.../services/urlencoding/UrlEncodingService.java | 4 +-
.../services/wrapper/control/AsyncControl.java | 12 ----
.../wrapper/control/AsyncControlService.java | 10 ----
.../services/wrapper/control/ControlAbstract.java | 18 ++----
.../services/wrapper/control/ExceptionHandler.java | 5 --
.../services/wrapper/control/ExecutionMode.java | 5 +-
.../services/wrapper/control/SyncControl.java | 18 +-----
.../examples/services/xml/XmlService.java | 4 +-
.../adoc/modules/applib-svc/pages/XmlService.adoc | 10 ++--
.../org/apache/isis/applib/annotation/Action.java | 30 +++++-----
.../apache/isis/applib/annotation/MemberOrder.java | 5 +-
.../org/apache/isis/applib/annotation/Mixin.java | 3 +-
.../apache/isis/applib/annotation/PromptStyle.java | 8 ---
.../apache/isis/applib/annotation/Redirect.java | 4 --
.../services/urlencoding/UrlEncodingService.java | 4 +-
.../isis/applib/services/xml/XmlService.java | 4 +-
core/config/generateConfigDocs.groovy | 4 +-
.../adoc/modules/config/pages/sections/Other.adoc | 4 +-
.../modules/config/pages/sections/isis.applib.adoc | 30 +++++-----
.../pages/sections/isis.core.meta-model.adoc | 6 +-
.../isis.core.meta-model.introspector.adoc | 6 +-
.../sections/isis.core.meta-model.validator.adoc | 10 ++--
.../pages/sections/isis.core.runtime-services.adoc | 26 ++++-----
.../config/pages/sections/isis.core.runtime.adoc | 8 +--
.../config/pages/sections/isis.extensions.adoc | 8 +--
.../modules/config/pages/sections/isis.legacy.adoc | 8 +--
.../sections/isis.persistence.jdo-datanucleus.adoc | 4 +-
.../isis.persistence.jdo-datanucleus.impl.adoc | 60 ++++++++++----------
.../config/pages/sections/isis.security.shiro.adoc | 6 +-
.../config/pages/sections/isis.testing.adoc | 6 +-
.../config/pages/sections/isis.value-types.adoc | 22 ++++----
.../pages/sections/isis.viewer.restfulobjects.adoc | 26 ++++-----
.../config/pages/sections/isis.viewer.wicket.adoc | 58 +++++++++----------
.../modules/config/pages/sections/resteasy.adoc | 33 +++--------
preview.sh | 66 ++++++++++++++++++++--
scripts/ci/_build-site.sh | 23 ++++----
64 files changed, 394 insertions(+), 446 deletions(-)
diff --git a/antora/supplemental-ui/css/home/style.css b/antora/supplemental-ui/css/home/style.css
index 6eacd07..2dc43d7 100644
--- a/antora/supplemental-ui/css/home/style.css
+++ b/antora/supplemental-ui/css/home/style.css
@@ -1166,4 +1166,9 @@ body.mobile-nav-active #mobile-nav-toggle {
#call-to-action pre {
color: wheat;
background-color: darkslateblue;
-}
\ No newline at end of file
+}
+
+img.helloworld-copy,
+img.simpleapp-copy {
+ cursor: pointer;
+}
diff --git a/antora/supplemental-ui/css/site-custom.css b/antora/supplemental-ui/css/site-custom.css
index 206b737..51ae584 100644
--- a/antora/supplemental-ui/css/site-custom.css
+++ b/antora/supplemental-ui/css/site-custom.css
@@ -1,3 +1,15 @@
+.content .hljs-meta {
+ color: olivedrab;
+ font-weight: 500;
+}
+
+.content .hljs-keyword,
+.content .hljs-selector-tag,
+.content .hljs-subst {
+ color: darkblue;
+ font-weight: 500;
+}
+
div.paragraph code {
color: darkmagenta;
}
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
index b054030..c73d945 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Action.java
@@ -168,20 +168,6 @@ public @interface Action {
// end::refguide[]
/**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
- *
- * <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
- * </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
- */
- // tag::refguide[]
- String fileAccept() // <.>
- default "";
-
- // end::refguide[]
- /**
* Indicates where (in the UI) the action is not visible to the user.
*
* <p>
@@ -242,5 +228,21 @@ public @interface Action {
Class<?> typeOf() // <.>
default Object.class;
+ // end::refguide[]
+ /**
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
+ *
+ * <p>
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
+ * </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
+ *
+ * @deprecated - unused; see instead @Parameter and @Property
+ */
+ @Deprecated
+ String fileAccept() // <.>
+ default "";
+ // tag::refguide[]
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/MemberOrder.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/MemberOrder.java
index eef7938..54a49dc 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/MemberOrder.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/MemberOrder.java
@@ -50,7 +50,8 @@ public @interface MemberOrder {
* </ul>
*/
// tag::refguide[]
- String name() default "";
+ String name() // <.>
+ default "";
// end::refguide[]
/**
@@ -59,7 +60,7 @@ public @interface MemberOrder {
* (collections aren't grouped).
*/
// tag::refguide[]
- String sequence();
+ String sequence(); // <.>
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Mixin.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Mixin.java
index 2b92093..a2fe2b6 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Mixin.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Mixin.java
@@ -69,7 +69,8 @@ public @interface Mixin {
* </p>
*/
// tag::refguide[]
- String method() default DEFAULT_METHOD_NAME;
+ String method() // <.>
+ default DEFAULT_METHOD_NAME;
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PromptStyle.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PromptStyle.java
index bbe9e1b..df7e313 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PromptStyle.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/PromptStyle.java
@@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlType;
namespace = "http://isis.apache.org/applib/layout/component"
)
public enum PromptStyle {
-
// end::refguide[]
/**
* Prompt using the style configured by <tt>isis.viewer.wicket.promptStyle</tt>.
@@ -39,7 +38,6 @@ public enum PromptStyle {
*/
// tag::refguide[]
AS_CONFIGURED,
-
// end::refguide[]
/**
* Use a dialog for the prompt.
@@ -52,28 +50,24 @@ public enum PromptStyle {
*/
// tag::refguide[]
DIALOG,
-
// end::refguide[]
/**
* Use a dialog for the prompt, rendered in a sidebar.
*/
// tag::refguide[]
DIALOG_SIDEBAR,
-
// end::refguide[]
/**
* Use a dialog for the prompt, rendered in a modal dialog.
*/
// tag::refguide[]
DIALOG_MODAL,
-
// end::refguide[]
/**
* Show the form inline, temporarily replacing the rendering of the property.
*/
// tag::refguide[]
INLINE,
-
// end::refguide[]
/**
* Applies only to actions, show the form inline, invoked as if editing the property.
@@ -96,7 +90,6 @@ public enum PromptStyle {
*/
// tag::refguide[]
INLINE_AS_IF_EDIT,
-
// end::refguide[]
/**
* Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta
@@ -104,7 +97,6 @@ public enum PromptStyle {
*/
// tag::refguide[]
NOT_SPECIFIED;
-
// end::refguide[]
public boolean isDialog() { return this == DIALOG || this == DIALOG_MODAL || this == DIALOG_SIDEBAR; }
public boolean isInline() { return this == INLINE; }
diff --git a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Redirect.java b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Redirect.java
index 20d1e38..c771535 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Redirect.java
+++ b/api/applib/src/main/adoc/modules/applib-ant/examples/annotation/Redirect.java
@@ -29,21 +29,18 @@ import javax.xml.bind.annotation.XmlType;
namespace = "http://isis.apache.org/applib/layout/component"
)
public enum Redirect {
-
// end::refguide[]
/**
* As defined by configuration property <code>isis.viewer.wicket.redirectEvenIfSameObject</code>
*/
// tag::refguide[]
AS_CONFIGURED,
-
// end::refguide[]
/**
* Redirect (meaning render a new page) even if the result of the action is the same as the target.
*/
// tag::refguide[]
EVEN_IF_SAME,
-
// end::refguide[]
/**
* Don't redirect if the result is the same as the target, instead just update the existing page.
@@ -54,6 +51,5 @@ public enum Redirect {
*/
// tag::refguide[]
ONLY_IF_DIFFERS,
-
}
// end::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc
index 0bda359..d5b153a 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Action.adoc
@@ -9,20 +9,16 @@ The `@Action` annotation groups together all domain-specific metadata for an inv
----
include::refguide:applib-ant:example$annotation/Action.java[tags="refguide"]
----
-<.> xref:refguide:applib-ant:Action.adoc#associateWith[`associateWith()`]
+<.> xref:refguide:applib-ant:Action.adoc#associatewith[`associateWith()`]
+
associates an action with another property or collection of the action.
-<.> xref:refguide:applib-ant:Action.adoc#associateWith[`associateWith()`]
+<.> `associateWithSequence()`
+
-associates an action with another property or collection of the action.
-
-<.> xref:refguide:applib-ant:Action.adoc#associateWith[`associateWithSequence()`]
-associates an action with another property or collection of the action.
+the ordering of multiple actions associated with another property/collection.
<.> xref:refguide:applib-ant:Action.adoc#command[`command()`]
-whether the action invocation should be reified into a `o.a.i.applib.` +
-`services.command.Command` object through the xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] service:
+whether the action invocation should be reified into a `Command` object using the xref:refguide:applib-svc:CommandContext.adoc[`CommandContext`] service:
<.> `commandExecuteIn()`
+
@@ -36,7 +32,7 @@ Whether the reified `Command` (as provided by the `CommandContext` domain servic
+
If the `Command` also implements `CommandWithDto` (meaning that it can return a `CommandDto`, in other words be converted into an XML memento), then optionally specifies a processor that can refine this XML.
-<.> xref:refguide:applib-ant:Action.adoc#domainEvent[`domainEvent()`]
+<.> xref:refguide:applib-ant:Action.adoc#domainevent[`domainEvent()`]
+
The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the action's business rule checking (hide, disable, validate) and its invocation (pre-execute and post-execute).
@@ -48,7 +44,7 @@ Indicates where (in the UI) the action should be hidden from the user.
+
Whether the action invocation should be published to the registered xref:refguide:applib-svc:PublisherService.adoc[`PublisherService`].
-<.> xref:refguide:applib-ant:Action.adoc#restrictTo[`restrictTo()`]
+<.> xref:refguide:applib-ant:Action.adoc#restrictto[`restrictTo()`]
+
Whether the action is only available in prototyping mode, or whether it is available also in production mode.
@@ -58,7 +54,7 @@ The action's semantics (ie whether objects are modified as the result of invokin
+
The `...ARE_YOU_SURE` variants cause a confirmation dialog to be displayed in the xref:vw:ROOT:about.adoc[Wicket viewer].
-<.> xref:refguide:applib-ant:Action.adoc#typeOf[`typeOf()`]
+<.> xref:refguide:applib-ant:Action.adoc#typeof[`typeOf()`]
+
If the action returns a collection, hints as to the run-time type of the objects within that collection (as a fallback)
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc
index 7959904..b588685 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Action/command.adoc
@@ -1,5 +1,5 @@
[[command]]
-= Command Persistence and Processing
+= Command Processing
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-partial:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc
index 936ed89..6052895 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ActionLayout.adoc
@@ -13,11 +13,11 @@ include::refguide:applib-ant:example$annotation/ActionLayout.java[tags="refguide
+
Indicates if an action (with safe xref:refguide:applib-ant:Action.adoc#semantics[action semantics]) is automatically bookmarked.
-<.> xref:refguide:applib-ant:ActionLayout.adoc#cssClass[`cssClass()`]
+<.> xref:refguide:applib-ant:ActionLayout.adoc#cssclass[`cssClass()`]
+
An additional CSS class around the HTML that represents for the action, to allow targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]. +
-<.> xref:refguide:applib-ant:ActionLayout.adoc#cssClassFa[`cssClassFa()`]
+<.> xref:refguide:applib-ant:ActionLayout.adoc#cssclassfa[`cssClassFa()`]
+
Specify a link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon name for the action's menu link or icon.
@@ -25,7 +25,7 @@ Specify a link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon nam
+
Positioning of the icon on the button/menu item.
-<.> xref:refguide:applib-ant:ActionLayout.adoc#describedAs[`describedAs()`]
+<.> xref:refguide:applib-ant:ActionLayout.adoc#describedas[`describedAs()`]
+
Provides a short description of the action, eg for rendering as a 'tool tip'.
@@ -42,7 +42,17 @@ A typical use case is if the desired name is a reserved Java keyword, such as `d
+
For actions associated (using xref:refguide:applib-ant:MemberOrder.adoc[`@MemberOrder#named`]) with properties, the positioning of the action's button with respect to the property
+<.> `promptStyle()`
++
+How to render the action prompt / property edit form : inline, dialog, sidebar etc.
+
+<.> `redirectPolicy()`
++
+For the xref:vw:ROOT:about.adoc[Wicket viewer], whether to re-render the page after invoking this action, even if the result is the same.
++
+Not re-rendering can provide a smoother UI experience.
+// TODO: v2 - missing subpages for `promptStyle` and `redirectPolicy`
For example:
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
index 51e4c4e..c0bdb89 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Collection.adoc
@@ -9,7 +9,7 @@ The `@Collection` annotation applies to collections collecting together all doma
----
include::refguide:applib-ant:example$annotation/Collection.java[tags="refguide"]
----
-<.> xref:refguide:applib-ant:Collection.adoc#domainEvent[`domainEvent()`]
+<.> xref:refguide:applib-ant:Collection.adoc#domainevent[`domainEvent()`]
+
The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the collection's business rule checking (hide, disable, validate) and its modification (before and after).
@@ -25,11 +25,11 @@ If `editing()` is `DISABLED`, provides a reason as to why.
+
Indicates where (in the UI) the collection should be hidden from the user.
-<.> xref:refguide:applib-ant:Collection.adoc#mementoSerialization[`mementoSerialization()`]
+<.> xref:refguide:applib-ant:Collection.adoc#mementoserialization[`memento()`]
+
Whether to include/exclude in snapshots. +
-<.> xref:refguide:applib-ant:Collection.adoc#typeOf[`typeOf()`]
+<.> xref:refguide:applib-ant:Collection.adoc#typeof[`typeOf()`]
+
Hints as to the run-time type of the objects within that collection (as a fallback)
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc
index 08a88f2..a573016 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/CollectionLayout.adoc
@@ -10,15 +10,15 @@ It is also possible to apply the annotation to actions of domain services that a
----
include::refguide:applib-ant:example$annotation/CollectionLayout.java[tags="refguide"]
----
-<.> xref:refguide:applib-ant:CollectionLayout.adoc#cssClass[`cssClass()`]
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#cssclass[`cssClass()`]
+
The css class that a collection should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-<.> xref:refguide:applib-ant:CollectionLayout.adoc#defaultView[`defaultView()`]
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#defaultview[`defaultView()`]
+
Which view is selected by default, if multiple views are available.
-<.> xref:refguide:applib-ant:CollectionLayout.adoc#describedAs[`describedAs()`]
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#describedas[`describedAs()`]
+
Description of this collection, eg to be rendered in a tooltip.
@@ -39,7 +39,7 @@ Whether to HTML escape the name of this property.
+
The page size for instances of this class when rendered within a table.
-<.> xref:refguide:applib-ant:CollectionLayout.adoc#sortedBy[`sortedBy()`]
+<.> xref:refguide:applib-ant:CollectionLayout.adoc#sortedby[`sortedBy()`]
+
Indicates that the elements in the `java.util.SortedSet` collection should be sorted according to a specified `Comparator` rather than their natural sort order.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc
index 19545ce..575c42d 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObject.adoc
@@ -17,11 +17,11 @@ include::refguide:applib-ant:example$annotation/DomainObject.java[tags="refguide
Indicates whether each of the changed properties of an object should be submitted to the registered
xref:refguide:applib-svc:AuditerService.adoc[`AuditerService`](s)
-<.> xref:refguide:applib-ant:DomainObject.adoc#autoCompleteRepository[`autoCompleteRepository()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#autocompleterepository[`autoCompleteRepository()`]
+
Nominate a method on a domain service to be used for looking up instances of the domain object
-<.> `autoCompleteAction()`
+<.> xref:refguide:applib-ant:DomainObject.adoc#autocompleteaction[`autoCompleteAction()`]
+
Override the method name to use on the auto-complete repository
@@ -37,7 +37,7 @@ Whether the object's properties and collections can be edited or not (ie whether
+
The default reason why the object's properties and collections cannot be edited.
-<.> xref:refguide:applib-ant:DomainObject.adoc#mixinMethod[`mixinMethod()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#mixinmethod[`mixinMethod()`]
+
How to recognize the "reserved" method name, meaning that the mixin's own name will be inferred from the mixin type.
Typical examples are "exec", "execute", "invoke", "apply" and so on.
@@ -48,7 +48,7 @@ The default "reserved" method name is `$$`.
Whether the domain object logically is an entity (part of the domain layer) or is a view model (part of the application layer); or is a mixin.
If an entity, indicates how its persistence is managed.
-<.> xref:refguide:applib-ant:DomainObject.adoc#objectType[`objectType()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#objecttype[`objectType()`]
+
Specify an alias for the domain class used to uniquely identify the object both within the Apache Isis runtime and externally
@@ -70,27 +70,27 @@ include::refguide:applib-ant:example$annotation/DomainObject.java[tags="refguide
+
The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] whenever an instance is created
-<.> xref:refguide:applib-ant:DomainObject.adoc#persistingLifecycleEvent[`persistingLifecycleEvent()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#persistinglifecycleevent[`persistingLifecycleEvent()`]
+
The event type to be posted to whenever an instance is about to be persisted
-<.> xref:refguide:applib-ant:DomainObject.adoc#persistedLifecycleEvent[`persistedLifecycleEvent()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#persistedlifecycleevent[`persistedLifecycleEvent()`]
+
The event type to be posted whenever an instance has just been persisted
-<.> xref:refguide:applib-ant:DomainObject.adoc#loadedLifecycleEvent[`loadedLifecycleEvent()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#loadedlifecycleevent[`loadedLifecycleEvent()`]
+
The event type to be posted whenever an instance has just been loaded from the datastore
-<.> xref:refguide:applib-ant:DomainObject.adoc#removingLifecycleEvent[`removingLifecycleEvent()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#removinglifecycleevent[`removingLifecycleEvent()`]
+
The event type to be posted whenever an instance is about to be deleted
-<.> xref:refguide:applib-ant:DomainObject.adoc#updatedLifecycleEvent[`updatedLifecycleEvent()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#updatedlifecycleevent[`updatedLifecycleEvent()`]
+
The event type to be posted whenever an instance has just been updated
-<.> xref:refguide:applib-ant:DomainObject.adoc#updatingLifecycleEvent[`updatingLifecycleEvent()`]
+<.> xref:refguide:applib-ant:DomainObject.adoc#updatinglifecycleevent[`updatingLifecycleEvent()`]
+
The event type to be posted whenever an instance is about to be updated
@@ -126,7 +126,7 @@ For example:
@DomainObject(
auditing=Auditing.ENABLED,
autoCompleteRepository=CustomerRepository.class
- editing=Editing.ENABLED, // <1>
+ editing=Editing.ENABLED, // <.>
updatedLifecycleEvent=Customer.UpdatedEvent.class
)
@@ -134,11 +134,7 @@ public class Customer {
...
}
----
-<1> default value, so could be omitted
-
-
-
-
+<.> default value, so could be omitted
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
index 599ecf1..ff78c5d 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc
@@ -21,7 +21,7 @@ Whether (and how) this domain object should be automatically bookmarked
+
The css class that a domain class (type) should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassFa[`cssClassFa`]
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#cssclassfa[`cssClassFa`]
+
Any valid link:http://fortawesome.github.io/Font-Awesome/[Font awesome] icon name for the domain object's menu link or icon. +
@@ -31,7 +31,7 @@ Currently unused.
-<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#describedAs[`describedAs`]
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#describedas[`describedAs`]
+
Description of this class, eg to be rendered in a tooltip.
@@ -80,19 +80,19 @@ Note that there is (currently) no support for specifying UI hints for domain obj
----
include::refguide:applib-ant:example$annotation/DomainObjectLayout.java[tags="refguide-ui-events"]
----
-<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#cssClassUiEvent[`cssClassUiEvent`]
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#cssclassuievent[`cssClassUiEvent`]
+
The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to obtain a CSS class for the domain object.
-<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#iconUiEvent[`iconUiEvent`]
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#iconuievent[`iconUiEvent`]
+
The event type to be posted to obtain the icon (name) for the domain object.
-<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#layoutUiEvent[`layoutUiEvent`]
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#layoutuievent[`layoutUiEvent`]
+
The event type to be posted to obtain the layout (name) for the domain object.
-<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#titleUiEvent[`titleUiEvent`]
+<.> xref:refguide:applib-ant:DomainObjectLayout.adoc#titleuievent[`titleUiEvent`]
+
The event type to be posted to obtain the title for the domain object.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
index a59ebe1..529b3c4 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService.adoc
@@ -15,7 +15,7 @@ include::refguide:applib-ant:example$annotation/DomainService.java[tags="refguid
+
Whether the actions of this domain service should be rendered in UI menus only, or the xref:vro:ROOT:about.adoc[RestfulObjects] REST API only, or both
-<.> xref:refguide:applib-ant:DomainService.adoc#objectType[`objectType()`]
+<.> xref:refguide:applib-ant:DomainService.adoc#objecttype[`objectType()`]
+
Equivalent to xref:refguide:applib-ant:DomainObject.adoc#objectType[`@DomainObject#objectType()`], specifies the objectType of the service.
+
@@ -38,4 +38,4 @@ public class LoanRepository {
include::DomainService/nature.adoc[leveloffset=+1]
include::DomainService/objectType.adoc[leveloffset=+1]
-include::DomainService/repositoryFor.adoc[leveloffset=+1]
+
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService/repositoryFor.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService/repositoryFor.adoc
deleted file mode 100644
index 7afa9b3..0000000
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainService/repositoryFor.adoc
+++ /dev/null
@@ -1,25 +0,0 @@
-= `repositoryFor`
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-:page-partial:
-
-
-The `repositoryFor` attribute is intended for domain services (probably with a xref:refguide:applib-ant:DomainService.adoc#nature[`nature=DOMAIN`]) that are intended to act as repositories for domain entities.
-
-For example:
-
-[source,java]
-----
-@DomainService(
- nature=NatureOfService.DOMAIN,
- repositoryFor=Loan.class
-)
-public class LoanRepository {
- @Programmatic
- public List<Loan> findLoansFor(Borrower borrower) { /* ... */ }
-}
-----
-
-
-Currently the metadata is unused; one planned use is to infer the icon for the domain service from the icon of the nominated entity.
-
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
index c9fe676..dd49afa 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/DomainServiceLayout.adoc
@@ -17,7 +17,7 @@ The annotation is:
----
include::refguide:applib-ant:example$annotation/DomainServiceLayout.java[tags="refguide"]
----
-<.> xref:refguide:applib-ant:DomainServiceLayout.adoc#menuBar[`menuBar()`]
+<.> xref:refguide:applib-ant:DomainServiceLayout.adoc#menubar[`menuBar()`]
+
The menubar in which the menu that holds this service's actions should reside:
+
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc
index 28d9dcb..391c325 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/MemberOrder.adoc
@@ -11,11 +11,14 @@ The `@MemberOrder` annotation is used to specify the relative order of domain ob
----
include::refguide:applib-ant:example$annotation/MemberOrder.java[tags="refguide"]
----
-
-The annotation defines two attributes:
-
-* xref:refguide:applib-ant:MemberOrder.adoc#name[`name()`]
-* xref:refguide:applib-ant:MemberOrder.adoc#sequence[`sequence()`]
+<.> xref:refguide:applib-ant:MemberOrder.adoc#name[`name()`]
++
+Names a group of (property) members.
+All properties with this name will be grouped together.
+
+<.> xref:refguide:applib-ant:MemberOrder.adoc#sequence[`sequence()`]
++
+Defines an ordering for members, within their container.
As this is an important topic, there is a xref:vw:ROOT:layout.adoc[separate chapter] that discussed object layout in full.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc
index 49a4e09..50430be 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Mixin.adoc
@@ -15,26 +15,12 @@ For further discussion on using mixins, see xref:userguide:fun:building-blocks.a
----
include::refguide:applib-ant:example$annotation/Mixin.java[tags="refguide"]
----
-
-The table below summarizes the annotation's attributes.
-
-.`@Mixin` attributes
-[cols="2,2,4a",options="header"]
-|===
-
-
-| Attribute
-| Values (default)
-| Description
-
-
-|xref:refguide:applib-ant:Mixin.adoc#method[`method()`]
-|Method name within the mixin
-|How to recognize the "reserved" method name, meaning that the mixin's own name will be inferred from the mixin type.
+<.> xref:refguide:applib-ant:Mixin.adoc#method[`method()`]
++
+Determines how to recognize the "reserved" method name, meaning that the mixin's own name will be inferred from the mixin type.
Typical examples are "exec", "execute", "invoke", "apply" and so on.
The default "reserved" method name is `$$`.
-|===
An alternative and equivalent approach is to use the
xref:refguide:applib-ant:DomainObject.adoc#nature[`@DomainObject#nature()`] annotation with a nature of `MIXIN`.
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
index 1d308b7..511a9df 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter.adoc
@@ -9,18 +9,18 @@ The `@Parameter` annotation applies to action parameters collecting together all
----
include::refguide:applib-ant:example$annotation/Parameter.java[tags="refguide"]
----
-<.> xref:refguide:applib-ant:Parameter.adoc#fileAccept[`fileAccept()`]
+<.> xref:refguide:applib-ant:Parameter.adoc#fileaccept[`fileAccept()`]
+
Hints the file type (media type or file extension) to be uploaded for xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]
or xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]. +
+
Note that this does not prevent the user from uploading some other file type; rather it merely defaults the file type in the file open dialog.
-<.> xref:refguide:applib-ant:Parameter.adoc#maxLength[`maxLength()`]
+<.> xref:refguide:applib-ant:Parameter.adoc#maxlength[`maxLength()`]
+
Maximum number of characters for string parameters; ignored otherwise
-<.> xref:refguide:applib-ant:Parameter.adoc#mustSatisfy[`mustSatisfy()`]
+<.> xref:refguide:applib-ant:Parameter.adoc#mustsatisfy[`mustSatisfy()`]
+
Implementation of `o.a.i.applib.spec.Specification`, allowing arbitrary validation to be applied.
@@ -28,7 +28,7 @@ Implementation of `o.a.i.applib.spec.Specification`, allowing arbitrary validati
+
Specifies a parameter is optional rather than mandatory
-<.> xref:refguide:applib-ant:Parameter.adoc#regexPattern[regexPattern()]
+<.> xref:refguide:applib-ant:Parameter.adoc#regexpattern[regexPattern()]
+
Validates the contents of a string parameter against the regular expression pattern
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/fileAccept.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/fileAccept.adoc
index f7e263b..bd46ce28 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/fileAccept.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/fileAccept.adoc
@@ -1,4 +1,3 @@
-[[fileAccept]]
= `fileAccept()`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/maxLength.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/maxLength.adoc
index f1e44f2..cd28357 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/maxLength.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/maxLength.adoc
@@ -1,4 +1,3 @@
-[[maxLength]]
= `maxLength()`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/mustSatisfy.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/mustSatisfy.adoc
index be2cfcc..a17a701 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/mustSatisfy.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/mustSatisfy.adoc
@@ -1,4 +1,3 @@
-[[mustSatisfy]]
= `mustSatisfy()`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/regexPattern.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/regexPattern.adoc
index 59cef2c..54309d8 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/regexPattern.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Parameter/regexPattern.adoc
@@ -1,4 +1,3 @@
-[[regexPattern]]
= `regexPattern()`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
index 9b87278..aa35a39 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/ParameterLayout.adoc
@@ -10,24 +10,24 @@ The `@ParameterLayout` annotation applies to action parameters, collecting toget
----
include::refguide:applib-ant:example$annotation/ParameterLayout.java[tags="refguide"]
----
-<.> xref:refguide:applib-ant:ParameterLayout.adoc#cssClass[`cssClass()`]
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#cssclass[`cssClass()`]
+The css class that a parameter should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-<.> xref:refguide:applib-ant:ParameterLayout.adoc#describedAs[`describedAs()`]
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#describedas[`describedAs()`]
+
Description of this parameter, eg to be rendered in a tooltip.
-<.> xref:refguide:applib-ant:ParameterLayout.adoc#labelPosition[`labelPosition()`]
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#labelposition[`labelPosition()`]
In forms, the positioning of the label relative to the property value. +
=
-Default is `LEFT`, unless xref:refguide:applib-ant:ParameterLayout.adoc#multiLine[`multiLine`] in which case `TOP`.
+Default is `LEFT`, unless xref:refguide:applib-ant:ParameterLayout.adoc#multiline[`multiLine`] in which case `TOP`.
The value `RIGHT` is only supported for boolean parameters.
-<.> xref:refguide:applib-ant:ParameterLayout.adoc#multiLine[`multiLine()`]
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#multiline[`multiLine()`]
+
For string parameters, render as a text area over specified number of lines.
+
-If set > 1, then then xref:refguide:applib-ant:ParameterLayout.adoc#labelPosition[`labelPosition`] defaults to `TOP`.
+If set > 1, then then xref:refguide:applib-ant:ParameterLayout.adoc#labelposition[`labelPosition`] defaults to `TOP`.
<.> xref:refguide:applib-ant:ParameterLayout.adoc#named[`named()`]
+
@@ -44,11 +44,11 @@ The only reason then to name the parameter is if the desired name is a reserved
+
Whether to HTML escape the name of this parameter.
-<.> xref:refguide:applib-ant:ParameterLayout.adoc#renderedAsDayBefore[`renderedAsDayBefore()`]
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#renderedasdaybefore[`renderedAsDayBefore()`]
+
For date parameters only, render the date as one day prior to the actually stored date (eg the end date of an open interval into a closed interval)
-<.> xref:refguide:applib-ant:ParameterLayout.adoc#typicalLength[`typicalLength()`]
+<.> xref:refguide:applib-ant:ParameterLayout.adoc#typicallength[`typicalLength()`]
+
The typical entry length of a field, use to determine the optimum width for display
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
index f548a1a..c40fb52 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property.adoc
@@ -28,7 +28,7 @@ Whether to execute the command immediately, or to persist it (assuming that an a
+
If the `Command` also implements `CommandWithDto` (meaning that it can return a `CommandDto`, in other words be converted into an XML memento), then optionally specifies the implementation of a `CommandDtoProcessor` that can refine this XML.
-<.> xref:refguide:applib-ant:Property.adoc#domainEvent[`domainEvent()`]
+<.> xref:refguide:applib-ant:Property.adoc#domainevent[`domainEvent()`]
+
The event type to be posted to the xref:refguide:applib-svc:EventBusService.adoc[`EventBusService`] to broadcast the property's business rule checking (hide, disable, validate) and its modification (before and after).
@@ -40,7 +40,7 @@ Whether a property can be modified or cleared from within the UI
+
The reason that this property cannot be modified.
-<.> xref:refguide:applib-ant:Property.adoc#fileAccept[`fileAccept()`]
+<.> xref:refguide:applib-ant:Property.adoc#fileaccept[`fileAccept()`]
+
Hints the file type (media type or file extension) to be uploaded to a xref:refguide:applib-cm:classes/value-types.adoc#Blob[`Blob`]
or xref:refguide:applib-cm:classes/value-types.adoc#Clob[`Clob`]. +
@@ -51,17 +51,17 @@ Note that this does not prevent the user from uploading some other file type; ra
+
Indicates where (in the UI) the property should be hidden from the user.
-<.> xref:refguide:applib-ant:Property.adoc#maxLength[`maxLength()`]
+<.> xref:refguide:applib-ant:Property.adoc#maxlength[`maxLength()`]
+
Maximum number of characters for string parameters; ignored otherwise +
+
TIP: In many/most cases you should however use xref:refguide:applib-ant:Column.adoc[`@Column#length()`]
-<.> xref:refguide:applib-ant:Property.adoc#mementoSerialization[`mementoSerialization()`]
+<.> xref:refguide:applib-ant:Property.adoc#mementoserialization[`mementoSerialization()`]
+
Whether to exclude from snapshots. +
-<.> xref:refguide:applib-ant:Property.adoc#mustSatisfy[`mustSatisfy()`]
+<.> xref:refguide:applib-ant:Property.adoc#mustsatisfy[`mustSatisfy()`]
+
Implementation of `o.a.i.applib.spec.Specification` that allows arbitrary validation to be applied.
@@ -79,7 +79,7 @@ Indicates that owning object is a view model that is acting as a projection of t
+
Determines whether the editing of a property should be published.
-<.> xref:refguide:applib-ant:Property.adoc#regexPattern[`regexPattern()`]
+<.> xref:refguide:applib-ant:Property.adoc#regexpattern[`regexPattern()`]
+
Validates the contents of a string parameter against the regular expression pattern
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/maxLength.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/maxLength.adoc
index c2369d0..8430da1 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/Property/maxLength.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/Property/maxLength.adoc
@@ -1,4 +1,3 @@
-[[maxLength]]
= `maxLength()`
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
diff --git a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
index a57d331..0dba772 100644
--- a/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
+++ b/api/applib/src/main/adoc/modules/applib-ant/pages/PropertyLayout.adoc
@@ -9,11 +9,11 @@ The `@PropertyLayout` annotation applies to properties collecting together all U
----
include::refguide:applib-ant:example$annotation/PropertyLayout.java[tags="refguide"]
----
-<.> xref:refguide:applib-ant:PropertyLayout.adoc#cssClass[`cssClass()`]
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#cssclass[`cssClass()`]
+
The css class that a property should have, to allow more targetted styling in xref:refguide:config:application-specific/application-css.adoc[`application.css`]
-<.> xref:refguide:applib-ant:PropertyLayout.adoc#describedAs[`describedAs()`]
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#describedas[`describedAs()`]
+
Description of this property, eg to be rendered in a tooltip.
@@ -21,20 +21,20 @@ Description of this property, eg to be rendered in a tooltip.
+
Indicates where (in the UI) the property should be hidden from the user.
-<.> xref:refguide:applib-ant:PropertyLayout.adoc#labelPosition[`labelPosition()`]
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#labelposition[`labelPosition()`]
+
In forms, the positioning of the label relative to the property value. +
+
-Defaults is `LEFT`, unless xref:refguide:applib-ant:PropertyLayout.adoc#multiLine[`multiLine`] in which case `TOP`.
+Defaults is `LEFT`, unless xref:refguide:applib-ant:PropertyLayout.adoc#multiline[`multiLine`] in which case `TOP`.
The value `RIGHT` is only supported for boolean properties.
+
It is also possible to change the default through a xref:refguide:config:configuring-core.adoc#isis-viewers-propertyLayout-labelPosition[configuration property]
-<.> xref:refguide:applib-ant:PropertyLayout.adoc#multiLine[`multiLine()`]
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#multiline[`multiLine()`]
+
For string properties, render as a text area over multiple lines. +
+
-If set > 1, then xref:refguide:applib-ant:PropertyLayout.adoc#labelPosition[`labelPosition`] defaults to TOP.
+If set > 1, then xref:refguide:applib-ant:PropertyLayout.adoc#labelposition[`labelPosition`] defaults to TOP.
<.> xref:refguide:applib-ant:PropertyLayout.adoc#named[`named()`]
+
@@ -50,11 +50,11 @@ Whether to HTML escape the name of this property.
+
Whether a property should be used as the navigable parent (parent breadcrumb) of this object
-<.> xref:refguide:applib-ant:PropertyLayout.adoc#promptStyle[`promptStyle()`]
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#promptstyle[`promptStyle()`]
+
How a property prompt should be displayed within the UI
-<.> xref:refguide:applib-ant:PropertyLayout.adoc#renderedAsDayBefore[`renderedAsDayBefore()`]
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#renderedasdaybefore[`renderedAsDayBefore()`]
+
For date properties only, render the date as one day prior to the actually stored date.
@@ -64,7 +64,7 @@ Indicates that the value held by the property never changes over time (even if o
+
Used as a hint to the viewer not to redraw the property if possible after an AJAX update.
-<.> xref:refguide:applib-ant:PropertyLayout.adoc#typicalLength[`typicalLength()`]
+<.> xref:refguide:applib-ant:PropertyLayout.adoc#typicallength[`typicalLength()`]
+
The typical entry length of a field, use to determine the optimum width for display
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java
index 219d9f9..094a791 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/urlencoding/UrlEncodingService.java
@@ -28,10 +28,10 @@ import org.apache.isis.core.commons.internal.memento._Mementos.EncoderDecoder;
public interface UrlEncodingService extends EncoderDecoder {
@Override
- String encode(final byte[] bytes);
+ String encode(final byte[] bytes); // <.>
@Override
- byte[] decode(String str);
+ byte[] decode(String str); // <.>
default String encodeString(final String str) {
return encode(_Strings.toBytes(str, StandardCharsets.UTF_8));
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
index db508c5..d5fccec 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControl.java
@@ -18,24 +18,12 @@
*/
package org.apache.isis.applib.services.wrapper.control;
-import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.Future;
-import java.util.function.Consumer;
-
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.user.RoleMemento;
-import org.apache.isis.applib.services.user.UserMemento;
-import org.apache.isis.applib.services.user.UserService;
-import org.apache.isis.core.commons.collections.ImmutableEnumSet;
-import org.apache.isis.schema.common.v2.OidDto;
import lombok.AccessLevel;
import lombok.Getter;
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControlService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControlService.java
index 51d4459..c112868 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControlService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/AsyncControlService.java
@@ -19,23 +19,13 @@
package org.apache.isis.applib.services.wrapper.control;
import java.lang.reflect.Method;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.Future;
-import java.util.function.Consumer;
import org.springframework.stereotype.Component;
import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.core.commons.collections.ImmutableEnumSet;
-import org.apache.isis.schema.common.v2.OidDto;
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.Setter;
import lombok.val;
-import lombok.extern.log4j.Log4j2;
/**
* For framework internal use.
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
index dc796a1..dc03213 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ControlAbstract.java
@@ -19,22 +19,16 @@
package org.apache.isis.applib.services.wrapper.control;
import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.EnumSet;
-import java.util.List;
-import java.util.concurrent.Future;
-import java.util.function.Consumer;
import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.iactn.Interaction;
import org.apache.isis.core.commons.collections.ImmutableEnumSet;
+import org.apache.isis.core.commons.internal.base._Casts;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
-import lombok.extern.log4j.Log4j2;
// tag::refguide[]
public class ControlAbstract<T extends ControlAbstract<T>> {
@@ -58,18 +52,18 @@ public class ControlAbstract<T extends ControlAbstract<T>> {
private Bookmark bookmark;
// tag::refguide[]
- private boolean checkRules = true; // <.>
+ private boolean checkRules = true; // <.>
public T withCheckRules() {
// end::refguide[]
checkRules = true;
- return (T)this;
+ return _Casts.uncheckedCast(this);
// tag::refguide[]
// ...
}
public T withSkipRules() {
// end::refguide[]
checkRules = false;
- return (T)this;
+ return _Casts.uncheckedCast(this);
// tag::refguide[]
// ...
}
@@ -80,11 +74,11 @@ public class ControlAbstract<T extends ControlAbstract<T>> {
*/
// tag::refguide[]
@Getter @NonNull
- private ExceptionHandler exceptionHandler; // <.>
+ private ExceptionHandler exceptionHandler; // <.>
public T with(ExceptionHandler exceptionHandler) {
// end::refguide[]
this.exceptionHandler = exceptionHandler;
- return (T)this;
+ return _Casts.uncheckedCast(this);
// tag::refguide[]
// ...
}
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandler.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandler.java
index 651247b..bda7a5b 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandler.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExceptionHandler.java
@@ -18,11 +18,6 @@
*/
package org.apache.isis.applib.services.wrapper.control;
-import java.util.function.Consumer;
-
-import lombok.SneakyThrows;
-import lombok.extern.log4j.Log4j2;
-
/**
*/
// tag::refguide[]
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExecutionMode.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExecutionMode.java
index 694a1c3..b88159f 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExecutionMode.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/ExecutionMode.java
@@ -1,9 +1,6 @@
package org.apache.isis.applib.services.wrapper.control;
-import java.util.function.Consumer;
-
import org.apache.isis.applib.services.wrapper.WrapperFactory;
-import org.apache.isis.applib.services.wrapper.control.AsyncControl;
import org.apache.isis.core.commons.collections.ImmutableEnumSet;
import lombok.AccessLevel;
@@ -29,7 +26,7 @@ public enum ExecutionMode {
* Skip actual execution.
*
* <p>
- * This is not supported for {@link WrapperFactory#async(Object, AsyncControl)}; instead just invoke {@link WrapperFactory#wrap(Object, ImmutableEnumSet)}.
+ * This is not supported for {@link WrapperFactory#asyncWrap(Object, AsyncControl)}; instead just invoke {@link WrapperFactory#wrap(Object, ImmutableEnumSet)}.
*/
// tag::refguide[]
SKIP_EXECUTION,
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
index c2d433c..6ea0387 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/wrapper/control/SyncControl.java
@@ -18,26 +18,12 @@
*/
package org.apache.isis.applib.services.wrapper.control;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.EnumSet;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ForkJoinPool;
-import java.util.concurrent.Future;
-import java.util.function.Consumer;
import org.apache.isis.core.commons.collections.ImmutableEnumSet;
-import org.apache.isis.schema.common.v2.OidDto;
-
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.Setter;
-import lombok.SneakyThrows;
-import lombok.extern.log4j.Log4j2;
+/**
+ */
// tag::refguide[]
public class SyncControl extends ControlAbstract<SyncControl> {
diff --git a/api/applib/src/main/adoc/modules/applib-svc/examples/services/xml/XmlService.java b/api/applib/src/main/adoc/modules/applib-svc/examples/services/xml/XmlService.java
index 7081689..189c423 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/examples/services/xml/XmlService.java
+++ b/api/applib/src/main/adoc/modules/applib-svc/examples/services/xml/XmlService.java
@@ -29,6 +29,8 @@ import org.apache.isis.applib.services.xmlsnapshot.XmlSnapshotService;
// tag::refguide[]
public interface XmlService {
+ // end::refguide[]
+
// tag::refguide-3[]
class Exception extends RuntimeException {
@@ -53,7 +55,6 @@ public interface XmlService {
// end::refguide-3[]
- // end::refguide[]
/**
* Converts xml string into an {@link Document W3C Document}.
*
@@ -63,7 +64,6 @@ public interface XmlService {
Document asDocument(String xmlStr); // <.>
// end::refguide[]
-
/**
* Serializes a {@link Document W3C Document} back into a string.
*
diff --git a/api/applib/src/main/adoc/modules/applib-svc/pages/XmlService.adoc b/api/applib/src/main/adoc/modules/applib-svc/pages/XmlService.adoc
index 536d3f8..2282673 100644
--- a/api/applib/src/main/adoc/modules/applib-svc/pages/XmlService.adoc
+++ b/api/applib/src/main/adoc/modules/applib-svc/pages/XmlService.adoc
@@ -14,12 +14,12 @@ The API of `XmlService` is:
[source]
----
-include::refguide:applib-svc:example$services/xmlsnapshot/XmlService.java[tags="refguide"]
+include::refguide:applib-svc:example$services/xml/XmlService.java[tags="refguide"]
----
-<1> is a convenience method to convert xml string back into a W3C Document
-<2> is a convenience method to extract the value of an XML element, based on its type.
-<3> is a convenience method to walk XML document.
-<4> is a convenience method to obtain value of child text node.
+<.> is a convenience method to convert xml string back into a W3C Document
+<.> is a convenience method to extract the value of an XML element, based on its type.
+<.> is a convenience method to walk XML document.
+<.> is a convenience method to obtain value of child text node.
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
index b054030..c73d945 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
@@ -168,20 +168,6 @@ public @interface Action {
// end::refguide[]
/**
- * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
- *
- * <p>
- * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
- * </p>
- *
- * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
- */
- // tag::refguide[]
- String fileAccept() // <.>
- default "";
-
- // end::refguide[]
- /**
* Indicates where (in the UI) the action is not visible to the user.
*
* <p>
@@ -242,5 +228,21 @@ public @interface Action {
Class<?> typeOf() // <.>
default Object.class;
+ // end::refguide[]
+ /**
+ * For uploading {@link Blob} or {@link Clob}, optionally restrict the files accepted (eg <tt>.xslx</tt>).
+ *
+ * <p>
+ * The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
+ * </p>
+ *
+ * @see <a href="http://www.w3schools.com/tags/att_input_accept.asp">http://www.w3schools.com</a>
+ *
+ * @deprecated - unused; see instead @Parameter and @Property
+ */
+ @Deprecated
+ String fileAccept() // <.>
+ default "";
+ // tag::refguide[]
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/MemberOrder.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/MemberOrder.java
index eef7938..54a49dc 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/MemberOrder.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/MemberOrder.java
@@ -50,7 +50,8 @@ public @interface MemberOrder {
* </ul>
*/
// tag::refguide[]
- String name() default "";
+ String name() // <.>
+ default "";
// end::refguide[]
/**
@@ -59,7 +60,7 @@ public @interface MemberOrder {
* (collections aren't grouped).
*/
// tag::refguide[]
- String sequence();
+ String sequence(); // <.>
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Mixin.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Mixin.java
index 2b92093..a2fe2b6 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Mixin.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Mixin.java
@@ -69,7 +69,8 @@ public @interface Mixin {
* </p>
*/
// tag::refguide[]
- String method() default DEFAULT_METHOD_NAME;
+ String method() // <.>
+ default DEFAULT_METHOD_NAME;
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/PromptStyle.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/PromptStyle.java
index bbe9e1b..df7e313 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/PromptStyle.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/PromptStyle.java
@@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlType;
namespace = "http://isis.apache.org/applib/layout/component"
)
public enum PromptStyle {
-
// end::refguide[]
/**
* Prompt using the style configured by <tt>isis.viewer.wicket.promptStyle</tt>.
@@ -39,7 +38,6 @@ public enum PromptStyle {
*/
// tag::refguide[]
AS_CONFIGURED,
-
// end::refguide[]
/**
* Use a dialog for the prompt.
@@ -52,28 +50,24 @@ public enum PromptStyle {
*/
// tag::refguide[]
DIALOG,
-
// end::refguide[]
/**
* Use a dialog for the prompt, rendered in a sidebar.
*/
// tag::refguide[]
DIALOG_SIDEBAR,
-
// end::refguide[]
/**
* Use a dialog for the prompt, rendered in a modal dialog.
*/
// tag::refguide[]
DIALOG_MODAL,
-
// end::refguide[]
/**
* Show the form inline, temporarily replacing the rendering of the property.
*/
// tag::refguide[]
INLINE,
-
// end::refguide[]
/**
* Applies only to actions, show the form inline, invoked as if editing the property.
@@ -96,7 +90,6 @@ public enum PromptStyle {
*/
// tag::refguide[]
INLINE_AS_IF_EDIT,
-
// end::refguide[]
/**
* Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta
@@ -104,7 +97,6 @@ public enum PromptStyle {
*/
// tag::refguide[]
NOT_SPECIFIED;
-
// end::refguide[]
public boolean isDialog() { return this == DIALOG || this == DIALOG_MODAL || this == DIALOG_SIDEBAR; }
public boolean isInline() { return this == INLINE; }
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Redirect.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Redirect.java
index 20d1e38..c771535 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Redirect.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Redirect.java
@@ -29,21 +29,18 @@ import javax.xml.bind.annotation.XmlType;
namespace = "http://isis.apache.org/applib/layout/component"
)
public enum Redirect {
-
// end::refguide[]
/**
* As defined by configuration property <code>isis.viewer.wicket.redirectEvenIfSameObject</code>
*/
// tag::refguide[]
AS_CONFIGURED,
-
// end::refguide[]
/**
* Redirect (meaning render a new page) even if the result of the action is the same as the target.
*/
// tag::refguide[]
EVEN_IF_SAME,
-
// end::refguide[]
/**
* Don't redirect if the result is the same as the target, instead just update the existing page.
@@ -54,6 +51,5 @@ public enum Redirect {
*/
// tag::refguide[]
ONLY_IF_DIFFERS,
-
}
// end::refguide[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java b/api/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java
index 219d9f9..094a791 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/urlencoding/UrlEncodingService.java
@@ -28,10 +28,10 @@ import org.apache.isis.core.commons.internal.memento._Mementos.EncoderDecoder;
public interface UrlEncodingService extends EncoderDecoder {
@Override
- String encode(final byte[] bytes);
+ String encode(final byte[] bytes); // <.>
@Override
- byte[] decode(String str);
+ byte[] decode(String str); // <.>
default String encodeString(final String str) {
return encode(_Strings.toBytes(str, StandardCharsets.UTF_8));
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/xml/XmlService.java b/api/applib/src/main/java/org/apache/isis/applib/services/xml/XmlService.java
index 7081689..189c423 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/xml/XmlService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/xml/XmlService.java
@@ -29,6 +29,8 @@ import org.apache.isis.applib.services.xmlsnapshot.XmlSnapshotService;
// tag::refguide[]
public interface XmlService {
+ // end::refguide[]
+
// tag::refguide-3[]
class Exception extends RuntimeException {
@@ -53,7 +55,6 @@ public interface XmlService {
// end::refguide-3[]
- // end::refguide[]
/**
* Converts xml string into an {@link Document W3C Document}.
*
@@ -63,7 +64,6 @@ public interface XmlService {
Document asDocument(String xmlStr); // <.>
// end::refguide[]
-
/**
* Serializes a {@link Document W3C Document} back into a string.
*
diff --git a/core/config/generateConfigDocs.groovy b/core/config/generateConfigDocs.groovy
index db261ec..399a02c 100644
--- a/core/config/generateConfigDocs.groovy
+++ b/core/config/generateConfigDocs.groovy
@@ -208,8 +208,8 @@ for (property in data.properties) {
}
}
-def license = "
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or [...]
+def license = """
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or [...]
new File(outputDir).mkdirs()
def bufNav = StringBuilder.newInstance()
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/Other.adoc b/core/config/src/main/adoc/modules/config/pages/sections/Other.adoc
index 7b5b869..02df289 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/Other.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/Other.adoc
@@ -1,8 +1,8 @@
= Other
:page-role: -toc
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
include::../section-hooks/Other~pre.adoc[]
@@ -15,7 +15,7 @@ include::../section-hooks/Other~pre.adoc[]
[[isis.as-map]]
isis.as-map
-|
+|
| null
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.applib.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.applib.adoc
index 86017db..724f730 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.applib.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.applib.adoc
@@ -1,8 +1,8 @@
= Applib
:page-role: -toc
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
include::../section-hooks/isis.applib~pre.adoc[]
@@ -17,7 +17,7 @@ isis.applib.annotation. +
action-layout.css-class-fa. +
patterns
-|
+|
| Provides a mapping of patterns to font-awesome CSS classes, where the pattern is used to match against the name of the action method in order to determine a CSS class to use, for example on the action's menu icon if rendered by the Wicket viewer.
Providing a default set of patterns encourages a common set of verbs to be used.
@@ -30,7 +30,7 @@ The font awesome class for individual actions can be overridden using ``ActionLa
isis.applib.annotation. +
action-layout.css-class.patterns
-|
+|
| Provides a mapping of patterns to CSS classes, where the pattern is used to match against the name of the action method in order to determine a CSS class to use, for example on the action's button if rendered by the Wicket viewer.
Providing a default set of patterns encourages a common set of verbs to be used.
@@ -43,7 +43,7 @@ The CSS class for individual actions can be overridden using ``ActionLayout#cssC
isis.applib.annotation.action. +
command
-|
+|
| The default for whether action invocations should be reified as a ``Command`` using the ``CommandService``, possibly so that the actual execution of the action can be deferred until later (background execution) or replayed against a copy of the system.
In particular, the ``CommandWithDto`` implementation of ``Command`` represents the action invocation memento (obtained using ``CommandWithDto#asDto()``) as a ``CommandDto``.
@@ -73,7 +73,7 @@ The algorithm for determining whether (and what type of) an event is actually se
isis.applib.annotation.action. +
explicit
-|
+|
| Whether or not a public method needs to be annotated with @``Action`` in order to be picked up as an action in the metamodel.
@@ -82,7 +82,7 @@ explicit
isis.applib.annotation.action. +
publishing
-|
+|
| The default for whether action invocations should be sent through to the ``PublisherService`` for publishing.
The service's publish method is called only once per transaction, with ``Execution`` collecting details of the identity of the target object, the action invoked, the action arguments and the returned object (if any).
@@ -95,7 +95,7 @@ This setting can be overridden on a case-by-case basis using ``Action#publishing
isis.applib.annotation. +
collection-layout.default-view
-|
+|
| Defines the initial view to display collections when rendered.
The value of this can be overridden on a case-by-case basis using ``CollectionLayout#defaultView()``. Note that this default configuration property is an enum and so defines only a fixed number of values, whereas the annotation returns a string; this is to allow for flexibility that individual viewers might support their own additional types. For example, the Wicket viewer supports
@@ -212,7 +212,7 @@ The algorithm for determining whether (and what type of) an event is sent depend
isis.applib.annotation. +
domain-object.auditing
-|
+|
| The default for whether _domain entities_ should be audited or not (meaning that any changes are sent through to the ``AuditerService``.
This setting can be overridden on a case-by-case basis using ``DomainObject#auditing()`` DomainObject#getAuditing()}
@@ -242,7 +242,7 @@ The algorithm for determining whether (and what type of) an event is sent depend
isis.applib.annotation. +
domain-object.editing
-|
+|
| The default for whether the properties of domain objects can be edited, or whether instead they can be modified only using actions (or programmatically as a side-effect of actions on other objects).
This setting can be overridden on a case-by-case basis using DomainObject#getEditing()
@@ -310,7 +310,7 @@ Note: this applies only to domain entities, not to view models.
isis.applib.annotation. +
domain-object.publishing
-|
+|
| The default for whether the identities of changed objects should be sent through to the ``PublisherService`` for publishing.
The service's publish method is called only once per transaction, with ``PublishedObjects`` collecting details of all changed domain objects.
@@ -382,7 +382,7 @@ Note: this applies only to domain entities, not to view models.
isis.applib.annotation. +
parameter-layout.label-position
-|
+|
| Defines the default position for the label for an action parameter.
Can be overridden on a case-by-case basis using ``ParameterLayout#labelPosition()``.
@@ -395,7 +395,7 @@ If left as ``LabelPosition#NOT_SPECIFIED`` and not overridden, then the position
isis.applib.annotation. +
property-layout.label-position
-|
+|
| Defines the default position for the label for a domain object property.
Can be overridden on a case-by-case basis using ``ParameterLayout#labelPosition()``.
@@ -408,7 +408,7 @@ If left as ``LabelPosition#NOT_SPECIFIED`` and not overridden, then the position
isis.applib.annotation.property. +
command
-|
+|
| The default for whether property edits should be reified as a ``Command`` using the ``CommandService``, possibly so that the actual execution of the property edit can be deferred until later (background execution) or replayed against a copy of the system.
In particular, the ``CommandWithDto`` implementation of ``Command`` represents the action invocation memento (obtained using ``CommandWithDto#asDto()``) as a ``CommandDto``.
@@ -438,7 +438,7 @@ The algorithm for determining whether (and what type of) an event is actually se
isis.applib.annotation.property. +
publishing
-|
+|
| The default for whether property edits should be sent through to the ``PublisherService`` for publishing.
The service's publish method is called only once per transaction, with ``Execution`` collecting details of the identity of the target object, the property edited, and the new value of the property.
@@ -519,7 +519,7 @@ isis.applib.annotation.view-model. +
validation.semantic-checking. +
enable
-|
+|
| Whether to check for inconsistencies between the usage of ``DomainObject``, ``ViewModel``, ``DomainObjectLayout`` and ``ViewModelLayout``.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.adoc
index 7ec757d..1e4f480 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.adoc
@@ -1,9 +1,9 @@
= Core MetaModel
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.core.meta-model~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -28,7 +28,7 @@ isis.core.meta-model. +
programming-model. +
ignore-deprecated
-|
+|
| If set, then any aspects of the programming model (as implemented by ``FacetFactory``s that have been indicated as deprecated will simply be ignored/excluded from the metamodel.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.introspector.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.introspector.adoc
index f0825e6..f1d484f 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.introspector.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.introspector.adoc
@@ -1,9 +1,9 @@
= Core MetaModel Introspection
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.core.meta-model.introspector~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -27,7 +27,7 @@ Only applies if the introspector is configured to perform full introspection up-
isis.core.meta-model.introspector. +
mode
-|
+|
| Whether all known types should be fully introspected as part of the bootstrapping, or should only be partially introspected initially.
Leaving this as lazy means that there's a chance that metamodel validation errors will not be discovered during bootstrap. That said, metamodel validation is still run incrementally for any classes introspected lazily after initial bootstrapping (unless ``#isValidateIncrementally()`` is disabled.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.validator.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.validator.adoc
index 42870a5..b1f7a7a 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.validator.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.meta-model.validator.adoc
@@ -1,9 +1,9 @@
= MetaModel Validator
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.core.meta-model.validator~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -50,7 +50,7 @@ It is _highly advisable_ to leave this set as enabled (the default), and to also
isis.core.meta-model.validator. +
explicit-object-type
-|
+|
| Whether to ensure that the object type of all objects must be specified explicitly, using either ``DomainObject#objectType()`` or ``DomainService#objectType()``.
It is _highly advisable_ to leave this set as enabled (the default). These object types should also (of course) be unique - that can be checked by setting the ``#isEnsureUniqueObjectTypes()`` config property.
@@ -71,7 +71,7 @@ date-time-type-adapter
isis.core.meta-model.validator. +
jaxb-view-model.no-arg-constructor
-|
+|
| If set, then ensures that all JAXB-style view models have a no-arg constructor.
@@ -126,7 +126,7 @@ jdoql.variables-clause
isis.core.meta-model.validator. +
no-params-only
-|
+|
| If set, then checks that the supports ``hideXxx`` and ``disableXxx`` methods for actions do not have take parameters.
Historically, the programming model allowed these methods to accept the same number of parameters as the action method to which they relate, the rationale being for similarity with the ``validateXxx`` method. However, since these parameters serve no function, the programming model has been simplified so that these supporting methods are discovered if they have exactly no parameters.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime-services.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime-services.adoc
index b680819..43885ed 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime-services.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime-services.adoc
@@ -1,9 +1,9 @@
= Core Runtime Services configurations
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.core.runtime-services~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -16,7 +16,7 @@ include::../section-hooks/isis.core.runtime-services~pre.adoc[]
isis.core.runtime-services. +
application-features.init
-|
+|
| Whether the ``ApplicationFeatureRepository`` (or the default implementation of that service, at least) should compute the set of ``ApplicationFeature`` that describe the metamodel eagerly, or lazily.
@@ -25,7 +25,7 @@ application-features.init
isis.core.runtime-services.email. +
override.bcc
-|
+|
| Intended for testing purposes only, if set then the requested ``bcc:`` of the email will be ignored, and instead sent to this email address instead.
@@ -34,7 +34,7 @@ override.bcc
isis.core.runtime-services.email. +
override.cc
-|
+|
| Intended for testing purposes only, if set then the requested ``cc:`` of the email will be ignored, and instead sent to this email address instead.
@@ -43,7 +43,7 @@ override.cc
isis.core.runtime-services.email. +
override.to
-|
+|
| Intended for testing purposes only, if set then the requested ``to:`` of the email will be ignored, and instead sent to this email address instead.
@@ -61,7 +61,7 @@ port
isis.core.runtime-services.email. +
sender.address
-|
+|
| Specifies the email address of the user sending the email.
If the username is not specified, is also used as the username to connect to the SMTP service.
@@ -74,7 +74,7 @@ This configuration property is mandatory (for the default implementation of the
isis.core.runtime-services.email. +
sender.hostname
-|
+|
| Specifies the host running the SMTP service.
If not specified, then the value used depends upon the email implementation. The default implementation will use the ``host`` system property.
@@ -85,7 +85,7 @@ If not specified, then the value used depends upon the email implementation. The
isis.core.runtime-services.email. +
sender.password
-|
+|
| Specifies the password (corresponding to the username to connect to the SMTP service.
This configuration property is mandatory (for the default implementation of the ``EmailService``, at least).
@@ -96,7 +96,7 @@ This configuration property is mandatory (for the default implementation of the
isis.core.runtime-services.email. +
sender.username
-|
+|
| Specifies the username to use to connect to the SMTP service.
If not specified, then the sender's email address will be used instead.
@@ -143,7 +143,7 @@ tls.enabled
isis.core.runtime-services. +
exception-recognizer.jdo.disable
-|
+|
| Whether the ``ExceptionRecognizer`` implementation for JDO/DataNucleus object store - which attempts to sanitize any exceptions arising from that object store - should be disabled (meaning that exceptions will potentially propagate as more serious to the end user).
@@ -153,7 +153,7 @@ isis.core.runtime-services. +
repository-service. +
disable-auto-flush
-|
+|
| Normally any queries are automatically preceded by flushing pending executions.
This key allows this behaviour to be disabled.
@@ -166,7 +166,7 @@ Originally introduced as part of ISIS-1134 (fixing memory leaks in the objectsto
isis.core.runtime-services. +
translation.po.mode
-|
+|
| Specifies the initial mode for obtaining/discovering translations.
There are three modes:
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime.adoc
index f8d5c44..64cfe71 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.core.runtime.adoc
@@ -1,9 +1,9 @@
= Core Runtime Services configurations
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.core.runtime~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -15,7 +15,7 @@ include::../section-hooks/isis.core.runtime~pre.adoc[]
[[isis.core.runtime.locale]]
isis.core.runtime.locale
-|
+|
| If set, then overrides the application's ``Locale#getDefault()``
@@ -23,7 +23,7 @@ isis.core.runtime.locale
[[isis.core.runtime.timezone]]
isis.core.runtime.timezone
-|
+|
| If set, then override's the application's timezone.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.extensions.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.extensions.adoc
index 21d30c4..1b85ea6 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.extensions.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.extensions.adoc
@@ -1,9 +1,9 @@
= Extensions
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.extensions~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -16,7 +16,7 @@ include::../section-hooks/isis.extensions~pre.adoc[]
isis.extensions.cors. +
allowed-headers
-|
+|
| Which HTTP headers are allowed in a CORS request.
For more information, check the usage of the ``headers`` init parameter for https://github.com/eBay/cors-filter[EBay CORSFilter].
@@ -27,7 +27,7 @@ For more information, check the usage of the ``headers`` init parameter for http
isis.extensions.cors. +
allowed-methods
-|
+|
| Which HTTP methods are permitted in a CORS request.
For more information, check the usage of the ``methods`` init parameter for https://github.com/eBay/cors-filter[EBay CORSFilter].
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.legacy.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.legacy.adoc
index def46c5..245b641 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.legacy.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.legacy.adoc
@@ -1,9 +1,9 @@
= Legacy
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.legacy~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -16,7 +16,7 @@ include::../section-hooks/isis.legacy~pre.adoc[]
isis.legacy.value-types.money. +
currency
-|
+|
| Configures the default currency code used by ``MoneyValueSemanticsProvider``. @deprecated
@@ -25,7 +25,7 @@ currency
isis.legacy.value-types.percentage. +
format
-|
+|
| Configures the formats understood by ``PercentageValueSemanticsProvider``. @deprecated
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.adoc
index ee226cd..d9af62b 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.adoc
@@ -1,9 +1,9 @@
= JDO DataNucleus
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.persistence.jdo-datanucleus~pre.adoc[]
[cols="3a,2a,5a", options="header"]
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.impl.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.impl.adoc
index 8a20af6..dfd73f5 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.impl.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.persistence.jdo-datanucleus.impl.adoc
@@ -1,9 +1,9 @@
= DataNucleus Configuration
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.persistence.jdo-datanucleus.impl~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -17,7 +17,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
ConnectionFactory2Name
-|
+|
| null
@@ -27,7 +27,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
ConnectionFactoryName
-|
+|
| null
@@ -37,7 +37,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
ConnectionPasswordDecrypter
-|
+|
| null
@@ -47,7 +47,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
PersistenceUnitLoadClasses
-|
+|
| null
@@ -56,7 +56,7 @@ PersistenceUnitLoadClasses
isis.persistence.jdo-datanucleus. +
impl.datanucleus.cache.level2.mode
-|
+|
| Values of javax.persistence.SharedCacheMode, capitalized
@@ -81,7 +81,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
connection-factory-name
-|
+|
| The JNDI name for a connection factory for transactional connections.
For RBDMS, it must be a JNDI name that points to a javax.sql.DataSource object.
@@ -97,7 +97,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
connection-factory2-name
-|
+|
| The JNDI name for a connection factory for non-transactional connections.
For RBDMS, it must be a JNDI name that points to a javax.sql.DataSource object.
@@ -113,7 +113,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
connection-password-decrypter
-|
+|
| Name of a class that implements ``DecryptionProvider`` and should only be specified if the password is encrypted in the persistence properties.
See also ``json`` (camelCasing instead of kebab-casing).
@@ -126,7 +126,7 @@ NOTE: this config property isn't used by the framework, but is provided as a con
isis.persistence.jdo-datanucleus. +
impl.datanucleus.identifier.case
-|
+|
| null
@@ -150,7 +150,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.objectProvider. +
className
-|
+|
| null
@@ -176,7 +176,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus. +
persistenceByReachabilityAtCommit
-|
+|
| null
@@ -186,7 +186,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.schema. +
auto-create-all
-|
+|
| Whether DN should automatically create the database schema on bootstrapping.
This should be set to ``true`` when running against an in-memory database, but set to ``false`` when running against a persistent database (use something like flyway instead to manage schema evolution).
@@ -202,7 +202,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.schema. +
auto-create-database
-|
+|
| Previously we defaulted this property to "true", but that could cause the target database to be modified
See also ``json`` (camelCasing instead of kebab-casing).
@@ -216,7 +216,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.schema. +
autoCreateAll
-|
+|
| null
@@ -226,7 +226,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.schema. +
autoCreateDatabase
-|
+|
| null
@@ -248,7 +248,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.schema. +
validateAll
-|
+|
| null
@@ -258,7 +258,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.schema. +
validateConstraints
-|
+|
| null
@@ -268,7 +268,7 @@ isis.persistence.jdo-datanucleus. +
impl.datanucleus.schema. +
validateTables
-|
+|
| null
@@ -277,7 +277,7 @@ validateTables
isis.persistence.jdo-datanucleus. +
impl.datanucleus.transaction-type
-|
+|
| Type of transaction to use.
If running under JavaSE the default is RESOURCE_LOCAL, and if running under JavaEE the default is JTA.
@@ -293,7 +293,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo. +
PersistenceManagerFactoryClass
-|
+|
| null
@@ -303,7 +303,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
ConnectionDriverName
-|
+|
| null
@@ -313,7 +313,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
ConnectionPassword
-|
+|
| null
@@ -323,7 +323,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
ConnectionURL
-|
+|
| null
@@ -333,7 +333,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
ConnectionUserName
-|
+|
| null
@@ -343,7 +343,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
connection-driver-name
-|
+|
| JDBC driver used by JDO/DataNucleus object store to connect.
See also ``json`` (PascalCasing instead of kebab-casing).
@@ -357,7 +357,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
connection-password
-|
+|
| Password for the user account used by JDO/DataNucleus object store to connect.
See also ``json`` (PascalCasing instead of kebab-casing).
@@ -371,7 +371,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
connection-url
-|
+|
| URL used by JDO/DataNucleus object store to connect.
See also ``json`` (PascalCasing instead of kebab-casing).
@@ -385,7 +385,7 @@ isis.persistence.jdo-datanucleus. +
impl.javax.jdo.option. +
connection-user-name
-|
+|
| User account used by JDO/DataNucleus object store to connect.
See also ``json`` (PascalCasing instead of kebab-casing).
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.security.shiro.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.security.shiro.adoc
index b8db279..b901894 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.security.shiro.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.security.shiro.adoc
@@ -1,9 +1,9 @@
= Shiro Security Implementation
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.security.shiro~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -17,7 +17,7 @@ isis.security.shiro. +
auto-logout-if-already- +
authenticated
-|
+|
| If the Shiro subject is found to be still authenticated, then will be logged out anyway and then re-authenticated.
Applies only to the Restful Objects viewer.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.testing.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.testing.adoc
index 9281fa6..f7bbe2a 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.testing.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.testing.adoc
@@ -1,9 +1,9 @@
= Testing
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.testing~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -16,7 +16,7 @@ include::../section-hooks/isis.testing~pre.adoc[]
isis.testing.fixtures. +
initial-script
-|
+|
| Indicates the fixture script class to run initially.
Intended for use when prototyping against an in-memory database (but will run in production mode as well if required).
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.value-types.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.value-types.adoc
index 299c068..e35d5c4 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.value-types.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.value-types.adoc
@@ -1,9 +1,9 @@
= Value types
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.value-types~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -16,7 +16,7 @@ include::../section-hooks/isis.value-types~pre.adoc[]
isis.value-types.primitives. +
integer.format
-|
+|
| null
@@ -25,7 +25,7 @@ integer.format
isis.value-types.java-lang.byte. +
format
-|
+|
| Configures the number format understood by ``ByteValueSemanticsProviderAbstract``. @deprecated
@@ -34,7 +34,7 @@ format
isis.value-types.java-lang.double. +
format
-|
+|
| Configures the number format understood by ``DoubleValueSemanticsProviderAbstract``. @deprecated
@@ -43,7 +43,7 @@ format
isis.value-types.java-lang.float. +
format
-|
+|
| Configures the number format understood by ``FloatValueSemanticsProviderAbstract``. @deprecated
@@ -52,7 +52,7 @@ format
isis.value-types.java-lang.long. +
format
-|
+|
| Configures the number format understood by ``LongValueSemanticsProviderAbstract``. @deprecated
@@ -61,7 +61,7 @@ format
isis.value-types.java-lang.short. +
format
-|
+|
| Configures the number format understood by ``ShortValueSemanticsProviderAbstract``. @deprecated
@@ -70,7 +70,7 @@ format
isis.value-types.java-math. +
big-decimal.format
-|
+|
| Configures the number format understood by ``BigDecimalValueSemanticsProvider``. @deprecated
@@ -79,7 +79,7 @@ big-decimal.format
isis.value-types.java-math. +
big-integer.format
-|
+|
| Configures the number format understood by ``BigIntegerValueSemanticsProvider``. @deprecated
@@ -205,7 +205,7 @@ format
isis.value-types.primitives.int. +
format
-|
+|
| Configures the number format understood by ``IntValueSemanticsProviderAbstract``. @deprecated
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.restfulobjects.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.restfulobjects.adoc
index 3da5008..8957c9a 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.restfulobjects.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.restfulobjects.adoc
@@ -1,9 +1,9 @@
= Restful Objects Viewer
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.viewer.restfulobjects~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -16,8 +16,8 @@ include::../section-hooks/isis.viewer.restfulobjects~pre.adoc[]
isis.viewer.restfulobjects. +
base-uri
-|
-| If left unset (the default), then the RO viewer will use the ``UriInfo`` (injected using ``AsyncContext``) to figure out the base Uri (used to render ``href``s).
+|
+| If left unset (the default), then the RO viewer will use the ``UriInfo`` (injected using ``Context``) to figure out the base Uri (used to render ``href``s).
This will be correct much of the time, but will almost certainly be wrong if there is a reverse proxy.
@@ -29,7 +29,7 @@ If set, eg ``com/``, then this value will be used instead.
isis.viewer.restfulobjects. +
honor-ui-hints
-|
+|
| Whether to enable the ``x-ro-follow-links`` support, to minimize round trips.
The RO viewer provides the capability for the client to set the optional ``x-ro-follow-links`` query parameter, as described in section 34.4 of the RO spec v1.0. If used, the resultant representation includes the result of following the associated link, but through a server-side "join", somewhat akin to GraphQL.
@@ -42,7 +42,7 @@ By default this functionality is disabled, this configuration property enables t
isis.viewer.restfulobjects. +
object-property-values-only
-|
+|
| When rendering domain objects, if set the representation returned is stripped back to a minimal set, excluding links to actions and collections and with a simplified representation of an object's properties.
This is disabled by default. If enabled, then the representations returned are non-standard with respect to the RO Spec v1.0.
@@ -53,7 +53,7 @@ This is disabled by default. If enabled, then the representations returned are n
isis.viewer.restfulobjects. +
strict-accept-checking
-|
+|
| If set, then any unrecognised ``Accept`` headers will result in an HTTP _Not Acceptable_ response code (406).
@@ -62,7 +62,7 @@ strict-accept-checking
isis.viewer.restfulobjects. +
suppress-described-by-links
-|
+|
| If set, then the representations returned will omit any links to the formal domain-type representations.
@@ -71,7 +71,7 @@ suppress-described-by-links
isis.viewer.restfulobjects. +
suppress-member-disabled-reason
-|
+|
| If set, then - should there be an interaction with an action, property or collection that is disabled - then this will prevent the ``disabledReason`` reason from being added to the returned representation.
This is disabled by default. If enabled, then the representations returned are non-standard with respect to the RO Spec v1.0.
@@ -82,7 +82,7 @@ This is disabled by default. If enabled, then the representations returned are n
isis.viewer.restfulobjects. +
suppress-member-extensions
-|
+|
| If set, then the ``x-isis-format`` key (under ``extensions``) for properties will be suppressed.
This is disabled by default. If enabled, then the representations returned are non-standard with respect to the RO Spec v1.0.
@@ -93,7 +93,7 @@ This is disabled by default. If enabled, then the representations returned are n
isis.viewer.restfulobjects. +
suppress-member-id
-|
+|
| If set, then the ``id`` key for all members will be suppressed.
This is disabled by default. If enabled, then the representations returned are non-standard with respect to the RO Spec v1.0.
@@ -104,7 +104,7 @@ This is disabled by default. If enabled, then the representations returned are n
isis.viewer.restfulobjects. +
suppress-member-links
-|
+|
| If set, then the detail link (in other words ``]``) for all members will be suppressed.
This is disabled by default. If enabled, then the representations returned are non-standard with respect to the RO Spec v1.0.
@@ -115,7 +115,7 @@ This is disabled by default. If enabled, then the representations returned are n
isis.viewer.restfulobjects. +
suppress-update-link
-|
+|
| If set, then the update link (in other words `` ]`` to perform a bulk update of an object) will be suppressed.
This is disabled by default. If enabled, then the representations returned are non-standard with respect to the RO Spec v1.0.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.wicket.adoc b/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.wicket.adoc
index cb2be76..0fc83d5 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.wicket.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/isis.viewer.wicket.adoc
@@ -1,9 +1,9 @@
= Wicket Viewer
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/isis.viewer.wicket~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -15,7 +15,7 @@ include::../section-hooks/isis.viewer.wicket~pre.adoc[]
[[isis.viewer.wicket.ajax-debug-mode]]
isis.viewer.wicket.ajax-debug-mode
-|
+|
| Whether the Ajax debug should be shown, by default this is disabled.
@@ -36,7 +36,7 @@ There is usually very little reason to change this from its default.
isis.viewer.wicket.application. +
about
-|
+|
| Label used on the about page.
@@ -45,7 +45,7 @@ about
isis.viewer.wicket.application. +
brand-logo-header
-|
+|
| Either the location of the image file (relative to the class-path resource root), or an absolute URL.
This is rendered on the header panel. An image with a size of 160x40 works well. If not specified, the application.name is used instead.
@@ -56,7 +56,7 @@ This is rendered on the header panel. An image with a size of 160x40 works well.
isis.viewer.wicket.application. +
brand-logo-signin
-|
+|
| Either the location of the image file (relative to the class-path resource root), or an absolute URL.
This is rendered on the sign-in page. An image with a size of 400x40 works well. If not specified, the application name is used instead.
@@ -66,7 +66,7 @@ This is rendered on the sign-in page. An image with a size of 400x40 works well.
[[isis.viewer.wicket.application.css]]
isis.viewer.wicket.application.css
-|
+|
| URL of file to read any custom CSS, relative to ``static`` package on the class path.
A typical value is ``css``. This will result in this file being read from the ``static/css`` directory (because static resources such as CSS are mounted by Spring by default under ``static`` package).
@@ -77,7 +77,7 @@ A typical value is ``css``. This will result in this file being read from the ``
isis.viewer.wicket.application. +
favicon-content-type
-|
+|
| Specifies the content type of the favIcon, if any.
@@ -86,7 +86,7 @@ favicon-content-type
isis.viewer.wicket.application. +
favicon-url
-|
+|
| Specifies the URL to use of the favIcon.
This is expected to be a local resource.
@@ -96,7 +96,7 @@ This is expected to be a local resource.
[[isis.viewer.wicket.application.js]]
isis.viewer.wicket.application.js
-|
+|
| URL of file to read any custom Javascript, relative to ``static`` package on the class path.
A typical value is ``js``. This will result in this file being read from the ``static/js`` directory (because static resources such as CSS are mounted by Spring by default under ``static`` package).
@@ -127,7 +127,7 @@ name
isis.viewer.wicket.application. +
version
-|
+|
| The version of the application, eg 1.0, 1.1, etc.
If present, then this will be shown in the footer on every page as well as on the about page.
@@ -194,7 +194,7 @@ max-parent-chain-length
isis.viewer.wicket. +
clear-original-destination
-|
+|
| If the end user uses a deep link to access the Wicket viewer, but is not authenticated, then this configuration property determines whether to continue through to that original destination once authenticated, or simply to go to the home page.
The default behaviour is to honour the original destination requested.
@@ -204,7 +204,7 @@ The default behaviour is to honour the original destination requested.
[[isis.viewer.wicket.credit]]
isis.viewer.wicket.credit
-|
+|
| List of organisations or individuals to give credit to, shown as links and icons in the footer. A maximum of 3 credits can be specified.
IntelliJ unfortunately does not provide IDE completion for lists of classes; YMMV.
@@ -260,7 +260,7 @@ Each Date scalar panel will use ``#getDatePattern()`` or ``#getDateTimePattern()
isis.viewer.wicket. +
development-utilities.enable
-|
+|
| Determines whether debug bar and other stuff influenced by ``DebugSettings#isDevelopmentUtilitiesEnabled()`` is enabled or not.
By default, depends on the mode (prototyping = enabled, server = disabled). This property acts as an override.
@@ -270,7 +270,7 @@ By default, depends on the mode (prototyping = enabled, server = disabled). This
[[isis.viewer.wicket.dialog-mode]]
isis.viewer.wicket.dialog-mode
-|
+|
| Whether the dialog mode rendered when invoking actions on domain objects should be to use the sidebar (the default) or to use a modal dialog.
This can be overridden on a case-by-case basis using ``ActionLayout#promptStyle()``.
@@ -281,7 +281,7 @@ This can be overridden on a case-by-case basis using ``ActionLayout#promptStyle(
isis.viewer.wicket. +
dialog-mode-for-menu
-|
+|
| Whether the dialog mode rendered when invoking actions on domain services (that is, menus) should be to use a modal dialog (the default) or to use the sidebar panel.
This can be overridden on a case-by-case basis using ``ActionLayout#promptStyle()``.
@@ -291,7 +291,7 @@ This can be overridden on a case-by-case basis using ``ActionLayout#promptStyle(
[[isis.viewer.wicket.live-reload-url]]
isis.viewer.wicket.live-reload-url
-|
+|
| If specified, then is rendered on each page to enable live reload.
Configuring live reload also requires an appropriate plugin to the web browser (eg see http://livereload.com/[livereload.com] and a mechanism to trigger changes, eg by watching ``xml`` files.
@@ -303,7 +303,7 @@ isis.viewer.wicket. +
max-title-length-in-parented- +
tables
-|
+|
| null
@@ -313,7 +313,7 @@ isis.viewer.wicket. +
max-title-length-in-standalone- +
tables
-|
+|
| null
@@ -354,7 +354,7 @@ This behaviour is enabled by default, but can be disabled using this flag.
[[isis.viewer.wicket.prompt-style]]
isis.viewer.wicket.prompt-style
-|
+|
| Whether to use a modal dialog for property edits and for actions associated with properties.
This can be overridden on a case-by-case basis using ``@PropertyLayout#promptStyle`` and ``@ActionLayout#promptStyle``.
@@ -367,7 +367,7 @@ This behaviour is disabled by default; the viewer will use an inline prompt in t
isis.viewer.wicket. +
redirect-even-if-same-object
-|
+|
| Whether to redirect to a new page, even if the object being shown (after an action invocation or a property edit) is the same as the previous page.
This behaviour is disabled by default; the viewer will update the existing page if it can, making for a smoother user experience. If enabled then this reinstates the pre-1.15.0 behaviour of redirecting in all cases.
@@ -387,7 +387,7 @@ cookie-key
isis.viewer.wicket.remember-me. +
encryption-key
-|
+|
| If the "remember me" feature is available, optionally specifies an encryption key (a complex string acting as salt to the encryption algorithm) for computing the encrypted credentials.
If not set, then (in production mode) the Wicket viewer will compute a random key each time it is started. This will mean that any credentials stored between sessions will become invalid.
@@ -402,7 +402,7 @@ In prototype mode this setting is effectively ignored, because the same key will
isis.viewer.wicket.remember-me. +
suppress
-|
+|
| Whether the sign-in page should have a "remember me" link (the default), or if it should be suppressed.
If "remember me" is available and checked, then the viewer will allow users to login based on encrypted credentials stored in a cookie. An encryption key can optionally be specified.
@@ -446,7 +446,7 @@ By default this is enabled, in other words Wicket tags are stripped. Please be a
isis.viewer.wicket. +
suppress-password-reset
-|
+|
| Whether to suppress the password reset link on the sign-in page.
Although this is disabled by default (in other words the 'reset password' link is not suppressed), note that in addition the application must provide an implementation of the ``UserRegistrationService`` as well as a configured ``EmailNotificationService`` (same conditions as for the ``#isSuppressSignUp()`` sign-up link).
@@ -457,7 +457,7 @@ Although this is disabled by default (in other words the 'reset password' link i
isis.viewer.wicket. +
suppress-sign-up
-|
+|
| Whether to suppress the sign-up link on the sign-in page.
Although this is disabled by default (in other words the sign-up link is not suppressed), note that in addition the application must provide an implementation of the ``UserRegistrationService`` as well as a configured ``EmailNotificationService`` (same conditions as for the ``#isSuppressPasswordReset()`` password reset link).
@@ -467,7 +467,7 @@ Although this is disabled by default (in other words the sign-up link is not sup
[[isis.viewer.wicket.themes.enabled]]
isis.viewer.wicket.themes.enabled
-|
+|
| A comma separated list of enabled theme names, as defined by https://bootswatch.com.
@@ -496,7 +496,7 @@ IsisWicketThemeSupportDefault
isis.viewer.wicket.themes. +
show-chooser
-|
+|
| Whether the theme chooser widget should be available in the footer.
@@ -526,7 +526,7 @@ This behaviour is enabled by default.
[[isis.viewer.wicket.welcome.text]]
isis.viewer.wicket.welcome.text
-|
+|
| Text to be displayed on the application’s home page, used as a fallback if welcome.file is not specified. If a @HomePage action exists, then that will take precedence.
@@ -535,7 +535,7 @@ isis.viewer.wicket.welcome.text
isis.viewer.wicket. +
wicket-source-plugin
-|
+|
| Whether the Wicket source plugin should be enabled; if so, the markup includes links to the Wicket source.
This behaviour is disabled by default. Please be aware that enabloing it can substantially impact performance.
diff --git a/core/config/src/main/adoc/modules/config/pages/sections/resteasy.adoc b/core/config/src/main/adoc/modules/config/pages/sections/resteasy.adoc
index d7946bb..ac394b8 100644
--- a/core/config/src/main/adoc/modules/config/pages/sections/resteasy.adoc
+++ b/core/config/src/main/adoc/modules/config/pages/sections/resteasy.adoc
@@ -1,9 +1,9 @@
= RestEasy Configuration
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
:page-role: -toc
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+
include::../section-hooks/resteasy~pre.adoc[]
[cols="3a,2a,5a", options="header"]
@@ -15,24 +15,15 @@ include::../section-hooks/resteasy~pre.adoc[]
[[resteasy.as-map]]
resteasy.as-map
-|
+|
| null
|
-[[resteasy.authentication.strategy-class-name]]
-resteasy.authentication. +
-strategy-class-name
-
-|
-| Defaults to ``AuthenticationSessionStrategyBasicAuth``.
-
-
-|
[[resteasy.environment]]
resteasy.environment
-|
+|
| null
@@ -40,25 +31,15 @@ resteasy.environment
[[resteasy.jaxrs.app.registration]]
resteasy.jaxrs.app.registration
-|
+|
| How the implementation of the JAX-RS application is discovered.
|
-[[resteasy.jaxrs.default-path]]
-resteasy.jaxrs.default-path
-
-| /restful
-| The path at which the RO viewer should be mounted.
-
-Note that this is used rather than ``prefix`` because there is _NO_ implementation of ``Application``, so we rely on it being automatically created.
-
-
-|
[[resteasy.jaxrs.defaultPath]]
resteasy.jaxrs.defaultPath
-|
+|
| The path at which the RO viewer should be mounted.
@@ -66,7 +47,7 @@ resteasy.jaxrs.defaultPath
[[resteasy.resteasy-settings]]
resteasy.resteasy-settings
-|
+|
| null
diff --git a/preview.sh b/preview.sh
index 53762a9..cbbdd91 100644
--- a/preview.sh
+++ b/preview.sh
@@ -4,26 +4,52 @@ export ANTORA_CACHE_DIR=.antora-cache-dir
export ANTORA_TARGET_SITE=antora/target/site
PLAYBOOK_FILE=antora/playbooks/site.yml
-while getopts 'ecf:aksxyh' opt
+
+while getopts 'ECAKSecaksxyhf:' opt
do
case $opt in
+ E) export SKIP_EXAMPLES=false
+ forcing=true ;;
+ C) export SKIP_CONFIGS=false
+ forcing=true ;;
+ A) export SKIP_GENERATION=false
+ export SKIP_CLEAR_CACHE=false
+ export SKIP_CLEAR_PREVIOUS=false
+ forcing=true ;;
+ K) export SKIP_STALE_EXAMPLE_CHECK=false
+ forcing=true ;;
+ S) export SKIP_SERVE=false
+ forcing=true ;;
+
e) export SKIP_EXAMPLES=true ;;
c) export SKIP_CONFIGS=true ;;
- f) PLAYBOOK_FILE=$OPTARG ;;
- a) export SKIP_GENERATION=true ;;
+ a) export SKIP_GENERATION=true
+ export SKIP_CLEAR_CACHE=true
+ export SKIP_CLEAR_PREVIOUS=true
+ ;;
k) export SKIP_STALE_EXAMPLE_CHECK=true ;;
s) export SKIP_SERVE=true ;;
+
x) export SKIP_CLEAR_CACHE=true ;;
y) export SKIP_CLEAR_PREVIOUS=true ;;
+ f) PLAYBOOK_FILE=$OPTARG ;;
h) echo ""
echo "preview.sh options:"
+ echo ""
+ echo " Skip options:"
echo " -e skip examples"
echo " -k skip stale example check"
echo " -c skip config doc generation"
echo " -a skip Antora generation"
echo " -s skip serving generated site"
- echo " -x skip clear Antora cache"
- echo " -y skip clear any previous build site"
+ echo ""
+ echo " Force options (override skip):"
+ echo " -E force examples"
+ echo " -K force stale example check"
+ echo " -C force config doc generation"
+ echo " -A force Antora generation"
+ echo " -S force serving generated site"
+ echo ""
echo " -f antora/playbooks/site-xxx.yml"
exit 1
;;
@@ -33,6 +59,36 @@ do
esac
done
+if [ "$forcing" = "true" ]; then
+ if [ -z "$SKIP_EXAMPLES" ]; then
+ export SKIP_EXAMPLES=true
+ fi
+ if [ -z "$SKIP_CONFIGS" ]; then
+ export SKIP_CONFIGS=true
+ fi
+ if [ -z "$SKIP_GENERATION" ]; then
+ export SKIP_GENERATION=true
+ export SKIP_CLEAR_CACHE=true
+ export SKIP_CLEAR_PREVIOUS=true
+ fi
+ if [ -z "$SKIP_STALE_EXAMPLE_CHECK" ]; then
+ export SKIP_STALE_EXAMPLE_CHECK=true
+ fi
+ if [ -z "$SKIP_SERVE" ]; then
+ export SKIP_SERVE=true
+ fi
+fi
+
+echo ""
+echo "SKIP_EXAMPLES : $SKIP_EXAMPLES"
+echo "SKIP_STALE_EXAMPLE_CHECK : $SKIP_STALE_EXAMPLE_CHECK"
+echo "SKIP_CONFIGS : $SKIP_CONFIGS"
+echo "SKIP_GENERATION (Antora) : $SKIP_GENERATION"
+echo "SKIP_SERVE : $SKIP_SERVE"
+echo "SKIP_CLEAR_PREVIOUS (site) : $SKIP_CLEAR_PREVIOUS"
+echo "SKIP_CLEAR_CACHE (template): $SKIP_SKIP_CLEAR_CACHE"
+echo ""
+
if [[ "$SKIP_CLEAR_CACHE" == "true" ]]; then
echo "skipping clearing the Antora cache"
else
diff --git a/scripts/ci/_build-site.sh b/scripts/ci/_build-site.sh
index c6a2be6..89a4639 100644
--- a/scripts/ci/_build-site.sh
+++ b/scripts/ci/_build-site.sh
@@ -26,38 +26,37 @@ fi
bash $SCRIPT_DIR/_print-environment.sh "build-site"
-if [ "$SKIP_EXAMPLES" = "true" ]; then
+if [[ "$SKIP_EXAMPLES" == "true" ]]; then
echo "skipping examples"
else
bash $SCRIPT_DIR/_adoc-copy-examples.sh
fi
-if [ "$SKIP_CONFIGS" = "true" ]; then
+if [[ "$SKIP_CONFIGS" == "true" ]]; then
echo "skipping config generation"
else
bash $SCRIPT_DIR/_adoc-gen-config.sh
fi
-if [ "$SKIP_STALE_EXAMPLE_CHECK" = "true" ]; then
+if [[ "$SKIP_GENERATION" == "true" ]]; then
+ echo "skipping building..."
+else
+ echo "building ..."
+ bash $SCRIPT_DIR/_adoc-antora.sh $*
+ echo "site built in ${SECONDS}s"
+fi
+
+if [[ "$SKIP_STALE_EXAMPLE_CHECK" == "true" ]]; then
echo "skipping stale example check"
else
WC=$(git status --porcelain | grep examples | wc -l)
if [ "$WC" -ne "0" ]; then
git status --porcelain
echo "Some examples are out of date; commit changes and then try again" >&2
- exit 1
fi
fi
-if [ "$SKIP_GENERATION" = "true" ]; then
- echo "skipping building..."
-else
- echo "building ..."
- bash $SCRIPT_DIR/_adoc-antora.sh $*
- echo "site built in ${SECONDS}s"
-fi
-
# add a marker, that tells github not to use jekyll on the github pages folder
touch ${PROJECT_ROOT_PATH}/antora/target/site/.nojekyll
[isis] 01/07: ISIS-2062: adds copy link to home page
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 f087a440dceea24486d00457e9e61a15c2f2ff6d
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Mar 17 09:04:38 2020 +0000
ISIS-2062: adds copy link to home page
---
antora/supplemental-ui/img/home/clipboard-copy.png | Bin 0 -> 3415 bytes
antora/supplemental-ui/index.html | 37 +++++++++++++++++++--
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/antora/supplemental-ui/img/home/clipboard-copy.png b/antora/supplemental-ui/img/home/clipboard-copy.png
new file mode 100644
index 0000000..344951c
Binary files /dev/null and b/antora/supplemental-ui/img/home/clipboard-copy.png differ
diff --git a/antora/supplemental-ui/index.html b/antora/supplemental-ui/index.html
index ddf0045..f9d02f5 100644
--- a/antora/supplemental-ui/index.html
+++ b/antora/supplemental-ui/index.html
@@ -613,18 +613,20 @@ Examples
<div class="col-lg-6 text-left text-lg-left">
<p class="cta-text text-center" style="margin-block-end: 0; ">
Learn about Apache Isis™ by running the minimal <a href="docs/latest/starters/helloworld.html">helloworld</a> starter app.
+ <span><img id="helloworld-copy" src="_/img/home/clipboard-copy.png" width="16" height="16"/></span>
</p>
</div>
<div class="col-lg-6 text-left text-lg-left">
<p class="cta-text text-center" style="margin-block-end: 0; ">
Develop your own Apache Isis™ app using the more structured <a href="docs/latest/starters/simpleapp.html">simpleapp</a> starter app.
+ <span><img id="simpleapp-copy" src="_/img/home/clipboard-copy.png" width="16" height="16"/></span>
</p>
</div>
</div>
<div class="row">
<div class="col-lg-6 text-left text-lg-left">
<p>
- <pre>
+ <pre id="helloworld-text">
curl https://codeload.github.com/apache/isis-app-helloworld/zip/master | jar xv
cd isis-app-helloworld-master
@@ -634,7 +636,7 @@ mvn spring-boot:run</pre>
</div>
<div class="col-lg-6 text-left text-lg-left">
<p>
- <pre>
+ <pre id="simpleapp-text">
curl https://codeload.github.com/apache/isis-app-simpleapp/zip/master | jar xv
cd isis-app-simpleapp-master
@@ -893,6 +895,37 @@ mvn -pl webapp jetty:run</pre>
<script src="_/js/home/lib/magnific-popup/magnific-popup.min.js"></script>
<script src="_/js/home/lib/sticky/sticky.js"></script>
+<script>
+ document.querySelector('img#helloworld-copy').addEventListener('click', async event => {
+ if (!navigator.clipboard) {
+ document.querySelector('#helloworld-copy').remove()
+ return
+ }
+ const text = document.querySelector('#helloworld-text').innerHTML
+ try {
+ await navigator.clipboard.writeText(text)
+ event.target.textContent = 'Copied to clipboard'
+ alert("text copied")
+ } catch (err) {
+ alert("Failed to copy :-(", err)
+ }
+ });
+ document.querySelector('img#simpleapp-copy').addEventListener('click', async event => {
+ if (!navigator.clipboard) {
+ document.querySelector('#simpleapp-copy').remove()
+ return
+ }
+ const text = document.querySelector('#simpleapp-text').innerHTML
+ try {
+ await navigator.clipboard.writeText(text)
+ event.target.textContent = 'Copied to clipboard'
+ alert("text copied")
+ } catch (err) {
+ alert("Failed to copy :-(", err)
+ }
+ })
+</script>
+
<!-- Template Main Javascript File -->
<script src="_/js/home/main.js"></script>
[isis] 06/07: ISIS-2278: adds some unit tests for AsyncControl and
SyncControl.
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 a521d2a2696ac78f6f69e324ffe0f168d6fee371
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Mar 17 14:26:01 2020 +0000
ISIS-2278: adds some unit tests for AsyncControl and SyncControl.
reinstates generic type, required for chaining
---
.../services/wrapper/control/AsyncControl.java | 2 +-
.../services/wrapper/control/ControlAbstract.java | 10 +-
.../services/wrapper/control/SyncControl.java | 2 +-
.../wrapper/control/AsyncControl_Test.java | 101 +++++++++++++++++++++
.../services/wrapper/control/SyncControl_Test.java | 89 ++++++++++++++++++
5 files changed, 197 insertions(+), 7 deletions(-)
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java
index 2f7ba81..d5fccec 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/AsyncControl.java
@@ -37,7 +37,7 @@ import lombok.extern.log4j.Log4j2;
*/
// tag::refguide[]
@Log4j2
-public class AsyncControl<R> extends ControlAbstract {
+public class AsyncControl<R> extends ControlAbstract<AsyncControl<R>> {
public static AsyncControl<Void> control() { // <.>
return new AsyncControl<>();
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java
index 944146a..dc03213 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/ControlAbstract.java
@@ -31,7 +31,7 @@ import lombok.NonNull;
import lombok.Setter;
// tag::refguide[]
-public class ControlAbstract {
+public class ControlAbstract<T extends ControlAbstract<T>> {
// end::refguide[]
protected ControlAbstract() {
@@ -53,14 +53,14 @@ public class ControlAbstract {
// tag::refguide[]
private boolean checkRules = true; // <.>
- public <T extends ControlAbstract> T withCheckRules() {
+ public T withCheckRules() {
// end::refguide[]
checkRules = true;
return _Casts.uncheckedCast(this);
// tag::refguide[]
// ...
}
- public <T extends ControlAbstract> T withSkipRules() {
+ public T withSkipRules() {
// end::refguide[]
checkRules = false;
return _Casts.uncheckedCast(this);
@@ -75,10 +75,10 @@ public class ControlAbstract {
// tag::refguide[]
@Getter @NonNull
private ExceptionHandler exceptionHandler; // <.>
- public <T extends ControlAbstract> T with(ExceptionHandler exceptionHandler) {
+ public T with(ExceptionHandler exceptionHandler) {
// end::refguide[]
this.exceptionHandler = exceptionHandler;
- return (T)this;
+ return _Casts.uncheckedCast(this);
// tag::refguide[]
// ...
}
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
index efe2767..6ea0387 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/wrapper/control/SyncControl.java
@@ -25,7 +25,7 @@ import org.apache.isis.core.commons.collections.ImmutableEnumSet;
/**
*/
// tag::refguide[]
-public class SyncControl extends ControlAbstract {
+public class SyncControl extends ControlAbstract<SyncControl> {
public static SyncControl control() {
return new SyncControl();
diff --git a/api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/AsyncControl_Test.java b/api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/AsyncControl_Test.java
new file mode 100644
index 0000000..a48ed57
--- /dev/null
+++ b/api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/AsyncControl_Test.java
@@ -0,0 +1,101 @@
+package org.apache.isis.applib.services.wrapper.control;
+
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+import org.springframework.core.task.support.ExecutorServiceAdapter;
+import org.springframework.core.task.support.TaskExecutorAdapter;
+
+import lombok.val;
+
+public class AsyncControl_Test {
+
+ @Test
+ public void defaults() throws Exception {
+
+ // given
+ val control = AsyncControl.control();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).isEmpty();
+ }
+
+ @Test
+ public void check_rules() throws Exception {
+ // given
+ val control = AsyncControl.control();
+
+ // when
+ control.withCheckRules();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).isEmpty();
+ }
+
+ @Test
+ public void skip_rules() throws Exception {
+
+ // given
+ val control = AsyncControl.control();
+
+ // when
+ control.withSkipRules();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).contains(ExecutionMode.SKIP_RULE_VALIDATION);
+ }
+
+ @Test
+ public void user() throws Exception {
+
+ // given
+ val control = AsyncControl.control();
+
+ // when
+ control.withUser("fred");
+
+ // then
+ Assertions.assertThat(control.getUser()).isEqualTo("fred");
+ }
+
+ @Test
+ public void roles() throws Exception {
+
+ // given
+ val control = AsyncControl.control();
+
+ // when
+ control.withRoles("role-1", "role-2");
+
+ // then
+ Assertions.assertThat(control.getRoles()).containsExactlyInAnyOrder("role-1", "role-2");
+ }
+
+ @Test
+ public void chaining() throws Exception {
+
+ val executorService = new ExecutorServiceAdapter(new TaskExecutorAdapter(new Executor() {
+ @Override
+ public void execute(Runnable command) {
+ }
+ }));
+ ExceptionHandler exceptionHandler = ex -> null;
+
+ val control = AsyncControl.control(String.class)
+ .withSkipRules()
+ .withUser("fred")
+ .withRoles("role-1", "role-2")
+ .with(executorService)
+ .with(exceptionHandler);
+
+ Assertions.assertThat(control.getExecutionModes())
+ .containsExactlyInAnyOrder(ExecutionMode.SKIP_RULE_VALIDATION);
+ Assertions.assertThat(control.getExecutorService())
+ .isSameAs(executorService);
+ Assertions.assertThat(control.getExceptionHandler())
+ .isSameAs(exceptionHandler);
+ }
+
+}
\ No newline at end of file
diff --git a/api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/SyncControl_Test.java b/api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/SyncControl_Test.java
new file mode 100644
index 0000000..3b29b82
--- /dev/null
+++ b/api/applib/src/test/java/org/apache/isis/applib/services/wrapper/control/SyncControl_Test.java
@@ -0,0 +1,89 @@
+package org.apache.isis.applib.services.wrapper.control;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import lombok.val;
+
+public class SyncControl_Test {
+
+ @Test
+ public void defaults() throws Exception {
+
+ // given
+ val control = SyncControl.control();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).isEmpty();
+ }
+
+ @Test
+ public void check_rules() throws Exception {
+ // given
+ val control = SyncControl.control();
+
+ // when
+ control.withCheckRules();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).isEmpty();
+ }
+
+ @Test
+ public void skip_rules() throws Exception {
+
+ // given
+ val control = SyncControl.control();
+
+ // when
+ control.withSkipRules();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).contains(ExecutionMode.SKIP_RULE_VALIDATION);
+ }
+
+ @Test
+ public void execute() throws Exception {
+
+ // given
+ val control = SyncControl.control();
+
+ // when
+ control.withExecute();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).isEmpty();
+ }
+
+ @Test
+ public void no_execute() throws Exception {
+
+ // given
+ val control = SyncControl.control();
+
+ // when
+ control.withNoExecute();
+
+ // then
+ Assertions.assertThat(control.getExecutionModes()).contains(ExecutionMode.SKIP_EXECUTION);
+ }
+
+ @Test
+ public void chaining() throws Exception {
+
+ ExceptionHandler exceptionHandler = ex -> null;
+
+ val control = SyncControl.control()
+ .withNoExecute()
+ .withSkipRules()
+ .with(exceptionHandler);
+
+ Assertions.assertThat(
+ control
+ .getExecutionModes())
+ .containsExactlyInAnyOrder(ExecutionMode.SKIP_RULE_VALIDATION, ExecutionMode.SKIP_EXECUTION);
+ }
+
+}
\ No newline at end of file