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 2021/04/13 19:44:00 UTC

[isis-app-simpleapp] branch jpa updated (fc95327 -> a9c9f39)

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a change to branch jpa
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git.


    from fc95327  Merge branch 'jdo' into jpa
     add e6bddf1  simplifies SimpleObject.layout.xml
     add 7783e86  for menubar, adds section names, simplifies
     new 9fe1003  Merge branch 'jdo' into jpa
     add c93c384  Removes the custom (application) configuration properties
     new aeb490c  Merge branch 'jdo' into jpa
     new a9c9f39  adds back in EntityScan; removes unnecessary domain event

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../domainapp/modules/simple/SimpleModule.java     | 32 --------
 .../modules/simple/dom/so/SimpleObject.java        | 21 ++++-
 .../modules/simple/dom/so/SimpleObject.layout.xml  | 10 +--
 .../modules/simple/dom/so/SimpleObjects.java       |  1 -
 .../java/domainapp/modules/simple/types/Name.java  | 25 +-----
 webapp/src/main/resources/application.yml          |  8 --
 webapp/src/main/resources/menubars.layout.xml      | 89 +++++++---------------
 7 files changed, 49 insertions(+), 137 deletions(-)

[isis-app-simpleapp] 02/03: Merge branch 'jdo' into jpa

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch jpa
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git

commit aeb490c220ee0ba3a80f4ee496c3485a14f2edaf
Merge: 9fe1003 c93c384
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Apr 13 19:27:59 2021 +0100

    Merge branch 'jdo' into jpa

 .../domainapp/modules/simple/SimpleModule.java     | 33 ----------------------
 .../modules/simple/dom/so/SimpleObject.java        |  8 ++++++
 .../java/domainapp/modules/simple/types/Name.java  | 25 ++--------------
 webapp/src/main/resources/application.yml          |  8 ------
 4 files changed, 10 insertions(+), 64 deletions(-)

diff --cc module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
index 89c9d01,978c617..fd47969
--- a/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
+++ b/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
@@@ -17,11 -16,6 +16,8 @@@ import domainapp.modules.simple.dom.so.
  
  @Configuration
  @ComponentScan
- @EnableConfigurationProperties({
-         SimpleModule.Configuration.class,
- })
 +@EnableJpaRepositories
 +@EntityScan(basePackageClasses = {SimpleModule.class})
  public class SimpleModule implements ModuleWithFixtures {
  
      @Override
diff --cc module-simple/src/main/java/domainapp/modules/simple/types/Name.java
index a04b05c,4e1e8d2..2412d3d
--- a/module-simple/src/main/java/domainapp/modules/simple/types/Name.java
+++ b/module-simple/src/main/java/domainapp/modules/simple/types/Name.java
@@@ -17,8 -18,9 +17,8 @@@ import lombok.val
  
  import domainapp.modules.simple.SimpleModule;
  
- @Property(mustSatisfy = Name.Specification.class, maxLength = Name.MAX_LEN)
- @Parameter(mustSatisfy = Name.Specification.class, maxLength = Name.MAX_LEN)
 -@Column(length = Name.MAX_LEN, allowsNull = "false")
+ @Property(maxLength = Name.MAX_LEN)
+ @Parameter(maxLength = Name.MAX_LEN)
  @ParameterLayout(named = "Name")
  @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
  @Retention(RetentionPolicy.RUNTIME)
diff --cc webapp/src/main/resources/application.yml
index 986d6cf,0e6436d..394dc2b
--- a/webapp/src/main/resources/application.yml
+++ b/webapp/src/main/resources/application.yml
@@@ -101,16 -103,3 +101,8 @@@ management
      health:
        enabled: true
  
- app:
-   simple-module:
-     types:
-       name:
-         validation:
-           message: "'{character}' is invalid."
-           prohibited-characters: "&%$!"
- 
 +# workaround for https://issues.apache.org/jira/browse/ISIS-2583: not used, but needed to prevent NPE
 +datanucleus:
 +  cache:
 +    level2:
 +      type: soft

[isis-app-simpleapp] 01/03: Merge branch 'jdo' into jpa

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch jpa
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git

commit 9fe1003705bbab00081ad57cc74ddb9132c57282
Merge: fc95327 7783e86
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Apr 13 19:10:41 2021 +0100

    Merge branch 'jdo' into jpa

 .../modules/simple/dom/so/SimpleObject.java        | 13 +++-
 .../modules/simple/dom/so/SimpleObject.layout.xml  | 10 +--
 webapp/src/main/resources/menubars.layout.xml      | 89 +++++++---------------
 3 files changed, 39 insertions(+), 73 deletions(-)

diff --cc module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.java
index 819e16b,98441e1..97e58f5
--- a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.java
+++ b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.java
@@@ -9,7 -13,7 +10,8 @@@ import org.apache.isis.applib.annotatio
  import org.apache.isis.applib.annotation.DomainObject;
  import org.apache.isis.applib.annotation.DomainObjectLayout;
  import org.apache.isis.applib.annotation.MemberOrder;
+ import org.apache.isis.applib.annotation.PromptStyle;
 +import org.apache.isis.applib.annotation.Programmatic;
  import org.apache.isis.applib.jaxb.PersistentEntityAdapter;
  import org.apache.isis.applib.services.message.MessageService;
  import org.apache.isis.applib.services.repository.RepositoryService;
@@@ -78,13 -73,13 +80,15 @@@ public class SimpleObject implements Co
  
  
      @Name
 +    @javax.persistence.Column(length = Name.MAX_LEN, nullable = false)
      @Getter @Setter @ToString.Include
+     @MemberOrder(name = "Name", sequence = "1")
      private String name;
  
      @Notes
 +    @javax.persistence.Column(length = Notes.MAX_LEN, nullable = true)
      @Getter @Setter
+     @MemberOrder(name = "Name", sequence = "2")
      private String notes;
  
  
diff --cc webapp/src/main/resources/menubars.layout.xml
index 323e883,99acb10..af812e8
--- a/webapp/src/main/resources/menubars.layout.xml
+++ b/webapp/src/main/resources/menubars.layout.xml
@@@ -4,18 -4,9 +4,10 @@@
          <mb3:menu>
              <mb3:named>Simple Objects</mb3:named>
              <mb3:section>
-                 <mb3:serviceAction objectType="simple.SimpleObjects" id="create">
-                     <cpt:named>Create</cpt:named>
-                 </mb3:serviceAction>
-                 <mb3:serviceAction objectType="simple.SimpleObjects" id="findByName">
-                     <cpt:named>Find By Name</cpt:named>
-                 </mb3:serviceAction>
-                 <mb3:serviceAction objectType="simple.SimpleObjects" id="findByNameLike">
-                     <cpt:named>Find By Name Like</cpt:named>
-                 </mb3:serviceAction>
-                 <mb3:serviceAction objectType="simple.SimpleObjects" id="listAll">
-                     <cpt:named>List All</cpt:named>
-                 </mb3:serviceAction>
+                 <mb3:serviceAction objectType="simple.SimpleObjects" id="create"/>
+                 <mb3:serviceAction objectType="simple.SimpleObjects" id="findByName"/>
++                <mb3:serviceAction objectType="simple.SimpleObjects" id="findByNameLike"/>
+                 <mb3:serviceAction objectType="simple.SimpleObjects" id="listAll"/>
              </mb3:section>
          </mb3:menu>
          <mb3:menu unreferencedActions="true">

[isis-app-simpleapp] 03/03: adds back in EntityScan; removes unnecessary domain event

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch jpa
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git

commit a9c9f39180c3c2dba0b4c270554a7932429c7ed1
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Apr 13 20:42:55 2021 +0100

    adds back in EntityScan; removes unnecessary domain event
---
 module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java   | 1 +
 .../src/main/java/domainapp/modules/simple/dom/so/SimpleObjects.java     | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java b/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
index fd47969..94f1a60 100644
--- a/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
+++ b/module-simple/src/main/java/domainapp/modules/simple/SimpleModule.java
@@ -1,5 +1,6 @@
 package domainapp.modules.simple;
 
+import org.springframework.boot.autoconfigure.domain.EntityScan;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.ComponentScan;
diff --git a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObjects.java b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObjects.java
index 89a3868..aea4b79 100644
--- a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObjects.java
+++ b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObjects.java
@@ -31,7 +31,6 @@ public class SimpleObjects {
     private final JpaSupportService jpaSupportService;
     private final SimpleObjectRepository simpleObjectRepository;
 
-    public static class ActionDomainEvent extends SimpleModule.ActionDomainEvent<SimpleObjects> {}
 
     @Action(semantics = SemanticsOf.NON_IDEMPOTENT)
     @ActionLayout(promptStyle = PromptStyle.DIALOG_SIDEBAR)