From 3c841da5bf0de73d209d10b2f0ee9c839380e466 Mon Sep 17 00:00:00 2001 From: Frank Hossfeld Date: Thu, 21 Jun 2018 09:53:35 +0200 Subject: [PATCH] =?UTF-8?q?Fixed:=20#12=20Weitere=20Steuerm=C3=B6glichkeit?= =?UTF-8?q?en=20aus=20den=20Sema4g=20Commands=20heraus.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed: #12 Weitere Steuermöglichkeiten aus den Sema4g Commands heraus. Fixed: #12 Weitere Steuermöglichkeiten aus den Sema4g Commands heraus. --- pom.xml | 2 +- sema4g-client/pom.xml | 2 +- .../github/mvp4g/sema4g/client/SeMa4g.java | 20 +++++++++++++++++-- .../client/command/AbstractCommand.java | 18 +++++++++++++---- sema4g-example/pom.xml | 6 +++--- sema4g-requestbuilder/pom.xml | 2 +- sema4g-resty/pom.xml | 2 +- sema4g-rpc/pom.xml | 2 +- 8 files changed, 40 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 72e249c..cea2cda 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ com.github.mvp4g sema4g-parent - 1.6.0 + 1.6.1 pom SeMa4g parent - parent pom for sema4g diff --git a/sema4g-client/pom.xml b/sema4g-client/pom.xml index 43a2577..e088fbd 100644 --- a/sema4g-client/pom.xml +++ b/sema4g-client/pom.xml @@ -23,7 +23,7 @@ com.github.mvp4g sema4g-parent - 1.6.0 + 1.6.1 sema4g diff --git a/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/SeMa4g.java b/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/SeMa4g.java index b02a033..e1c9d51 100644 --- a/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/SeMa4g.java +++ b/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/SeMa4g.java @@ -70,7 +70,11 @@ public State getState() { } /** - *

Use this method to invoke all commands

Make sure, that this method is called only once.

+ * Use this method to invoke all commands + * + * Make sure, that this method is called only once. + * + * @throws SeMa4gException in case some thing went wrong (validation error, etc.) */ public void run() throws SeMa4gException { @@ -144,8 +148,20 @@ public void signalError() { * start the next one. */ public void signalFinish() { + this.signalFinish(true); + } + + /** + * This command can be called to finish an execution and + * start the next one. + * + * @param finishSema4gContext true: finish Sema4gContext, false: finish command + */ + public void signalFinish(boolean finishSema4gContext) { // set state - this.state = State.FINISH; + if (finishSema4gContext) { + this.state = State.FINISH; + } // trigger another command executeRun(); } diff --git a/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/command/AbstractCommand.java b/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/command/AbstractCommand.java index 5936a57..7db77f1 100644 --- a/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/command/AbstractCommand.java +++ b/sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/command/AbstractCommand.java @@ -15,14 +15,14 @@ */ package com.github.mvp4g.sema4g.client.command; -import java.util.ArrayList; -import java.util.List; - import com.github.mvp4g.sema4g.client.SeMa4g; import com.github.mvp4g.sema4g.client.SeMa4gConstants; import com.github.mvp4g.sema4g.client.SeMa4gUtils; import com.github.mvp4g.sema4g.client.exception.SeMa4gException; +import java.util.ArrayList; +import java.util.List; + /** *

AbstractCommand provides base functionality to run a SeMa4g command.

*/ @@ -56,8 +56,18 @@ String getId() { * start the next one. */ public void signalFinish() { + this.signalFinish(false); + } + + /** + * This command can be called to finish an execution and + * start the next one depending on the parameter finishSema4gContext . + * + * @param finishSema4gContext true: context will be finished, false: only the task will be finished + */ + public void signalFinish(boolean finishSema4gContext) { this.state = State.FINISH; - executionContext.signalFinish(); + executionContext.signalFinish(finishSema4gContext); } /** diff --git a/sema4g-example/pom.xml b/sema4g-example/pom.xml index e6202a9..b2861e7 100644 --- a/sema4g-example/pom.xml +++ b/sema4g-example/pom.xml @@ -21,7 +21,7 @@ de.gishmo.gwt.example sema4g-example - 1.6.0 + 1.6.1 4.0.0 gwt-app @@ -76,12 +76,12 @@ com.github.mvp4g sema4g - 1.6.0 + 1.6.1 com.github.mvp4g sema4g-rpc - 1.6.0 + 1.6.1 com.squareup diff --git a/sema4g-requestbuilder/pom.xml b/sema4g-requestbuilder/pom.xml index 8270963..5a2d1bd 100644 --- a/sema4g-requestbuilder/pom.xml +++ b/sema4g-requestbuilder/pom.xml @@ -21,7 +21,7 @@ com.github.mvp4g sema4g-parent - 1.6.0 + 1.6.1 4.0.0 diff --git a/sema4g-resty/pom.xml b/sema4g-resty/pom.xml index 61f3c9b..a2a1b7e 100644 --- a/sema4g-resty/pom.xml +++ b/sema4g-resty/pom.xml @@ -21,7 +21,7 @@ com.github.mvp4g sema4g-parent - 1.6.0 + 1.6.1 4.0.0 diff --git a/sema4g-rpc/pom.xml b/sema4g-rpc/pom.xml index ee5ca83..122d440 100644 --- a/sema4g-rpc/pom.xml +++ b/sema4g-rpc/pom.xml @@ -21,7 +21,7 @@ com.github.mvp4g sema4g-parent - 1.6.0 + 1.6.1 4.0.0