summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:38:54 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:38:54 +0000
commit0596b077bdb07db40ebb067cdcda749f14cf6a9c (patch)
tree114416a1c88cc05bb04288873b1ccdd4b2998f39 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
parent2747a16945d5f89b9b029681a0d98393dd238c74 (diff)
downloadpdf-over-0596b077bdb07db40ebb067cdcda749f14cf6a9c.tar.gz
pdf-over-0596b077bdb07db40ebb067cdcda749f14cf6a9c.tar.bz2
pdf-over-0596b077bdb07db40ebb067cdcda749f14cf6a9c.zip
Add CL argument to skip finish dialog
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@433 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java19
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java1
7 files changed, 68 insertions, 4 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
index 3b50e5af..952116ec 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
@@ -73,6 +73,12 @@ public interface ConfigOverlayManipulator {
public void setDefaultSignaturePositionOverlay(SignaturePosition position);
/**
+ * Sets whether to skip the finish screen
+ * @param skipFinish whether to skip the finish screen
+ */
+ public void setSkipFinishOverlay(boolean skipFinish);
+
+ /**
* Sets the configuration file
* @param configurationFile
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
index bfa5ce15..1adf39e4 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
@@ -34,6 +34,13 @@ public interface ConfigProvider {
*/
public static final String SIGN_POS_REGEX = "(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?);p=(\\d))|(auto)|(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?))"; //$NON-NLS-1$
+
+ /**
+ * Loads the configuration from a configuration file
+ * @param configSource the configuration file
+ * @throws IOException
+ */
+ public void loadConfiguration(InputStream configSource) throws IOException;
/**
* Gets the configuration file
@@ -138,9 +145,8 @@ public interface ConfigProvider {
public Point getMainWindowSize();
/**
- * Loads the configuration from a configuration file
- * @param configSource the configuration file
- * @throws IOException
+ * Gets whether to skip the finish screen
+ * @return whether to skip the finish screen
*/
- public void loadConfiguration(InputStream configSource) throws IOException;
+ public boolean getSkipFinish();
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
index ac1ab7fa..3225c92d 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
@@ -920,4 +920,20 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
public Point getMainWindowSize() {
return this.configuration.getMainWindowSize();
}
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigProvider#getSkipFinish()
+ */
+ @Override
+ public boolean getSkipFinish() {
+ return this.configurationOverlay.getSkipFinish();
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigOverlayManipulator#setSkipFinishOverlay(boolean)
+ */
+ @Override
+ public void setSkipFinishOverlay(boolean skipFinish) {
+ this.configurationOverlay.setSkipFinish(skipFinish);
+ }
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
index faf6b9fb..383f5e9b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
@@ -218,4 +218,16 @@ public interface ConfigurationContainer {
* @param size the main window size
*/
public void setMainWindowSize(Point size);
+
+ /**
+ * Gets whether to skip the finish screen
+ * @return whether to skip the finish screen
+ */
+ public boolean getSkipFinish();
+
+ /**
+ * Sets whether to skip the finish screen
+ * @param skipFinish whether to skip the finish screen
+ */
+ public void setSkipFinish(boolean skipFinish);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
index 8088eaa9..d878f59e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
@@ -97,6 +97,9 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/** Holds the default signature position */
protected SignaturePosition defaultSignaturePosition = null;
+ /** Whether to skip the output state */
+ protected boolean skipFinish = false;
+
/* (non-Javadoc)
* @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem()
*/
@@ -399,4 +402,20 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
public void setMainWindowSize(Point size) {
this.mainWindowSize = size;
}
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getSkipFinish()
+ */
+ @Override
+ public boolean getSkipFinish() {
+ return this.skipFinish;
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#setSkipFinish(boolean)
+ */
+ @Override
+ public void setSkipFinish(boolean skipFinish) {
+ this.skipFinish = skipFinish;
+ }
}
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 967d255e..df9d1a39 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
@@ -67,6 +67,10 @@ public class OutputState extends State {
// Save signed document
this.outputComposite.saveDocument();
+
+ if (config.getSkipFinish() && this.outputComposite.getSaveSuccessful()) {
+ this.stateMachine.exit();
+ }
}
return this.outputComposite;
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 ae81ce7b..2107e50b 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
@@ -40,6 +40,7 @@ import at.asit.pdfover.gui.cliarguments.PasswordArgument;
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.cliarguments.SkipFinishArgument;
import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
import at.asit.pdfover.gui.exceptions.InitializationException;