diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:32:52 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:32:52 +0000 |
commit | 81129700eb9f14e829a44f7a6669991eab017634 (patch) | |
tree | 7379033bc45dbe5a3cb3da459864e3208789580d /pdf-over-gui | |
parent | a0441f22bc3ac6221fba0d8c6f0028287f12fbb9 (diff) | |
download | pdf-over-81129700eb9f14e829a44f7a6669991eab017634.tar.gz pdf-over-81129700eb9f14e829a44f7a6669991eab017634.tar.bz2 pdf-over-81129700eb9f14e829a44f7a6669991eab017634.zip |
Add signature data url to mobile status
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@377 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui')
5 files changed, 54 insertions, 28 deletions
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 65bc0ff3..e650d265 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 @@ -108,8 +108,8 @@ public class ATrustHandler extends MobileBKUHandler { String eventValidation = status.getEventvalidation(); String sessionID = status.getSessionID(); String refVal = null; + String signatureDataURL = null; - status.setRefVal(null); status.setErrorMessage(null); if(responseData.contains("signature.aspx?sid=")) { //$NON-NLS-1$ @@ -118,8 +118,9 @@ public class ATrustHandler extends MobileBKUHandler { viewState = MobileBKUHelper.extractTag(responseData, "id=\"__VIEWSTATE\" value=\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$ eventValidation = MobileBKUHelper.extractTag(responseData, "id=\"__EVENTVALIDATION\" value=\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$ refVal = MobileBKUHelper.extractTag(responseData, "id='vergleichswert'><b>Vergleichswert:</b>", "</div>"); //$NON-NLS-1$//$NON-NLS-2$ + signatureDataURL = status.getBaseURL() + "/ShowSigobj.aspx" + //$NON-NLS-1$ + MobileBKUHelper.extractTag(responseData, "ShowSigobj.aspx", "'"); //$NON-NLS-1$//$NON-NLS-2$ - status.setRefVal(refVal); getState().setCommunicationState(MobileBKUCommunicationState.POST_TAN); } else { // error page @@ -136,10 +137,13 @@ public class ATrustHandler extends MobileBKUHandler { log.info("Vergleichswert: " + refVal); //$NON-NLS-1$ log.info("viewState: " + viewState); //$NON-NLS-1$ log.info("eventValidation: " + eventValidation); //$NON-NLS-1$ + log.info("signatureDataURL: " + signatureDataURL); //$NON-NLS-1$ status.setSessionID(sessionID); + status.setRefVal(refVal); status.setViewstate(viewState); status.setEventvalidation(eventValidation); + status.setSignatureDataURL(signatureDataURL); } /* (non-Javadoc) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustStatus.java index 869a367f..d5beaf2d 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustStatus.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/ATrustStatus.java @@ -32,20 +32,19 @@ public class ATrustStatus extends AbstractMobileBKUStatusImpl { private static final Logger log = LoggerFactory .getLogger(ATrustStatus.class); - /** - * Maximum number of TAN tries! - */ + /** Maximum number of TAN tries */ public static final int MOBILE_MAX_TAN_TRIES = 3; private String viewstate; private String eventvalidation; + /** * Constructor - * @param provider + * @param provider the ConfigProvider */ public ATrustStatus(ConfigProvider provider) { - this.setPhoneNumber(provider.getDefaultMobileNumber()); - this.setMobilePassword(provider.getDefaultMobilePassword()); + setPhoneNumber(provider.getDefaultMobileNumber()); + setMobilePassword(provider.getDefaultMobilePassword()); } /* (non-Javadoc) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java index 209602a0..deb7b16a 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java @@ -28,6 +28,7 @@ public abstract class AbstractMobileBKUStatusImpl implements MobileBKUStatus { private String errorMessage; private String tan; private String server; + private String signatureDataURL; private int tanTries = getMaxTanTries(); @Override @@ -119,4 +120,14 @@ public abstract class AbstractMobileBKUStatusImpl implements MobileBKUStatus { public void setServer(String server) { this.server = server; } + + @Override + public String getSignatureDataURL() { + return this.signatureDataURL; + } + + @Override + public void setSignatureDataURL(String signatureDataURL) { + this.signatureDataURL = signatureDataURL; + } }
\ No newline at end of file diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java index 44e24c30..2c1367bc 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUStatus.java @@ -22,100 +22,112 @@ public interface MobileBKUStatus { /** * @return the identification_url */ - public abstract String getSessionID(); + public String getSessionID(); /** * @param sessionID the identification_url to set */ - public abstract void setSessionID(String sessionID); + public void setSessionID(String sessionID); /** * @return the phoneNumber */ - public abstract String getPhoneNumber(); + public String getPhoneNumber(); /** * @param phoneNumber the phoneNumber to set */ - public abstract void setPhoneNumber(String phoneNumber); + public void setPhoneNumber(String phoneNumber); /** * @return the mobilePassword */ - public abstract String getMobilePassword(); + public String getMobilePassword(); /** * @param mobilePassword the mobilePassword to set */ - public abstract void setMobilePassword(String mobilePassword); + public void setMobilePassword(String mobilePassword); /** * @return the reference value */ - public abstract String getRefVal(); + public String getRefVal(); /** * @param refVal the reference value to set */ - public abstract void setRefVal(String refVal); + public void setRefVal(String refVal); /** * @return the tan */ - public abstract String getTan(); + public String getTan(); /** * @param tan the tan to set */ - public abstract void setTan(String tan); + public void setTan(String tan); /** * Get maximum number of TAN tries * @return the maximum number of TAN tries */ - public abstract int getMaxTanTries(); + public int getMaxTanTries(); /** * Get number of TAN tries left * @return the number of TAN tries left */ - public abstract int getTanTries(); + public int getTanTries(); /** * Set number of TAN tries left * @param tries the number of TAN tries left */ - public abstract void setTanTries(int tries); + public void setTanTries(int tries); /** * @return the errorMessage */ - public abstract String getErrorMessage(); + public String getErrorMessage(); /** * @param errorMessage the errorMessage to set */ - public abstract void setErrorMessage(String errorMessage); + public void setErrorMessage(String errorMessage); /** * @return the baseURL */ - public abstract String getBaseURL(); + public String getBaseURL(); /** * @param baseURL */ - public abstract void setBaseURL(String baseURL); + public void setBaseURL(String baseURL); /** * Return the SL request server * @return the SL request server */ - public abstract String getServer(); + public String getServer(); /** * Set the SL request server * @param server the SL request server */ - public abstract void setServer(String server); + public void setServer(String server); + + /** + * Get the signature data URL + * @return the signature data URL + */ + public String getSignatureDataURL(); + + /** + * Set the signature data URL + * @param signatureDataURL the signature data URL + */ + public void setSignatureDataURL(String signatureDataURL); } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostCredentialsThread.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostCredentialsThread.java index b57143a5..6e807df5 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostCredentialsThread.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/PostCredentialsThread.java @@ -54,7 +54,7 @@ public class PostCredentialsThread implements Runnable { String responseData = this.handler.postCredentials(); // Now we have received some data lets check it: - log.debug("Response from A-Trust: " + responseData); //$NON-NLS-1$ + log.debug("Response from mobile BKU: " + responseData); //$NON-NLS-1$ this.handler.handleCredentialsResponse(responseData); } catch (Exception ex) { |