summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:59:00 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:59:00 +0000
commit6684441798e6fdb899f4e67e39a42ccd40e8a607 (patch)
tree1974666bf8148e6da53d18d660eafe7c09ab00ca /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
parente0e4a0071590681135aeffb5df14d3b856678a12 (diff)
downloadpdf-over-6684441798e6fdb899f4e67e39a42ccd40e8a607.tar.gz
pdf-over-6684441798e6fdb899f4e67e39a42ccd40e8a607.tar.bz2
pdf-over-6684441798e6fdb899f4e67e39a42ccd40e8a607.zip
Fixed some error with output folder variables
setting pdfas config folder added extraction of pdfover config folder git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@66 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java58
1 files changed, 35 insertions, 23 deletions
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 f04805a7..18f913ef 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
@@ -150,11 +150,12 @@ public class MobileBKUState extends State {
MobileBKUStatus mobileStatus = this.getStatus();
if (this.threadException != null) {
- ErrorDialog error = new ErrorDialog(this.stateMachine.getGUIProvider().getMainShell(),
+ ErrorDialog error = new ErrorDialog(
+ this.stateMachine.getGUIProvider().getMainShell(),
SWT.NONE,
Messages.getString("error.Unexpected"), this.threadException, false); //$NON-NLS-1$
- //error.setException(this.threadException);
- //this.setNextState(error);
+ // error.setException(this.threadException);
+ // this.setNextState(error);
error.open();
this.stateMachine.exit();
return;
@@ -165,7 +166,8 @@ public class MobileBKUState extends State {
this.stateMachine.getGUIProvider().display(
this.getWaitingComposite());
Thread postSLRequestThread = new Thread(new PostSLRequestThread(
- this, this.stateMachine.getConfigProvider().getMobileBKUURL()));
+ this, this.stateMachine.getConfigProvider()
+ .getMobileBKUURL()));
postSLRequestThread.start();
break;
case POST_NUMBER:
@@ -208,16 +210,26 @@ public class MobileBKUState extends State {
} else {
// We need number and password => show UI!
+
+ if (mobileStatus.getErrorMessage() != null
+ && !mobileStatus.getErrorMessage().equals("")) { //$NON-NLS-1$
+ // set possible error message
+ ui.setErrorMessage(mobileStatus.getErrorMessage());
+ mobileStatus.setErrorMessage(null);
+ }
- // set possible error message
- ui.setErrorMessage(mobileStatus.getErrorMessage());
-
- // set possible phone number
- ui.setMobileNumber(mobileStatus.getPhoneNumber());
-
- // set possible password
- ui.setMobilePassword(mobileStatus.getMobilePassword());
-
+
+ if (ui.getMobileNumber() == null
+ || ui.getMobileNumber().equals("")) { //$NON-NLS-1$
+ // set possible phone number
+ ui.setMobileNumber(mobileStatus.getPhoneNumber());
+ }
+
+ if (ui.getMobilePassword() == null
+ || ui.getMobilePassword().equals("")) { //$NON-NLS-1$
+ // set possible password
+ ui.setMobilePassword(mobileStatus.getMobilePassword());
+ }
this.stateMachine.getGUIProvider().display(ui);
}
}
@@ -231,23 +243,23 @@ public class MobileBKUState extends State {
if (tan.isUserAck()) {
// user hit ok!
tan.setUserAck(false);
-
+
mobileStatus.setTan(tan.getTan());
-
+
// post to BKU!
Thread postTanThread = new Thread(new PostTanThread(this));
postTanThread.start();
} else {
tan.setVergleichswert(mobileStatus.getVergleichswert());
-
- if(mobileStatus.getTanTries() < MobileBKUStatus.MOBILE_MAX_TAN_TRIES
+
+ if (mobileStatus.getTanTries() < MobileBKUStatus.MOBILE_MAX_TAN_TRIES
&& mobileStatus.getTanTries() > 0) {
// show warning message x tries left!
-
+
tan.setTries(mobileStatus.getTanTries());
-
- }
+
+ }
this.stateMachine.getGUIProvider().display(tan);
}
@@ -265,11 +277,11 @@ public class MobileBKUState extends State {
*/
@Override
public void cleanUp() {
- if(this.mobileBKUEnterNumberComposite != null)
+ if (this.mobileBKUEnterNumberComposite != null)
this.mobileBKUEnterNumberComposite.dispose();
- if(this.mobileBKUEnterTANComposite != null)
+ if (this.mobileBKUEnterTANComposite != null)
this.mobileBKUEnterTANComposite.dispose();
- if(this.waitingComposite != null)
+ if (this.waitingComposite != null)
this.waitingComposite.dispose();
}