diff options
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: |