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 18:58:07 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:58:07 +0000
commitb8b015d3fa3b58cb5e70b4cd2ad1b8fe2a424af9 (patch)
tree6094be25392267d91bbcf03027782cb61bbc20ed /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
parentdf925d1606a38624c20cdc68bfa0a23da14d29a0 (diff)
downloadmocca-b8b015d3fa3b58cb5e70b4cd2ad1b8fe2a424af9.tar.gz
mocca-b8b015d3fa3b58cb5e70b4cd2ad1b8fe2a424af9.tar.bz2
mocca-b8b015d3fa3b58cb5e70b4cd2ad1b8fe2a424af9.zip
Added missing CLI Parameter
Using proxy parameters if set Added localization string file git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@60 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/states/PrepareConfigurationState.java11
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java10
3 files changed, 30 insertions, 5 deletions
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 3cf0861f..f720cb57 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
@@ -28,8 +28,13 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.cliarguments.ArgumentHandler;
import at.asit.pdfover.gui.cliarguments.BKUArgument;
import at.asit.pdfover.gui.cliarguments.ConfigFileArgument;
+import at.asit.pdfover.gui.cliarguments.EmblemArgument;
import at.asit.pdfover.gui.cliarguments.HelpArgument;
+import at.asit.pdfover.gui.cliarguments.OutputFolderArgument;
+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.controls.ErrorDialog;
import at.asit.pdfover.gui.exceptions.InitializationException;
import at.asit.pdfover.gui.workflow.ConfigManipulator;
@@ -53,7 +58,11 @@ public class PrepareConfigurationState extends State {
this.handler.addCLIArgument(new HelpArgument());
this.handler.addCLIArgument(new BKUArgument());
this.handler.addCLIArgument(new PhoneNumberArgument());
-
+ this.handler.addCLIArgument(new EmblemArgument());
+ this.handler.addCLIArgument(new PasswordArgument());
+ this.handler.addCLIArgument(new ProxyHostArgument());
+ this.handler.addCLIArgument(new ProxyPortArgument());
+ this.handler.addCLIArgument(new OutputFolderArgument());
// adding config file argument to this handler so it appears in help
this.handler.addCLIArgument(new ConfigFileArgument());
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 4ed59e5a..38215593 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
@@ -65,6 +65,20 @@ public class PrepareSigningState extends State {
ConfigProvider configuration = this.state.stateMachine.getConfigProvider();
+ // SET PROXY HOST and PORT settings
+ String proxyHost = configuration.getProxyHost();
+ int proxyPort = configuration.getProxyPort();
+
+ if(proxyPort > 0 && proxyPort <= 0xFFFF) {
+ System.setProperty("http.proxyPort", Integer.toString(proxyPort)); //$NON-NLS-1$
+ System.setProperty("https.proxyPort", Integer.toString(proxyPort)); //$NON-NLS-1$
+ }
+
+ if(proxyHost != null && !proxyHost.equals("")) { //$NON-NLS-1$
+ System.setProperty("http.proxyHost", proxyHost); //$NON-NLS-1$
+ System.setProperty("https.proxyHost", proxyHost); //$NON-NLS-1$
+ }
+
if(this.state.signer == null) {
this.state.signer = this.state.stateMachine.getPDFSigner().getPDFSigner();
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java
index 91aa6caa..c7430bab 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java
@@ -36,6 +36,8 @@ import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.asit.pdfover.gui.Messages;
+
/**
*
*/
@@ -78,7 +80,7 @@ public class TrustedSocketFactory implements ProtocolSocketFactory {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- "Not really an IOException! See inner exception", ex);
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$
}
}
}
@@ -106,7 +108,7 @@ public class TrustedSocketFactory implements ProtocolSocketFactory {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- "Not really an IOException! See inner exception", ex);
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$
}
}
}
@@ -125,7 +127,7 @@ public class TrustedSocketFactory implements ProtocolSocketFactory {
UnknownHostException, ConnectTimeoutException {
try {
if (params == null) {
- throw new IllegalArgumentException("Parameters may not be null");
+ throw new IllegalArgumentException("Parameters may not be null"); //$NON-NLS-1$
}
int timeout = params.getConnectionTimeout();
Socket socket = null;
@@ -151,7 +153,7 @@ public class TrustedSocketFactory implements ProtocolSocketFactory {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- "Not really an IOException! See inner exception", ex);
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //$NON-NLS-1$
}
}
}