com.uqpay.sdk.config.BaseConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of uqpay-payment Show documentation
Show all versions of uqpay-payment Show documentation
uqpay payment server side SDK
package com.uqpay.sdk.config;
import java.io.Serializable;
/**
* BaseConfig class.
*
* @author zhengwei
* @version $Id: $Id
*/
public class BaseConfig implements Serializable {
private static final long serialVersionUID = 3560080745805474798L;
private boolean testMode = false;
private SecureConfig productSecure;
private SecureConfig testSecure;
/**
* getSecure.
*
* @return a {@link SecureConfig} object.
*/
public SecureConfig getSecure() {
if (isTestMode()) {
return testSecure;
}
return productSecure;
}
/**
* Getter for the field productSecure
.
*
* @return a {@link SecureConfig} object.
*/
public SecureConfig getProductSecure() {
return productSecure;
}
/**
* Setter for the field productSecure
.
*
* @param productSecure a {@link SecureConfig} object.
*/
public void setProductSecure(SecureConfig productSecure) {
this.productSecure = productSecure;
}
/**
* Getter for the field testSecure
.
*
* @return a {@link SecureConfig} object.
*/
public SecureConfig getTestSecure() {
return testSecure;
}
/**
* Setter for the field testSecure
.
*
* @param testSecure a {@link SecureConfig} object.
*/
public void setTestSecure(SecureConfig testSecure) {
this.testSecure = testSecure;
}
/**
* isTestMode.
*
* @return a boolean.
*/
public boolean isTestMode() {
return testMode;
}
/**
* Setter for the field testMode
.
*
* @param testMode a boolean.
*/
public void setTestMode(boolean testMode) {
this.testMode = testMode;
}
}