summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2019-01-24 08:44:05 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2019-01-24 08:44:05 +0100
commit66adb44f6773c4dbbb8b1309a7ccb6088ae019ee (patch)
treeac343bd674e1ef276bc42af432d2f01d94e48b1a /pdf-over-gui/src
parent95acd1bdf8afc413713b27c61d18bafbc88c241c (diff)
downloadpdf-over-66adb44f6773c4dbbb8b1309a7ccb6088ae019ee.tar.gz
pdf-over-66adb44f6773c4dbbb8b1309a7ccb6088ae019ee.tar.bz2
pdf-over-66adb44f6773c4dbbb8b1309a7ccb6088ae019ee.zip
user is now notified to open the signature app
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java3
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java26
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties1
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties1
5 files changed, 32 insertions, 1 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
index e739e7dd..5c5494b5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
@@ -94,8 +94,10 @@ public class MobileBKUConnector implements BkuSlConnector {
if (responseData.contains("page_undecided")) { //$NON-NLS-1$
// handle polling
+ this.state.showOpenAppMessage();
handler.handlePolling(responseData);
+
} else {
// Now we have received some data lets check it:
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
index 3745879d..4cf84223 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
@@ -352,5 +352,8 @@ public abstract class MobileBKUHandler {
return responseData;
}
+ /**
+ * @param responseData
+ */
public abstract void handlePolling(String responseData);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
index cbb0af41..98dfaad5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
@@ -39,6 +39,7 @@ import at.asit.pdfover.gui.composites.MobileBKUEnterTANComposite;
import at.asit.pdfover.gui.composites.MobileBKUFingerprintComposite;
import at.asit.pdfover.gui.composites.MobileBKUQRComposite;
import at.asit.pdfover.gui.composites.WaitingComposite;
+import at.asit.pdfover.gui.composites.WaitingForAppComposite;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.utils.Messages;
@@ -96,7 +97,19 @@ public class MobileBKUState extends State {
MobileBKUFingerprintComposite mobileBKUFingerprintComposite = null;
WaitingComposite waitingComposite = null;
+
+ WaitingForAppComposite waitingForAppComposite = null;
+
+
+ WaitingForAppComposite getWaitingForAppComposite() {
+ if (this.waitingForAppComposite == null) {
+ this.waitingForAppComposite = getStateMachine().getGUIProvider()
+ .createComposite(WaitingForAppComposite.class, SWT.RESIZE, this);
+ }
+ return this.waitingForAppComposite;
+ }
+
WaitingComposite getWaitingComposite() {
if (this.waitingComposite == null) {
this.waitingComposite = getStateMachine().getGUIProvider()
@@ -419,7 +432,18 @@ public class MobileBKUState extends State {
});
}
-
+ /**
+ * This composite notifies the user to open the signature-app
+ */
+ public void showOpenAppMessage() {
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ getStateMachine().getGUIProvider().display(MobileBKUState.this.getWaitingForAppComposite());
+ }
+ });
+ }
+
/**
* when fingerprint or faceid is selected in the app
* this information is shown
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
index c87ce2bc..dcfa8506 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
@@ -223,3 +223,4 @@ tanEnter.try=Only 1 try left\!
version_check.UpdateText=Version %s is available.\nOpen download page now?
version_check.UpdateTitle=New version available\!
waiting.message=Signature creation in progress...
+waiting_for_app.message=Please open Signature-App!
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
index 1b2bbae1..158af59a 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
@@ -222,3 +222,4 @@ tanEnter.try=Nur noch 1 Versuch \u00FCbrig\!
version_check.UpdateText=Version %s ist verf\u00FCgbar\nJetzt Download-Seite \u00F6ffnen?
version_check.UpdateTitle=Neue Version verf\u00FCgbar\!
waiting.message=Signaturerstellung l\u00E4uft...
+waiting_for_app.message=Bitte \u00f6ffnen Sie die Handy-Signatur App!