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 2022/09/27 13:43:09 UTC

[isis] branch ISIS-3224 created (now 57d097049d)

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

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


      at 57d097049d ISIS-3224: makes consistent

This branch includes the following new commits:

     new 718e68913c ISIS-2965: fixes verify-isis-release.sh script
     new e4a3db684e ISIS-2965: further fixes
     new 57d097049d ISIS-3224: makes consistent

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.



[isis] 03/03: ISIS-3224: makes consistent

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

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

commit 57d097049dddf3f8b0877b86f3f633ff3683fd61
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 27 14:42:45 2022 +0100

    ISIS-3224: makes consistent
---
 .../applib/dom/CommandLogEntryRepository.java      |  4 ++--
 .../applib/dom/ExecutionLogEntryRepository.java    |  5 ++++-
 .../applib/dom/AuditTrailEntryRepository.java      | 23 +++++++++++++++-------
 3 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java
index f4a139a48d..d59e46359b 100644
--- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java
+++ b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java
@@ -396,7 +396,7 @@ public abstract class CommandLogEntryRepository<C extends CommandLogEntry> {
      */
     public List<C> findAll() {
         if (isisSystemEnvironment.getDeploymentType().isProduction()) {
-            throw new IllegalStateException("Cannot removeAll in production systems");
+            throw new IllegalStateException("Cannot call 'findAll' in production systems");
         }
         return repositoryService().allInstances(commandLogEntryClass);
     }
@@ -407,7 +407,7 @@ public abstract class CommandLogEntryRepository<C extends CommandLogEntry> {
      */
     public void removeAll() {
         if (isisSystemEnvironment.getDeploymentType().isProduction()) {
-            throw new IllegalStateException("Cannot removeAll in production systems");
+            throw new IllegalStateException("Cannot call 'removeAll' in production systems");
         }
         repositoryService().removeAll(commandLogEntryClass);
     }
diff --git a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntryRepository.java b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntryRepository.java
index cf72d07707..8afd7e46ae 100644
--- a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntryRepository.java
+++ b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntryRepository.java
@@ -189,6 +189,9 @@ public abstract class ExecutionLogEntryRepository<E extends ExecutionLogEntry> {
      * intended for testing purposes only
      */
     public List<E> findAll() {
+        if (isisSystemEnvironment.getDeploymentType().isProduction()) {
+            throw new IllegalStateException("Cannot call 'findAll' in production systems");
+        }
         return repositoryService().allInstances(executionLogEntryClass);
     }
 
@@ -198,7 +201,7 @@ public abstract class ExecutionLogEntryRepository<E extends ExecutionLogEntry> {
      */
     public void removeAll() {
         if (isisSystemEnvironment.getDeploymentType().isProduction()) {
-            throw new IllegalStateException("Cannot removeAll in production systems");
+            throw new IllegalStateException("Cannot call 'removeAll' in production systems");
         }
         repositoryService().removeAll(executionLogEntryClass);
     }
diff --git a/extensions/security/audittrail/applib/src/main/java/org/apache/isis/extensions/audittrail/applib/dom/AuditTrailEntryRepository.java b/extensions/security/audittrail/applib/src/main/java/org/apache/isis/extensions/audittrail/applib/dom/AuditTrailEntryRepository.java
index 7c57e09518..f2436c5f64 100644
--- a/extensions/security/audittrail/applib/src/main/java/org/apache/isis/extensions/audittrail/applib/dom/AuditTrailEntryRepository.java
+++ b/extensions/security/audittrail/applib/src/main/java/org/apache/isis/extensions/audittrail/applib/dom/AuditTrailEntryRepository.java
@@ -33,6 +33,7 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.factory.FactoryService;
 import org.apache.isis.applib.services.publishing.spi.EntityPropertyChange;
 import org.apache.isis.applib.services.repository.RepositoryService;
+import org.apache.isis.core.config.environment.IsisSystemEnvironment;
 
 import lombok.AccessLevel;
 import lombok.RequiredArgsConstructor;
@@ -49,6 +50,7 @@ public abstract class AuditTrailEntryRepository<E extends AuditTrailEntry> {
 
     @Inject RepositoryService repositoryService;
     @Inject FactoryService factoryService;
+    @Inject IsisSystemEnvironment isisSystemEnvironment;
 
     public Class<E> getEntityClass() {
         return auditTrailEntryClass;
@@ -156,26 +158,33 @@ public abstract class AuditTrailEntryRepository<E extends AuditTrailEntry> {
         return repositoryService.allMatches(query);
     }
 
+    private static Timestamp toTimestampStartOfDayWithOffset(final LocalDate dt, final int daysOffset) {
+        return dt!=null
+                ? Timestamp.valueOf(dt.atStartOfDay().plusDays(daysOffset))
+                :null;
+    }
+
+
+
     /**
      * intended for testing only
      */
     public List<? extends AuditTrailEntry> findAll() {
+        if (isisSystemEnvironment.getDeploymentType().isProduction()) {
+            throw new IllegalStateException("Cannot call 'findAll' in production systems");
+        }
         return repositoryService.allMatches(
                 Query.named(auditTrailEntryClass, AuditTrailEntry.Nq.FIND)
         );
     }
 
-    private static Timestamp toTimestampStartOfDayWithOffset(final LocalDate dt, final int daysOffset) {
-        return dt!=null
-                ? Timestamp.valueOf(dt.atStartOfDay().plusDays(daysOffset))
-                :null;
-    }
-
-
     /**
      * intended for testing only
      */
     public void removeAll() {
+        if (isisSystemEnvironment.getDeploymentType().isProduction()) {
+            throw new IllegalStateException("Cannot call 'removeAll' in production systems");
+        }
         repositoryService.removeAll(auditTrailEntryClass);
     }
 


[isis] 01/03: ISIS-2965: fixes verify-isis-release.sh script

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

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

commit 718e68913c8e96b53aee0739143c20d16ce7e4c0
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 26 23:54:28 2022 +0100

    ISIS-2965: fixes verify-isis-release.sh script
    
    (cherry picked from commit ba2b58bbcd53c532b4781818770bd843add3e71e)
---
 scripts/verify-isis-release.sh | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/scripts/verify-isis-release.sh b/scripts/verify-isis-release.sh
index 8137762c6a..7e11e98217 100755
--- a/scripts/verify-isis-release.sh
+++ b/scripts/verify-isis-release.sh
@@ -91,16 +91,11 @@ _build(){
     rm -rf ~/.m2/repository/org/apache/isis
 
     echo 'Building'
-    
-	# 2.0.0-M8-RC1 verification build hotfix
-	pushd isis*/supplemental-model
-	_execmustpass mvn clean install -Dskip.git -Preleased,-all
-	popd
-    
+
     # previously there were multiple directories, now just the one.
-	pushd isis*/bom
-    _execmustpass mvn clean install -Dskip.git -Preleased,-all
-	popd
+    pushd isis*/bom
+    _execmustpass mvn clean install -DskipTests -T1C -Dgithub
+    popd
 }
 
 _download_app(){


[isis] 02/03: ISIS-2965: further fixes

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

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

commit e4a3db684ec8c5daec2aaa3ab974fd66b6b512e7
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 27 00:32:27 2022 +0100

    ISIS-2965: further fixes
---
 scripts/verify-isis-release.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/verify-isis-release.sh b/scripts/verify-isis-release.sh
index 7e11e98217..962fee73cb 100755
--- a/scripts/verify-isis-release.sh
+++ b/scripts/verify-isis-release.sh
@@ -107,7 +107,7 @@ _download_app(){
     DIR=$REPO-$VARIANT
 
     rm -rf $DIR
-    curl "https://codeload.github.com/apache/$REPO/zip/$BRANCH" | jar xv
+    curl "https://codeload.github.com/apache/$REPO/zip/refs/heads/$BRANCH" | jar xv
     mv $REPO-$BRANCH $DIR
 
     pushd $DIR