diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:32:14 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:32:14 +0000 |
commit | 33c49abc111f184ac87076fa735e75877dfbeab3 (patch) | |
tree | 75269ef14ce27ab49613d47c0fc6b8c5d6978926 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java | |
parent | e497e79c707d335ebb0610e9bc993a180098db55 (diff) | |
download | pdf-over-33c49abc111f184ac87076fa735e75877dfbeab3.tar.gz pdf-over-33c49abc111f184ac87076fa735e75877dfbeab3.tar.bz2 pdf-over-33c49abc111f184ac87076fa735e75877dfbeab3.zip |
Rework mobile BKU handling
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@371 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.java | 38 |
1 files changed, 34 insertions, 4 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 71e68d36..4d7c5985 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 @@ -29,7 +29,9 @@ import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.Dialog.BUTTONS; import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; +import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHandler; import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUCommunicationState; +import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUHandler; import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus; import at.asit.pdfover.gui.workflow.states.mobilebku.PostCredentialsThread; import at.asit.pdfover.gui.workflow.states.mobilebku.PostSLRequestThread; @@ -45,6 +47,16 @@ public class MobileBKUState extends State { public MobileBKUState(StateMachine stateMachine) { super(stateMachine); this.status = new MobileBKUStatus(this.stateMachine.getConfigProvider()); + switch(this.stateMachine.getConfigProvider().getMobileBKUType()) { + case A_TRUST: + this.handler = new ATrustHandler(this); + break; + + case IAIK: + //TODO + break; + } + } /** @@ -62,6 +74,8 @@ public class MobileBKUState extends State { MobileBKUStatus status = null; + MobileBKUHandler handler = null; + MobileBKUEnterNumberComposite mobileBKUEnterNumberComposite = null; MobileBKUEnterTANComposite mobileBKUEnterTANComposite = null; @@ -99,13 +113,30 @@ public class MobileBKUState extends State { } /** - * @return the status + * Get the MobileBKUStatus + * @return the MobileBKUStatus */ public MobileBKUStatus getStatus() { return this.status; } /** + * Get the MobileBKUHandler + * @return the MobileBKUHandler + */ + public MobileBKUHandler getHandler() { + return this.handler; + } + + /** + * Get the mobile BKU URL + * @return the mobile BKU URL + */ + public String getURL() { + return this.stateMachine.getConfigProvider().getMobileBKUURL(); + } + + /** * @return the communicationState */ public MobileBKUCommunicationState getCommunicationState() { @@ -165,9 +196,8 @@ public class MobileBKUState extends State { case POST_REQUEST: this.stateMachine.getGUIProvider().display( this.getWaitingComposite()); - Thread postSLRequestThread = new Thread(new PostSLRequestThread( - this, this.stateMachine.getConfigProvider() - .getMobileBKUURL())); + Thread postSLRequestThread = new Thread( + new PostSLRequestThread(this)); postSLRequestThread.start(); break; case POST_NUMBER: |