summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java3
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java5
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java3
5 files changed, 12 insertions, 13 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
index 2be35d56..4c361819 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
@@ -60,6 +60,9 @@ public class Constants {
/** How far to displace the signature with the arrow keys */
public static final int SIGNATURE_KEYBOARD_POSITIONING_OFFSET = 15;
+ /** PDF-Over User Agent string */
+ public static final String USER_AGENT_STRING = "PDF-Over 4.0"; //$NON-NLS-1$
+
/* Configuration parameters */
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 31cf1e06..39aa2920 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
@@ -60,11 +60,6 @@ public class LocalBKUState extends State {
public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; //$NON-NLS-1$
/**
- * PDF Over User Agent string
- */
- public static final String PDF_OVER_USER_AGENT_STRING = "PDF-Over 4.0"; //$NON-NLS-1$
-
- /**
* Whether to use Base64 or FileUpload Request
*/
public static final boolean USE_BASE64_REQUEST = true;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java
index 0ce95c4e..cfe53ef8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustHandler.java
@@ -27,11 +27,11 @@ import org.eclipse.swt.widgets.Shell;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.asit.pdfover.gui.Constants;
import at.asit.pdfover.gui.controls.Dialog;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
import at.asit.pdfover.gui.controls.Dialog.ICON;
import at.asit.pdfover.gui.utils.Messages;
-import at.asit.pdfover.gui.workflow.states.LocalBKUState;
import at.asit.pdfover.gui.workflow.states.MobileBKUState;
import at.asit.pdfover.signator.SLResponse;
@@ -96,7 +96,7 @@ public class ATrustHandler extends MobileBKUHandler {
HttpClient client = new HttpClient();
client.getParams().setParameter("http.useragent", //$NON-NLS-1$
- LocalBKUState.PDF_OVER_USER_AGENT_STRING);
+ Constants.USER_AGENT_STRING);
PostMethod post = new PostMethod(status.getBaseURL() + "/identification.aspx?sid=" + status.getSessionID()); //$NON-NLS-1$
post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
@@ -169,7 +169,7 @@ public class ATrustHandler extends MobileBKUHandler {
HttpClient client = new HttpClient();
client.getParams().setParameter("http.useragent", //$NON-NLS-1$
- LocalBKUState.PDF_OVER_USER_AGENT_STRING);
+ Constants.USER_AGENT_STRING);
PostMethod post = new PostMethod(status.getBaseURL()
+ "/signature.aspx?sid=" + status.getSessionID()); //$NON-NLS-1$
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java
index b2e81df4..59519050 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/IAIKHandler.java
@@ -31,11 +31,11 @@ import org.eclipse.swt.widgets.Shell;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.asit.pdfover.gui.Constants;
import at.asit.pdfover.gui.controls.Dialog;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
import at.asit.pdfover.gui.controls.Dialog.ICON;
import at.asit.pdfover.gui.utils.Messages;
-import at.asit.pdfover.gui.workflow.states.LocalBKUState;
import at.asit.pdfover.gui.workflow.states.MobileBKUState;
import at.asit.pdfover.signator.SLResponse;
@@ -103,7 +103,7 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = new HttpClient();
client.getParams().setParameter("http.useragent", //$NON-NLS-1$
- LocalBKUState.PDF_OVER_USER_AGENT_STRING);
+ Constants.USER_AGENT_STRING);
PostMethod post = new PostMethod(status.getBaseURL());
post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
@@ -151,7 +151,7 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = new HttpClient();
client.getParams().setParameter("http.useragent", //$NON-NLS-1$
- LocalBKUState.PDF_OVER_USER_AGENT_STRING);
+ Constants.USER_AGENT_STRING);
String redirectURL = status.getBaseURL().substring(0,
status.getBaseURL().lastIndexOf('/',
@@ -247,7 +247,7 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = new HttpClient();
client.getParams().setParameter("http.useragent", //$NON-NLS-1$
- LocalBKUState.PDF_OVER_USER_AGENT_STRING);
+ Constants.USER_AGENT_STRING);
PostMethod post = new PostMethod(status.getBaseURL());
post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
index d82585db..5d387351 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
@@ -32,6 +32,7 @@ import org.apache.commons.httpclient.protocol.Protocol;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.asit.pdfover.gui.Constants;
import at.asit.pdfover.gui.utils.FileUploadSource;
import at.asit.pdfover.gui.workflow.states.LocalBKUState;
import at.asit.pdfover.gui.workflow.states.MobileBKUState;
@@ -79,7 +80,7 @@ public abstract class MobileBKUHandler {
HttpClient client = new HttpClient();
client.getParams().setParameter("http.useragent", //$NON-NLS-1$
- LocalBKUState.PDF_OVER_USER_AGENT_STRING);
+ Constants.USER_AGENT_STRING);
PostMethod post = new PostMethod(mobileBKUUrl);