diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:10:00 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:10:00 +0000 |
commit | 782c82871bdea8d6091e9335823240af8e0f04d7 (patch) | |
tree | 03bdcb6ce04b7bd1022bfcbf2e091d95515e0ee9 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow | |
parent | 880f96c5fd18d760f85e6814cb77ca908c4d8dc4 (diff) | |
download | mocca-782c82871bdea8d6091e9335823240af8e0f04d7.tar.gz mocca-782c82871bdea8d6091e9335823240af8e0f04d7.tar.bz2 mocca-782c82871bdea8d6091e9335823240af8e0f04d7.zip |
+ ignore option for error dialog
+ resumeable exception for settings validation
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@168 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
7 files changed, 19 insertions, 10 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java index db20bde3..8ef85bd1 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java @@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow; import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.workflow.states.PrepareConfigurationState; import at.asit.pdfover.gui.workflow.states.State; @@ -87,7 +88,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider { } catch (Exception e) { log.error("StateMachine update: ", e); //$NON-NLS-1$ ErrorDialog errorState = new ErrorDialog(this.getMainShell(), - Messages.getString("error.Unexpected"), false); //$NON-NLS-1$ + Messages.getString("error.Unexpected"), ERROR_BUTTONS.OK); //$NON-NLS-1$ //errorState.setException(e); //jumpToState(errorState); errorState.open(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java index 234b4317..46daf8f7 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java @@ -20,6 +20,7 @@ import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.PostMethod; +import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -27,6 +28,7 @@ import at.asit.pdfover.gui.MainWindow.Buttons; import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.SLRequest; @@ -171,8 +173,8 @@ public class LocalBKUState extends State { ErrorDialog dialog = new ErrorDialog( this.stateMachine.getGUIProvider().getMainShell(), Messages.getString("error.LocalBKU"), //$NON-NLS-1$ - true); - if (!dialog.open()) { + ERROR_BUTTONS.RETRY_CANCEL); + if (dialog.open() != SWT.RETRY) { this.stateMachine.exit(); return; } 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 326eb12f..401d71f3 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 @@ -27,6 +27,7 @@ import at.asit.pdfover.gui.composites.MobileBKUEnterNumberComposite; import at.asit.pdfover.gui.composites.MobileBKUEnterTANComposite; import at.asit.pdfover.gui.composites.WaitingComposite; import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUCommunicationState; import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus; @@ -152,7 +153,7 @@ public class MobileBKUState extends State { if (this.threadException != null) { ErrorDialog error = new ErrorDialog( this.stateMachine.getGUIProvider().getMainShell(), - Messages.getString("error.Unexpected"), false); //$NON-NLS-1$ + Messages.getString("error.Unexpected"), ERROR_BUTTONS.OK); //$NON-NLS-1$ // error.setException(this.threadException); // this.setNextState(error); error.open(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java index 5ed273ca..a6ec93bd 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java @@ -29,6 +29,7 @@ import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.composites.OutputComposite; import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.DocumentSource; @@ -100,7 +101,7 @@ public class OutputState extends State { } catch (IOException e) { log.error("Failed to save signed document to configured output folder.", e); //$NON-NLS-1$ ErrorDialog dialog = new ErrorDialog(outputComposite.getShell(), - Messages.getString("error.SaveOutputFolder"), false); //$NON-NLS-1$ + Messages.getString("error.SaveOutputFolder"), ERROR_BUTTONS.OK); //$NON-NLS-1$ dialog.open(); } } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java index e5117768..29a17ad9 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java @@ -39,6 +39,7 @@ import at.asit.pdfover.gui.cliarguments.PhoneNumberArgument; import at.asit.pdfover.gui.cliarguments.ProxyHostArgument; import at.asit.pdfover.gui.cliarguments.ProxyPortArgument; import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.exceptions.InitializationException; import at.asit.pdfover.gui.utils.Unzipper; import at.asit.pdfover.gui.workflow.ConfigManipulator; @@ -244,7 +245,7 @@ public class PrepareConfigurationState extends State { ErrorDialog error = new ErrorDialog(this.stateMachine .getGUIProvider().getMainShell(), Messages.getString("error.Initialization"), //$NON-NLS-1$ - false); + ERROR_BUTTONS.OK); // error.setException(e); // this.setNextState(error); error.open(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index 6381038f..77362682 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java @@ -25,6 +25,7 @@ import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.composites.WaitingComposite; import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.workflow.ConfigProvider; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; @@ -155,9 +156,9 @@ public class PrepareSigningState extends State { if(this.threadException != null) { ErrorDialog error = new ErrorDialog(this.stateMachine.getGUIProvider().getMainShell(), Messages.getString("error.PrepareDocument"), //$NON-NLS-1$ - true); + ERROR_BUTTONS.RETRY_CANCEL); this.threadException = null; - if(error.open()) { + if(error.open() == SWT.RETRY) { this.stateMachine.update(); } else { this.stateMachine.exit(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java index e16e4cb3..932a6d8a 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java @@ -16,11 +16,13 @@ package at.asit.pdfover.gui.workflow.states; //Imports +import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.Signer; @@ -87,9 +89,9 @@ public class SigningState extends State { if(this.threadException != null) { ErrorDialog error = new ErrorDialog(this.stateMachine.getGUIProvider().getMainShell(), - Messages.getString("error.Signatur"), true); //$NON-NLS-1$ + Messages.getString("error.Signatur"), ERROR_BUTTONS.RETRY_CANCEL); //$NON-NLS-1$ this.threadException = null; - if(error.open()) { + if(error.open() == SWT.RETRY) { this.setNextState(new BKUSelectionState(this.stateMachine)); } else { this.stateMachine.exit(); |