diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:41:40 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:41:40 +0000 |
commit | 0293b6ab58632b2d941ebcac14165fd52886f7a1 (patch) | |
tree | f571e2ee289a813fb4fc9688f9d674afd0402212 /pdf-over-gui/src/main/java | |
parent | bc912e9c3c790f5c5c92c7732d0662dbecd251e2 (diff) | |
download | pdf-over-0293b6ab58632b2d941ebcac14165fd52886f7a1.tar.gz pdf-over-0293b6ab58632b2d941ebcac14165fd52886f7a1.tar.bz2 pdf-over-0293b6ab58632b2d941ebcac14165fd52886f7a1.zip |
Move User Agent String to Constants
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@452 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java')
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); |