You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by mg...@apache.org on 2015/11/12 21:02:27 UTC

[45/50] [abbrv] isis git commit: ISIS-1243: updating how-to and powered-by

ISIS-1243: updating how-to and powered-by


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/8da4a6f0
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/8da4a6f0
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/8da4a6f0

Branch: refs/heads/ISIS-1224-select2-v4
Commit: 8da4a6f08a4ec403768a30bf8b57f0a4e4f61617
Parents: ce80e96
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Nov 11 11:51:37 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Nov 11 11:51:37 2015 +0000

----------------------------------------------------------------------
 .../asciidoc/_powered-by_gesconsultor-grc.adoc  |  2 +-
 .../_cg_committers_post-release-successful.adoc | 34 +++++++++--
 .../src/main/asciidoc/guides/_ug_how-tos.adoc   |  3 +-
 ...placing-default-service-implementations.adoc | 64 ++++++++++++++++++++
 4 files changed, 96 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/8da4a6f0/adocs/documentation/src/main/asciidoc/_powered-by_gesconsultor-grc.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/_powered-by_gesconsultor-grc.adoc b/adocs/documentation/src/main/asciidoc/_powered-by_gesconsultor-grc.adoc
index e32247b..920a5be 100644
--- a/adocs/documentation/src/main/asciidoc/_powered-by_gesconsultor-grc.adoc
+++ b/adocs/documentation/src/main/asciidoc/_powered-by_gesconsultor-grc.adoc
@@ -90,7 +90,7 @@ functionality available in Apache Isis, along with many of the (non-ASF) link:ht
 as http://github.com/isisaddons/isis-module-audit[audit], http://github.com/isisaddons/isis-module-security[security]
 and the http://github.com/isisaddons/isis-module-excel[excel] modules).
 
-The GRC platform currently has more than 4600 automated tests, about 2000 being
+The GRC platform currently has more than 5600 automated tests, about 2000 being
 xref:ug.adoc#_ug_testing_bdd-spec-support[BDD tests] and 3600 xref:ug.adoc#_ug_testing_integ-test-support[integration
 tests], all leveraging Apache Isis' extensive testing capabilities.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8da4a6f0/adocs/documentation/src/main/asciidoc/guides/_cg_committers_post-release-successful.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cg_committers_post-release-successful.adoc b/adocs/documentation/src/main/asciidoc/guides/_cg_committers_post-release-successful.adoc
index cb1fc37..c7fd687 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cg_committers_post-release-successful.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cg_committers_post-release-successful.adoc
@@ -392,10 +392,34 @@ git push
 
 Once the Apache Isis release is available, all of the (non-ASF) link:http://isisaddons.org[Isis Addons] should also be released.
 
-For each add-on:
+Using this https://gist.github.com/danhaywood/3129b688be3628322c01[gist] to invoke operations across all (or selected) addons:
+
+* update its dependency on Apache Isis to reference the newly released version: +
++
+[source,bash]
+----
+sh all.sh -r "1.11.0" bumpisis
+----
+
+* confirm compiles: +
++
+[source,bash]
+----
+sh all.sh mcio
+----
+
+* release to mvn central: +
++
+[source,bash]
+----
+sh all.sh -r "1.11.0" -s "1.12.0-SNAPSHOT" -k "dan@haywood-associates.co.uk" -p "this is not my password" release
+----
+
+* update its dependency on Apache Isis to reference the next SNAPSHOT version: +
++
+[source,bash]
+----
+sh all.sh -r "1.12.0-SNAPSHOT" bumpisis
+----
 
-* update its dependency on Apache Isis to reference the newly released version
-** all the addons define their dependency in the `<isis.version>` property, so search for this string across all `pom.xml` files
-* use the `release.sh` script (that each provides) to release.
 
-You can use this https://gist.github.com/danhaywood/3129b688be3628322c01[gist] to invoke `release.sh` across all (or selected) addons.

http://git-wip-us.apache.org/repos/asf/isis/blob/8da4a6f0/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
index e067c03..823e24b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos.adoc
@@ -5,7 +5,7 @@
 :_imagesdir: images/
 
 
-This chapter provides instructions on how to go about actually developing Apache Isis domain applications.
+This chapter provides a grab bag of "how-to"s and tips to help you go about actually developing Apache Isis domain applications.
 
 include::_ug_how-tos_class-structure.adoc[leveloffset=+1]
 include::_ug_how-tos_ui-hints.adoc[leveloffset=+1]
@@ -17,4 +17,5 @@ include::_ug_how-tos_business-rules.adoc[leveloffset=+1]
 include::_ug_how-tos_derived-members.adoc[leveloffset=+1]
 include::_ug_how-tos_drop-downs-and-defaults.adoc[leveloffset=+1]
 include::_ug_how-tos_persisted-title.adoc[leveloffset=+1]
+include::_ug_how-tos_replacing-default-service-implementations.adoc[leveloffset=+1]
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8da4a6f0/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc
new file mode 100644
index 0000000..1acde98
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_how-tos_replacing-default-service-implementations.adoc
@@ -0,0 +1,64 @@
+[[_ug_how-tos_replacing-default-service-implementations]]
+= Replacing Service Implns
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+The framework provides default implementations for many of the xref:rg.adoc#_rg_services-api[API Services].  This is convenient, but sometimes you will want to replace the default implementation with your own service implementation.
+
+The trick is to use the xref:rg.adoc#_rg_annotations_manpage-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] attribute, specifying a low number (typically `"1"`).
+
+For example, suppose you wanted to provide your own implementation of xref:rg.adoc#_rg_services-api_manpage-LocaleProvider[`LocaleProvider`].  Here's how:
+
+[source,java]
+----
+@DomainService(
+        nature = NatureOfService.DOMAIN
+)
+@DomainServiceLayout(
+        menuOrder = "1"                             // <1>
+)
+public class MyLocaleProvider implements LocaleProvider {
+    @Override
+    public Locale getLocale() {
+        return ...
+    }
+}
+----
+<1> takes precedence over the default implementation.
+
+
+It's also quite common to want to decorate the existing implementation (ie have your own implementation delegate to the default); this is also possible and quite easy if using `1.10.0` or later:
+
+[source,java]
+----
+@DomainService(
+        nature = NatureOfService.DOMAIN
+)
+@DomainServiceLayout(
+        menuOrder = "1"                                                                             // <1>
+)
+public class MyLocaleProvider implements LocaleProvider {
+    @Override
+    public Locale getLocale() {
+        return getDelegateLocaleProvider().getLocale();                                             // <2>
+    }
+    Optional<LocaleProvider> delegateLocaleProvider;                                                // <3>
+    private LocaleProvider getDelegateLocaleProvider() {
+        if(delegateLocaleProvider == null) {
+            delegateLocaleProvider = Iterables.tryFind(localeProviders, input -> input != this);    // <4>
+        }
+        return delegateLocaleProvider.orNull();
+    }
+    @Inject
+    List<LocaleProvider> localeProviders;                                                           // <5>
+}
+----
+<1> takes precedence over the default implementation when injected elsewhere.
+<2> this implementation merely delegates to the default implementation
+<3> lazily populated
+<4> delegate to the first implementation that isn't _this_ implementation (else infinite loop!)
+<5> Injects all implementations, including this implemenation
+