You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/01/09 22:40:21 UTC

[01/22] isis git commit: ISIS-1555: DomainChangeJdoAbstract no longer fails if the target bookmark is now an unknown type

Repository: isis
Updated Branches:
  refs/heads/master 140293a50 -> 8353a6d2d


ISIS-1555: DomainChangeJdoAbstract no longer fails if the target bookmark is now an unknown type


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

Branch: refs/heads/master
Commit: ae74bc952ae918027a8af72929198bac6e852be1
Parents: 43a7fc2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 11:38:13 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 11:40:14 2016 +0000

----------------------------------------------------------------------
 .../applib/service/DomainChangeJdoAbstract.java   |  5 +++--
 .../metamodel/MetaModelServiceDefault.java        | 18 +++++++++++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ae74bc95/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java b/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java
index 0307bfa..22c8cd9 100644
--- a/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java
+++ b/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/DomainChangeJdoAbstract.java
@@ -39,6 +39,7 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.bookmark.BookmarkService2;
 import org.apache.isis.applib.services.message.MessageService;
 import org.apache.isis.applib.services.metamodel.MetaModelService2;
+import org.apache.isis.applib.services.metamodel.MetaModelService3;
 import org.apache.isis.applib.services.publish.PublisherService;
 import org.apache.isis.applib.services.publish.PublishingService;
 import org.apache.isis.applib.util.ObjectContracts;
@@ -268,7 +269,7 @@ public abstract class DomainChangeJdoAbstract {
         if (targetObject == null) {
             return null;
         }
-        final MetaModelService2.Sort sortOfObject = metaModelService.sortOf(getTarget());
+        final MetaModelService2.Sort sortOfObject = metaModelService.sortOf(getTarget(), MetaModelService3.Mode.RELAXED);
         return !(sortOfObject.isViewModel() || sortOfObject.isJdoEntity())
                 ? "Can only open view models or entities"
                 : null;
@@ -381,6 +382,6 @@ public abstract class DomainChangeJdoAbstract {
     protected MessageService messageService;
 
     @javax.inject.Inject
-    protected MetaModelService2 metaModelService;
+    protected MetaModelService3 metaModelService;
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ae74bc95/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
index e20b751..9f45b8f 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
@@ -205,7 +205,23 @@ public class MetaModelServiceDefault implements MetaModelService3 {
         if(bookmark == null) {
             return null;
         }
-        final Class<?> domainType = this.fromObjectType(bookmark.getObjectType());
+
+        final Class<?> domainType;
+        switch (mode) {
+            case RELAXED:
+                try {
+                    domainType = this.fromObjectType(bookmark.getObjectType());
+                } catch (Exception e) {
+                    return Sort.UNKNOWN;
+                }
+                break;
+
+            case STRICT:
+                // fall through to...
+            default:
+                domainType = this.fromObjectType(bookmark.getObjectType());
+                break;
+        }
         return sortOf(domainType, mode);
     }
 


[18/22] isis git commit: Fixes using datanucleus.ConnectionPasswordDecrypter in CreateSchemaObjectFromClassMetadata

Posted by da...@apache.org.
Fixes using datanucleus.ConnectionPasswordDecrypter in CreateSchemaObjectFromClassMetadata


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

Branch: refs/heads/master
Commit: b89ae6b2a2f069b8dd689cb14379ff04ffa167c8
Parents: 140293a
Author: Martin Hesse <mw...@gmail.com>
Authored: Mon Jan 9 20:52:03 2017 +0700
Committer: Martin Hesse <mw...@gmail.com>
Committed: Mon Jan 9 20:52:03 2017 +0700

----------------------------------------------------------------------
 .../CreateSchemaObjectFromClassMetadata.java    | 38 ++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/b89ae6b2/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
index b5fe0ea..990e52d 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
@@ -27,8 +27,11 @@ import java.util.Map;
 
 import com.google.common.base.Strings;
 
+import org.datanucleus.ClassLoaderResolver;
+import org.datanucleus.enhancer.EnhancementNucleusContextImpl;
 import org.datanucleus.metadata.AbstractClassMetaData;
 import org.datanucleus.metadata.MetaDataListener;
+import org.datanucleus.store.encryption.ConnectionEncryptionProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -63,7 +66,7 @@ public class CreateSchemaObjectFromClassMetadata implements MetaDataListener, Da
         final String driverName = properties.get("javax.jdo.option.ConnectionDriverName");
         final String url = properties.get("javax.jdo.option.ConnectionURL");
         final String userName = properties.get("javax.jdo.option.ConnectionUserName");
-        final String password = properties.get("javax.jdo.option.ConnectionPassword");
+        final String password = getConnectionPassword();
 
         try {
 
@@ -158,7 +161,7 @@ public class CreateSchemaObjectFromClassMetadata implements MetaDataListener, Da
     }
     //endregion
 
-    //region > helpers: closeSafely
+    //region > helpers: closeSafely, getConnectionPassword
     protected void closeSafely(final AutoCloseable connection) {
         if(connection != null) {
             try {
@@ -168,6 +171,37 @@ public class CreateSchemaObjectFromClassMetadata implements MetaDataListener, Da
             }
         }
     }
+        
+    // copied and adapted from org.datanucleus.store.AbstractStoreManager.getConnectionPassword()    
+    /**
+     * Convenience accessor for the password to use for the connection.
+     * Will perform decryption if the persistence property "datanucleus.ConnectionPasswordDecrypter" has
+     * also been specified.
+     * @return Password
+     */
+    private String getConnectionPassword() {
+    	String password = properties.get("javax.jdo.option.ConnectionPassword");
+        if (password != null)
+        {
+            String decrypterName = properties.get("datanucleus.ConnectionPasswordDecrypter");
+            if (decrypterName != null)
+            {
+                // Decrypt the password using the provided class
+                ClassLoaderResolver clr = new EnhancementNucleusContextImpl("JDO", properties).getClassLoaderResolver(null);
+                try
+                {
+                    Class decrypterCls = clr.classForName(decrypterName);
+                    ConnectionEncryptionProvider decrypter = (ConnectionEncryptionProvider) decrypterCls.newInstance();
+                    password = decrypter.decrypt(password);
+                }
+                catch (Exception e)
+                {
+                    LOG.warn("Error invoking decrypter class " + decrypterName, e);
+                }
+            }
+        }
+        return password;
+	}    
     //endregion
 
     //region > injected dependencies


[06/22] isis git commit: ISIS-1557: updates _rgcfg_configuring_core.adoc, each sentence to its own line.

Posted by da...@apache.org.
ISIS-1557: updates _rgcfg_configuring_core.adoc, each sentence to its own line.


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

Branch: refs/heads/master
Commit: ac2907dfe80a3a118bc096c35dece291d25dc6ce
Parents: 6b1dd2f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:19:48 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:19:48 2016 +0000

----------------------------------------------------------------------
 .../guides/_rgcfg_configuring-core.adoc         | 54 +++++++++++---------
 1 file changed, 29 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ac2907df/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
index bdc1a3d..e4f894e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
@@ -299,7 +299,8 @@ Since this almost certainly constitutes a bug in application code, by default th
 (`false`)
 |whether recognized exceptions should also be logged. +
 
-Generally a recognized exception is one that is expected (for example a uniqueness constraint violated in the database) and which does not represent an error condition.  This property logs the exception anyway, useful for debugging.
+Generally a recognized exception is one that is expected (for example a uniqueness constraint violated in the database) and which does not represent an error condition.
+This property logs the exception anyway, useful for debugging.
 
 
 | `isis.services.` +
@@ -309,7 +310,8 @@ Generally a recognized exception is one that is expected (for example a uniquene
 (`false`)
 |whether to disable the default recognizers registered by `ExceptionRecognizerCompositeForJdoObjectStore`. +
 
-This implementation provides a default set of recognizers to convert RDBMS constraints into user-friendly messages.  In the (probably remote) chance that this functionality isn't required, they can be disabled through this flag.
+This implementation provides a default set of recognizers to convert RDBMS constraints into user-friendly messages.
+In the (probably remote) chance that this functionality isn't required, they can be disabled through this flag.
 
 
 |`isis.services.` +
@@ -318,7 +320,9 @@ This implementation provides a default set of recognizers to convert RDBMS const
 (`false`)
 |(Whether the framework should support `inject...()` as a prefix for injecting domain services into other domain objects.
 +
-By default this is disabled.  The default prior to `1.13.0` was enabled.  If the setting is left as disabled then this may reduce application start-up times.
+By default this is disabled.
+The default prior to `1.13.0` was enabled.
+If the setting is left as disabled then this may reduce application start-up times.
 
 
 |`isis.services.` +
@@ -327,7 +331,8 @@ By default this is disabled.  The default prior to `1.13.0` was enabled.  If the
 (`true`)
 |Whether the framework should support `set...()` as a prefix for injecting domain services into other domain objects.
 +
-By default this is enabled (no change in `1.13.0`).  If the setting is changed to disabled then this may reduce application start-up times.
+By default this is enabled (no change in `1.13.0`).
+If the setting is changed to disabled then this may reduce application start-up times.
 
 
 
@@ -426,7 +431,8 @@ See xref:rgcfg.adoc#_rgcfg_configuring-core_filterVisibility[section below] for
 |`FQCN`
 |This property is now ignored.  +
 +
-To customize the programming model, use `facets.exclude` and `facets.include`. See xref:ugbtb.adoc#_ugbtb_programming-model_finetuning[finetuning the programming model] for more details.
+To customize the programming model, use `facets.exclude` and `facets.include`.
+See xref:ugbtb.adoc#_ugbtb_programming-model_finetuning[finetuning the programming model] for more details.
 
 
 
@@ -446,13 +452,12 @@ See xref:ugbtb.adoc#_ugbtb_programming-model_finetuning[finetuning the programmi
 (`false`)
 |Whether deprecated facets should be ignored or honoured.  +
 +
-By default all deprecated facets are honoured; they remain part of the metamodel.  If instead this property is set to
-`true` then the facets are simply not loaded into the metamodel and their semantics will be excluded.  +
+By default all deprecated facets are honoured; they remain part of the metamodel.
+If instead this property is set to `true` then the facets are simply not loaded into the metamodel and their semantics will be excluded.  +
 +
-In most cases this should reduce the start-up times for the application.  However, be aware that this could also
-substantially alter the semantics of your application.  To be safe, we recommend that you first run your application
-using `isis.reflector.validator.allowDeprecated` set to `false`; if any deprecated annotations etc. are in use, then
-the app will fail-fast and refuse to start.
+In most cases this should reduce the start-up times for the application.
+However, be aware that this could also substantially alter the semantics of your application.
+To be safe, we recommend that you first run your application using `isis.reflector.validator.allowDeprecated` set to `false`; if any deprecated annotations etc. are in use, then the app will fail-fast and refuse to start.
 
 
 |`isis.reflector.facets.` +
@@ -481,7 +486,8 @@ See xref:ugbtb.adoc#_ugbtb_programming-model_custom-validator[Custom Validator]
 `allowDeprecated`
 |`true`,`false` +
 (`true`)
-| Whether deprecated annotations or naming conventions are tolerated or not.  If not, then a metamodel validation error will be triggered, meaning the app won't boot (fail-fast). +
+| Whether deprecated annotations or naming conventions are tolerated or not.
+If not, then a metamodel validation error will be triggered, meaning the app won't boot (fail-fast). +
 +
 See also `isis.reflector.facets.ignoreDeprecated`.
 
@@ -515,7 +521,8 @@ The framework provides the `isis.reflector.facet.filterVisibility` configuration
 
 * Action invocations: +
 
-If an action returns a collection that includes the object, then the object will be excluded from the list when rendered. If it returns a single object and the user does not have access to that object, then the action will seemingly return `null`
+If an action returns a collection that includes the object, then the object will be excluded from the list when rendered.
+If it returns a single object and the user does not have access to that object, then the action will seemingly return `null`
 
 * Collections: +
 
@@ -529,7 +536,8 @@ If an parent object has a (scalar) reference some other object to which the user
 
 If an object is returned in a list of choices or within an auto-complete list, and the user does not have access, then it is excluded from the rendered list.
 
-The original motivation for this feature was to transparently support such features as multi-tenancy (as per the (non-ASF) http://github.com/isisaddons/isis-module-security[Isis addons' security] module).  That is, if an entity is logically "owned" by a user, then the multi-tenancy support can be arranged to prevent some other user from viewing that object.
+The original motivation for this feature was to transparently support such features as multi-tenancy (as per the (non-ASF) http://github.com/isisaddons/isis-module-security[Isis addons' security] module).
+That is, if an entity is logically "owned" by a user, then the multi-tenancy support can be arranged to prevent some other user from viewing that object.
 
 By default this configuration property is enabled.  To disable the visibility filtering, set the appropriate configuration property to `false`:
 
@@ -538,18 +546,14 @@ By default this configuration property is enabled.  To disable the visibility fi
 isis.reflector.facet.filterVisibility=false
 ----
 
-Filtering is supported by the xref:ugvw.adoc#[Wicket viewer] and the xref:ugvro.adoc#[Restful Objects viewer], and also
-by the xref:rgsvc.adoc#_rgsvc_api_WrapperFactory[`WrapperFactory`] domain service (provided the wrapper's execution
-mode is __not__ "skip rules").
+Filtering is supported by the xref:ugvw.adoc#[Wicket viewer] and the xref:ugvro.adoc#[Restful Objects viewer], and also by the xref:rgsvc.adoc#_rgsvc_api_WrapperFactory[`WrapperFactory`] domain service (provided the wrapper's execution mode is __not__ "skip rules").
 
 [NOTE]
 ====
-In order for the framework to perform this filtering of collections, be aware that the framework takes a _copy_ of the
-original collection, filters on the collection, and returns that filtered collection rather than the original.
+In order for the framework to perform this filtering of collections, be aware that the framework takes a _copy_ of the original collection, filters on the collection, and returns that filtered collection rather than the original.
 
-There are no major side-effects from this algorithm, other than the fact that the referenced objects will (most likely)
-need to be resolved in order to determine if they are visible.  This could conceivably have a performance impact in
-some cases.
+There are no major side-effects from this algorithm, other than the fact that the referenced objects will (most likely) need to be resolved in order to determine if they are visible.
+This could conceivably have a performance impact in some cases.
 ====
 
 
@@ -572,8 +576,7 @@ We recommend enabling this feature; it will help drive out the underlying busine
 [[_rgcfg_configuring-core_isis-viewers-propertyLayout-labelPosition]]
 === `propertyLayout.labelPosition`
 
-If you want a consistent look-n-feel throughout the app, eg all property labels to the top, then it'd be rather
-frustrating to have to annotate every property.
+If you want a consistent look-n-feel throughout the app, eg all property labels to the top, then it'd be rather frustrating to have to annotate every property.
 
 Instead, a default can be specified in `isis.properties`:
 
@@ -589,4 +592,5 @@ or
 isis.viewers.propertyLayout.labelPosition=LEFT
 ----
 
-If these are not present then Apache Isis will render according to internal defaults. At the time of writing, this means labels are to the left for all datatypes except multiline strings.
+If these are not present then Apache Isis will render according to internal defaults.
+At the time of writing, this means labels are to the left for all datatypes except multiline strings.


[07/22] isis git commit: ISIS-1557: reorders configuration properties alphabetically.

Posted by da...@apache.org.
ISIS-1557: reorders configuration properties alphabetically.


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

Branch: refs/heads/master
Commit: 0e4f1ffa66547642fe89b82e2eb959544d3d8ea5
Parents: ac2907d
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:28:15 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:28:15 2016 +0000

----------------------------------------------------------------------
 .../guides/_rgcfg_configuring-core.adoc         | 33 +++++++++++---------
 1 file changed, 18 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0e4f1ffa/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
index e4f894e..213f000 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
@@ -241,21 +241,6 @@ If no configuration property is available, then the defaults is determined by th
 
 
 | `isis.service.` +
-`email.tls.enabled`
-|`true`,`false` +
-(`true`)
-|Whether to enable TLS for the email SMTP connection (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
-
-NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
-
-| `isis.service.` +
-`email.sender.hostname` +
-| host (`_smtp.gmail.com_`)
-|The hostname of the external SMTP provider (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
-
-NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
-
-| `isis.service.` +
 `email.port` +
 | port number (`_587_`)
 |The port number for the SMTP service on the the external SMTP host (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
@@ -270,6 +255,15 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
 
+
+| `isis.service.` +
+`email.sender.hostname` +
+| host (`_smtp.gmail.com_`)
+|The hostname of the external SMTP provider (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
 | `isis.service.` +
 `email.sender.password` +
 | email password
@@ -278,6 +272,15 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
 
 
+| `isis.service.` +
+`email.tls.enabled`
+|`true`,`false` +
+(`true`)
+|Whether to enable TLS for the email SMTP connection (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
 | `isis.services.` +
 `eventbus.implementation` +
 | `guava`, `axon`, +


[16/22] isis git commit: Merge branch 'maint-1.13.2.1' into maint-1.13.3

Posted by da...@apache.org.
Merge branch 'maint-1.13.2.1' into maint-1.13.3


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

Branch: refs/heads/master
Commit: e2f0a9f583b2a145096ac2da3b5e550219fe867e
Parents: 1e81a3a b47edb6
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Dec 22 18:54:59 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Dec 22 18:54:59 2016 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[11/22] isis git commit: ISIS-1557: adds in configuration properties for email service to set socket timeout and socket connection timeout

Posted by da...@apache.org.
ISIS-1557: adds in configuration properties for email service to set socket timeout and socket connection timeout


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

Branch: refs/heads/master
Commit: 07b0ecfa0544560b381d7f3483acdce699de7a06
Parents: c074b8b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:44:55 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:44:55 2016 +0000

----------------------------------------------------------------------
 .../guides/_rgcfg_configuring-core.adoc         | 21 ++++++++++++++++++++
 .../guides/_rgsvc_api_EmailService.adoc         |  7 +++++++
 .../services/email/EmailServiceDefault.java     | 19 ++++++++++++++++++
 3 files changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/07b0ecfa/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
index eb7dffa..7223385 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
@@ -285,6 +285,27 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 | `isis.service.` +
 `email.` +
+`socketConnectionTimeout`
+|milliseconds +
+(2000)
+|(`1.13.3-SNAPSHOT`) The socket connection timeout
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
+| `isis.service.` +
+`email.` +
+`socketTimeout`
+|milliseconds +
+(2000)
+|(`1.13.3-SNAPSHOT`) The socket timeout
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
+
+| `isis.service.` +
+`email.` +
 `throwExceptionOnFail`
 |`true`,`false` +
 (`true`)

http://git-wip-us.apache.org/repos/asf/isis/blob/07b0ecfa/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
index f05c63e..7c58b40 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
@@ -73,6 +73,13 @@ In addition (as of `1.13.3-SNAPSHOT`), the following properties can be set:
 Whether to throw an exception if there the email cannot be sent (probably because of some misconfiguration).
 This behaviour is (now) the default; the old behaviour (of just returning `false` from the `send()` method) can be re-enabled by setting this property to `false`.
 
+* `isis.service.email.socketTimeout` +
++
+The socket timeout, defaulting to 2000ms.
+
+* `isis.service.email.socketConnectionTimeout` +
++
+The socket connection timeout, defaulting to 2000ms.
 
 
 == Alternative Implementations

http://git-wip-us.apache.org/repos/asf/isis/blob/07b0ecfa/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
index f40bb2d..76d7d02 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
@@ -73,6 +73,12 @@ public class EmailServiceDefault implements EmailService {
     private static final String ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL = "isis.service.email.throwExceptionOnFail";
     private static final boolean ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL_DEFAULT = true;
 
+    private static final String ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT = "isis.service.email.socketTimeout";
+    private static final int ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT_DEFAULT = 2000;
+
+    private static final String ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT = "isis.service.email.socketConnectionTimeout";
+    private static final int ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT_DEFAULT = 2000;
+
     //endregion
 
     //region > init
@@ -121,6 +127,14 @@ public class EmailServiceDefault implements EmailService {
     protected Boolean isThrowExceptionOnFail() {
         return configuration.getBoolean(ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL, ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL_DEFAULT);
     }
+
+    protected int getSocketTimeout() {
+        return configuration.getInteger(ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT, ISIS_SERVICE_EMAIL_SOCKET_TIMEOUT_DEFAULT);
+    }
+
+    protected int getSocketConnectionTimeout() {
+        return configuration.getInteger(ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT, ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT_DEFAULT);
+    }
     //endregion
 
     //region > isConfigured
@@ -147,6 +161,8 @@ public class EmailServiceDefault implements EmailService {
             final String senderEmailHostName = getSenderEmailHostName();
             final Integer senderEmailPort = getSenderEmailPort();
             final Boolean senderEmailTlsEnabled = getSenderEmailTlsEnabled();
+            final int socketTimeout = getSocketTimeout();
+            final int socketConnectionTimeout = getSocketConnectionTimeout();
 
             email.setAuthenticator(new DefaultAuthenticator(senderEmailAddress, senderEmailPassword));
             email.setHostName(senderEmailHostName);
@@ -154,6 +170,9 @@ public class EmailServiceDefault implements EmailService {
             email.setStartTLSEnabled(senderEmailTlsEnabled);
             email.setDataSourceResolver(new DataSourceClassPathResolver("/", true));
 
+            email.setSocketTimeout(socketTimeout);
+            email.setSocketConnectionTimeout(socketConnectionTimeout);
+
             final Properties properties = email.getMailSession().getProperties();
 
             properties.put("mail.smtps.auth", "true");


[05/22] isis git commit: EST-1557: reformats EmailService.adoc, each sentence on its own line.

Posted by da...@apache.org.
EST-1557: reformats EmailService.adoc, each sentence on its own line.


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

Branch: refs/heads/master
Commit: 6b1dd2f6be5c586b0d4496cf74ab0b0e8565e1c6
Parents: 66ff503
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:16:00 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:16:00 2016 +0000

----------------------------------------------------------------------
 .../guides/_rgsvc_api_EmailService.adoc         | 29 +++++++++++---------
 1 file changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/6b1dd2f6/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
index 71c4993..1c090c0 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
@@ -8,7 +8,9 @@
 
 The `EmailService` provides the ability to send HTML emails, with attachments, to one or more recipients.
 
-Apache Isis provides a default implementation to send emails using an external SMTP provider.  Note that this must be configured (using a number of configuration properties) before it can be used.  The that sends email as an HTML message, using an external SMTP provider.
+Apache Isis provides a default implementation to send emails using an external SMTP provider.
+Note that this must be configured (using a number of configuration properties) before it can be used.
+The that sends email as an HTML message, using an external SMTP provider.
 
 
 
@@ -27,10 +29,12 @@ public interface EmailService {
     boolean isConfigured();                                         // <4>
 }
 ----
-<1> is the main API to send the email (and optional attachments). Will return `false` if failed to send
+<1> is the main API to send the email (and optional attachments).
+Will return `false` if failed to send
 <2> pass either `null` or `Collections.emptyList()` if not required
 <3> should be HTML text
-<4> indicates whether the implementation was configured and initialized correctly.  If this returns `false` then any attempt to call `send(...)` will fail.
+<4> indicates whether the implementation was configured and initialized correctly.
+If this returns `false` then any attempt to call `send(...)` will fail.
 
 As noted in the introduction, the core framework provides a default implementation (`EmailServiceDefault`) that sends email as an HTML message, using an external SMTP provider.
 
@@ -51,7 +55,8 @@ and these properties may optionally be configured (each has a default to use gma
 
 These configuration properties can be specified either in `isis.properties` or in an xref:ugbtb.adoc#_ugbtb_deployment_externalized-configuration[external configuration file].
 
-If prototyping (that is, running the app using `org.apache.isis.WebServer`), the configuration properties can also be specified as system properties. For example, if you create a test email account on gmail, you can configure the service using:
+If prototyping (that is, running the app using `org.apache.isis.WebServer`), the configuration properties can also be specified as system properties.
+For example, if you create a test email account on gmail, you can configure the service using:
 
 [source,ini]
 ----
@@ -67,10 +72,13 @@ where "xxx" is the gmail user account and "yyy" is its password
 
 If you wish to write an alternative implementation, be aware that it should process the message body as HTML (as opposed to plain text or any other format).
 
-Also, note that (unlike most Apache Isis domain services) the implementation is also instantiated and injected by Google Guice. This is because `EmailService` is used as part of the xref:ugvw.adoc#_ugvw_features_user-registration[user registration] functionality and is used by Wicket pages that are accessed outside of the usual Apache Isis runtime. This implies a couple of additional constraints:
+Also, note that (unlike most Apache Isis domain services) the implementation is also instantiated and injected by Google Guice.
+This is because `EmailService` is used as part of the xref:ugvw.adoc#_ugvw_features_user-registration[user registration] functionality and is used by Wicket pages that are accessed outside of the usual Apache Isis runtime.
+This implies a couple of additional constraints:
 
 * first, implementation class should also be annotated with `@com.google.inject.Singleton`
-* second, there may not be any Apache Isis session running. (If necessary, one can be created on the fly using `IsisContext.doInSession(...)`)
+* second, there may not be any Apache Isis session running.
+(If necessary, one can be created on the fly using `IsisContext.doInSession(...)`)
 
 To ensure that your alternative implementation takes the place of the default implementation, register it explicitly in `isis.properties`.
 
@@ -78,14 +86,9 @@ To ensure that your alternative implementation takes the place of the default im
 
 == Registering the Services
 
-Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the
-`AppManifest` to xref:rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core
-implementation of `EmailService` service is automatically registered and injected (it is annotated with
-`@DomainService`) so no further configuration is required.
+Assuming that the `configuration-and-annotation` services installer is configured (implicit if using the `AppManifest` to xref:rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[bootstrap the app]) then Apache Isis' core implementation of `EmailService` service is automatically registered and injected (it is annotated with `@DomainService`) so no further configuration is required.
 
-To use an alternative implementation, use
-xref:rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained
-in the xref:rgsvc.adoc#_rgsvc_intro_overriding-the-services[introduction] to this guide).
+To use an alternative implementation, use xref:rgant.adoc#_rgant-DomainServiceLayout_menuOrder[`@DomainServiceLayout#menuOrder()`] (as explained in the xref:rgsvc.adoc#_rgsvc_intro_overriding-the-services[introduction] to this guide).
 
 
 == Related Services


[20/22] isis git commit: ISIS-1565: fixes @MemberOrder for default mixin actions

Posted by da...@apache.org.
ISIS-1565: fixes @MemberOrder for default mixin actions


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

Branch: refs/heads/master
Commit: c0467a67dfbe7446343e92c157af74b0f536be6e
Parents: ec67e59
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jan 9 22:12:12 2017 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 9 22:12:12 2017 +0000

----------------------------------------------------------------------
 .../isis/applib/services/layout/Object_downloadLayoutXml.java    | 4 +---
 .../isis/applib/services/layout/Object_rebuildMetamodel.java     | 2 +-
 .../services/jdosupport/Persistable_downloadJdoMetadata.java     | 3 +--
 .../isis/viewer/wicket/viewer/services/Object_clearHints.java    | 2 +-
 4 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c0467a67/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
index 22261f9..f1bcaf8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
@@ -16,8 +16,6 @@
  */
 package org.apache.isis.applib.services.layout;
 
-import javax.inject.Inject;
-
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.MemberOrder;
@@ -48,7 +46,7 @@ public class Object_downloadLayoutXml {
             cssClassFa = "fa-download",
             position = ActionLayout.Position.PANEL_DROPDOWN
     )
-    @MemberOrder(name = "Metadata", sequence = "700.1")
+    @MemberOrder(name = "datanucleusIdLong", sequence = "700.1")
     public Object $$(
             @ParameterLayout(named = "File name")
             final String fileName,

http://git-wip-us.apache.org/repos/asf/isis/blob/c0467a67/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_rebuildMetamodel.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_rebuildMetamodel.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_rebuildMetamodel.java
index 69d0cb7..05a9618 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_rebuildMetamodel.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_rebuildMetamodel.java
@@ -44,7 +44,7 @@ public class Object_rebuildMetamodel {
             cssClassFa = "fa-refresh",
             position = ActionLayout.Position.PANEL_DROPDOWN
     )
-    @MemberOrder(name = "Metadata", sequence = "800.1")
+    @MemberOrder(name = "datanucleusIdLong", sequence = "800.1")
     public void $$() {
         metaModelService.rebuild(object.getClass());
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/c0467a67/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
index 38a0f2f..3155247 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
@@ -20,7 +20,6 @@ package org.apache.isis.core.metamodel.services.jdosupport;
 
 import java.io.IOException;
 
-import javax.inject.Inject;
 import javax.jdo.PersistenceManagerFactory;
 import javax.jdo.metadata.TypeMetadata;
 import javax.xml.bind.JAXBException;
@@ -57,7 +56,7 @@ public class Persistable_downloadJdoMetadata {
             cssClassFa = "fa-download",
             position = ActionLayout.Position.PANEL_DROPDOWN
     )
-    @MemberOrder(name = "Metadata", sequence = "710.1")
+    @MemberOrder(name = "datanucleusIdLong", sequence = "710.1")
     public Clob $$(
             @ParameterLayout(named = ".jdo file name")
             final String fileName) throws JAXBException, IOException {

http://git-wip-us.apache.org/repos/asf/isis/blob/c0467a67/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/services/Object_clearHints.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/services/Object_clearHints.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/services/Object_clearHints.java
index c97f8a6..00d419d 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/services/Object_clearHints.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/services/Object_clearHints.java
@@ -52,7 +52,7 @@ public class Object_clearHints {
             cssClassFa = "fa-trash",
             position = ActionLayout.Position.PANEL_DROPDOWN
     )
-    @MemberOrder(name = "Metadata", sequence = "400.1")
+    @MemberOrder(name = "datanucleusIdLong", sequence = "400.1")
     public Object $$() {
         if (getHintStoreUsingWicketSession() != null) {
             final Bookmark bookmark = bookmarkService.bookmarkFor(object);


[03/22] isis git commit: ISIS-1557: refactors EmailServiceDefault, tidying up only (no functional change)

Posted by da...@apache.org.
ISIS-1557: refactors EmailServiceDefault, tidying up only (no functional change)


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

Branch: refs/heads/master
Commit: a942d1bea258f922d5e49c3de549213eb2b55b72
Parents: 8b10623
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:05:28 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:05:28 2016 +0000

----------------------------------------------------------------------
 .../services/email/EmailServiceDefault.java     | 23 ++++++++++----------
 1 file changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/a942d1be/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
index 96e9562..28a12ed 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
@@ -63,9 +63,6 @@ public class EmailServiceDefault implements EmailService {
     private static final String ISIS_SERVICE_EMAIL_TLS_ENABLED = "isis.service.email.tls.enabled";
     private static final boolean ISIS_SERVICE_EMAIL_TLS_ENABLED_DEFAULT = true;
 
-    private String senderEmailAddress;
-    private String senderEmailPassword;
-    private Integer senderEmailPort;
     //endregion
 
     //region > init
@@ -82,10 +79,6 @@ public class EmailServiceDefault implements EmailService {
             return;
         }
 
-        senderEmailAddress = getSenderEmailAddress();
-        senderEmailPassword = getSenderEmailPassword();
-        senderEmailPort = getSenderEmailPort();
-
         initialized = true;
 
         if(!isConfigured()) {
@@ -120,6 +113,8 @@ public class EmailServiceDefault implements EmailService {
 
     @Override
     public boolean isConfigured() {
+        final String senderEmailAddress = getSenderEmailAddress();
+        final String senderEmailPassword = getSenderEmailPassword();
         return !Strings.isNullOrEmpty(senderEmailAddress) && !Strings.isNullOrEmpty(senderEmailPassword);
     }
     //endregion
@@ -132,22 +127,28 @@ public class EmailServiceDefault implements EmailService {
 
         try {
             final ImageHtmlEmail email = new ImageHtmlEmail();
+
+            final String senderEmailAddress = getSenderEmailAddress();
+            final String senderEmailPassword = getSenderEmailPassword();
+            final String senderEmailHostName = getSenderEmailHostName();
+            final Integer senderEmailPort = getSenderEmailPort();
+            final Boolean senderEmailTlsEnabled = getSenderEmailTlsEnabled();
+
             email.setAuthenticator(new DefaultAuthenticator(senderEmailAddress, senderEmailPassword));
-            email.setHostName(getSenderEmailHostName());
+            email.setHostName(senderEmailHostName);
             email.setSmtpPort(senderEmailPort);
-            email.setStartTLSEnabled(getSenderEmailTlsEnabled());
+            email.setStartTLSEnabled(senderEmailTlsEnabled);
             email.setDataSourceResolver(new DataSourceClassPathResolver("/", true));
 
             final Properties properties = email.getMailSession().getProperties();
 
-            // TODO ISIS-987: check whether all these are required and extract as configuration settings
             properties.put("mail.smtps.auth", "true");
             properties.put("mail.debug", "true");
             properties.put("mail.smtps.port", "" + senderEmailPort);
             properties.put("mail.smtps.socketFactory.port", "" + senderEmailPort);
             properties.put("mail.smtps.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
             properties.put("mail.smtps.socketFactory.fallback", "false");
-            properties.put("mail.smtp.starttls.enable", "" + getSenderEmailTlsEnabled());
+            properties.put("mail.smtp.starttls.enable", "" + senderEmailTlsEnabled);
 
             email.setFrom(senderEmailAddress);
 


[19/22] isis git commit: Merge branch 'maint-1.13.3'

Posted by da...@apache.org.
Merge branch 'maint-1.13.3'


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

Branch: refs/heads/master
Commit: ec67e59e766058e35b8ace03b2eddd2e9c6d87f0
Parents: 140293a b05ed58
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jan 9 22:09:06 2017 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 9 22:09:06 2017 +0000

----------------------------------------------------------------------
 .../guides/_rgcfg_configuring-core.adoc         | 194 ++++++++++++++-----
 .../guides/_rgsvc_api_EmailService.adoc         |  55 ++++--
 .../applib/service/DomainChangeJdoAbstract.java |   5 +-
 .../metamodel/MetaModelServiceDefault.java      |  18 +-
 .../services/email/EmailServiceDefault.java     | 115 +++++++++--
 .../email/EmailServiceDefaultTest_actually.java |  61 ++++++
 .../email/EmailServiceDefaultTest_notEmpty.java |  45 +++++
 7 files changed, 405 insertions(+), 88 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ec67e59e/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------


[02/22] isis git commit: ISIS-1556: fixes DomainAppFixtureScriptsSpecificationProvider...

Posted by da...@apache.org.
ISIS-1556: fixes DomainAppFixtureScriptsSpecificationProvider...

use DomainAppDemo fixture script rather than RecreateSimpleObjects fixture script


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

Branch: refs/heads/master
Commit: 8b106237eea87274078421773974f46f0fe41d7c
Parents: ae74bc9
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 11:58:31 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 11:58:31 2016 +0000

----------------------------------------------------------------------
 .../fixture/DomainAppFixtureScriptsSpecificationProvider.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/8b106237/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java b/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
index aa48811..703c42f 100644
--- a/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
+++ b/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
@@ -24,7 +24,7 @@ import org.apache.isis.applib.fixturescripts.FixtureScripts;
 import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecification;
 import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecificationProvider;
 
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.application.fixture.scenarios.DomainAppDemo;
 
 /**
  * Specifies where to find fixtures, and other settings.
@@ -36,9 +36,9 @@ public class DomainAppFixtureScriptsSpecificationProvider implements FixtureScri
         return FixtureScriptsSpecification
                 .builder(DomainAppFixtureScriptsSpecificationProvider.class)
                 .with(FixtureScripts.MultipleExecutionStrategy.EXECUTE)
-                .withRunScriptDefault(RecreateSimpleObjects.class)
+                .withRunScriptDefault(DomainAppDemo.class)
                 .withRunScriptDropDown(FixtureScriptsSpecification.DropDownPolicy.CHOICES)
-                .withRecreate(RecreateSimpleObjects.class)
+                .withRecreate(DomainAppDemo.class)
                 .build();
     }
 }


[15/22] isis git commit: ISIS-1559: removes the mixins from SimpleObject, and simplifies code elsewhere also where possible.

Posted by da...@apache.org.
ISIS-1559: removes the mixins from SimpleObject, and simplifies code elsewhere also where possible.

Also moves the specglue from the application module to the module-simple module.


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

Branch: refs/heads/master
Commit: 1e81a3a0e2a7815a8052a41702a96551f1d421af
Parents: 735cb81
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Dec 22 18:45:49 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Dec 22 18:45:49 2016 +0000

----------------------------------------------------------------------
 .../application/simpleapp/application/pom.xml   |   7 +-
 .../fixture/scenarios/DomainAppDemo.java        |  28 +--
 .../fixture/teardown/DomainAppTearDown.java     |   5 -
 .../DomainAppAppManifestWithFixtures.java       |   4 +-
 .../services/homepage/HomePageViewModel.java    |   9 -
 .../bdd/specglue/BootstrappingGlue.java         |   2 -
 .../bdd/specglue/CatalogOfFixturesGlue.java     |   6 +-
 .../bdd/specglue/SimpleObjectGlue.java          |  50 ------
 .../application/bdd/specs/RunIntegBddSpecs.java |   5 +-
 .../SimpleObjectSpec_listAllAndCreate.feature   |   2 +-
 .../application/integtests/Smoke_IntegTest.java |   4 +-
 .../simple/dom/SimpleModuleDomSubmodule.java    |   2 +-
 .../modules/simple/dom/impl/SimpleObject.java   | 180 +++++--------------
 .../fixture/SimpleModuleFixtureSubmodule.java   |   3 +-
 .../fixture/data/SimpleObjectMenu_create.java   |  58 ------
 .../fixture/scenario/CreateSimpleObjects.java   |  81 +++++++++
 .../fixture/scenario/RecreateSimpleObjects.java |  76 --------
 .../tests/SimpleObjectMenu_IntegTest.java       |   8 +-
 .../tests/SimpleObject_IntegTest.java           |  10 +-
 .../simple/specglue/SimpleObjectMenuGlue.java   |  53 ++++++
 example/application/simpleapp/pom.xml           |   6 +
 .../src/main/webapp/WEB-INF/translations-en.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations-es.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations-nl.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations.po     |   2 +-
 25 files changed, 221 insertions(+), 386 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/pom.xml b/example/application/simpleapp/application/pom.xml
index d0dd876..293ffc0 100644
--- a/example/application/simpleapp/application/pom.xml
+++ b/example/application/simpleapp/application/pom.xml
@@ -107,7 +107,12 @@
             <groupId>${project.groupId}</groupId>
             <artifactId>simpleapp-module-simple</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>simpleapp-module-simple</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
 
         <!-- isis -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java b/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
index 8914ba8..7f3ce27 100644
--- a/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
+++ b/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
@@ -18,10 +18,14 @@
  */
 package domainapp.application.fixture.scenarios;
 
+import javax.annotation.Nullable;
+
 import org.apache.isis.applib.fixturescripts.FixtureScript;
 
 import domainapp.application.fixture.teardown.DomainAppTearDown;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
+import lombok.Getter;
+import lombok.Setter;
 
 public class DomainAppDemo extends FixtureScript {
 
@@ -29,32 +33,16 @@ public class DomainAppDemo extends FixtureScript {
         withDiscoverability(Discoverability.DISCOVERABLE);
     }
 
-    //region > number (optional input)
+    @Nullable
+    @Getter @Setter
     private Integer number;
 
-    /**
-     * The number of objects to create, up to 10; optional, defaults to 3.
-     */
-    public Integer getNumber() {
-        return number;
-    }
-
-    public DomainAppDemo setNumber(final Integer number) {
-        this.number = number;
-        return this;
-    }
-    //endregion
-
     @Override
     protected void execute(final ExecutionContext ec) {
 
-        // defaults
-        final int number = defaultParam("number", ec, 3);
-
-
         // execute
         ec.executeChild(this, new DomainAppTearDown());
-        ec.executeChild(this, new RecreateSimpleObjects().setNumber(number));
+        ec.executeChild(this, new CreateSimpleObjects().setNumber(number));
 
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java b/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
index 44a81a8..f7ea288 100644
--- a/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
+++ b/example/application/simpleapp/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
@@ -19,7 +19,6 @@
 package domainapp.application.fixture.teardown;
 
 import org.apache.isis.applib.fixturescripts.FixtureScript;
-import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
 
 import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
 
@@ -30,8 +29,4 @@ public class DomainAppTearDown extends FixtureScript {
         executionContext.executeChild(this, new SimpleModuleTearDown());
     }
 
-
-    @javax.inject.Inject
-    private IsisJdoSupport isisJdoSupport;
-
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java b/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
index 1afec6f..756ff0e 100644
--- a/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
+++ b/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
@@ -27,7 +27,7 @@ import com.google.common.collect.Maps;
 
 import org.apache.isis.applib.fixturescripts.FixtureScript;
 
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
 
 /**
  * Run the app but without setting up any fixtures.
@@ -39,7 +39,7 @@ public class DomainAppAppManifestWithFixtures extends DomainAppAppManifest {
      */
     @Override
     public List<Class<? extends FixtureScript>> getFixtures() {
-        return Lists.newArrayList(RecreateSimpleObjects.class);
+        return Lists.newArrayList(CreateSimpleObjects.class);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java b/example/application/simpleapp/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
index 78e0ae0..0a0fb6c 100644
--- a/example/application/simpleapp/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
+++ b/example/application/simpleapp/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
@@ -29,23 +29,14 @@ import domainapp.modules.simple.dom.impl.SimpleObjectRepository;
 @ViewModel
 public class HomePageViewModel {
 
-    //region > title
     public TranslatableString title() {
         return TranslatableString.tr("{num} objects", "num", getObjects().size());
     }
-    //endregion
 
-    //region > object (collection)
-    @org.apache.isis.applib.annotation.HomePage
     public List<SimpleObject> getObjects() {
         return simpleObjectRepository.listAll();
     }
-    //endregion
-
-    //region > injected services
 
     @javax.inject.Inject
     SimpleObjectRepository simpleObjectRepository;
-
-    //endregion
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
index 53df979..43f59e1 100644
--- a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
+++ b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
@@ -27,9 +27,7 @@ public class BootstrappingGlue extends CukeGlueAbstract {
 
     @Before(value={"@integration"}, order=100)
     public void beforeScenarioIntegrationScope() {
-
         DomainAppIntegTestAbstract.initSystem();
-
         before(ScenarioExecutionScope.INTEGRATION);
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
index 1a7c4c7..a5adbac 100644
--- a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
+++ b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
@@ -19,13 +19,13 @@ package domainapp.application.bdd.specglue;
 import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
 
 import cucumber.api.java.Before;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.application.fixture.scenarios.DomainAppDemo;
 
 public class CatalogOfFixturesGlue extends CukeGlueAbstract {
 
-    @Before(value={"@integration", "@RecreateSimpleObjects"}, order=20000)
+    @Before(value={"@integration", "@DomainAppDemo"}, order=20000)
     public void integrationFixtures() throws Throwable {
-        scenarioExecution().install(new RecreateSimpleObjects());
+        scenarioExecution().install(new DomainAppDemo());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java
deleted file mode 100644
index 258b9f0..0000000
--- a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package domainapp.application.bdd.specglue;
-
-import java.util.List;
-import java.util.UUID;
-
-import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
-
-import cucumber.api.java.en.Given;
-import cucumber.api.java.en.When;
-import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class SimpleObjectGlue extends CukeGlueAbstract {
-
-    @Given("^there are.* (\\d+) simple objects$")
-    public void there_are_N_simple_objects(int n) throws Throwable {
-        try {
-            final List<SimpleObject> findAll = service(SimpleObjectMenu.class).listAll();
-            assertThat(findAll.size(), is(n));
-            putVar("list", "all", findAll);
-            
-        } finally {
-            assertMocksSatisfied();
-        }
-    }
-    
-    @When("^I create a new simple object$")
-    public void I_create_a_new_simple_object() throws Throwable {
-        service(SimpleObjectMenu.class).create(UUID.randomUUID().toString());
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
index 18fd3be..4d9f543 100644
--- a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
+++ b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
@@ -31,7 +31,10 @@ import cucumber.api.junit.Cucumber;
                 "html:target/cucumber-html-report"
                 ,"json:target/cucumber.json"
         },
-        glue={"classpath:domainapp.application.bdd.specglue"},
+        glue={
+                "classpath:domainapp.application.bdd.specglue",
+                "classpath:domainapp.modules.simple.specglue"
+        },
         strict = true,
         tags = { "~@backlog", "~@ignore" })
 public class RunIntegBddSpecs {

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
index 77e0356..083e2cb 100644
--- a/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
+++ b/example/application/simpleapp/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
@@ -14,7 +14,7 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #
-@RecreateSimpleObjects
+@DomainAppDemo
 Feature: List and Create New Simple Objects
 
   @integration

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java b/example/application/simpleapp/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
index 4b514e8..08e64ef 100644
--- a/example/application/simpleapp/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
+++ b/example/application/simpleapp/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
@@ -81,7 +81,7 @@ public class Smoke_IntegTest extends DomainAppIntegTestAbstract {
 
 
         // when
-        wrap(mixin(SimpleObject.updateName.class, fred)).exec("Freddy");
+        wrap(fred).updateName("Freddy");
         transactionService.flushTransaction();
 
         // then
@@ -97,7 +97,7 @@ public class Smoke_IntegTest extends DomainAppIntegTestAbstract {
 
 
         // when
-        wrap(mixin(SimpleObject.delete.class, fred)).exec();
+        wrap(fred).delete();
         transactionService.flushTransaction();
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
index 41dc75b..7d314e8 100644
--- a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
+++ b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
@@ -19,6 +19,7 @@
 package domainapp.modules.simple.dom;
 
 public final class SimpleModuleDomSubmodule {
+    private SimpleModuleDomSubmodule(){}
 
     public static class PropertyDomainEvent<S,T>
             extends org.apache.isis.applib.services.eventbus.PropertyDomainEvent<S,T> {}
@@ -26,5 +27,4 @@ public final class SimpleModuleDomSubmodule {
             extends org.apache.isis.applib.services.eventbus.CollectionDomainEvent<S,T> {}
     public static class ActionDomainEvent<S> extends
             org.apache.isis.applib.services.eventbus.ActionDomainEvent<S> {}
-
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
index 23b3c54..52e9fe9 100644
--- a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
+++ b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
@@ -22,25 +22,19 @@ import javax.jdo.annotations.IdentityType;
 import javax.jdo.annotations.VersionStrategy;
 
 import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.Auditing;
-import org.apache.isis.applib.annotation.CommandReification;
-import org.apache.isis.applib.annotation.Contributed;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Mixin;
 import org.apache.isis.applib.annotation.Parameter;
 import org.apache.isis.applib.annotation.ParameterLayout;
 import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.Publishing;
 import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.annotation.Title;
 import org.apache.isis.applib.services.i18n.TranslatableString;
 import org.apache.isis.applib.services.message.MessageService;
 import org.apache.isis.applib.services.repository.RepositoryService;
 import org.apache.isis.applib.services.title.TitleService;
 import org.apache.isis.applib.util.ObjectContracts;
 
-import domainapp.modules.simple.dom.SimpleModuleDomSubmodule;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -51,172 +45,68 @@ import lombok.Setter;
 )
 @javax.jdo.annotations.DatastoreIdentity(
         strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
-         column="id")
+        column="id")
 @javax.jdo.annotations.Version(
         strategy= VersionStrategy.DATE_TIME,
         column="version")
 @javax.jdo.annotations.Queries({
         @javax.jdo.annotations.Query(
-                name = "findByName", language = "JDOQL",
+                name = "findByName",
                 value = "SELECT "
                         + "FROM domainapp.modules.simple.dom.impl.SimpleObject "
                         + "WHERE name.indexOf(:name) >= 0 ")
 })
 @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members = {"name"})
 @DomainObject(
-        objectType = "simple.SimpleObject",
-        auditing = Auditing.ENABLED,
-        publishing = Publishing.ENABLED
+        objectType = "simple.SimpleObject"
 )
 public class SimpleObject implements Comparable<SimpleObject> {
 
-    //region > title
-    public TranslatableString title() {
-        return TranslatableString.tr("Object: {name}", "name", getName());
-    }
-    //endregion
-
-    //region > constructor
     public SimpleObject(final String name) {
         setName(name);
     }
-    //endregion
-
-    //region > name (read-only property)
-    public static class NameType {
-        private NameType() {
-        }
-
-        public static class Meta {
-            public static final int MAX_LEN = 40;
-
-            private Meta() {
-            }
-        }
-
-        public static class PropertyDomainEvent
-                extends SimpleModuleDomSubmodule.PropertyDomainEvent<SimpleObject, String> { }
-    }
 
-
-    @javax.jdo.annotations.Column(allowsNull = "false", length = NameType.Meta.MAX_LEN)
-    @Property(
-            editing = Editing.DISABLED,
-            domainEvent = NameType.PropertyDomainEvent.class
-    )
+    @javax.jdo.annotations.Column(allowsNull = "false", length = 40)
+    @Property(editing = Editing.DISABLED)
     @Getter @Setter
+    @Title(prepend = "Object: ")
     private String name;
 
-    // endregion
-
-    //region > notes (editable property)
-    public static class NotesType {
-        private NotesType() {
-        }
-
-        public static class Meta {
-            public static final int MAX_LEN = 4000;
-
-            private Meta() {
-            }
-        }
-
-        public static class PropertyDomainEvent
-                extends SimpleModuleDomSubmodule.PropertyDomainEvent<SimpleObject, String> { }
-    }
-
-
-    @javax.jdo.annotations.Column(
-            allowsNull = "true",
-            length = NotesType.Meta.MAX_LEN
-    )
-    @Property(
-            command = CommandReification.ENABLED,
-            publishing = Publishing.ENABLED,
-            domainEvent = NotesType.PropertyDomainEvent.class
-    )
+    @javax.jdo.annotations.Column(allowsNull = "true", length = 4000)
+    @Property(editing = Editing.ENABLED)
     @Getter @Setter
     private String notes;
-    //endregion
+
 
     //region > updateName (action)
-    @Mixin(method = "exec")
-    public static class updateName {
-
-        public static class ActionDomainEvent extends SimpleModuleDomSubmodule.ActionDomainEvent<SimpleObject> {
-        }
-
-        private final SimpleObject simpleObject;
-
-        public updateName(final SimpleObject simpleObject) {
-            this.simpleObject = simpleObject;
-        }
-
-        @Action(
-                command = CommandReification.ENABLED,
-                publishing = Publishing.ENABLED,
-                semantics = SemanticsOf.IDEMPOTENT,
-                domainEvent = ActionDomainEvent.class
-        )
-        @ActionLayout(
-                contributed = Contributed.AS_ACTION
-        )
-        public SimpleObject exec(
-                @Parameter(maxLength = SimpleObject.NameType.Meta.MAX_LEN)
-                @ParameterLayout(named = "Name")
-                final String name) {
-            simpleObject.setName(name);
-            return simpleObject;
-        }
-
-        public String default0Exec() {
-            return simpleObject.getName();
-        }
-
-        public TranslatableString validate0Exec(final String name) {
-            return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
-        }
+    @Action(semantics = SemanticsOf.IDEMPOTENT)
+    public SimpleObject updateName(
+            @Parameter(maxLength = 40)
+            @ParameterLayout(named = "Name")
+            final String name) {
+        setName(name);
+        return this;
+    }
 
+    public String default0UpdateName() {
+        return getName();
+    }
+
+    public TranslatableString validate0UpdateName(final String name) {
+        return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
     }
     //endregion
 
     //region > delete (action)
-    @Mixin(method = "exec")
-    public static class delete {
-
-        public static class ActionDomainEvent extends SimpleModuleDomSubmodule.ActionDomainEvent<SimpleObject> {
-        }
-
-        private final SimpleObject simpleObject;
-        public delete(final SimpleObject simpleObject) {
-            this.simpleObject = simpleObject;
-        }
-
-        @Action(
-                domainEvent = ActionDomainEvent.class,
-                semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
-        )
-        @ActionLayout(
-                contributed = Contributed.AS_ACTION
-        )
-        public void exec() {
-            final String title = titleService.titleOf(simpleObject);
-            messageService.informUser(String.format("'%s' deleted", title));
-            repositoryService.remove(simpleObject);
-        }
-
-        @javax.inject.Inject
-        RepositoryService repositoryService;
-
-        @javax.inject.Inject
-        TitleService titleService;
-
-        @javax.inject.Inject
-        MessageService messageService;
+    @Action(semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE)
+    public void delete() {
+        final String title = titleService.titleOf(this);
+        messageService.informUser(String.format("'%s' deleted", title));
+        repositoryService.remove(this);
     }
-
     //endregion
 
+
     //region > toString, compareTo
     @Override
     public String toString() {
@@ -227,7 +117,17 @@ public class SimpleObject implements Comparable<SimpleObject> {
     public int compareTo(final SimpleObject other) {
         return ObjectContracts.compare(this, other, "name");
     }
+    //endregion
+
+    //region > injected services
+    @javax.inject.Inject
+    RepositoryService repositoryService;
+
+    @javax.inject.Inject
+    TitleService titleService;
 
+    @javax.inject.Inject
+    MessageService messageService;
     //endregion
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
index 0ac5838..b840eb2 100644
--- a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
+++ b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
@@ -19,6 +19,5 @@
 package domainapp.modules.simple.fixture;
 
 public final class SimpleModuleFixtureSubmodule {
-
-
+    private SimpleModuleFixtureSubmodule(){}
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java
deleted file mode 100644
index cb22a8b..0000000
--- a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package domainapp.modules.simple.fixture.data;
-
-import org.apache.isis.applib.fixturescripts.FixtureScript;
-
-import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-@Accessors(chain = true)
-public class SimpleObjectMenu_create extends FixtureScript {
-
-    /**
-     * Name of the object (required)
-     */
-    @Getter @Setter
-    private String name;
-
-    /**
-     * The created simple object (output).
-     */
-    @Getter
-    private SimpleObject simpleObject;
-
-
-    @Override
-    protected void execute(final ExecutionContext ec) {
-
-        String name = checkParam("name", ec, String.class);
-
-        this.simpleObject = wrap(simpleObjectMenu).create(name);
-        ec.addResult(this, simpleObject);
-    }
-
-    @javax.inject.Inject
-    SimpleObjectMenu simpleObjectMenu;
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
new file mode 100644
index 0000000..35c4a43
--- /dev/null
+++ b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
@@ -0,0 +1,81 @@
+/*
+ *  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 domainapp.modules.simple.fixture.scenario;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.fixturescripts.FixtureScript;
+
+import domainapp.modules.simple.dom.impl.SimpleObject;
+import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+@Accessors(chain = true)
+public class CreateSimpleObjects extends FixtureScript {
+
+    public final List<String> NAMES = Collections.unmodifiableList(Arrays.asList(
+            "Foo", "Bar", "Baz", "Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
+
+    /**
+     * The number of objects to create, up to 10; optional, defaults to 3.
+     */
+    @Nullable
+    @Getter @Setter
+    private Integer number;
+
+    /**
+     * The simpleobjects created by this fixture (output).
+     */
+    @Getter
+    private final List<SimpleObject> simpleObjects = Lists.newArrayList();
+
+    @Override
+    protected void execute(final ExecutionContext ec) {
+
+        // defaults
+        final int number = defaultParam("number", ec, 3);
+
+        // validate
+        if(number < 0 || number > NAMES.size()) {
+            throw new IllegalArgumentException(String.format("number must be in range [0,%d)", NAMES.size()));
+        }
+
+        // execute
+        for (int i = 0; i < number; i++) {
+            final String name = NAMES.get(i);
+
+            final SimpleObject simpleObject = wrap(simpleObjectMenu).create(name);
+            ec.addResult(this, simpleObject);
+            simpleObjects.add(simpleObject);
+        }
+    }
+
+    @javax.inject.Inject
+    SimpleObjectMenu simpleObjectMenu;
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java
deleted file mode 100644
index a91b29c..0000000
--- a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package domainapp.modules.simple.fixture.scenario;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.fixturescripts.FixtureScript;
-
-import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.fixture.data.SimpleObjectMenu_create;
-import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-@Accessors(chain = true)
-public class RecreateSimpleObjects extends FixtureScript {
-
-    public final List<String> NAMES = Collections.unmodifiableList(Arrays.asList(
-            "Foo", "Bar", "Baz", "Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
-
-    /**
-     * The number of objects to create, up to 10; optional, defaults to 3.
-     */
-    @Getter @Setter
-    private Integer number;
-
-    /**
-     * The simpleobjects created by this fixture (output).
-     */
-    @Getter
-    private final List<SimpleObject> simpleObjects = Lists.newArrayList();
-
-    @Override
-    protected void execute(final ExecutionContext ec) {
-
-        // defaults
-        final int number = defaultParam("number", ec, 3);
-
-        // validate
-        if(number < 0 || number > NAMES.size()) {
-            throw new IllegalArgumentException(String.format("number must be in range [0,%d)", NAMES.size()));
-        }
-
-        // execute
-        ec.executeChild(this, new SimpleModuleTearDown());
-        for (int i = 0; i < number; i++) {
-            final String name = NAMES.get(i);
-            final SimpleObjectMenu_create fs = new SimpleObjectMenu_create().setName(name);
-            ec.executeChild(this, fs.getName(), fs);
-            simpleObjects.add(fs.getSimpleObject());
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java b/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
index e6a6700..88016a9 100644
--- a/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
+++ b/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
@@ -32,12 +32,11 @@ import org.junit.Test;
 
 import org.apache.isis.applib.fixturescripts.FixtureScript;
 import org.apache.isis.applib.fixturescripts.FixtureScripts;
-import org.apache.isis.applib.services.repository.RepositoryService;
 import org.apache.isis.applib.services.xactn.TransactionService;
 
 import domainapp.modules.simple.dom.impl.SimpleObject;
 import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
 import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
 import domainapp.modules.simple.integtests.SimpleModuleIntegTestAbstract;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -50,8 +49,6 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
     TransactionService transactionService;
     @Inject
     SimpleObjectMenu menu;
-    @Inject
-    RepositoryService repositoryService;
 
     public static class ListAll extends SimpleObjectMenu_IntegTest {
 
@@ -59,7 +56,8 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
         public void happyCase() throws Exception {
 
             // given
-            RecreateSimpleObjects fs = new RecreateSimpleObjects();
+            fixtureScripts.runFixtureScript(new SimpleModuleTearDown(), null);
+            CreateSimpleObjects fs = new CreateSimpleObjects();
             fixtureScripts.runFixtureScript(fs, null);
             transactionService.nextTransaction();
 

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java b/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
index f6ac63e..9ece316 100644
--- a/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
+++ b/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
@@ -34,7 +34,8 @@ import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleu
 import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleusVersionTimestamp;
 
 import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
+import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
 import domainapp.modules.simple.integtests.SimpleModuleIntegTestAbstract;
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -50,7 +51,8 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
     @Before
     public void setUp() throws Exception {
         // given
-        RecreateSimpleObjects fs = new RecreateSimpleObjects().setNumber(1);
+        fixtureScripts.runFixtureScript(new SimpleModuleTearDown(), null);
+        CreateSimpleObjects fs = new CreateSimpleObjects().setNumber(1);
         fixtureScripts.runFixtureScript(fs, null);
         transactionService.nextTransaction();
 
@@ -87,7 +89,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
         public void can_be_updated_directly() throws Exception {
 
             // when
-            wrap(mixin(SimpleObject.updateName.class, simpleObject)).exec("new name");
+            wrap(simpleObject).updateName("new name");
             transactionService.nextTransaction();
 
             // then
@@ -102,7 +104,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
             expectedExceptions.expectMessage("Exclamation mark is not allowed");
 
             // when
-            wrap(mixin(SimpleObject.updateName.class, simpleObject)).exec("new name!");
+            wrap(simpleObject).updateName("new name!");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java b/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
new file mode 100644
index 0000000..c0b887e
--- /dev/null
+++ b/example/application/simpleapp/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
@@ -0,0 +1,53 @@
+/**
+ *  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 domainapp.modules.simple.specglue;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
+
+import cucumber.api.java.en.Given;
+import cucumber.api.java.en.When;
+import domainapp.modules.simple.dom.impl.SimpleObject;
+import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class SimpleObjectMenuGlue extends CukeGlueAbstract {
+
+    @Given("^there are.* (\\d+) simple objects$")
+    public void there_are_N_simple_objects(int n) throws Throwable {
+        try {
+            final List<SimpleObject> list = simpleObjectMenu().listAll();
+            assertThat(list.size(), is(n));
+            putVar("java.util.List", "simpleObjects", list);
+        } finally {
+            assertMocksSatisfied();
+        }
+    }
+    
+    @When("^.*create a .*simple object$")
+    public void create_a_simple_object() throws Throwable {
+        simpleObjectMenu().create(UUID.randomUUID().toString());
+    }
+
+    private SimpleObjectMenu simpleObjectMenu() {
+        return service(SimpleObjectMenu.class);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 464ffdf..e20afcc 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -342,6 +342,12 @@
             </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
+                <artifactId>simpleapp-module-simple</artifactId>
+                <version>${project.version}</version>
+                <type>test-jar</type>
+            </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>simpleapp-application</artifactId>
                 <version>${project.version}</version>
             </dependency>

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
index c927400..5d9f038 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
@@ -488,7 +488,7 @@ msgstr "Remember Me"
 
 #: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
 msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
 
 
 #: org.wicketstuff.select2.Select2Choice

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
index 2730e34..5c0f06b 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
@@ -487,7 +487,7 @@ msgstr "Remember Me"
 
 #: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
 msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
 
 
 #: org.wicketstuff.select2.Select2Choice

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
index 6efa8de..f7c3e89 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
@@ -488,7 +488,7 @@ msgstr "Remember Me"
 
 #: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
 msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
 
 
 #: org.wicketstuff.select2.Select2Choice

http://git-wip-us.apache.org/repos/asf/isis/blob/1e81a3a0/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
index d071cdf..52dcfb3 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
@@ -487,7 +487,7 @@ msgstr "Remember Me"
 
 #: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
 msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
 
 
 #: org.wicketstuff.select2.Select2Choice


[21/22] isis git commit: Merge branch 'fix_connection_decrypter_in_create_schema' of https://github.com/mwhesse/isis into ISIS-1566_pr-69

Posted by da...@apache.org.
Merge branch 'fix_connection_decrypter_in_create_schema' of https://github.com/mwhesse/isis into ISIS-1566_pr-69


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

Branch: refs/heads/master
Commit: e5085a8bade448d82afdb1fd1df53cce53caebf7
Parents: c0467a6 b89ae6b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jan 9 22:34:28 2017 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 9 22:34:28 2017 +0000

----------------------------------------------------------------------
 .../CreateSchemaObjectFromClassMetadata.java    | 38 ++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[17/22] isis git commit: Merge branch 'release-1.13.2.1-RC1' into maint-1.13.3

Posted by da...@apache.org.
Merge branch 'release-1.13.2.1-RC1' into maint-1.13.3


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

Branch: refs/heads/master
Commit: b05ed58ed2f23b29ba28ed2b39d902c201ceaa4b
Parents: e2f0a9f 1538333
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Jan 3 19:06:33 2017 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Jan 3 19:06:33 2017 +0000

----------------------------------------------------------------------
 example/application/simpleapp/README.adoc       |  23 ++-
 .../META-INF/maven/archetype-metadata.xml       |   6 +
 .../resources/archetype-resources/README.adoc   |  59 +++++-
 .../archetype-resources/application/pom.xml     |   7 +-
 ...nAppFixtureScriptsSpecificationProvider.java |   6 +-
 .../fixture/scenarios/DomainAppDemo.java        |  28 +--
 .../fixture/teardown/DomainAppTearDown.java     |   5 -
 .../DomainAppAppManifestWithFixtures.java       |   4 +-
 .../services/homepage/HomePageViewModel.java    |   9 -
 .../bdd/specglue/BootstrappingGlue.java         |   2 -
 .../bdd/specglue/CatalogOfFixturesGlue.java     |   6 +-
 .../bdd/specglue/SimpleObjectGlue.java          |  53 ------
 .../application/bdd/specs/RunIntegBddSpecs.java |   5 +-
 .../SimpleObjectSpec_listAllAndCreate.feature   |   2 +-
 .../application/integtests/Smoke_IntegTest.java |   4 +-
 .../simple/dom/SimpleModuleDomSubmodule.java    |   2 +-
 .../modules/simple/dom/impl/SimpleObject.java   | 180 +++++--------------
 .../fixture/SimpleModuleFixtureSubmodule.java   |   3 +-
 .../fixture/data/SimpleObjectMenu_create.java   |  61 -------
 .../fixture/scenario/CreateSimpleObjects.java   |  84 +++++++++
 .../fixture/scenario/RecreateSimpleObjects.java |  79 --------
 .../tests/SimpleObjectMenu_IntegTest.java       |   8 +-
 .../tests/SimpleObject_IntegTest.java           |  10 +-
 .../simple/specglue/SimpleObjectMenuGlue.java   |  56 ++++++
 .../main/resources/archetype-resources/pom.xml  |  18 ++
 .../archetype-resources/webapp/pom.xml          |  16 +-
 .../src/main/webapp/WEB-INF/translations-en.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations-es.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations-nl.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations.po     |   2 +-
 .../projects/basic/archetype.properties         |   2 +-
 31 files changed, 334 insertions(+), 412 deletions(-)
----------------------------------------------------------------------



[14/22] isis git commit: ISIS-1558: replaces configuration with mavenmixin-docker.

Posted by da...@apache.org.
ISIS-1558: replaces configuration with mavenmixin-docker.


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

Branch: refs/heads/master
Commit: 735cb8193c6d16c78143d84b6ca678562d48bfce
Parents: 0febb58
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Dec 22 17:28:33 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Dec 22 17:28:33 2016 +0000

----------------------------------------------------------------------
 example/application/simpleapp/README.adoc       | 40 ++++++++++-
 example/application/simpleapp/pom.xml           |  2 +-
 example/application/simpleapp/webapp/pom.xml    | 74 ++------------------
 .../webapp/src/main/resources/docker/Dockerfile |  1 -
 4 files changed, 46 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/735cb819/example/application/simpleapp/README.adoc
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/README.adoc b/example/application/simpleapp/README.adoc
index df457bb..e61edec 100644
--- a/example/application/simpleapp/README.adoc
+++ b/example/application/simpleapp/README.adoc
@@ -51,7 +51,7 @@ Larger applications should consist of multiple modules; each such module can be
 ====
 
 |`webapp`
-|Assembles the application into a webapp (comprising both the Wicket viewer and Restful Objects viewer) and runs the `isis:swagger` goal.
+|Assembles the application into a webapp (comprising both the Wicket viewer and Restful Objects viewer) and also as a docker image, and runs the `isis:swagger` goal.
 
 |`_checks`
 |Checkstyle and PMD rule sets for static analysis.
@@ -88,6 +88,21 @@ cd webapp/target && java -jar simpleapp-webapp-xxx-jetty-console.war
 ----
 +
 Add additional flags, eg ``--headless`` or ``--port 9999``, if required.
++
+It can also be run using: +
++
+[source,bash]
+----
+mvn -pl webapp && mvn antrun:run -Dmavenmixin-jettyconsole
+----
++
+or to specify arguments:
++
+[source,bash]
+----
+mvn -pl webapp && mvn antrun:run -Dmavenmixin-jettyconsole \
+    -Dmaven-antrun-plugin.jettyconsole.args="--headless --port 9090"
+----
 
 
 * To also generate source and javadoc JARs:
@@ -191,4 +206,27 @@ mvn -Dskip.danhaywood-mavenmixin-isisswagger
 By default, Swagger spec files are generated at `target/generated-resources/isis-swagger` (in the ``webapp`` module).
 ====
 
+* To package up the application as a docker image: +
++
+[source,bash]
+----
+mvn package -Dmavenmixin-docker
+----
++
+This assumes that the `${docker-plugin.imageName}` property has been defined in the `webapp` module.
+Alternatively it can be specified on the command line using a system property, eg:
++
+[source,bash]
+----
+mvn package -Dmavenmixin-docker -Ddocker-plugin.imageName=mycompany/myapp
+----
 
+* To upload the application as a docker image to link:https://hub.docker.com[docker hub]: +
++
+[source,bash]
+----
+mvn deploy -Dmavenmixin-docker
+----
++
+This once again assumes that the `${docker-plugin.imageName}` property has been defined, _and_ also that docker registry credentials have been specified in `~/.m2/settings.xml`.
+See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-configure[mavenmixin-docker] for further details.

http://git-wip-us.apache.org/repos/asf/isis/blob/735cb819/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 0616fa7..464ffdf 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -89,7 +89,7 @@
         <jdepend-maven-plugin.version>2.0-beta-2</jdepend-maven-plugin.version>
         <findbugs-maven-plugin.version>2.5</findbugs-maven-plugin.version>
 
-        <mavenmixin-docker.version>0.0.1-SNAPSHOT</mavenmixin-docker.version>
+        <mavenmixin-docker.version>0.0.2</mavenmixin-docker.version>
         <maven-deploy-plugin.version>2.8.1</maven-deploy-plugin.version>
         <docker-maven-plugin.version>0.4.13</docker-maven-plugin.version>
 

http://git-wip-us.apache.org/repos/asf/isis/blob/735cb819/example/application/simpleapp/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/pom.xml b/example/application/simpleapp/webapp/pom.xml
index 41d77bb..d0a2e40 100644
--- a/example/application/simpleapp/webapp/pom.xml
+++ b/example/application/simpleapp/webapp/pom.xml
@@ -43,9 +43,8 @@
 
         <maven-war-plugin.warName>${project.parent.artifactId}</maven-war-plugin.warName>
 
-        <docker-plugin.imageName>danhaywood/isis-app-simpleapp</docker-plugin.imageName>
+        <docker-plugin.imageName>DOCKER_REGISTRY_ACCOUNT/${project.parent.artifactId}</docker-plugin.imageName>
         <docker-plugin.resource.include>${maven-war-plugin.warName}.war</docker-plugin.resource.include>
-        <docker-plugin.maintainer>Apache Isis committers</docker-plugin.maintainer>
         <docker-plugin.serverId>docker-hub</docker-plugin.serverId>
         <docker-plugin.registryUrl>https://index.docker.io/v1/</docker-plugin.registryUrl>
 
@@ -128,76 +127,15 @@
                             <artifactId>jettyconsole</artifactId>
                             <version>${mavenmixin-jettyconsole.version}</version>
                         </mixin>
+                        <mixin>
+                            <groupId>com.danhaywood.mavenmixin</groupId>
+                            <artifactId>docker</artifactId>
+                            <version>${mavenmixin-docker.version}</version>
+                        </mixin>
                     </mixins>
                 </configuration>
             </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>com.spotify</groupId>
-                <artifactId>docker-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>build-image</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>build</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>tag-image</id>
-                        <phase>install</phase>
-                        <goals>
-                            <goal>tag</goal>
-                        </goals>
-                        <configuration>
-                            <image>${docker-plugin.imageName}</image>
-                            <newName>${docker-plugin.imageName}:${project.version}</newName>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>push-image</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>push</goal>
-                        </goals>
-                        <configuration>
-                            <imageName>${docker-plugin.imageName}:${project.version}</imageName>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>push-image-latest</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>push</goal>
-                        </goals>
-                        <configuration>
-                            <imageName>${docker-plugin.imageName}:latest</imageName>
-                        </configuration>
-                    </execution>
-                </executions>
-                <configuration>
-                    <imageName>${docker-plugin.imageName}</imageName>
-                    <dockerDirectory>${build.outputDirectory}/docker</dockerDirectory>
-                    <resources>
-                        <resource>
-                            <targetPath>.</targetPath>
-                            <directory>${project.build.directory}</directory>
-                            <include>${docker-plugin.resource.include}</include>
-                        </resource>
-                    </resources>
-                    <serverId>${docker-plugin.serverId}</serverId>
-                    <registryUrl>${docker-plugin.registryUrl}</registryUrl>
-                </configuration>
-            </plugin>
-
-
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/isis/blob/735cb819/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile b/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile
index eb975db..4c83be7 100644
--- a/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile
+++ b/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile
@@ -1,5 +1,4 @@
 FROM incodehq/tomcat
-MAINTAINER ${docker-plugin.maintainer}
 RUN rm -rf ${DEPLOYMENT_DIR}/ROOT
 COPY ${docker-plugin.resource.include} ${DEPLOYMENT_DIR}/ROOT.war
 EXPOSE 8080
\ No newline at end of file


[08/22] isis git commit: ISIS-1557: more reformatting, each sentence on its own line.

Posted by da...@apache.org.
ISIS-1557: more reformatting, each sentence on its own line.


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

Branch: refs/heads/master
Commit: a6959fa90f021d45e77650d120b5f5fa89291660
Parents: 0e4f1ff
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:29:08 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:29:08 2016 +0000

----------------------------------------------------------------------
 .../src/main/asciidoc/guides/_rgcfg_configuring-core.adoc      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/a6959fa9/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
index 213f000..4b2b83c 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
@@ -251,7 +251,8 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 | `isis.service.` +
 `email.sender.address` +
 | email address
-|The email address to use for sending out email (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  *Mandatory*.  +
+|The email address to use for sending out email (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).
+*Mandatory*.  +
 
 NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
 
@@ -267,7 +268,8 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 | `isis.service.` +
 `email.sender.password` +
 | email password
-|The corresponding password for the email address to use for sending out email (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  *Mandatory*.  +
+|The corresponding password for the email address to use for sending out email (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).
+*Mandatory*.  +
 
 NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
 


[04/22] isis git commit: ISIS-1557: adds the throwExceptionOnFail config property for EmailServiceDefault

Posted by da...@apache.org.
ISIS-1557: adds the throwExceptionOnFail config property for EmailServiceDefault


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

Branch: refs/heads/master
Commit: 66ff503427afb40e091dc3e54b81a18628b95a9b
Parents: a942d1b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:14:16 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:14:16 2016 +0000

----------------------------------------------------------------------
 .../services/email/EmailServiceDefault.java     | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/66ff5034/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
index 28a12ed..f40bb2d 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
@@ -50,6 +50,13 @@ public class EmailServiceDefault implements EmailService {
 
     private static final Logger LOG = LoggerFactory.getLogger(EmailServiceDefault.class);
 
+    public static class EmailServiceException extends RuntimeException {
+        static final long serialVersionUID = 1L;
+        public EmailServiceException(final EmailException cause) {
+            super(cause);
+        }
+    }
+
     //region > constants
     private static final String ISIS_SERVICE_EMAIL_SENDER_ADDRESS = "isis.service.email.sender.address";
     private static final String ISIS_SERVICE_EMAIL_SENDER_PASSWORD = "isis.service.email.sender.password";
@@ -63,6 +70,9 @@ public class EmailServiceDefault implements EmailService {
     private static final String ISIS_SERVICE_EMAIL_TLS_ENABLED = "isis.service.email.tls.enabled";
     private static final boolean ISIS_SERVICE_EMAIL_TLS_ENABLED_DEFAULT = true;
 
+    private static final String ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL = "isis.service.email.throwExceptionOnFail";
+    private static final boolean ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL_DEFAULT = true;
+
     //endregion
 
     //region > init
@@ -107,6 +117,10 @@ public class EmailServiceDefault implements EmailService {
     protected Boolean getSenderEmailTlsEnabled() {
         return configuration.getBoolean(ISIS_SERVICE_EMAIL_TLS_ENABLED, ISIS_SERVICE_EMAIL_TLS_ENABLED_DEFAULT);
     }
+
+    protected Boolean isThrowExceptionOnFail() {
+        return configuration.getBoolean(ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL, ISIS_SERVICE_EMAIL_THROW_EXCEPTION_ON_FAIL_DEFAULT);
+    }
     //endregion
 
     //region > isConfigured
@@ -174,7 +188,11 @@ public class EmailServiceDefault implements EmailService {
             email.send();
 
         } catch (EmailException ex) {
-            LOG.error("An error occurred while trying to send an email about user email verification", ex);
+            LOG.error("An error occurred while trying to send an email", ex);
+            final Boolean throwExceptionOnFail = isThrowExceptionOnFail();
+            if(throwExceptionOnFail) {
+                throw new EmailServiceException(ex);
+            }
             return false;
         }
 


[09/22] isis git commit: ISIS-1557: adds docs for isis.service.email.throwExceptionOnFail

Posted by da...@apache.org.
ISIS-1557: adds docs for isis.service.email.throwExceptionOnFail


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

Branch: refs/heads/master
Commit: 15b30aa0a2afd2ff0b6511e0980a6a4ceb0f0d04
Parents: a6959fa
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:32:09 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:32:09 2016 +0000

----------------------------------------------------------------------
 .../main/asciidoc/guides/_rgcfg_configuring-core.adoc   | 12 ++++++++++++
 .../main/asciidoc/guides/_rgsvc_api_EmailService.adoc   |  7 +++++++
 2 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/15b30aa0/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
index 4b2b83c..6656a86 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
@@ -275,6 +275,18 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 
 | `isis.service.` +
+`email.` +
+`throwExceptionOnFail`
+|`true`,`false` +
+(`true`)
+|(`1.13.3-SNAPSHOT`) Whether to throw an exception if there the email cannot be sent (probably because of some misconfiguration).
+
+This behaviour is (now) the default; the old behaviour (of just returning `false` from the `send()` method) can be re-enabled by setting this property to `false`.
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
+| `isis.service.` +
 `email.tls.enabled`
 |`true`,`false` +
 (`true`)

http://git-wip-us.apache.org/repos/asf/isis/blob/15b30aa0/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
index 1c090c0..f05c63e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
@@ -66,6 +66,13 @@ For example, if you create a test email account on gmail, you can configure the
 where "xxx" is the gmail user account and "yyy" is its password
 
 
+In addition (as of `1.13.3-SNAPSHOT`), the following properties can be set:
+
+* `isis.service.email.throwExceptionOnFail` +
++
+Whether to throw an exception if there the email cannot be sent (probably because of some misconfiguration).
+This behaviour is (now) the default; the old behaviour (of just returning `false` from the `send()` method) can be re-enabled by setting this property to `false`.
+
 
 
 == Alternative Implementations


[10/22] isis git commit: ISIS-1557: formats adoc, table of service config properties

Posted by da...@apache.org.
ISIS-1557: formats adoc,  table of service config properties


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

Branch: refs/heads/master
Commit: c074b8b9afa6bacca505867eda8b50c0c2fe5e20
Parents: 15b30aa
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 12:35:07 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 12:35:07 2016 +0000

----------------------------------------------------------------------
 .../guides/_rgcfg_configuring-core.adoc         | 60 +++++++++++++-------
 1 file changed, 40 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c074b8b9/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
index 6656a86..eb7dffa 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
@@ -191,7 +191,8 @@ This property is IGNORED if the xref:rgcfg.adoc#_rgcfg_configuring-components[`i
 
 
 |`isis.services.` +
-`applicationFeatures.init`
+`applicationFeatures.` +
+`init`
 | `lazy`, `eager` +
 (`lazy`)
 |Whether the application features repository (which surfaces the framework's metamodel) should be
@@ -201,27 +202,31 @@ Lazy initialization can speed up bootstrapping, useful while developing and runn
 
 
 |`isis.services.` +
-`audit.objects`
+`audit.` +
+`objects`
 | `all`, `none` +
 (`all`)
 |Whether the changed properties of objects should be automatically audited (for objects annotated with xref:rgant.adoc#_rgant-DomainObject_auditing[`@DomainObject(auditing=Auditing.AS_CONFIGURED)`].
 
 
 |`isis.services.` +
-`command.actions`
+`command.` +
+`actions`
 | `all`, `ignoreSafe`, `none` (`all`)
 |Whether action invocations should be automatically reified into commands (for actions annotated with xref:rgant.adoc#_rgant-Action_command[`@Action(command=CommandReification.AS_CONFIGURED)`].  +
 
 `ignoreQueryOnly` is an alias for `ignoreSafe`.
 
 |`isis.services.` +
-`command.properties`
+`command.` +
+`properties`
 | `all`, `none` (`all`)
 |(Whether property edits should be automatically reified into commands (for properties annotated with xref:rgant.adoc#_rgant-Property_command[`@Property(command=CommandReification.AS_CONFIGURED)`].  +
 
 
 |`isis.services.` +
-`container.disableAutoFlush`
+`container.` +
+`disableAutoFlush`
 |`true`,`false` +
 (`false`)
 |Whether the `DomainObjectContainer` should automatically flush pending changes prior to querying (via `allMatches()`, `firstMatch()` and so on).
@@ -241,7 +246,8 @@ If no configuration property is available, then the defaults is determined by th
 
 
 | `isis.service.` +
-`email.port` +
+`email.` +
+`port` +
 | port number (`_587_`)
 |The port number for the SMTP service on the the external SMTP host (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
 
@@ -249,7 +255,8 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 
 | `isis.service.` +
-`email.sender.address` +
+`email.` +
+`sender.address` +
 | email address
 |The email address to use for sending out email (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).
 *Mandatory*.  +
@@ -258,7 +265,8 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 
 | `isis.service.` +
-`email.sender.hostname` +
+`email.` +
+`sender.hostname` +
 | host (`_smtp.gmail.com_`)
 |The hostname of the external SMTP provider (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
 
@@ -266,7 +274,8 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 
 | `isis.service.` +
-`email.sender.password` +
+`email.` +
+`sender.password` +
 | email password
 |The corresponding password for the email address to use for sending out email (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).
 *Mandatory*.  +
@@ -287,7 +296,8 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 
 | `isis.service.` +
-`email.tls.enabled`
+`email.` +
+`tls.enabled`
 |`true`,`false` +
 (`true`)
 |Whether to enable TLS for the email SMTP connection (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +
@@ -296,13 +306,15 @@ NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.serv
 
 
 | `isis.services.` +
-`eventbus.implementation` +
+`eventbus.` +
+`implementation` +
 | `guava`, `axon`, +
 FQCN (`_guava_`)
 |which implementation to use by the xref:rgsvc.adoc#_rgsvc_api_EventBusService[`EventBusService`] as the underlying event bus.
 
 | `isis.services.` +
-`eventbus.allowLateRegistration` +
+`eventbus.` +
+`allowLateRegistration` +
 |`true`,`false` +
 (`false`)
 |whether a domain service can register with the xref:rgsvc.adoc#_rgsvc_api_EventBusService[`EventBusService`] after any events have posted. +
@@ -311,7 +323,8 @@ Since this almost certainly constitutes a bug in application code, by default th
 
 
 | `isis.services.` +
-`exceprecog.logRecognizedExceptions` +
+`exceprecog.` +
+`logRecognizedExceptions` +
 |`true`,`false` +
 (`false`)
 |whether recognized exceptions should also be logged. +
@@ -322,7 +335,8 @@ This property logs the exception anyway, useful for debugging.
 
 | `isis.services.` +
 `ExceptionRecognizerComposite-` +
-`ForJdoObjectStore.disable` +
+`ForJdoObjectStore.` +
+`disable` +
 |`true`,`false` +
 (`false`)
 |whether to disable the default recognizers registered by `ExceptionRecognizerCompositeForJdoObjectStore`. +
@@ -332,7 +346,8 @@ In the (probably remote) chance that this functionality isn't required, they can
 
 
 |`isis.services.` +
-`injector.injectPrefix`
+`injector.` +
+`injectPrefix`
 | `true`,`false`  +
 (`false`)
 |(Whether the framework should support `inject...()` as a prefix for injecting domain services into other domain objects.
@@ -343,7 +358,8 @@ If the setting is left as disabled then this may reduce application start-up tim
 
 
 |`isis.services.` +
-`injector.setPrefix`
+`injector.` +
+`setPrefix`
 | `true`,`false`  +
 (`true`)
 |Whether the framework should support `set...()` as a prefix for injecting domain services into other domain objects.
@@ -355,19 +371,22 @@ If the setting is changed to disabled then this may reduce application start-up
 
 
 |`isis.services.` +
-`publish.objects`
+`publish.` +
+`objects`
 | `all`, `none` +
 (`all`)
 |Whether changed objects should be automatically published (for objects annotated with xref:rgant.adoc#_rgant-DomainObject_publishing[`@DomainObject(publishing=Publishing.AS_CONFIGURED)`].
 
 
 |`isis.services.` +
-`publish.actions`
+`publish.` +
+`actions`
 | `all`, `ignoreSafe`, `none` (`none`)
 |Whether actions should be automatically published (for actions annotated with xref:rgant.adoc#_rgant-Action_publishing[`@Action(publishing=Publishing.AS_CONFIGURED)`]. +
 
 |`isis.services.` +
-`publish.properties`
+`publish.` +
+`properties`
 | `all`, `none` (`none`)
 |Whether properties should be automatically published (for properties annotated with xref:rgant.adoc#_rgant-Action_publishing[`@Property(publishing=Publishing.AS_CONFIGURED)`]. +
 
@@ -382,7 +401,8 @@ This property is IGNORED if the xref:rgcfg.adoc#_rgcfg_configuring-components[`i
 
 
 |`isis.services.` +
-`translation.po.mode`
+`translation.` +
+`po.mode`
 | `read`,`write`
 |Whether to force the `TranslationService` into either read or write mode. +
 


[22/22] isis git commit: Merge branch 'ISIS-1566_pr-69'

Posted by da...@apache.org.
Merge branch 'ISIS-1566_pr-69'


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

Branch: refs/heads/master
Commit: 8353a6d2d99e1ed4e05064573bae73de563b7b5c
Parents: c0467a6 e5085a8
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jan 9 22:39:46 2017 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 9 22:39:46 2017 +0000

----------------------------------------------------------------------
 .../CreateSchemaObjectFromClassMetadata.java    | 38 ++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[13/22] isis git commit: ISIS-1558: extends the simpleapp to use spotify maven plugin directly

Posted by da...@apache.org.
ISIS-1558: extends the simpleapp to use spotify maven plugin directly


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

Branch: refs/heads/master
Commit: 0febb58e932e57eee1ef4a3829bb3cf98952791a
Parents: 7c2ca99
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Dec 22 14:16:32 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Dec 22 14:16:32 2016 +0000

----------------------------------------------------------------------
 example/application/simpleapp/pom.xml           | 12 +++
 example/application/simpleapp/webapp/pom.xml    | 79 +++++++++++++++++++-
 .../webapp/src/main/resources/docker/Dockerfile |  5 ++
 3 files changed, 93 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0febb58e/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 56707d1..0616fa7 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -89,6 +89,10 @@
         <jdepend-maven-plugin.version>2.0-beta-2</jdepend-maven-plugin.version>
         <findbugs-maven-plugin.version>2.5</findbugs-maven-plugin.version>
 
+        <mavenmixin-docker.version>0.0.1-SNAPSHOT</mavenmixin-docker.version>
+        <maven-deploy-plugin.version>2.8.1</maven-deploy-plugin.version>
+        <docker-maven-plugin.version>0.4.13</docker-maven-plugin.version>
+
         <mavendeps-isistesting.version>0.0.2</mavendeps-isistesting.version>
         <mavendeps-isisintellij.version>0.0.1</mavendeps-isisintellij.version>
         <mavendeps-isiswebapp.version>0.0.1</mavendeps-isiswebapp.version>
@@ -233,6 +237,14 @@
                     <artifactId>findbugs-maven-plugin</artifactId>
                     <version>${findbugs-maven-plugin.version}</version>
                 </plugin>
+
+                <!-- mavenmixin-docker -->
+                <plugin>
+                    <groupId>com.spotify</groupId>
+                    <artifactId>docker-maven-plugin</artifactId>
+                    <version>${docker-maven-plugin.version}</version>
+                </plugin>
+
             </plugins>
         </pluginManagement>
         <plugins>

http://git-wip-us.apache.org/repos/asf/isis/blob/0febb58e/example/application/simpleapp/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/pom.xml b/example/application/simpleapp/webapp/pom.xml
index 96b22a5..41d77bb 100644
--- a/example/application/simpleapp/webapp/pom.xml
+++ b/example/application/simpleapp/webapp/pom.xml
@@ -42,12 +42,19 @@
         <jetty-console-maven-plugin.backgroundImage>${basedir}/src/main/jettyconsole/isis-banner.png</jetty-console-maven-plugin.backgroundImage>
 
         <maven-war-plugin.warName>${project.parent.artifactId}</maven-war-plugin.warName>
+
+        <docker-plugin.imageName>danhaywood/isis-app-simpleapp</docker-plugin.imageName>
+        <docker-plugin.resource.include>${maven-war-plugin.warName}.war</docker-plugin.resource.include>
+        <docker-plugin.maintainer>Apache Isis committers</docker-plugin.maintainer>
+        <docker-plugin.serverId>docker-hub</docker-plugin.serverId>
+        <docker-plugin.registryUrl>https://index.docker.io/v1/</docker-plugin.registryUrl>
+
     </properties>
 
     <build>
         <resources>
             <resource>
-                <filtering>false</filtering>
+                <filtering>true</filtering>
                 <directory>src/main/resources</directory>
             </resource>
             <resource>
@@ -88,6 +95,7 @@
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>com.github.odavid.maven.plugins</groupId>
                 <artifactId>mixin-maven-plugin</artifactId>
@@ -123,6 +131,73 @@
                     </mixins>
                 </configuration>
             </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>build-image</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>tag-image</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>tag</goal>
+                        </goals>
+                        <configuration>
+                            <image>${docker-plugin.imageName}</image>
+                            <newName>${docker-plugin.imageName}:${project.version}</newName>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>push-image</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>push</goal>
+                        </goals>
+                        <configuration>
+                            <imageName>${docker-plugin.imageName}:${project.version}</imageName>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>push-image-latest</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>push</goal>
+                        </goals>
+                        <configuration>
+                            <imageName>${docker-plugin.imageName}:latest</imageName>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <imageName>${docker-plugin.imageName}</imageName>
+                    <dockerDirectory>${build.outputDirectory}/docker</dockerDirectory>
+                    <resources>
+                        <resource>
+                            <targetPath>.</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${docker-plugin.resource.include}</include>
+                        </resource>
+                    </resources>
+                    <serverId>${docker-plugin.serverId}</serverId>
+                    <registryUrl>${docker-plugin.registryUrl}</registryUrl>
+                </configuration>
+            </plugin>
+
+
         </plugins>
     </build>
 
@@ -186,7 +261,6 @@
                 </dependency>
             </dependencies>
         </profile>
-        <!--
         <profile>
             <id>jdbc-postgres</id>
             <activation>
@@ -202,7 +276,6 @@
                 </dependency>
             </dependencies>
         </profile>
-        -->
         <!--
         <profile>
             <id>jdbc-mssql</id>

http://git-wip-us.apache.org/repos/asf/isis/blob/0febb58e/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile b/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile
new file mode 100644
index 0000000..eb975db
--- /dev/null
+++ b/example/application/simpleapp/webapp/src/main/resources/docker/Dockerfile
@@ -0,0 +1,5 @@
+FROM incodehq/tomcat
+MAINTAINER ${docker-plugin.maintainer}
+RUN rm -rf ${DEPLOYMENT_DIR}/ROOT
+COPY ${docker-plugin.resource.include} ${DEPLOYMENT_DIR}/ROOT.war
+EXPOSE 8080
\ No newline at end of file


[12/22] isis git commit: ISIS-1557: adds email configuration keys to allow the to, cc and bcc email addresses to be overridden.

Posted by da...@apache.org.
ISIS-1557: adds email configuration keys to allow the to, cc and bcc email addresses to be overridden.


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

Branch: refs/heads/master
Commit: 7c2ca9933e9200aee4f93b04f4e08c331575fece
Parents: 07b0ecf
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 21 13:08:45 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 21 13:08:45 2016 +0000

----------------------------------------------------------------------
 .../guides/_rgcfg_configuring-core.adoc         | 28 +++++++++
 .../guides/_rgsvc_api_EmailService.adoc         | 12 ++++
 .../services/email/EmailServiceDefault.java     | 53 ++++++++++++++---
 .../email/EmailServiceDefaultTest_actually.java | 61 ++++++++++++++++++++
 .../email/EmailServiceDefaultTest_notEmpty.java | 45 +++++++++++++++
 5 files changed, 191 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/7c2ca993/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
index 7223385..3a6e1c2 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcfg_configuring-core.adoc
@@ -247,6 +247,34 @@ If no configuration property is available, then the defaults is determined by th
 
 | `isis.service.` +
 `email.` +
+`override.bcc` +
+| email address
+|(`1.13.3-SNAPSHOT`) intended to simplify testing, if specified then the email's `bcc` address will be that specified (rather than the email address(es) passed in as an argument to `EmailService#send(...)`).  +
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
+| `isis.service.` +
+`email.` +
+`override.cc` +
+| email address
+|(`1.13.3-SNAPSHOT`) intended to simplify testing, if specified then the email's `cc` address will be that specified (rather than the email address(es) passed in as an argument to `EmailService#send(...)`).  +
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
+| `isis.service.` +
+`email.` +
+`override.to` +
+| email address
+|(`1.13.3-SNAPSHOT`) intended to simplify testing, if specified then the email's `to` address will be that specified (rather than the email address(es) passed in as an argument to `EmailService#send(...)`).  +
+
+NB: note that the key is mis-spelt, (`isis.service.email` rather than `isis.services.email`)
+
+
+
+| `isis.service.` +
+`email.` +
 `port` +
 | port number (`_587_`)
 |The port number for the SMTP service on the the external SMTP host (used by xref:rgsvc.adoc#_rgsvc_api_EmailService[`EmailService`]).  +

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2ca993/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
index 7c58b40..9215dd9 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgsvc_api_EmailService.adoc
@@ -73,6 +73,18 @@ In addition (as of `1.13.3-SNAPSHOT`), the following properties can be set:
 Whether to throw an exception if there the email cannot be sent (probably because of some misconfiguration).
 This behaviour is (now) the default; the old behaviour (of just returning `false` from the `send()` method) can be re-enabled by setting this property to `false`.
 
+* `isis.service.email.override.to` +
++
+Intended to simplify testing, if specified then the email's `to` address will be that specified (rather than the email address(es) passed in as an argument to `EmailService#send(...)`).
+
+* `isis.service.email.override.cc` +
++
+Similarly, to override the `cc` email address.
+
+* `isis.service.email.override.to` +
++
+Similarly, to override the `bcc` email address.
+
 * `isis.service.email.socketTimeout` +
 +
 The socket timeout, defaulting to 2000ms.

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2ca993/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
index 76d7d02..5b01331 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/email/EmailServiceDefault.java
@@ -18,6 +18,7 @@
  */
 package org.apache.isis.core.runtime.services.email;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.Properties;
 
@@ -79,6 +80,10 @@ public class EmailServiceDefault implements EmailService {
     private static final String ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT = "isis.service.email.socketConnectionTimeout";
     private static final int ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT_DEFAULT = 2000;
 
+    private static final String ISIS_SERVICE_EMAIL_OVERRIDE_TO = "isis.service.email.override.to";
+    private static final String ISIS_SERVICE_EMAIL_OVERRIDE_CC = "isis.service.email.override.cc";
+    private static final String ISIS_SERVICE_EMAIL_OVERRIDE_BCC = "isis.service.email.override.bcc";
+
     //endregion
 
     //region > init
@@ -135,6 +140,19 @@ public class EmailServiceDefault implements EmailService {
     protected int getSocketConnectionTimeout() {
         return configuration.getInteger(ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT, ISIS_SERVICE_EMAIL_SOCKET_CONNECTION_TIMEOUT_DEFAULT);
     }
+
+    protected String getEmailOverrideTo() {
+        return configuration.getString(ISIS_SERVICE_EMAIL_OVERRIDE_TO);
+    }
+
+    protected String getEmailOverrideCc() {
+        return configuration.getString(ISIS_SERVICE_EMAIL_OVERRIDE_CC);
+    }
+
+    protected String getEmailOverrideBcc() {
+        return configuration.getString(ISIS_SERVICE_EMAIL_OVERRIDE_BCC);
+    }
+
     //endregion
 
     //region > isConfigured
@@ -194,14 +212,22 @@ public class EmailServiceDefault implements EmailService {
                 }
             }
 
-            if(notEmpty(toList)) {
-                email.addTo(toList.toArray(new String[toList.size()]));
+
+            final String overrideTo = getEmailOverrideTo();
+            final String overrideCc = getEmailOverrideCc();
+            final String overrideBcc = getEmailOverrideBcc();
+
+            final String[] toListElseOverride = actually(toList, overrideTo);
+            if(notEmpty(toListElseOverride)) {
+                email.addTo(toListElseOverride);
             }
-            if(notEmpty(ccList)) {
-                email.addCc(ccList.toArray(new String[ccList.size()]));
+            final String[] ccListElseOverride = actually(ccList, overrideCc);
+            if(notEmpty(ccListElseOverride)) {
+                email.addCc(ccListElseOverride);
             }
-            if(notEmpty(bccList)) {
-                email.addBcc(bccList.toArray(new String[bccList.size()]));
+            final String[] bccListElseOverride = actually(bccList, overrideBcc);
+            if(notEmpty(bccListElseOverride)) {
+                email.addBcc(bccListElseOverride);
             }
 
             email.send();
@@ -219,9 +245,20 @@ public class EmailServiceDefault implements EmailService {
     }
     //endregion
 
+
     //region > helper methods
-    private boolean notEmpty(final List<String> toList) {
-        return toList != null && !toList.isEmpty();
+
+    static String[] actually(final List<String> original, final String overrideIfAny) {
+        final List<String> addresses = Strings.isNullOrEmpty(overrideIfAny)
+                ? original == null
+                    ? Collections.<String>emptyList()
+                    : original
+                : Collections.singletonList(overrideIfAny);
+        return addresses.toArray(new String[addresses.size()]);
+    }
+
+    static boolean notEmpty(final String[] addresses) {
+        return addresses != null && addresses.length > 0;
     }
     //endregion
 

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2ca993/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_actually.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_actually.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_actually.java
new file mode 100644
index 0000000..cfbd748
--- /dev/null
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_actually.java
@@ -0,0 +1,61 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.runtime.services.email;
+
+import com.google.common.collect.Lists;
+
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class EmailServiceDefaultTest_actually {
+
+    @Test
+    public void when_null() throws Exception {
+
+        final String[] actually = EmailServiceDefault.actually(null, null);
+
+        assertThat(actually, is(not(nullValue())));
+        assertThat(actually.length, is(0));
+    }
+
+    @Test
+    public void when_not_null_but_no_override() throws Exception {
+
+        final String[] actually = EmailServiceDefault.actually(Lists.newArrayList("joey@tribiani.com", "rachel@green.com"), null);
+
+        assertThat(actually, is(not(nullValue())));
+        assertThat(actually.length, is(2));
+    }
+
+    @Test
+    public void when_not_null_but_with_override() throws Exception {
+
+        final String[] actually = EmailServiceDefault.actually(Lists.newArrayList("joey@tribiani.com", "rachel@green.com"), "ross@geller.com");
+
+        assertThat(actually, is(not(nullValue())));
+        assertThat(actually.length, is(1));
+        assertThat(actually[0], is(equalTo("ross@geller.com")));
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2ca993/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_notEmpty.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_notEmpty.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_notEmpty.java
new file mode 100644
index 0000000..e4b00ff
--- /dev/null
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/email/EmailServiceDefaultTest_notEmpty.java
@@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.runtime.services.email;
+
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class EmailServiceDefaultTest_notEmpty {
+
+    @Test
+    public void when_not_empty() throws Exception {
+        assertThat(EmailServiceDefault.notEmpty(new String[] { "joey@tribiani.com", "rachel@green.com" }), is(true));
+        assertThat(EmailServiceDefault.notEmpty(new String[] { "rachel@green.com" }), is(true));
+    }
+
+    @Test
+    public void when_null() throws Exception {
+        assertThat(EmailServiceDefault.notEmpty(null), is(false));
+    }
+
+    @Test
+    public void when_empty() throws Exception {
+        assertThat(EmailServiceDefault.notEmpty(new String[]{}), is(false));
+    }
+
+
+}
\ No newline at end of file