From 3f69a54ce7268c1bdf3e5a8ad9fa45880f003d8f Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:32:40 +0000 Subject: Extract basic mobile BKU status stuff git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@375 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../workflow/states/mobilebku/ATrustStatus.java | 158 +-------------------- .../mobilebku/AbstractMobileBKUStatusImpl.java | 122 ++++++++++++++++ 2 files changed, 124 insertions(+), 156 deletions(-) create mode 100644 pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java (limited to 'pdf-over-gui/src/main/java') 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 d970c6ca..869a367f 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 @@ -22,9 +22,9 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.workflow.ConfigProvider; /** - * + * A-Trust MobileBKUStatus implementation */ -public class ATrustStatus implements MobileBKUStatus { +public class ATrustStatus extends AbstractMobileBKUStatusImpl { /** * SLF4J Logger instance **/ @@ -39,16 +39,6 @@ public class ATrustStatus implements MobileBKUStatus { private String viewstate; private String eventvalidation; - private String sessionID; - private String phoneNumber; - private String mobilePassword; - private String baseURL; - private String refVal; - private String errorMessage; - private String tan; - private String server; - private int tanTries = MOBILE_MAX_TAN_TRIES; - /** * Constructor * @param provider @@ -66,86 +56,6 @@ public class ATrustStatus implements MobileBKUStatus { return MOBILE_MAX_TAN_TRIES; } - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getTanTries() - */ - @Override - public int getTanTries() { - return this.tanTries; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setTanTries(int) - */ - @Override - public void setTanTries(int tries) { - this.tanTries = tries; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getTan() - */ - @Override - public String getTan() { - return this.tan; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setTan(java.lang.String) - */ - @Override - public void setTan(String tan) { - this.tan = tan; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getErrorMessage() - */ - @Override - public String getErrorMessage() { - return this.errorMessage; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setErrorMessage(java.lang.String) - */ - @Override - public void setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getRefVal() - */ - @Override - public String getRefVal() { - return this.refVal; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setRefVal(java.lang.String) - */ - @Override - public void setRefVal(String refVal) { - this.refVal = refVal; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getBaseURL() - */ - @Override - public String getBaseURL() { - return this.baseURL; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setBaseURL(java.lang.String) - */ - @Override - public void setBaseURL(String baseURL) { - this.baseURL = baseURL; - } - /** * @return the viewstate */ @@ -174,68 +84,4 @@ public class ATrustStatus implements MobileBKUStatus { public void setEventvalidation(String eventvalidation) { this.eventvalidation = eventvalidation; } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getPhoneNumber() - */ - @Override - public String getPhoneNumber() { - return this.phoneNumber; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setPhoneNumber(java.lang.String) - */ - @Override - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getMobilePassword() - */ - @Override - public String getMobilePassword() { - return this.mobilePassword; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setMobilePassword(java.lang.String) - */ - @Override - public void setMobilePassword(String mobilePassword) { - this.mobilePassword = mobilePassword; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getSessionID() - */ - @Override - public String getSessionID() { - return this.sessionID; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setSessionID(java.lang.String) - */ - @Override - public void setSessionID(String sessionID) { - this.sessionID = sessionID; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getServer() - */ - @Override - public String getServer() { - return this.server; - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#setServer(java.lang.String) - */ - @Override - public void setServer(String server) { - this.server = server; - } } 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 new file mode 100644 index 00000000..209602a0 --- /dev/null +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/AbstractMobileBKUStatusImpl.java @@ -0,0 +1,122 @@ +/* + * Copyright 2012 by A-SIT, Secure Information Technology Center Austria + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://joinup.ec.europa.eu/software/page/eupl + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + */ +package at.asit.pdfover.gui.workflow.states.mobilebku; + +/** + * Basic implementation of a MobileBKUStatus + */ +public abstract class AbstractMobileBKUStatusImpl implements MobileBKUStatus { + + private String sessionID; + private String phoneNumber; + private String mobilePassword; + private String baseURL; + private String refVal; + private String errorMessage; + private String tan; + private String server; + private int tanTries = getMaxTanTries(); + + @Override + public int getTanTries() { + return this.tanTries; + } + + @Override + public void setTanTries(int tries) { + this.tanTries = tries; + } + + @Override + public String getTan() { + return this.tan; + } + + @Override + public void setTan(String tan) { + this.tan = tan; + } + + @Override + public String getErrorMessage() { + return this.errorMessage; + } + + @Override + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + @Override + public String getRefVal() { + return this.refVal; + } + + @Override + public void setRefVal(String refVal) { + this.refVal = refVal; + } + + @Override + public String getBaseURL() { + return this.baseURL; + } + + @Override + public void setBaseURL(String baseURL) { + this.baseURL = baseURL; + } + + @Override + public String getPhoneNumber() { + return this.phoneNumber; + } + + @Override + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + @Override + public String getMobilePassword() { + return this.mobilePassword; + } + + @Override + public void setMobilePassword(String mobilePassword) { + this.mobilePassword = mobilePassword; + } + + @Override + public String getSessionID() { + return this.sessionID; + } + + @Override + public void setSessionID(String sessionID) { + this.sessionID = sessionID; + } + + @Override + public String getServer() { + return this.server; + } + + @Override + public void setServer(String server) { + this.server = server; + } +} \ No newline at end of file -- cgit v1.2.3