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/09/30 05:11:02 UTC

[isis-app-demo] branch main updated (77982d5 -> 1362883)

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

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


    from 77982d5  updates and slims down the README
     new 6c5f4b6  removes unnecessary javax.persistence qualifications.
     new c18ecd4  updates description in pom.xml, is all
     new 5e3eaef  updates docker image name
     new cf25957  updates app name. welcome page and banner
     new 1362883  updates security perms

The 5 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:
 module-pets-tests/pom.xml                          |  2 +-
 .../modules/pets/dom/petowner/PetOwner.java        | 44 ++++++++++++++--------
 .../modules/pets/dom/petowner/PetOwners.java       |  7 +++-
 webapp/pom.xml                                     |  2 +-
 webapp/src/main/resources/application.yml          |  4 +-
 webapp/src/main/resources/banner.txt               | 13 ++++---
 webapp/src/main/resources/shiro.ini                |  9 ++---
 webapp/src/main/resources/static/index.html        |  5 +--
 8 files changed, 50 insertions(+), 36 deletions(-)

[isis-app-demo] 01/05: removes unnecessary javax.persistence qualifications.

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

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

commit 6c5f4b6b9152b0558dbeb37713e79e388a7666be
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 29 23:13:59 2021 +0100

    removes unnecessary javax.persistence qualifications.
---
 .../modules/pets/dom/petowner/PetOwner.java        | 44 ++++++++++++++--------
 .../modules/pets/dom/petowner/PetOwners.java       |  7 +++-
 2 files changed, 33 insertions(+), 18 deletions(-)

diff --git a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java
index 5eb374d..dc89b83 100644
--- a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java
+++ b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java
@@ -3,6 +3,18 @@ package petclinic.modules.pets.dom.petowner;
 import java.util.Comparator;
 
 import javax.inject.Inject;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EntityListeners;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import javax.persistence.UniqueConstraint;
+import javax.persistence.Version;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
 import org.apache.isis.applib.annotation.Action;
@@ -34,22 +46,22 @@ import petclinic.modules.pets.types.Name;
 import petclinic.modules.pets.types.Notes;
 
 
-@javax.persistence.Entity
-@javax.persistence.Table(
+@Entity
+@Table(
     schema="pets",
     uniqueConstraints = {
-        @javax.persistence.UniqueConstraint(name = "PetOwner__name__UNQ", columnNames = {"NAME"})
+        @UniqueConstraint(name = "PetOwner__name__UNQ", columnNames = {"NAME"})
     }
 )
-@javax.persistence.NamedQueries({
-        @javax.persistence.NamedQuery(
+@NamedQueries({
+        @NamedQuery(
                 name = PetOwner.NAMED_QUERY__FIND_BY_NAME_LIKE,
                 query = "SELECT so " +
                         "FROM PetOwner so " +
                         "WHERE so.name LIKE :name"
         )
 })
-@javax.persistence.EntityListeners(IsisEntityListener.class)
+@EntityListeners(IsisEntityListener.class)
 @DomainObject(logicalTypeName = "pets.PetOwner", entityChangePublishing = Publishing.ENABLED)
 @DomainObjectLayout()
 @NoArgsConstructor(access = AccessLevel.PUBLIC)
@@ -59,13 +71,13 @@ public class PetOwner implements Comparable<PetOwner> {
 
     static final String NAMED_QUERY__FIND_BY_NAME_LIKE = "PetOwner.findByNameLike";
 
-    @javax.persistence.Id
-    @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
-    @javax.persistence.Column(name = "id", nullable = false)
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
     private Long id;
 
-    @javax.persistence.Version
-    @javax.persistence.Column(name = "version", nullable = false)
+    @Version
+    @Column(name = "version", nullable = false)
     @PropertyLayout(fieldSetId = "metadata", sequence = "999")
     @Getter @Setter
     private long version;
@@ -76,21 +88,21 @@ public class PetOwner implements Comparable<PetOwner> {
         return simpleObject;
     }
 
-    @Inject @javax.persistence.Transient RepositoryService repositoryService;
-    @Inject @javax.persistence.Transient TitleService titleService;
-    @Inject @javax.persistence.Transient MessageService messageService;
+    @Inject @Transient RepositoryService repositoryService;
+    @Inject @Transient TitleService titleService;
+    @Inject @Transient MessageService messageService;
 
 
 
     @Title
     @Name
-    @javax.persistence.Column(length = Name.MAX_LEN, nullable = false)
+    @Column(length = Name.MAX_LEN, nullable = false)
     @Getter @Setter @ToString.Include
     @PropertyLayout(fieldSetId = "name", sequence = "1")
     private String name;
 
     @Notes
-    @javax.persistence.Column(length = Notes.MAX_LEN, nullable = true)
+    @Column(length = Notes.MAX_LEN, nullable = true)
     @Getter @Setter
     @Property(commandPublishing = Publishing.ENABLED, executionPublishing = Publishing.ENABLED)
     @PropertyLayout(fieldSetId = "name", sequence = "2")
diff --git a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwners.java b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwners.java
index c471183..8d0b165 100644
--- a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwners.java
+++ b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwners.java
@@ -2,6 +2,7 @@ package petclinic.modules.pets.dom.petowner;
 
 import java.util.List;
 
+import javax.annotation.Priority;
 import javax.inject.Inject;
 import javax.persistence.TypedQuery;
 
@@ -18,14 +19,16 @@ import org.apache.isis.applib.query.Query;
 import org.apache.isis.applib.services.repository.RepositoryService;
 import org.apache.isis.persistence.jpa.applib.services.JpaSupportService;
 
+import lombok.RequiredArgsConstructor;
+
 import petclinic.modules.pets.types.Name;
 
 @DomainService(
         nature = NatureOfService.VIEW,
         logicalTypeName = "pets.PetOwners"
 )
-@javax.annotation.Priority(PriorityPrecedence.EARLY)
-@lombok.RequiredArgsConstructor(onConstructor_ = {@Inject} )
+@Priority(PriorityPrecedence.EARLY)
+@RequiredArgsConstructor(onConstructor_ = {@Inject} )
 public class PetOwners {
 
     final RepositoryService repositoryService;

[isis-app-demo] 03/05: updates docker image name

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

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

commit 5e3eaefd09ee081984e9af3d8251df220a6e0c75
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 29 23:23:45 2021 +0100

    updates docker image name
---
 webapp/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapp/pom.xml b/webapp/pom.xml
index 1f6e9dd..24eb48a 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -177,7 +177,7 @@
                                 </ports>
                             </container>
                             <to>
-                                <image>docker.io/apacheisis/simpleapp</image>
+                                <image>docker.io/apacheisis/petclinic</image>
                                 <tags>
                                     <tag>${env.REVISION}</tag>
                                 </tags>

[isis-app-demo] 05/05: updates security perms

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

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

commit 1362883d5dca36fe082be0ca9d4cd6569cf99648
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 29 23:29:50 2021 +0100

    updates security perms
---
 webapp/src/main/resources/shiro.ini | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/webapp/src/main/resources/shiro.ini b/webapp/src/main/resources/shiro.ini
index 59e43ba..98daf81 100644
--- a/webapp/src/main/resources/shiro.ini
+++ b/webapp/src/main/resources/shiro.ini
@@ -35,11 +35,10 @@ guest = guest, guest_role, default_role
 # role = perm1, perm2, perm3, ...
 # perm in format: logicalTypeNamespace:logicalTypeSimpleName:memberName:r,w
 
-simple_role    = *:SimpleObjects:*:*,\
-                 *:SimpleObject:*:*
-guest_role     = *:SimpleObjects:findByName:*,\
-                 *:SimpleObjects:listAll:*,\
-                 *:SimpleObjects:*:r
+simple_role    = pets
+guest_role     = pets:PetOwners:findByName:*,\
+                 pets:PetOwners:listAll:*,\
+                 pets:*:*:r
 admin_role     = *
 default_role   = isis.applib,\
                  isis.security

[isis-app-demo] 02/05: updates description in pom.xml, is all

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

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

commit c18ecd4cd162bcbe2ef88a24bcef5939b3af7182
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 29 23:23:26 2021 +0100

    updates description in pom.xml, is all
---
 module-pets-tests/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module-pets-tests/pom.xml b/module-pets-tests/pom.xml
index e3d433c..f64c055 100644
--- a/module-pets-tests/pom.xml
+++ b/module-pets-tests/pom.xml
@@ -14,7 +14,7 @@
     <name>Petclinic - Pets Module (tests)</name>
 
     <description>
-        Integ tests for 'simple module'
+        Integ tests for 'pets' module
     </description>
 
     <build>

[isis-app-demo] 04/05: updates app name. welcome page and banner

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

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

commit cf25957adf5b9eb8fd1593595dc3464be1c99e57
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 29 23:29:40 2021 +0100

    updates app name. welcome page and banner
---
 webapp/src/main/resources/application.yml   |  4 ++--
 webapp/src/main/resources/banner.txt        | 13 +++++++------
 webapp/src/main/resources/static/index.html |  5 ++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/webapp/src/main/resources/application.yml b/webapp/src/main/resources/application.yml
index 5960b92..5d1d898 100644
--- a/webapp/src/main/resources/application.yml
+++ b/webapp/src/main/resources/application.yml
@@ -41,13 +41,13 @@ isis:
   viewer:
     wicket:
       application:
-        about: Simple App
+        about: PetClinic
         brand-logo-header: images/apache-isis/logo-48x48.png
         css: css/application.css
         favicon-url: images/favicon.png
         js: scripts/application.js
         menubars-layout-xml: menubars.layout.xml
-        name: Simple App
+        name: PetClinic
         # https://stackoverflow.com/a/38983935/56880
         version: @project.version@
 
diff --git a/webapp/src/main/resources/banner.txt b/webapp/src/main/resources/banner.txt
index 1348a76..e335779 100644
--- a/webapp/src/main/resources/banner.txt
+++ b/webapp/src/main/resources/banner.txt
@@ -1,6 +1,7 @@
-     _                     _            ___     _
-    / \   _ __   __ _  ___| |__   ___  |_ _|___(_)___
-   / _ \ | '_ \ / _` |/ __| '_ \ / _ \  | |/ __| / __|
-  / ___ \| |_) | (_| | (__| | | |  __/  | |\__ \ \__ \
- /_/   \_\ .__/ \__,_|\___|_| |_|\___| |___|___/_|___/
-         |_|
\ No newline at end of file
+ _______         _      ______  __    _             _
+|_   __ \       / |_  .' ___  |[  |  (_)           (_)
+  | |__) |.---.`| |-'/ .'   \_| | |  __   _ .--.   __   .---.
+  |  ___// /__\\| |  | |        | | [  | [ `.-. | [  | / /'`\]
+ _| |_   | \__.,| |, \ `.___.'\ | |  | |  | | | |  | | | \__.
+|_____|   '.__.'\__/  `.____ .'[___][___][___||__][___]'.___.'
+                                                               
diff --git a/webapp/src/main/resources/static/index.html b/webapp/src/main/resources/static/index.html
index 5e8c12d..f9ed402 100644
--- a/webapp/src/main/resources/static/index.html
+++ b/webapp/src/main/resources/static/index.html
@@ -2,7 +2,7 @@
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-        <title>Apache Isis&trade; Simple App</title>
+        <title>Apache Isis&trade; PetClinic app</title>
 
         <link rel="stylesheet" type="text/css" href="css/page.css">
     </head>
@@ -11,8 +11,7 @@
             <img alt="Isis Logo" src="images/apache-isis/logo.png" />
 
             <p>
-                This is a simple <a href="http://isis.apache.org">Apache Isis</a> application, structured so it can be
-                used as a starting point for developing your own applications.
+                This is a PetClinic app implemented as an <a href="http://isis.apache.org">Apache Isis</a> application.
                 <br/>
             </p>