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 2018/01/29 09:21:52 UTC

[isis] 01/05: ISIS-1569: introduces a new ExecuteIn#EXCLUDED

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

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

commit 6e9676162f75bfb58949bc8db3d7259fa7ee7e7b
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jan 25 18:47:28 2018 +0000

    ISIS-1569: introduces a new ExecuteIn#EXCLUDED
---
 .../java/org/apache/isis/applib/annotation/Command.java   | 14 +++++++++++++-
 .../apache/isis/applib/annotation/CommandExecuteIn.java   | 15 ++++++++++++++-
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
index 58bafbb..1defbbb 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
@@ -87,7 +87,19 @@ public @interface Command {
          * @deprecated - use {@link CommandExecuteIn#REPLAYABLE}
          */
         @Deprecated
-        REPLAYABLE
+        REPLAYABLE,
+        /**
+         * For framework use, not intended to be used in application code.
+         *
+         * @deprecated - use {@link CommandExecuteIn#EXCLUDED}
+         */
+        @Deprecated
+        EXCLUDED;
+
+        public boolean isForeground() { return this == FOREGROUND; }
+        public boolean isBackground() { return this == BACKGROUND; }
+        public boolean isReplayable() { return this == REPLAYABLE; }
+        public boolean isExcluded() { return this == EXCLUDED; }
 
     }
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
index 4be71af..cd9311a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
@@ -47,7 +47,20 @@ public enum CommandExecuteIn {
      *     For framework use, not intended to be used in application code.
      * </p>
      */
-    REPLAYABLE;
+    REPLAYABLE,
+    /**
+     * For commands that have been excluded and will not run.
+     * These are typically for a replayable command that has hit an exception (which normally would prevent any further
+     * replayable commands from being replayed) and which the administrator has decided to skip.
+     */
+    EXCLUDED
+    ;
+
+    public boolean isForeground() { return this == FOREGROUND; }
+    public boolean isBackground() { return this == BACKGROUND; }
+    public boolean isReplayable() { return this == REPLAYABLE; }
+    public boolean isExcluded() { return this == EXCLUDED; }
+
 
     @Deprecated
     public static CommandExecuteIn from(final Command.ExecuteIn executeIn) {

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.