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 2019/01/04 09:34:16 UTC
[isis] 01/07: Merge branch 'release-1.17.0-RC3' into v2
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 4cd48b5b943f94aa3ce8a1fb19f0d693db4f9737
Merge: 4a11018 4aeada0
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 3 18:11:41 2019 +0000
Merge branch 'release-1.17.0-RC3' into v2
# Conflicts:
# adocs/documentation/src/main/asciidoc/__versions.adoc
# adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_MetamodelService.adoc
# adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc
# adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_names-and-descriptions.adoc
# adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc
# core/.m2/settings.xml
# core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelServicesMenu.java
# core/applib/src/test/java/org/apache/isis/schema/utils/CommonDtoUtils_setValueOn_Test.java
# core/config/src/main/java/org/apache/isis/config/property/ConfigProperty.java
# core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyAbstract.java
# core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyBoolean.java
# core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyEnum.java
# core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyString.java
# core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
# core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java
# example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties
# example/application/helloworld/src/main/webapp/WEB-INF/web.xml
# example/application/simpleapp/application/src/test/java/domainapp/application/integtests/tests/mml/MetaModelService_IntegTest.exports.approved.xml
# example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
# example/archetype/helloworld/pom.xml
# example/archetype/helloworld/src/main/resources/META-INF/maven/archetype-metadata.xml
# example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml
# example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/isis-non-changing.properties
# example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
# example/archetype/helloworld/src/test/resources/projects/basic/archetype.properties
# example/archetype/simpleapp/pom.xml
# example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
# example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml
# example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
# example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/pom.xml
# example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
# example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/translations.pot
# example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
# example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/logging.properties
# example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
# recreate_archetype_RELEASE.sh
# recreate_archetype_SNAPSHOT.sh
# scripts/updateGeneratedArchetypeSources.groovy
# scripts/verify-isis-release.sh
README.adoc | 113 ++-
.../src/main/asciidoc/__versions.adoc | 1 -
.../guides/cgcom/_cgcom_cutting-a-release.adoc | 172 ++--
.../cgcom/_cgcom_post-release-successful.adoc | 57 +-
.../guides/cgcom/_cgcom_verifying-releases.adoc | 211 ++--
.../main/asciidoc/guides/dg/_dg_ide_intellij.adoc | 2 +-
.../guides/rgant/_rgant-Action_publishing.adoc | 2 +-
.../rgant/_rgant-DomainObject_publishing.adoc | 2 +-
.../guides/rgant/_rgant-Property_publishing.adoc | 2 +-
...rgcms_classes_contributee_HasTransactionId.adoc | 19 +
...ms_classes_domainevent_AbstractDomainEvent.adoc | 64 +-
...gcms_classes_domainevent_ActionDomainEvent.adoc | 10 +-
.../asciidoc/guides/rgcms/_rgcms_schema-chg.adoc | 35 +-
.../asciidoc/guides/rgcms/_rgcms_schema-cmd.adoc | 9 +-
.../guides/rgcms/_rgcms_schema-common.adoc | 7 +-
.../asciidoc/guides/rgcms/_rgcms_schema-ixn.adoc | 6 +-
.../asciidoc/guides/rgcms/_rgcms_schema-mml.adoc | 362 +++++++
.../main/asciidoc/guides/rgcms/_rgcms_schema.adoc | 3 +
.../src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc | 2 +-
...rgsvc_application-layer-api_WrapperFactory.adoc | 72 +-
.../_rgsvc_metadata-api_MetamodelService.adoc | 25 +-
...c_presentation-layer-api_GuiceBeanProvider.adoc | 10 +-
.../guides/ugbtb/_ugbtb_headless-access.adoc | 4 +-
.../guides/ugbtb/_ugbtb_other-techniques.adoc | 2 +-
.../main/asciidoc/guides/ugbtb/_ugbtb_web-xml.adoc | 8 +-
.../guides/ugfun/_ugfun_core-concepts.adoc | 2 +-
...re-concepts_apache-isis-vs_mvc-server-side.adoc | 2 +-
.../ugfun/_ugfun_core-concepts_philosophy_aop.adoc | 4 +-
...ugfun_getting-started_helloworld-archetype.adoc | 127 ++-
..._ugfun_getting-started_simpleapp-archetype.adoc | 304 +++---
...entations_isisaddons-security-module-realm.adoc | 2 +-
...sec_shiro-realm-implementations_jdbc-realm.adoc | 2 +-
.../asciidoc/guides/ugtst/_ugtst_overview.adoc | 2 +-
.../asciidoc/guides/ugvro/_ugvro_health-check.adoc | 69 ++
.../src/main/asciidoc/guides/ugvro/ugvro.adoc | 1 +
.../ugvw/_ugvw_configuration-properties.adoc | 173 +++-
..._ugvw_customisation_cheap-n-cheerful-theme.adoc | 2 +-
.../_ugvw_customisation_request-parameters.adoc | 2 +-
.../_ugvw_extending_custom-bootstrap-theme.adoc | 2 +-
.../guides/ugvw/_ugvw_extending_custom-pages.adoc | 2 +-
...extending_login-via-query-args-prototyping.adoc | 4 +-
.../_ugvw_extending_replacing-page-elements.adoc | 2 +-
.../main/asciidoc/guides/ugvw/_ugvw_features.adoc | 3 +-
.../ugvw/_ugvw_features_blob-attachments.adoc | 2 +-
.../_ugvw_features_sidebar-vs-modal-dialogs.adoc | 34 +
.../ugvw/_ugvw_hints-and-tips_per-user-themes.adoc | 2 +-
.../guides/ugvw/images/dialog-mode/modal.png | Bin 0 -> 139750 bytes
.../guides/ugvw/images/dialog-mode/sidebar.png | Bin 0 -> 134677 bytes
.../src/main/asciidoc/pages/tg/tg.adoc | 2 +-
.../release-notes/_release-notes_1.4.0.adoc | 4 +-
.../release-notes/_release-notes_1.8.0.adoc | 4 +-
.../asciidoc}/schema/metamodel/metamodel-1.0.xsd | 12 +-
.../main/asciidoc/schema/metamodel/metamodel.xsd | 12 +-
core/.m2/settings.xml | 28 +-
.../services/metamodel/MetaModelService.java | 6 +
.../services/metamodel/MetaModelServicesMenu.java | 158 +--
.../metamodel/MetaModelService_Config_Test.java | 18 +
.../utils/CommonDtoUtils_setValueOn_Test.java | 26 +-
.../isis/config/property/ConfigProperty.java | 18 +
.../config/property/ConfigPropertyAbstract.java | 18 +
.../config/property/ConfigPropertyBoolean.java | 18 +
.../isis/config/property/ConfigPropertyEnum.java | 18 +
.../isis/config/property/ConfigPropertyString.java | 18 +
.../metamodel/facets/ObjectSpecIdFacetFactory.java | 18 +
.../IntrospectionState_comparable_Test.java | 18 +
core/pom.xml | 1 +
.../apache/isis/core/webapp/IsisSessionFilter.java | 2 +-
.../IsisSessionFilter_lookupPassThru_Test.java | 18 +
.../apache/isis/schema/metamodel/metamodel-1.0.xsd | 12 +-
.../server/resources/HealthResourceServerside.java | 2 +-
.../wicket/viewer/IsisWicketApplication.java | 8 +-
.../viewer/wicket/viewer/IsisWicketModule.java | 19 +-
.../actionpromptsb/ActionPromptSidebar.html | 14 +-
.../bookmarkedpages/BookmarkedPagesPanel.html | 6 +-
.../isis/viewer/wicket/ui/pages/simple-sidebar.css | 4 -
core/webdocker/pom.xml | 12 -
.../application/HelloWorldAppManifest.java | 3 +-
.../application/isis-non-changing.properties | 6 +-
.../java/domainapp/application/menubars.layout.xml | 3 +
.../helloworld/src/main/webapp/WEB-INF/web.xml | 1 -
.../main/{java/domainapp => }/webapp/welcome.html | 2 +-
.../application/manifest/DomainAppAppManifest.java | 8 +-
.../manifest/isis-non-changing.properties | 378 ++++++-
.../application/manifest/menubars.layout.xml | 3 +
.../manifest/authentication_shiro.properties | 25 -
.../manifest/persistor_datanucleus.properties | 113 ---
.../manifest/viewer_restfulobjects.properties | 64 --
.../application/manifest/viewer_wicket.properties | 185 ----
.../integtests/mml/MetaModelService_IntegTest.java | 12 +-
.../integtests/mml/approved/java.lang.Long.xml | 64 --
.../integtests/mml/approved/java.lang.Object.xml | 42 -
.../integtests/mml/approved/java.lang.String.xml | 56 --
.../integtests/mml/approved/java.net.URL.xml | 62 --
.../integtests/mml/approved/java.sql.Timestamp.xml | 53 -
.../integtests/mml/approved/java.util.Set.xml | 2 -
....applib.services.layout.LayoutService$Style.xml | 66 --
.../application/integtests/mml/approved/void.xml | 42 -
.../domainapp/webapp/DomainApplication.properties | 28 -
.../src/main/java/domainapp/webapp/welcome.html | 40 -
example/archetype/helloworld/pom.xml | 35 -
.../META-INF/maven/archetype-metadata.xml | 37 +-
.../src/main/resources/archetype-resources/pom.xml | 453 ++++-----
.../application/HelloWorldAppManifest.java | 3 +-
.../application/isis-non-changing.properties | 22 +-
.../java/domainapp/application/menubars.layout.xml | 3 +
.../java/domainapp/dom/impl/HelloWorldObjects.java | 5 +-
.../domainapp/webapp/HelloWorldApplication.java | 72 --
.../src/main/webapp/WEB-INF/isis.properties | 4 +
.../src/main/webapp/WEB-INF/logging.properties | 13 +-
.../src/main/webapp/WEB-INF/web.xml | 2 +-
.../main/webapp/images/apache-isis/logo-48x48.png | Bin 0 -> 2622 bytes
.../main/{java/domainapp => }/webapp/welcome.html | 2 +-
.../resources/projects/basic/archetype.properties | 2 +-
example/archetype/simpleapp/pom.xml | 45 +-
.../META-INF/maven/archetype-metadata.xml | 60 +-
.../archetype-resources/application/pom.xml | 27 +-
.../application/manifest/DomainAppAppManifest.java | 8 +-
.../manifest/isis-non-changing.properties | 388 +++++++-
.../application/manifest/menubars.layout.xml | 3 +
.../services/health/HealthCheckServiceImpl.java | 32 +
.../manifest/authentication_shiro.properties | 28 -
.../manifest/persistor_datanucleus.properties | 117 ---
.../manifest/viewer_restfulobjects.properties | 67 --
.../application/manifest/viewer_wicket.properties | 182 ----
.../integtests/mml/MetaModelService_IntegTest.java | 27 +-
...mainAppFixtureScriptsSpecificationProvider.xml} | 27 +-
...application.fixture.scenarios.DomainAppDemo.xml | 307 ++++++
...ion.services.health.HealthCheckServiceImpl.xml} | 32 +-
...lication.services.homepage.HomePageService.xml} | 16 +-
...ication.services.homepage.HomePageViewModel.xml | 390 ++++++++
...ainapp.modules.simple.dom.impl.SimpleObject.xml | 1035 ++++++++++++++++++++
...inapp.modules.simple.dom.impl.SimpleObjects.xml | 328 +++++++
.../integtests/{ => smoke}/Smoke_IntegTest.java | 3 +-
.../application/translations.pot | 537 +++-------
.../module-simple/logging-integtest.properties | 2 +-
.../archetype-resources/module-simple/pom.xml | 108 +-
.../modules/simple/dom/impl/SimpleObject.java | 54 +-
.../simple/dom/impl/SimpleObject.layout.xml | 4 +-
.../modules/simple/dom/impl/SimpleObjects.java | 8 +
.../module-simple/translations.pot | 525 +++-------
.../src/main/resources/archetype-resources/pom.xml | 292 +++---
.../resources/archetype-resources/webapp/pom.xml | 8 +
.../java/domainapp/webapp/DomainApplication.java | 93 --
.../domainapp/webapp/DomainApplication.properties | 31 -
.../src/main/java/domainapp/webapp/welcome.html | 43 -
.../webapp/src/main/webapp/WEB-INF/isis.properties | 37 +-
.../src/main/webapp/WEB-INF/logging.properties | 29 +-
.../webapp/src/main/webapp/WEB-INF/web.xml | 4 +-
.../main/webapp/images/apache-isis/logo-48x48.png | Bin 0 -> 2622 bytes
.../src/main/webapp/images/spinning-icon.gif | Bin 5266 -> 0 bytes
.../resources/projects/basic/archetype.properties | 2 +-
recreate_archetype_RELEASE.sh | 25 -
recreate_archetype_SNAPSHOT.sh | 26 -
scripts/addmissinglicenses.groovy | 164 ----
scripts/recreate-archetype.sh | 11 +-
scripts/updateGeneratedArchetypeSources.groovy | 59 +-
scripts/verify-isis-release.sh | 169 ++++
scripts/version-bump.sh | 19 +
scripts/version-reset.sh | 19 +
159 files changed, 5762 insertions(+), 3977 deletions(-)
diff --cc README.adoc
index 3d54f21,c884e58..da93448
--- a/README.adoc
+++ b/README.adoc
@@@ -1,13 -1,12 +1,14 @@@
= Apache Isis
+image:https://builds.apache.org/buildStatus/icon?job=Isis master jdk8[]
+
_http://isis.apache.org[Apache Isis] software is a framework for rapidly developing domain-driven apps in Java. Write your business logic in entities, domain services and repositories, and the framework dynamically generates a representation of that domain model as a webapp or a RESTful API._
- Start learning about Apache Isis using our https://isis.apache.org/guides/ugfun.html#_ugfun_getting-started_helloworld-archetype["Hello World"] Maven archetype.
- Build your own apps using our https://isis.apache.org/guides/ugfun.html#_ugfun_getting-started_simpleapp-archetype["SimpleApp"] Maven archetype.
+ Start learning about Apache Isis using our http://isis.apache.org/guides/ugfun/ugfun.html#_ugfun_getting-started_helloworld-archetype["Hello World"] Maven archetype.
+ Build your own apps using our http://isis.apache.org/guides/ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype["SimpleApp"] Maven archetype.
- For help and support, join the http://isis.apache.org/support.html[mailing lists]. To contribute to our documentation, see our https://github.com/apache/isis/tree/master/adocs/documentation[Asciidoctor source].
+ For help and support, join the http://isis.apache.org/support.html[mailing lists].
+ To contribute to our documentation, see our https://github.com/apache/isis/tree/master/adocs/documentation[Asciidoctor source].
diff --cc adocs/documentation/src/main/asciidoc/__versions.adoc
index af82873,c6c07dc..d718353
--- a/adocs/documentation/src/main/asciidoc/__versions.adoc
+++ b/adocs/documentation/src/main/asciidoc/__versions.adoc
@@@ -1,5 -1,4 +1,4 @@@
-:isiscurr: 1.16.2
-:isisnext: 1.17.0
-:isisnextafter: 1.18.0
+:isiscurr: 2.0.0-M1
+:isisnext: 2.0.0-M2
+:isisnextafter: 2.0.0-M3
- :isisdev: {isisnext}-SNAPSHOT
:isisdevafter: {isisnextafter}-SNAPSHOT
diff --cc adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
index 7fced91,6cd224c..a99320b
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
@@@ -7,10 -7,10 +7,10 @@@
-The `publishing()` attribute determines whether and how an action invocation is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
+The `publishing()` attribute determines whether and how an action invocation is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
This attribute is also supported for xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[domain objects], where it controls whether changed objects are published as events, and for xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`], where it controls whether property edits are published as events.
- A common use case is to notify external "downstream" systems of changes in the state of the Isis application.
+ A common use case is to notify external "downstream" systems of changes in the state of the Apache Isis application.
The default value for the attribute is `AS_CONFIGURED`, meaning that the xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] `isis.services.publish.actions` is used to determine the whether the action is published:
* `all` +
diff --cc adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
index 9d67e01,3e3e295..6bd18c2
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
@@@ -6,10 -6,10 +6,10 @@@
-The `publishing()` attribute determines whether and how a modified object instance is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
+The `publishing()` attribute determines whether and how a modified object instance is published via the registered implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
This attribute is also supported for xref:../rgant/rgant.adoc#_rgant-Action_publishing[actions], where it controls whether action invocations are published as events, and for xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`], where it controls whether property edits are published as events.
- A common use case is to notify external "downstream" systems of changes in the state of the Isis application.
+ A common use case is to notify external "downstream" systems of changes in the state of the Apache Isis application.
The default value for the attribute is `AS_CONFIGURED`, meaning that the xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] `isis.services.publish.objects` is used to determine the whether the action is published:
diff --cc adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
index ba0491b,1ada5e8..6181905
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
@@@ -7,10 -7,10 +7,10 @@@
-The `publishing()` attribute determines whether and how a property edit is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
+The `publishing()` attribute determines whether and how a property edit is published via the registered implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
This attribute is also supported for xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[domain objects], where it controls whether changed objects are published as events, and for xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`], where it controls whether property edits are published as events.
- A common use case is to notify external "downstream" systems of changes in the state of the Isis application.
+ A common use case is to notify external "downstream" systems of changes in the state of the Apache Isis application.
The default value for the attribute is `AS_CONFIGURED`, meaning that the
xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] `isis.services.publish.properties` is used to
determine the whether the property is published:
diff --cc adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_MetamodelService.adoc
index 243fe2d,559ce21..3e35ff2
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_MetamodelService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_metadata-api_MetamodelService.adoc
@@@ -43,6 -46,19 +43,16 @@@ public interface MetaModelService
CommandDtoProcessor commandDtoProcessorFor( // <8>
String memberIdentifier);
- // introduced in MetaModelService6
+ MetamodelDto pexportMetaModel(final Config config);
+
-
+ public static class Config {
+ public Config withIgnoreNoop() { ... }
+ public Config withIgnoreInterfaces() { ... }
+ public Config withIgnoreAbstractClasses() { ... }
+ public Config withIgnoreBuiltInValueTypes() { ... }
+ public Config withIgnoreMixins() { ... }
+ public Config withPackagePrefix(final String packagePrefix) { ... }
+ }
}
----
<1> reverse lookup of a domain class' object type
diff --cc adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc
index 652ba4f,fe5b3b8..f7abdca
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc
@@@ -360,50 -407,61 +407,43 @@@ This is used to run Isis' own xref:../r
=== myapp-webapp
- Finally, in the `myapp-webapp` module we have the classes and configuration to package and bootstrap the application as a webapp.
-
- Under `src/main/java` there is:
+ Finally, in the `myapp-webapp` module we have the configuration to package and bootstrap the application as a webapp.
-
-[NOTE]
-====
-In previous versions of Apache Isis the simple app defined its own subclass of `IsisWicketApplication` in `src/main/java`.
-This is generally no longer required because configuration properties now exist that can be set instead.
-====
-
-Under `src/main/webapp` we have various resources that are used to configure the webapp, or that are served up by the running webapp:
++Under `src/main/webapp` are various resources, used either to configure the webapp, or that are served up by the running webapp:
[monotree]
----
- > domainapp/
- >> webapp/
- >>> welcome.html
- ----
-
- The text of the welcome page shown by the Wicket viewer can be found in `welcome.html`, loaded from the classpath and in the same package as `DomainApplication`.
-
- Under `src/main/webapp` we have various resources that are used to configure the webapp, or that are served up by the running webapp:
-
- [monotree]
- ----
- > about/
- >> index.html
- > css/
- >> application.css
- > scripts/
- >> application.js
- > swagger-ui/
- > WEB-INF/
- >> isis.properties
- >> logging.properties
- >> shiro.ini
- >> translations.po
- >> web.xml
+ > src/
+ >> main/
+ >>> webapp/
+ >>>> src/
+ >>>>> main/
+ >>>>>> webapp/
+ >>>>>>> about/
+ >>>>>>>> index.html
+ >>>>>>> css/
+ >>>>>>>> application.css
+ >>>>>>> scripts/
+ >>>>>>>> application.js
+ >>>>>>> swagger-ui/
+ >>>>>>> WEB-INF/
+ >>>>>>>> isis.properties
+ >>>>>>>> logging.properties
+ >>>>>>>> shiro.ini
+ >>>>>>>> translations.po
+ >>>>>>>> web.xml
----
-Most important of these is `WEB-INF/web.xml`, which bootstraps both the Wicket viewer and the Restful Objects viewer (the REST API derived from the domain object model):
+Most important of these is `WEB-INF/web.xml`, which bootstraps both the Wicket viewer and the Restful Objects viewer, along with Shiro security.
+This is done using a webapp context listener:
[source,xml]
.web.xml
----
<web-app ...>
...
- <filter>
- <filter-name>WicketFilter</filter-name>
- <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
- <init-param>
- <param-name>applicationClassName</param-name>
- <param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketApplication</param-value>
- </init-param>
- </filter>
- ...
- <context-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>
- org.apache.isis.viewer.restfulobjects.server.RestfulObjectsApplication
- </param-value>
- </context-param>
+ <listener>
+ <listener-class>org.apache.isis.core.webapp.IsisWebAppContextListener</listener-class>
+ </listener>
-
...
</web-app>
----
diff --cc adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_features.adoc
index fab1069,d1a8f2e..fbdaeec
--- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_features.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_features.adoc
@@@ -10,8 -10,8 +10,9 @@@ This section discusses features of the
include::_ugvw_features_recent-pages.adoc[leveloffset=+1]
include::_ugvw_features_bookmarked-pages.adoc[leveloffset=+1]
+ include::_ugvw_features_sidebar-vs-modal-dialogs.adoc[leveloffset=+1]
include::_ugvw_features_hints-and-copy-url.adoc[leveloffset=+1]
+include::_ugvw_features_where-am-i.adoc[leveloffset=+1]
include::_ugvw_features_titles-in-tables.adoc[leveloffset=+1]
include::_ugvw_features_blob-attachments.adoc[leveloffset=+1]
include::_ugvw_features_user-registration.adoc[leveloffset=+1]
diff --cc core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelService.java
index 79593ac,be22ed4..a2ec9b3
--- a/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelService.java
@@@ -61,160 -54,15 +61,166 @@@ public interface MetaModelService
* <p>
* Used by {@link MetaModelServicesMenu} to return a downloadable CSV.
* </p>
+ *
+ * <p>
+ * Note that {@link MetaModelService6#exportMetaModel(MetaModelService6.Config)} provides a superset of the functionality provided by this method.
+ * </p>
+ *
+ * @see MetaModelService6
*/
@Programmatic
- List<DomainMember> export();
+ DomainModel getDomainModel();
+ @Programmatic
+ Sort sortOf(Class<?> domainType, Mode mode);
+
+ @Programmatic
+ Sort sortOf(Bookmark bookmark, Mode mode);
+
+ enum Sort {
+ VIEW_MODEL,
+ JDO_ENTITY,
+ DOMAIN_SERVICE,
+ MIXIN,
+ VALUE,
+ COLLECTION,
+ UNKNOWN;
+
+ public boolean isDomainService() {
+ return this == DOMAIN_SERVICE;
+ }
+
+ public boolean isMixin() {
+ return this == MIXIN;
+ }
+
+ public boolean isViewModel() {
+ return this == VIEW_MODEL;
+ }
+
+ public boolean isValue() {
+ return this == VALUE;
+ }
+
+ public boolean isCollection() {
+ return this == COLLECTION;
+ }
+
+ public boolean isJdoEntity() {
+ return this == JDO_ENTITY;
+ }
+
+ public boolean isUnknown() {
+ return this == UNKNOWN;
+ }
+
+ }
+
+ enum Mode {
+ /**
+ * If the {@link #sortOf(Class, Mode) sort of} object type is unknown, then throw an exception.
+ */
+ STRICT,
+ /**
+ * If the {@link #sortOf(Class, Mode) sort of} object type is unknown, then return {@link Sort#UNKNOWN}.
+ */
+ RELAXED
+ }
+
+ /**
+ * @return as {@link #getAppManifest()}, downcasted (else null).
+ */
+ @Programmatic
+ AppManifest2 getAppManifest2();
+
+ /**
+ * @return the {@link AppManifest} used to bootstrap the application.
+ */
+ @Programmatic
+ AppManifest getAppManifest();
+
+ @Programmatic
+ CommandDtoProcessor commandDtoProcessorFor(String memberIdentifier);
+
+ public static class Config {
+
+ private static final int IGNORE_NOOP_FACETS = 1;
+ private static final int IGNORE_INTERFACES = 2;
+ private static final int IGNORE_ABSTRACT_CLASSES = 4;
+ private static final int IGNORE_BUILT_IN_VALUE_TYPES = 8;
+ private static final int IGNORE_MIXINS = 16;
+
+ private final int mask;
+ private final List<String> packagePrefixes;
+
+ public Config() {
+ this(0, Collections.emptyList());
+ }
+ private Config(final int mask, final List<String> packagePrefixes) {
+ this.mask = mask;
+ this.packagePrefixes = Collections.unmodifiableList(packagePrefixes);
+ }
+ private Config(final int mask) {
+ this(mask, null);
+ }
+
+
+ public Config withIgnoreNoop() {
+ return newConfigWith(IGNORE_NOOP_FACETS);
+ }
+
+ public Config withIgnoreInterfaces() {
+ return newConfigWith(IGNORE_INTERFACES);
+ }
+ public Config withIgnoreAbstractClasses() {
+ return newConfigWith(IGNORE_ABSTRACT_CLASSES);
+ }
+ public Config withIgnoreBuiltInValueTypes() {
+ return newConfigWith(IGNORE_BUILT_IN_VALUE_TYPES);
+ }
+ public Config withIgnoreMixins() {
+ return newConfigWith(IGNORE_MIXINS);
+ }
+
+ private Config newConfigWith(final int x) {
+ return new Config(mask | x, packagePrefixes);
+ }
+
+ public Config withPackagePrefix(final String packagePrefix) {
+ final List<String> prefixes = _Lists.newArrayList(this.packagePrefixes);
+ prefixes.add(packagePrefix);
+ return new Config(mask, prefixes);
+ }
+
+ public boolean isIgnoreNoop() {
+ return hasFlag(IGNORE_NOOP_FACETS);
+ }
+
+ public boolean isIgnoreInterfaces() {
+ return hasFlag(IGNORE_INTERFACES);
+ }
+
+ public boolean isIgnoreAbstractClasses() {
+ return hasFlag(IGNORE_ABSTRACT_CLASSES);
+ }
+ public boolean isIgnoreBuiltInValueTypes() {
+ return hasFlag(IGNORE_BUILT_IN_VALUE_TYPES);
+ }
+ public boolean isIgnoreMixins() {
+ return hasFlag(IGNORE_MIXINS);
+ }
+
+ public List<String> getPackagePrefixes() {
+ return packagePrefixes;
+ }
+
+ private boolean hasFlag(final int x) {
+ return (mask & x) == x;
+ }
+
+ }
+
+ @Programmatic
+ MetamodelDto exportMetaModel(final Config config);
}
diff --cc core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelServicesMenu.java
index 0e4ba23,1b80b0d..e3c0447
--- a/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelServicesMenu.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelServicesMenu.java
@@@ -18,9 -18,8 +18,11 @@@
*/
package org.apache.isis.applib.services.metamodel;
++import java.util.ArrayList;
import java.util.List;
+ import java.util.SortedSet;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import javax.activation.MimeType;
import javax.activation.MimeTypeParseException;
@@@ -39,10 -41,7 +41,10 @@@ import org.apache.isis.applib.annotatio
import org.apache.isis.applib.annotation.RestrictTo;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.jaxb.JaxbService;
- import org.apache.isis.applib.services.metamodel.MetaModelService.Config;
import org.apache.isis.applib.value.Clob;
+import org.apache.isis.commons.internal.base._Strings;
+import org.apache.isis.commons.internal.collections._Lists;
++import org.apache.isis.commons.internal.collections._Sets;
import org.apache.isis.schema.metamodel.v1.MetamodelDto;
@DomainService(
@@@ -53,12 -52,14 +55,13 @@@
named = "Prototyping",
menuBar = DomainServiceLayout.MenuBar.SECONDARY,
menuOrder = "500.500"
-)
+ )
public class MetaModelServicesMenu {
- public static abstract class ActionDomainEvent extends IsisApplibModule.ActionDomainEvent<MetaModelServicesMenu> {
- }
+ public static abstract class ActionDomainEvent extends IsisApplibModule.ActionDomainEvent<MetaModelServicesMenu> { private static final long serialVersionUID = 1L; }
private final MimeType mimeTypeTextCsv;
+ private final MimeType mimeTypeTextXml;
public MetaModelServicesMenu() {
try {
@@@ -70,65 -72,9 +74,9 @@@
// //////////////////////////////////////
- public static class DownloadMetaModelEvent extends ActionDomainEvent {
- }
+ public static class DownloadMetaModelEvent extends ActionDomainEvent { private static final long serialVersionUID = 1L; }
+
- @Action(
- domainEvent = DownloadMetaModelEvent.class,
- semantics = SemanticsOf.SAFE,
- restrictTo = RestrictTo.PROTOTYPING
- )
- @ActionLayout(
- cssClassFa = "fa-download",
- named = "Download Meta Model (XML)"
- )
- @MemberOrder(sequence="500.500.1")
- public Clob downloadMetaModelXml(
-
- @ParameterLayout(named = ".xml file name")
- @Parameter(optionality=Optionality.MANDATORY)
- final String fileName,
-
- @ParameterLayout(
- named = "Package Prefix",
- describedAs="Subset of the complete meta model, only including packages starting with given prefix.")
- @Parameter(optionality=Optionality.MANDATORY)
- final String packagePrefix,
-
- @ParameterLayout(named = "Ignore Interfaces")
- @Parameter(optionality=Optionality.MANDATORY)
- final boolean ignoreInterfaces
-
- ) {
-
- Config modelConfig = new MetaModelService.Config()
- .withIgnoreNoop()
- .withIgnoreAbstractClasses()
- .withIgnoreBuiltInValueTypes()
- .withPackagePrefix(packagePrefix);
-
- if(ignoreInterfaces) {
- modelConfig = modelConfig.withIgnoreInterfaces();
- }
-
- final MetamodelDto metamodelDto = metaModelService.exportMetaModel(modelConfig);
- final String xml = toXml(metamodelDto);
- return new Clob(_Strings.asFileNameWithExtension(fileName, ".xml"), "text/xml", xml);
- }
- public String default0DownloadMetaModelXml() {
- return "metamodel.xml";
- }
-
- public String default1DownloadMetaModelXml() {
- return "domainapp";
- }
-
- public boolean default2DownloadMetaModelXml() {
- return true;
- }
-
- // //////////////////////////////////////
-
@Action(
domainEvent = DownloadMetaModelEvent.class,
semantics = SemanticsOf.SAFE,
@@@ -156,15 -102,75 +104,95 @@@
return "metamodel.csv";
}
- // -- XML HELPER
-
- @Inject JaxbService jaxbService;
-
+ private String toXml(MetamodelDto model) {
- return jaxbService.toXml(model);
++ return jaxbService.toXml(model);
++ }
++
++
+ // //////////////////////////////////////
+
++
+ public static class DownloadMetaModelXmlEvent extends ActionDomainEvent {
+ }
+
+ @Action(
+ domainEvent = DownloadMetaModelXmlEvent.class,
+ semantics = SemanticsOf.SAFE,
+ restrictTo = RestrictTo.PROTOTYPING
+ )
+ @ActionLayout(
+ cssClassFa = "fa-download",
+ named = "Download Meta Model (XML)"
+ )
+ @MemberOrder(sequence="500.500.2")
+ public Clob downloadMetaModelXml(
- @ParameterLayout(named = "Packages")
- final List<String> packages,
+ @ParameterLayout(named = ".xml file name")
- final String xmlFileName) {
++ final String fileName,
++ @ParameterLayout(named = "Packages",
++ describedAs="Subset of the complete meta model, only including packages starting with given prefix.")
++ final List<String> packages,
++ @ParameterLayout(named = "Ignore Interfaces")
++ @Parameter(optionality=Optionality.MANDATORY)
++ final boolean ignoreInterfaces
++ ) {
+
- MetaModelService6.Config config =
- new MetaModelService6.Config()
++ MetaModelService.Config config =
++ new MetaModelService.Config()
+ .withIgnoreNoop()
+ .withIgnoreAbstractClasses()
+ .withIgnoreInterfaces()
+ .withIgnoreBuiltInValueTypes();
+ for (final String pkg : packages) {
+ config = config.withPackagePrefix(pkg);
+ }
- final MetamodelDto metamodelDto = metaModelService.exportMetaModel(config);
++ if(ignoreInterfaces) {
++ config = config.withIgnoreInterfaces();
++ }
+
- final String asXml = jaxbService.toXml(metamodelDto);
+
- return new Clob(
- Util.withSuffix(xmlFileName, "xml"),
- mimeTypeTextXml, asXml);
++ final MetamodelDto metamodelDto = metaModelService.exportMetaModel(config);
++
++ final String xml = jaxbService.toXml(metamodelDto);
++ return new Clob(_Strings.asFileNameWithExtension(fileName, ".xml"), "text/xml", xml);
+ }
+
- public String validateDownloadMetaModelXml(List<String> packagePrefixes, final String xmlFileName) {
++ public String validateDownloadMetaModelXml(
++ final String fileName, final List<String> packagePrefixes, final boolean ignoreInterfaces) {
+ if(packagePrefixes == null || packagePrefixes.isEmpty()) {
+ return "At least one package must be selected";
+ }
+ return null;
+ }
+
- public List<String> choices0DownloadMetaModelXml() {
- final List<DomainMember> export = metaModelService.export();
- final SortedSet<String> packages = Sets.newTreeSet();
++ public String default0DownloadMetaModelXml() {
++ return "metamodel.xml";
++ }
++
++ public List<String> choices1DownloadMetaModelXml() {
++ final DomainModel domainModel = metaModelService.getDomainModel();
++ final List<DomainMember> export = domainModel.getDomainMembers();
++ final SortedSet<String> packages = _Sets.newTreeSet();
+ for (final DomainMember domainMember : export) {
+ final String packageName = domainMember.getPackageName();
- final List<String> split = Splitter.on(".").splitToList(packageName);
++ final String[] split = packageName.split("[.]");
+ final StringBuilder buf = new StringBuilder();
+ for (final String part : split) {
+ if(buf.length() > 0) {
+ buf.append(".");
+ }
+ buf.append(part);
+ packages.add(buf.toString());
+ }
+ }
- return Lists.newArrayList(packages);
++ return new ArrayList<>(packages);
}
-
- // -- CSV HELPER
+
- public String default1DownloadMetaModelXml() {
- return "metamodel.xml";
++ public boolean default2DownloadMetaModelXml() {
++ return true;
+ }
+
++
+ // //////////////////////////////////////
private static StringBuilder asBuf(final List<String> list) {
final StringBuilder buf = new StringBuilder();
@@@ -210,6 -215,8 +238,8 @@@
@javax.inject.Inject
- MetaModelService6 metaModelService;
+ MetaModelService metaModelService;
+ @Inject
+ JaxbService jaxbService;
}
diff --cc core/applib/src/test/java/org/apache/isis/applib/services/metamodel/MetaModelService_Config_Test.java
index a846d89,0000000..914aef5
mode 100644,000000..100644
--- a/core/applib/src/test/java/org/apache/isis/applib/services/metamodel/MetaModelService_Config_Test.java
+++ b/core/applib/src/test/java/org/apache/isis/applib/services/metamodel/MetaModelService_Config_Test.java
@@@ -1,56 -1,0 +1,74 @@@
++/*
++ * 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.metamodel;
+
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.emptyCollectionOf;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertThat;
+
+public class MetaModelService_Config_Test {
+
+ @Test
+ public void ignore_noop() throws Exception {
+
+ // when
+ MetaModelService.Config config = new MetaModelService.Config();
+ // then
+ assertThat(config.isIgnoreNoop(), is(equalTo(false)));
+
+ // and when
+ MetaModelService.Config config2 = config.withIgnoreNoop();
+
+ // then
+ assertNotSame(config, config2);
+ assertThat(config.isIgnoreNoop(), is(equalTo(false)));
+ assertThat(config2.isIgnoreNoop(), is(equalTo(true)));
+ }
+
+ @Test
+ public void packages_prefixes() throws Exception {
+
+ // when
+ MetaModelService.Config config = new MetaModelService.Config();
+ // then
+ assertThat(config.getPackagePrefixes(), is(emptyCollectionOf(String.class)));
+
+ // and when
+ MetaModelService.Config config2 = config.withPackagePrefix("org.foo");
+
+ // then
+ assertNotSame(config, config2);
+ assertThat(config2.getPackagePrefixes().size(), is(equalTo(1)));
+ assertThat(config2.getPackagePrefixes().get(0), is(equalTo("org.foo")));
+
+ // and when
+ MetaModelService.Config config3 = config2.withPackagePrefix("org.bar");
+
+ // then
+ assertNotSame(config, config3);
+ assertNotSame(config2, config3);
+ assertThat(config3.getPackagePrefixes().size(), is(equalTo(2)));
+ assertThat(config3.getPackagePrefixes().get(0), is(equalTo("org.foo")));
+ assertThat(config3.getPackagePrefixes().get(1), is(equalTo("org.bar")));
+ }
+}
diff --cc core/config/src/main/java/org/apache/isis/config/property/ConfigProperty.java
index 2faf7f2,0000000..7062269
mode 100644,000000..100644
--- a/core/config/src/main/java/org/apache/isis/config/property/ConfigProperty.java
+++ b/core/config/src/main/java/org/apache/isis/config/property/ConfigProperty.java
@@@ -1,12 -1,0 +1,30 @@@
++/*
++ * 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.config.property;
+
+import java.util.Map;
+
+import org.apache.isis.config.IsisConfiguration;
+
+public interface ConfigProperty<T> {
+ T from(final IsisConfiguration configuration);
+
+ Map.Entry<String,String> of(final T value);
+
+}
diff --cc core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyAbstract.java
index 4986538,0000000..a60e268
mode 100644,000000..100644
--- a/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyAbstract.java
+++ b/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyAbstract.java
@@@ -1,14 -1,0 +1,32 @@@
++/*
++ * 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.config.property;
+
+import org.apache.isis.config.IsisConfiguration;
+
+public abstract class ConfigPropertyAbstract<T> implements ConfigProperty<T> {
+ protected final String key;
+ final T defaultValue;
+ public ConfigPropertyAbstract(final String key, final T defaultValue) {
+ this.key = key;
+ this.defaultValue = defaultValue;
+ }
+ public abstract T from(final IsisConfiguration configuration);
+
+}
diff --cc core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyBoolean.java
index 9209a07,0000000..429b20c
mode 100644,000000..100644
--- a/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyBoolean.java
+++ b/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyBoolean.java
@@@ -1,21 -1,0 +1,39 @@@
++/*
++ * 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.config.property;
+
+import java.util.AbstractMap;
+import java.util.Map;
+
+import org.apache.isis.config.IsisConfiguration;
+
+public class ConfigPropertyBoolean extends ConfigPropertyAbstract<Boolean> {
+ public ConfigPropertyBoolean(final String key, final boolean defaultValue) {
+ super(key, defaultValue);
+ }
+ public Boolean from(final IsisConfiguration configuration) {
+ return configuration.getBoolean(key, defaultValue);
+ }
+
+ @Override
+ public Map.Entry<String, String> of(final Boolean value) {
+ return new AbstractMap.SimpleImmutableEntry<>(key, value.toString());
+ }
+
+}
diff --cc core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyEnum.java
index 2f42067,0000000..ada61e2
mode 100644,000000..100644
--- a/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyEnum.java
+++ b/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyEnum.java
@@@ -1,22 -1,0 +1,40 @@@
++/*
++ * 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.config.property;
+
+import java.util.AbstractMap;
+import java.util.Map;
+
+import org.apache.isis.config.IsisConfiguration;
+
+public class ConfigPropertyEnum<E extends Enum<E>> extends
+ ConfigPropertyAbstract<E> {
+ public ConfigPropertyEnum(final String key, final E defaultValue) {
+ super(key, defaultValue);
+ }
+ public E from(final IsisConfiguration configuration) {
+ return Enum.valueOf(defaultValue.getDeclaringClass(), configuration.getString(key, defaultValue.name()).toUpperCase());
+ }
+
+ @Override
+ public Map.Entry<String, String> of(final E value) {
+ return new AbstractMap.SimpleImmutableEntry<>(key, value.name().toUpperCase());
+ }
+
+}
diff --cc core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyString.java
index 44be8e2,0000000..f1c5bfa
mode 100644,000000..100644
--- a/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyString.java
+++ b/core/config/src/main/java/org/apache/isis/config/property/ConfigPropertyString.java
@@@ -1,21 -1,0 +1,39 @@@
++/*
++ * 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.config.property;
+
+import java.util.AbstractMap;
+import java.util.Map;
+
+import org.apache.isis.config.IsisConfiguration;
+
+public class ConfigPropertyString extends ConfigPropertyAbstract<String> {
+ public ConfigPropertyString(final String key, final String defaultValue) {
+ super(key, defaultValue);
+ }
+ public String from(final IsisConfiguration configuration) {
+ return configuration.getString(key, defaultValue);
+ }
+
+ @Override
+ public Map.Entry<String, String> of(final String value) {
+ return new AbstractMap.SimpleImmutableEntry<>(key, value);
+ }
+
+}
diff --cc core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
index 2900c26,6e3e6df..59256a9
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisSessionFilter.java
@@@ -51,25 -51,6 +51,25 @@@ import org.apache.isis.core.webapp.auth
import org.apache.isis.core.webapp.auth.AuthenticationSessionStrategyDefault;
import org.apache.isis.core.webapp.content.ResourceCachingFilter;
+/**
+ * Filter for RestfulObjects.
+ *
+ * authenticate user, set up an Isis session
+ */
+//@WebFilter(
+// servletNames={"RestfulObjectsRestEasyDispatcher"}, // this is mapped to the entire application;
+// // however the IsisSessionFilter will
+// // "notice" if the session filter has already been
+// // executed for the request pipeline, and if so will do nothing
+// initParams={
+// @WebInitParam(
+// name="authenticationSessionStrategy",
+// value="org.apache.isis.viewer.restfulobjects.server.authentication.AuthenticationSessionStrategyBasicAuth"), // authentication required for REST
+// @WebInitParam(
+// name="whenNoSession", // what to do if no session was found ...
+// value="auto"), // ... 401 and a basic authentication challenge if request originates from web browser
- // @WebInitParam(name="passThru", value="/restful/swagger") //TODO[ISIS-1895] the restful path is configured elsewhere
++// @WebInitParam(name="passThru", value="/restful/swagger,/restful/health") //TODO[ISIS-1895] the restful path is configured elsewhere
+//})
public class IsisSessionFilter implements Filter {
/**
diff --cc core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index 5e62a7d,d313f68..955174d
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@@ -20,8 -20,10 +20,9 @@@
package org.apache.isis.viewer.wicket.viewer;
import java.io.IOException;
+ import java.net.URL;
import java.util.Collections;
import java.util.List;
-import java.util.Map;
import java.util.ServiceLoader;
import java.util.Set;
import java.util.UUID;
@@@ -447,9 -564,14 +448,14 @@@ implements ComponentFactoryRegistryAcce
if(resourceName == null) {
return fallback;
}
+ final URL resource = Resources.getResource(contextClass, resourceName);
+ return readLines(resource, fallback);
+ }
+
+ protected static String readLines(final URL resource, final String fallback) {
try {
- List<String> readLines = Resources.readLines(Resources.getResource(contextClass, resourceName), Charsets.UTF_8);
+ List<String> readLines = Resources.readLines(resource, Charsets.UTF_8);
- return Joiner.on("\n").join(readLines);
+ return String.join("\n", readLines);
} catch (IOException | IllegalArgumentException e) {
return fallback;
}
diff --cc core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java
index 2e1d3aa,a06414e..272ce12
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java
@@@ -91,57 -95,90 +93,68 @@@ public class IsisWicketModule extends A
// these services need to be bound because they injected directly into
// Wicket panels outside of the Isis runtime.
-
- bind(EmailService.class)
- .to(EmailServiceDefault.class);
- bind(EmailNotificationService.class)
- .to(EmailNotificationServiceDefault.class);
-
- if(isisConfigIfAny != null) {
- bind(String.class).annotatedWith(Names.named("applicationName"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- return isisConfigIfAny.getString("isis.viewer.wicket.application.name", "Apache Isis ™");
- }
- });
- bind(String.class).annotatedWith(Names.named("brandLogoHeader"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- return isisConfigIfAny.getString("isis.viewer.wicket.application.brandLogoHeader");
- }
- });
-
- bind(String.class).annotatedWith(Names.named("brandLogoSignin"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- return isisConfigIfAny.getString("isis.viewer.wicket.application.brandLogoSignin");
- }
- });
-
- bind(String.class).annotatedWith(Names.named("applicationCss"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- return isisConfigIfAny.getString("isis.viewer.wicket.application.css", "css/application.css");
- }
- });
- bind(String.class).annotatedWith(Names.named("applicationJs"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- return isisConfigIfAny.getString("isis.viewer.wicket.application.js", "css/application.js");
- }
- });
- bind(String.class).annotatedWith(Names.named("aboutMessage"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- return isisConfigIfAny.getString("isis.viewer.wicket.application.about",
- isisConfigIfAny.getString("isis.viewer.wicket.application.name"));
- }
- });
- final String welcomeFile = isisConfigIfAny.getString("isis.viewer.wicket.welcome.file", "welcome.html");
- bind(String.class).annotatedWith(Names.named("welcomeMessage"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- final String fallback = isisConfigIfAny.getString("isis.viewer.wicket.welcome.text");
- final URL resource;
- try {
- resource = servletContext.getResource(prefix("/", welcomeFile));
- return readLines(resource, fallback);
- } catch (MalformedURLException e) {
- return fallback;
- }
- }
- });
- bind(String.class).annotatedWith(Names.named("applicationVersion"))
- .toProvider(
- new Provider<String>() {
- @Override public String get() {
- return isisConfigIfAny.getString("isis.viewer.wicket.application.version");
- }
- });
- }
- bind(InputStream.class).annotatedWith(Names.named("metaInfManifest"))
- .toProvider(new Provider<InputStream>() {
- @Override public InputStream get() {
- return servletContext.getResourceAsStream("/META-INF/MANIFEST.MF");
+ bind(EmailService.class).to(EmailServiceWicket.class);
+ bind(EmailNotificationService.class).to(EmailNotificationServiceWicket.class);
+
+ bind(String.class).annotatedWith(Names.named("applicationName"))
+ .toProvider(string("isis.viewer.wicket.application.name", "Apache Isis ™"));
+
+ bind(String.class).annotatedWith(Names.named("brandLogoHeader"))
+ .toProvider(string("isis.viewer.wicket.application.brandLogoHeader"));
+
+ bind(String.class).annotatedWith(Names.named("brandLogoSignin"))
+ .toProvider(string("isis.viewer.wicket.application.brandLogoSignin"));
+
+ bind(String.class).annotatedWith(Names.named("applicationCss"))
+ .toProvider(string("isis.viewer.wicket.application.css", "css/application.css"));
+
+ bind(String.class).annotatedWith(Names.named("applicationJs"))
+ .toProvider(string("isis.viewer.wicket.application.js", "css/application.js"));
+
+ bind(String.class).annotatedWith(Names.named("aboutMessage"))
+ .toProvider(stringOrElse("isis.viewer.wicket.application.about",
+ string("isis.viewer.wicket.application.name")));
+
+ final Provider<String> welcomeFile = string("isis.viewer.wicket.welcome.file", "welcome.html");
+ bind(String.class).annotatedWith(Names.named("welcomeMessage"))
- .toProvider(() -> readLines(getClass(), welcomeFile.get(),
- getConfiguration().getString("isis.viewer.wicket.welcome.text")));
++ .toProvider(() -> {
++ final String fallback = getConfiguration().getString("isis.viewer.wicket.welcome.text");
++ final URL resource;
++ try {
++ resource = servletContext.getResource(prefix("/", welcomeFile));
++ return readLines(resource, fallback);
++ } catch (MalformedURLException e) {
++ return fallback;
+ }
+ });
- }
- private static String prefix(final String prefix, final String text) {
+ bind(String.class).annotatedWith(Names.named("applicationVersion"))
+ .toProvider(string("isis.viewer.wicket.application.version"));
+
+ bind(InputStream.class).annotatedWith(Names.named("metaInfManifest"))
+ .toProvider(() -> servletContext.getResourceAsStream("/META-INF/MANIFEST.MF"));
+
+ }
+
+ // -- HELPER
+
+ private Provider<String> string(String key) {
+ return ()->getConfiguration().getString(key);
+ }
+
+ private Provider<String> string(String key, String defaultValue) {
+ return ()->getConfiguration().getString(key, defaultValue);
+ }
+
+ private Provider<String> stringOrElse(String key, Provider<String> fallback) {
+ return ()->getConfiguration().getString(key, fallback.get());
+ }
+
+ private IsisConfiguration getConfiguration() {
+ return _Config.getConfiguration();
+ }
-
++ private static String prefix(final String prefix, final Provider<String> textProvider) {
++ final String text = textProvider.get();
+ return text.startsWith(prefix) ? text : prefix + text;
+ }
}
diff --cc example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties
index 3aa8dd8,1dac3d8..463d7d4
--- a/example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties
+++ b/example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties
@@@ -16,9 -16,8 +16,9 @@@
# under the License.
- # -- auto wired by plugins --
-
-isis.services.eventbus.implementation=axon
++# -- auto wired by plugins --
+#isis.services.eventbus.implementation=guava
+#isis.services.eventbus.implementation=axon
isis.reflector.validator.allowDeprecated=false
isis.reflector.validator.noParamsOnly=true
diff --cc example/application/helloworld/src/main/java/domainapp/application/menubars.layout.xml
index 577ddf9,e771ba9..75fe0a6
--- a/example/application/helloworld/src/main/java/domainapp/application/menubars.layout.xml
+++ b/example/application/helloworld/src/main/java/domainapp/application/menubars.layout.xml
@@@ -60,12 -60,12 +60,15 @@@
</mb3:serviceAction>
</mb3:section>
<mb3:section>
- <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModel">
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelXml">
+ <cpt:named>Download Meta Model (XML)</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelCsv">
<cpt:named>Download Meta Model (CSV)</cpt:named>
</mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelXml">
+ <cpt:named>Download Meta Model (XML)</cpt:named>
+ </mb3:serviceAction>
</mb3:section>
<mb3:section>
<mb3:serviceAction objectType="isisApplib.SwaggerServiceMenu" id="openSwaggerUi">
diff --cc example/application/helloworld/src/main/webapp/WEB-INF/web.xml
index 1965e7c,cd4ee01..e5061c1
--- a/example/application/helloworld/src/main/webapp/WEB-INF/web.xml
+++ b/example/application/helloworld/src/main/webapp/WEB-INF/web.xml
@@@ -28,8 -27,302 +28,7 @@@
<welcome-file>about/index.html</welcome-file>
</welcome-file-list>
- <!-- shiro security configuration -->
<listener>
- <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
+ <listener-class>org.apache.isis.core.webapp.IsisWebAppContextListener</listener-class>
</listener>
-
-
- <filter>
- <filter-name>ShiroFilter</filter-name>
- <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>ShiroFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-
-
- <!-- which configuration directory to read overloaded property files from -->
- <!--
- By default the framework will read configuration properties from the WEB-INF
- directory (where this web.xml file resides).
-
- If you want to read configuration files from some other external directory,
- and the location of that external directory is the same/standardized for all
- locations where you intend to deploy the WAR file, you can uncomment the
- 'isis.config.dir' context parameter, below, and set it to that standardized
- location, eg:
-
- <context-param>
- <param-name>isis.config.dir</param-name>
- <param-value>/usr/local/conf</param-value>
- </context-param>
-
- If however the location of the external directory changes from one deployment
- to another (eg system testing, UAT, production etc) then you should be
- able to override the context parameter through the servlet container's own
- (proprietary) configuration files.
-
- For example, if deploying to Tomcat, you can edit $CATALINA_BASE/conf/context.xml,
- and add:
-
- <Parameter name="isis.config.dir"
- value="/usr/local/conf/systest"
- override="false"/>
-
- For more detail see: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Context_Parameters
- -->
-
-
- <!--
- determines which additional configuration files to search for
- -->
- <context-param>
- <param-name>isis.viewers</param-name>
- <param-value>wicket,restfulobjects</param-value>
- </context-param>
-
-
-
- <!--
- for diagnostics
- -->
- <filter>
- <filter-name>IsisLogOnExceptionFilter</filter-name>
- <filter-class>org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>IsisLogOnExceptionFilter</filter-name>
- <url-pattern>/wicket/*</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>IsisLogOnExceptionFilter</filter-name>
- <url-pattern>/restful/*</url-pattern>
- </filter-mapping>
-
-
-
- <!-- cache static resources for 1 day -->
- <filter>
- <filter-name>ResourceCachingFilter</filter-name>
- <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
- <init-param>
- <param-name>CacheTime</param-name>
- <param-value>86400</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.css</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.png</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.jpg</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.jpeg</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.gif</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.svg</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.js</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.html</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.swf</url-pattern>
- </filter-mapping>
-
- <servlet>
- <servlet-name>Resource</servlet-name>
- <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.css</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.png</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.jpg</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.jpeg</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.gif</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.svg</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.js</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.html</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.swf</url-pattern>
- </servlet-mapping>
-
-
- <servlet>
- <servlet-name>WebjarsServlet</servlet-name>
- <servlet-class>org.webjars.servlet.WebjarsServlet</servlet-class>
- <init-param>
- <param-name>disableCache</param-name>
- <param-value>false</param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>WebjarsServlet</servlet-name>
- <url-pattern>/webjars/*</url-pattern>
- </servlet-mapping>
-
-
-
- <!--
- -
- - config specific to the wicket-viewer
- -
- -->
- <filter>
- <filter-name>WicketFilter</filter-name>
- <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
- <init-param>
- <param-name>applicationClassName</param-name>
- <param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketApplication</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>WicketFilter</filter-name>
- <url-pattern>/wicket/*</url-pattern>
- </filter-mapping>
-
-
- <context-param>
- <param-name>configuration</param-name>
- <!--
- <param-value>deployment</param-value>
- -->
- <param-value>development</param-value>
- </context-param>
-
-
- <!--
- -
- - config specific to the restfulobjects-viewer
- -
- -->
-
- <!--
- THE FOLLOWING CONFIGURATION IS NOT REQUIRED IF THE WICKET VIEWER IS IN USE.
- IF THE WICKET VIEWER CONFIGURATION IS REMOVED, THEN UNCOMMENT
-
- <listener>
- <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
- </listener>
-
- <context-param>
- <param-name>deploymentType</param-name>
- <param-value>SERVER_PROTOTYPE</param-value>
- </context-param>
-
- <context-param>
- <param-name>isis.viewers</param-name>
- <param-value>restfulobjects</param-value>
- </context-param>
- -->
-
- <!-- bootstrap the RestEasy framework -->
- <listener>
- <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
- </listener>
-
- <!-- used by RestEasy to determine the JAX-RS resources and other related configuration -->
- <context-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>org.apache.isis.viewer.restfulobjects.server.RestfulObjectsApplication</param-value>
- </context-param>
-
- <context-param>
- <param-name>resteasy.servlet.mapping.prefix</param-name>
- <param-value>/restful/</param-value>
- </context-param>
-
-
- <!-- authenticate user, set up an Isis session -->
- <filter>
- <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
- <filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
- <!-- authentication required for REST -->
- <init-param>
- <param-name>authenticationSessionStrategy</param-name>
- <param-value>org.apache.isis.viewer.restfulobjects.server.authentication.AuthenticationSessionStrategyBasicAuth</param-value>
- </init-param>
- <init-param>
- <!-- what to do if no session was found... -->
- <param-name>whenNoSession</param-name>
- <!-- ... 401 and a basic authentication challenge if request originates from web browser -->
- <param-value>auto</param-value>
- </init-param>
- <init-param>
- <param-name>passThru</param-name>
- <param-value>/restful/swagger</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <!-- this is mapped to the entire app; however the IsisSessionFilter will "notice" if the session filter has already been
- executed for the request pipeline, and if so will do nothing -->
- <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- </filter-mapping>
-
- <filter>
- <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
- <filter-class>org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- </filter-mapping>
-
-
- <servlet>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- <url-pattern>/restful/*</url-pattern>
- </servlet-mapping>
-
-
</web-app>
diff --cc example/application/simpleapp/application/src/main/java/domainapp/application/manifest/isis-non-changing.properties
index d164d09,3838348..1f57e85
--- a/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/isis-non-changing.properties
+++ b/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/isis-non-changing.properties
@@@ -17,13 -17,19 +17,19 @@@
+ #################################################################################
+ #
+ # core
+ #
+ #################################################################################
+
-
+# -- auto wired by plugins --
#isis.services.eventbus.implementation=guava
-isis.services.eventbus.implementation=axon
+#isis.services.eventbus.implementation=axon
- #################################################################################
+ ########################################
#
# MetaModel
#
@@@ -371,13 -559,119 +559,118 @@@ isis.viewer.wicket.credit.1.image=/imag
isis.viewer.wicket.credit.1.name=Apache Isis
isis.viewer.wicket.credit.1.url=http://isis.apache.org
- isis.viewer.wicket.themes.initial=Flatly
- isis.viewer.wicket.themes.showChooser=yes
- isis.viewer.wicket.themes.enabled=Cosmo,Flatly,Darkly,Sandstone,United
+ #
+ # The maximum length of titles to display in standalone or parented tables.
+ # Titles longer than this length will be truncated with trailing ellipses (...)
+ #
+ # For example, if set to 12, the title
+ # "Buy milk on 15-Feb-13" will be truncated to "Buy milk ..."
+ #
+ # If set to 0, then only the icon will be shown.
+ #
+ isis.viewer.wicket.maxTitleLengthInStandaloneTables=0
+ isis.viewer.wicket.maxTitleLengthInParentedTables=0
+
+
+ #
+ # in Firefox and more recent versions of Chrome 54+, cannot copy out of disabled fields; instead we use the
+ # readonly attribute (https://www.w3.org/TR/2014/REC-html5-20141028/forms.html#the-readonly-attribute)
+ # This behaviour is enabled by default but can be disabled using this flag
+ #
+ #isis.viewer.wicket.replaceDisabledTagWithReadonlyTag=true
+
+
+ #
+ # Whether to disable buttons after it has been clicked (for both form submit and no-arg actions), to prevent users
+ # causing an error if they do a double click.
+ # Also, whether to show an indicator alongside the button.
+ #
+ # This behaviour is enabled by default, but can be disabled using this flag.
+ #
+ #isis.viewer.wicket.preventDoubleClickForFormSubmit=true
+ #isis.viewer.wicket.preventDoubleClickForNoArgAction=true
+ #isis.viewer.wicket.useIndicatorForFormSubmit=true
+ #isis.viewer.wicket.useIndicatorForNoArgAction=true
+
+
+ #isis.viewer.wicket.datePicker.minDate=1900-01-01T00:00:00.000Z
+ #isis.viewer.wicket.datePicker.maxDate=2100-01-01T00:00:00.000Z
+
+ #isis.viewer.wicket.datePattern=dd-MM-yyyy
+ #isis.viewer.wicket.dateTimePattern=dd-MM-yyyy HH:mm
+
+ #isis.viewer.wicket.datePattern=dd/MM/yy
+ #isis.viewer.wicket.dateTimePattern=dd/MM/yy HH:mm
+
+
+ #
+ # whether to strip wicket tags from markup (default is true, as they may break some CSS rules)
+ #
+ #isis.viewer.wicket.stripWicketTags=false
+
+
+ #
+ # action prompt='dialog' style ('sidebar' or 'modal', default is 'sidebar')
+ #
+ #isis.viewer.wicket.dialogMode=modal
+
+
+ #
+ # whether to suppress the 'rememberMe' checkbox on the login page (default is false)
+ #
+ #isis.viewer.wicket.rememberMe.suppress=false
+
+
+ #
+ # Encryption key is used to encrypt the rememberMe user/password. It should be set to a unique and private value.
+ # If a hard-coded and publicly known value is used, then it would be possible for rememberMe user/password to be
+ # intercepted and decrypted, compromising access.
+ #
+ # If no value is set then (for safety) a random UUID will be used as the encryption key. The net effect of this
+ # default is that 'rememberMe' will work, but only until the webapp is restarted (after which the end-user will
+ # have to log in again).
+ #
+ #isis.viewer.wicket.rememberMe.encryptionKey=myEncryptionKey
+
#
- # Specify viewer defaults
- #
+ # if user attempts to access a protected URL before signing in, then as a convenience the viewer will continue
+ # through to that destination after successful login. If you consider this to be a security risk then this flag
+ # disables that behaviour (default is false).
+ #
+ #isis.viewer.wicket.clearOriginalDestination=true
+
+
+ #
+ # whether to show the Wicket debug bar and any other development utilities
+ # (default depends on whether running in prototype mode or not; this property overrides that)
+ #
+ #isis.viewer.wicket.developmentUtilities.enable=true
+ isis.viewer.wicket.developmentUtilities.enable=true
+
+
+
+ #
+ # whether to show bookmarks (defaults to true)
+ #
+ #isis.viewer.wicket.bookmarkedPages.showChooser=true
+
+
-
+ #
+ # the maximum number of pages to list in bookmark (default is 15)
+ #
+ #isis.viewer.wicket.bookmarkedPages.maxSize=15
+
+
+ #
+ # whether to show breadcrumbs (defaults to true)
+ #
+ #isis.viewer.wicket.breadcrumbs.showChooser=true
+
+
+
+
+
#isis.viewers.paged.standalone=30
#isis.viewers.paged.parented=10
diff --cc example/application/simpleapp/application/src/main/java/domainapp/application/manifest/menubars.layout.xml
index c9072ae,a2fe922..523fcb5
--- a/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/menubars.layout.xml
+++ b/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/menubars.layout.xml
@@@ -60,12 -60,12 +60,15 @@@
</mb3:serviceAction>
</mb3:section>
<mb3:section>
- <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModel">
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelXml">
+ <cpt:named>Download Meta Model (XML)</cpt:named>
+ </mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelCsv">
<cpt:named>Download Meta Model (CSV)</cpt:named>
</mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelXml">
+ <cpt:named>Download Meta Model (XML)</cpt:named>
+ </mb3:serviceAction>
</mb3:section>
<mb3:section>
<mb3:serviceAction objectType="isisApplib.SwaggerServiceMenu" id="openSwaggerUi">
diff --cc example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml
index e61cfeb,9dc6df6..378d84a
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml
@@@ -16,230 -16,237 +16,239 @@@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.incode</groupId>
- <artifactId>incode-build</artifactId>
- <version>7</version>
- </parent>
- <groupId>${groupId}</groupId>
- <artifactId>${artifactId}</artifactId>
- <version>${version}</version>
- <name>Apache Isis App - HelloWorld</name>
- <packaging>war</packaging>
- <properties>
- <revision>${version}</revision>
- <isis.version>2.0.0-M1</isis.version>
- <compiler-plugin.source>1.8</compiler-plugin.source>
- <compiler-plugin.target>1.8</compiler-plugin.target>
- <compiler-plugin.compilerArgument>-parameters</compiler-plugin.compilerArgument>
- <datanucleus-core.version>5.1.11</datanucleus-core.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <maven-war-plugin.warName>${project.artifactId}</maven-war-plugin.warName>
- </properties>
- <build>
- <resources>
- <resource>
- <directory>src/main/java</directory>
- <includes>
- <include>**</include>
- </includes>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <version>0.1-alpha-39</version>
- <extensions>true</extensions>
- <configuration>
- <mixins>
- <mixin>
- <groupId>com.danhaywood.mavenmixin</groupId>
- <artifactId>standard</artifactId>
- </mixin>
- <mixin>
- <groupId>com.danhaywood.mavenmixin</groupId>
- <artifactId>datanucleusenhance</artifactId>
- </mixin>
- <mixin>
- <groupId>com.danhaywood.mavenmixin</groupId>
- <artifactId>surefire</artifactId>
- </mixin>
- <mixin>
- <groupId>com.danhaywood.mavenmixin</groupId>
- <artifactId>jettywar</artifactId>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>flatten-maven-plugin</artifactId>
- <version>1.0.0</version>
- <configuration>
- <updatePomFile>true</updatePomFile>
- <pomElements>
- <dependencyManagement>resolve</dependencyManagement>
- <dependencies>resolve</dependencies>
- </pomElements>
- </configuration>
- <executions>
- <execution>
- <id>flatten</id>
- <phase>process-resources</phase>
- <goals>
- <goal>flatten</goal>
- </goals>
- </execution>
- <execution>
- <id>flatten.clean</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis</artifactId>
- <version>${isis.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-applib</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-plugins-codegen-bytebuddy</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-plugins-discovery-reflections</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-plugins-jdo-datanucleus-5</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-plugins-eventbus-axon</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-plugins-jaxrs-resteasy-3</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.mavendeps</groupId>
- <artifactId>isis-mavendeps-webapp</artifactId>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.mavendeps</groupId>
- <artifactId>isis-mavendeps-testing</artifactId>
- <scope>test</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>m2e</id>
- <activation>
- <property>
- <name>m2e.version</name>
- </property>
- </activation>
- <build>
- <directory>target-ide</directory>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>${compiler-plugin.source}</source>
- <target>${compiler-plugin.target}</target>
- <compilerArgument/>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>skinny-war</id>
- <activation>
- <property>
- <name>skinny-war</name>
- </property>
- </activation>
- <build>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.incode</groupId>
+ <artifactId>incode-build</artifactId>
- <version>2.5</version>
++ <version>7</version>
+ </parent>
+
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <version>${version}</version>
+
+ <name>Apache Isis App - HelloWorld</name>
+
+ <packaging>war</packaging>
+
+ <properties>
- <revision>1.17.0</revision>
++ <revision>2.0.0-M1</revision>
+ <isis.version>${revision}</isis.version>
+
+ <compiler-plugin.source>1.8</compiler-plugin.source>
+ <compiler-plugin.target>1.8</compiler-plugin.target>
+ <compiler-plugin.compilerArgument>-parameters</compiler-plugin.compilerArgument>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+ <maven-war-plugin.warName>${project.artifactId}</maven-war-plugin.warName>
+ </properties>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
<plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>${maven-war-plugin.version}</version>
- <configuration>
- <warName>${maven-war-plugin.warName}</warName>
- <packagingExcludes>%regex[WEB-INF/lib/(?!common-A|common-B).*.jar]</packagingExcludes>
- <archive>
- <manifest>
- <addClasspath>false</addClasspath>
- </manifest>
- <manifestEntries>
- <Build-Time>${maven.build.timestamp}</Build-Time>
- <Build-Host>${agent.name}</Build-Host>
- <Build-User>${user.name}</Build-User>
- <Build-Maven>Maven ${maven.version}</Build-Maven>
- <Build-Java>${java.version}</Build-Java>
- <Build-OS>${os.name}</Build-OS>
- <Build-Label>${project.version}</Build-Label>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>com.github.odavid.maven.plugins</groupId>
+ <artifactId>mixin-maven-plugin</artifactId>
+ <version>0.1-alpha-39</version>
+ <extensions>true</extensions>
+ <configuration>
+ <mixins>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>standard</artifactId>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>datanucleusenhance</artifactId>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>surefire</artifactId>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>jettywar</artifactId>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>flatten-maven-plugin</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <updatePomFile>true</updatePomFile>
+ <pomElements>
+ <dependencyManagement>resolve</dependencyManagement>
+ <dependencies>resolve</dependencies>
+ </pomElements>
+ </configuration>
+ <executions>
+ <execution>
+ <id>flatten</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>flatten</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>flatten.clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
- </build>
- </profile>
- <profile>
- <id>deploy-to-tomcat</id>
- <activation>
- <property>
- <name>deploy-to-tomcat</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.tomcat.maven</groupId>
- <artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <url>http://localhost:8080/manager/text</url>
- <server>tomcat-server</server>
- <path>/ROOT</path>
- <warFile>${project.build.directory}/${maven-war-plugin.warName}.war</warFile>
- <update>true</update>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis</artifactId>
+ <version>${isis.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+
+ <!-- ISIS API -->
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-applib</artifactId>
+ </dependency>
+
+ <!-- OTHER DEPENDENCIES -->
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.mavendeps</groupId>
+ <artifactId>isis-mavendeps-webapp</artifactId>
+ <type>pom</type>
+ </dependency>
+
+
+ <!-- TEST DEPENDENCIES -->
+ <dependency>
+ <groupId>org.apache.isis.mavendeps</groupId>
+ <artifactId>isis-mavendeps-testing</artifactId>
+ <scope>test</scope>
+ <type>pom</type>
+ </dependency>
+
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>m2e</id>
+ <activation>
+ <property>
+ <name>m2e.version</name>
+ </property>
+ </activation>
+ <build>
+ <directory>target-ide</directory>
+ <plugins>
+ <!-- eclipse doesn't seem to support maven mixins config, so repeat here -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${compiler-plugin.source}</source>
+ <target>${compiler-plugin.target}</target>
+ <compilerArgument />
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>skinny-war</id>
+ <activation>
+ <property>
+ <name>skinny-war</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>${maven-war-plugin.version}</version>
+ <configuration>
+ <warName>${maven-war-plugin.warName}</warName>
+ <packagingExcludes>%regex[WEB-INF/lib/(?!helloworld).*.jar]</packagingExcludes>
+ <archive>
+ <manifest>
+ <addClasspath>false</addClasspath>
+ </manifest>
+ <manifestEntries>
+ <Build-Time>${maven.build.timestamp}</Build-Time>
+ <Build-Host>${agent.name}</Build-Host>
+ <Build-User>${user.name}</Build-User>
+ <Build-Maven>Maven ${maven.version}</Build-Maven>
+ <Build-Java>${java.version}</Build-Java>
+ <Build-OS>${os.name}</Build-OS>
+ <Build-Label>${project.version}</Build-Label>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ using:
+ mvn -s .m2/settings.xml -D deploy-to-tomcat tomcat7:deploy-only
+ -->
+ <profile>
+ <id>deploy-to-tomcat</id>
+ <activation>
+ <property>
+ <name>deploy-to-tomcat</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <url>http://localhost:8080/manager/text</url>
+ <server>tomcat-server</server>
+ <path>/ROOT</path>
+ <warFile>${project.build.directory}/${maven-war-plugin.warName}.war</warFile>
+ <update>true</update>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
++>>>>>>> release-1.17.0-RC3
</project>
diff --cc example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
index 6fbcefc,90b0fdf..5b49fed
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
@@@ -53,8 -53,11 +53,11 @@@ public class HelloWorldObjects
@Action(semantics = SemanticsOf.SAFE)
@MemberOrder(sequence = "2")
- public List<HelloWorldObject> findByName(final String name) {
+ public List<HelloWorldObject> findByName(
+ @Parameter(maxLength = 40)
+ @ParameterLayout(named = "Name")
+ final String name) {
- TypesafeQuery<HelloWorldObject> q = isisJdoSupport.newTypesafeQuery(HelloWorldObject.class);
+ JDOQLTypedQuery<HelloWorldObject> q = isisJdoSupport.newTypesafeQuery(HelloWorldObject.class);
final QHelloWorldObject cand = QHelloWorldObject.candidate();
q = q.filter(
cand.name.indexOf(q.stringParameter("name")).ne(-1)
diff --cc example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/isis-non-changing.properties
index 13aabf3,c8165dd..33faf26
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/isis-non-changing.properties
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/isis-non-changing.properties
@@@ -20,13 -20,19 +20,19 @@@ ${symbol_pound} under the License
+ ${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_po [...]
+ ${symbol_pound}
+ ${symbol_pound} core
+ ${symbol_pound}
+ ${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_po [...]
+
-
+${symbol_pound} -- auto wired by plugins --
${symbol_pound}isis.services.eventbus.implementation=guava
-isis.services.eventbus.implementation=axon
+${symbol_pound}isis.services.eventbus.implementation=axon
- ${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_po [...]
+ ${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_po [...]
${symbol_pound}
${symbol_pound} MetaModel
${symbol_pound}
diff --cc scripts/recreate-archetype.sh
index 9c382b2,10eda3a..ee5e1c0
--- a/scripts/recreate-archetype.sh
+++ b/scripts/recreate-archetype.sh
@@@ -63,10 -57,11 +57,11 @@@ for a in .project .classpath .settings
/bin/find . -name "*.log" -exec rm {} \;
/bin/find . -name "pom.xml.*" -exec rm {} \;
-echo "mvn archetype:create-from-project ..."
-mvn org.apache.maven.plugins:maven-archetype-plugin:3.0.1:create-from-project
+echo "mvn -Drevision=$ISISREL archetype:create-from-project ..."
+mvn -Drevision=$ISISREL org.apache.maven.plugins:maven-archetype-plugin:3.0.1:create-from-project
- echo "copy over Dockerfile since seems to be excluded for some reason ... "
+ # https://issues.apache.org/jira/browse/ARCHETYPE-548
+ echo "copy over Dockerfile since seems to be excluded (bug: ARCHETYPE-548) ... "
mkdir -p target/generated-sources/archetype/src/main/resources/archetype-resources/webapp/src/main/resources/docker
cp webapp/src/main/resources/docker/Dockerfile target/generated-sources/archetype/src/main/resources/archetype-resources/webapp/src/main/resources/docker/.
diff --cc scripts/updateGeneratedArchetypeSources.groovy
index 0be6252,044137a..326ba45
--- a/scripts/updateGeneratedArchetypeSources.groovy
+++ b/scripts/updateGeneratedArchetypeSources.groovy
@@@ -87,135 -88,40 +90,144 @@@ def pomFile=new File(BASE+"pom.xml"
println "updating ${pomFile.path}"
- def pomXml = new XmlSlurper(false,false).parseText(pomFile.text)
-
+ // read file, ignoring XML pragma
+ def pomFileText = stripXmlPragma(pomFile)
+
+ def pomXml = new XmlSlurper(false,false).parseText(pomFileText)
+ pomXml.appendNode {
+ parent {
+ groupId("org.apache.isis.core")
+ artifactId("isis")
+ version(isis_version)
+ relativePath("../../../core/pom.xml")
+ }
+ }
pomXml.groupId='org.apache.isis.archetype'
-def fragmentToAdd = new XmlSlurper( false, true ).parseText( '''<properties>
+pomXml.appendNode(new XmlSlurper( false, false ).parseText( '''
+ <parent>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>18</version>
+ <relativePath />
+ </parent>
+''' )
+)
+
+pomXml.appendNode(new XmlSlurper( false, false ).parseText( '''
+<properties>
<archetype.test.skip>true</archetype.test.skip>
-</properties>''' )
-pomXml.appendNode(fragmentToAdd)
+</properties>
+''' )
+)
+
+pomXml.appendNode(new XmlSlurper( false, false ).parseText( '''
+ <profiles>
+ <profile>
+ <!--
+ as per https://stackoverflow.com/a/28860520/56880
+ allows -Dgpg.passphrase= to be used rather than gpg.useagent
+ inherited from parent.
+ Note that this requires gpg v2.1+
+ -->
+ <id>gpg</id>
+ <activation>
+ <property>
+ <name>gpg.passphrase</name>
+ </property>
+ </activation>
+ <properties>
+ <gpg.useagent>false</gpg.useagent>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-release-artifacts</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ <configuration>
+ <gpgArguments>
+ <arg>--pinentry-mode</arg>
+ <arg>loopback</arg>
+ </gpgArguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+''' )
+)
+
+pomFile.text = withLicense(pomXml)
+ pomFile.text = serializeWithLicense(pomXml)
+/////////////////////////////////////////////////////
+//
+// update archetype's resource's pom.xml's
+// <revision> and <isis.version>
+//
+/////////////////////////////////////////////////////
+
+def resourcePomXmlFile=new File(BASE+"src/main/resources/archetype-resources/pom.xml")
+
+println "updating ${resourcePomXmlFile.path}"
+
+def resourcePomXml = new XmlSlurper(false,false).parseText(resourcePomXmlFile.text)
+
+
+// the properties.revision, meanwhile, is set to the version that is prompted for when the
+// app is first generated from the archetype
+resourcePomXml.properties.revision='${version}'
+resourcePomXml.properties['isis.version']=isis_version
+
+resourcePomXml.dependencyManagement.dependencies.dependency.each { dependency ->
+ if(dependency.groupId=='${groupId}') {
+ dependency.version='${project.version}'
+ }
+}
+resourcePomXmlFile.text = withLicense(resourcePomXml)
/////////////////////////////////////////////////////
//
- // update the .launch files
-// update archetype-metadata.xml
++// update the pom files parent version
//
/////////////////////////////////////////////////////
+new File(ROOT+"BASE+\"src/main/resources/archetype-resources/").eachDirRecurse() { dir ->
+
+ dir.eachFileMatch(~/pom[.].xml/) { eachPomXmlFile ->
+
+ println "updating ${eachPomXmlFile.path}"
+
+ def eachPomXml = new XmlSlurper(false,false).parseText(eachPomXmlFile.text)
+ if(eachPomXml.parent.groupId=='${groupId}') {
+ eachPomXml.parent.version='${revision}'
+ }
+
+ eachPomXmlFile.text = withLicense(eachPomXml)
+ }
+}
+
-
+/////////////////////////////////////////////////////
+//
+// update archetype-metadata.xml
+//
+/////////////////////////////////////////////////////
-
def metaDataFile=new File(ROOT+"META-INF/maven/archetype-metadata.xml")
println "updating ${metaDataFile.path}"
@@@ -228,9 -137,50 +243,24 @@@ metaDataXml.modules.module.fileSets.fil
}
}
+ // https://issues.apache.org/jira/browse/ARCHETYPE-548
+ metaDataXml.modules.module.each { module ->
+ if(module.@dir=='webapp') {
+ module.fileSets.fileSet.each { fileSet ->
+ if(fileSet.directory=='src/main/resources') {
+ fileSet.includes.include.each { include ->
+ if(include == '**/*.') {
+ include.replaceBody "**/*"
+ }
+ }
+ }
+ }
+ }
+ }
+
+ metaDataFile.text = serializeWithLicense(metaDataXml)
- metaDataFile.text = withLicense(metaDataXml)
-/////////////////////////////////////////////////////
-//
-// update the .launch files
-//
-/////////////////////////////////////////////////////
-
-new File(ROOT+"archetype-resources/").eachDirRecurse() { dir ->
-
- dir.eachFileMatch(~/.*[.]launch/) { launchFile ->
-
- println "updating ${launchFile.path}"
-
- def launchXml = new XmlSlurper().parseText(launchFile.text)
- def projectAttr = launchXml.stringAttribute.find { it.@key=="org.eclipse.jdt.launching.PROJECT_ATTR" }
- String oldValue=projectAttr.@value
- def newValue = oldValue.replaceAll("${application_name}[^-]*-","\\\${rootArtifactId}-")
- projectAttr.@value=newValue
-
- launchFile.text = """#set( \$symbol_pound = '#' )
-#set( \$symbol_dollar = '\$' )
-#set( \$symbol_escape = '\\' )
-"""
- launchFile.append(XmlUtil.serialize(launchXml))
- }
-}
-
///////////////////////////////////////////////////
//