com.dp2345.Setting.java Source code

Java tutorial

Introduction

Here is the source code for com.dp2345.Setting.java

Source

/*
 * Copyright 2013-2015 cetvision.com. All rights reserved.
 * Support: http://www.cetvision.com
 * License: http://www.cetvision.com/license
 */
package com.dp2345;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.apache.commons.lang.StringUtils;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 
 * 
 * @author CETVISION CORP
 * @version 2.0.3
 */
public class Setting implements Serializable {

    private static final long serialVersionUID = -1478999889661796840L;

    /**
     * ??
     */
    public enum WatermarkPosition {

        /**  */
        no,

        /**  */
        topLeft,

        /** ? */
        topRight,

        /**  */
        center,

        /**  */
        bottomLeft,

        /** ? */
        bottomRight
    }

    /**
     * ???
     */
    public enum RoundType {

        /** ? */
        roundHalfUp,

        /** ?? */
        roundUp,

        /** ?? */
        roundDown
    }

    /**
     * ??
     */
    public enum CaptchaType {

        /**  */
        memberLogin,

        /**  */
        memberRegister,

        /** ?? */
        adminLogin,

        /** ? */
        review,

        /** ? */
        consultation,

        /** ? */
        findPassword,

        /** ?? */
        resetPassword,

        /**  */
        other
    }

    /**
     * ??
     */
    public enum AccountLockType {

        /**  */
        member,

        /** ? */
        admin
    }

    /**
     * ?
     */
    public enum StockAllocationTime {

        /** ? */
        order,

        /** ? */
        payment,

        /** ?? */
        ship
    }

    /**
     * ??
     */
    public enum ReviewAuthority {

        /**  */
        anyone,

        /**  */
        member,

        /**  */
        purchased
    }

    /**
     * ??
     */
    public enum ConsultationAuthority {

        /**  */
        anyone,

        /**  */
        member
    }

    /** ?? */
    public static final String CACHE_NAME = "setting";

    /** Key */
    public static final Integer CACHE_KEY = 0;

    /**  */
    private static final String SEPARATOR = ",";

    /** ?? */
    private String siteName;

    /** ? */
    private String siteUrl;

    /** logo */
    private String logo;

    /** ? */
    private String hotSearch;

    /** ?? */
    private String address;

    /** ?? */
    private String phone;

    /** ? */
    private String zipCode;

    /** E-mail */
    private String email;

    /** ? */
    private String certtext;

    /** ?? */
    private Boolean isSiteEnabled;

    /** ? */
    private String siteCloseMessage;

    /** ?() */
    private Integer largeProductImageWidth;

    /** ?() */
    private Integer largeProductImageHeight;

    /** ?() */
    private Integer mediumProductImageWidth;

    /** ?() */
    private Integer mediumProductImageHeight;

    /** ? */
    private Integer thumbnailProductImageWidth;

    /** ? */
    private Integer thumbnailProductImageHeight;

    /** ?() */
    private String defaultLargeProductImage;

    /** ?(?) */
    private String defaultMediumProductImage;

    /**  */
    private String defaultThumbnailProductImage;

    /** ?? */
    private Integer watermarkAlpha;

    /** ? */
    private String watermarkImage;

    /** ?? */
    private WatermarkPosition watermarkPosition;

    /** ? */
    private Integer priceScale;

    /** ? */
    private RoundType priceRoundType;

    /** ??? */
    private Boolean isShowMarketPrice;

    /** ? */
    private Double defaultMarketPriceScale;

    /** ? */
    private Boolean isRegisterEnabled;

    /** ??E-mail?? */
    private Boolean isDuplicateEmail;

    /** ??? */
    private String disabledUsername;

    /** ??? */
    private Integer usernameMinLength;

    /** ?? */
    private Integer usernameMaxLength;

    /** ?? */
    private Integer passwordMinLength;

    /** ? */
    private Integer passwordMaxLength;

    /** ? */
    private Long registerPoint;

    /** ?? */
    private String registerAgreement;

    /** ??E-mail */
    private Boolean isEmailLogin;

    /** ?? */
    private CaptchaType[] captchaTypes;

    /** ?? */
    private AccountLockType[] accountLockTypes;

    /**  */
    private Integer accountLockCount;

    /** ? */
    private Integer accountLockTime;

    /**  */
    private Integer safeKeyExpiryTime;

    /** ? */
    private Integer uploadMaxSize;

    /** ??? */
    private String uploadImageExtension;

    /** ?Flash?? */
    private String uploadFlashExtension;

    /** ??? */
    private String uploadMediaExtension;

    /** ??? */
    private String uploadFileExtension;

    /**  */
    private String imageUploadPath;

    /** Flash */
    private String flashUploadPath;

    /**  */
    private String mediaUploadPath;

    /**  */
    private String fileUploadPath;

    /** ? */
    private String smtpFromMail;

    /** SMTP?? */
    private String smtpHost;

    /** SMTP?? */
    private Integer smtpPort;

    /** SMTP?? */
    private String smtpUsername;

    /** SMTP? */
    private String smtpPassword;

    /** SMS?? */
    private String smsApiHost;

    /** SMS??key */
    private String smsApiKey;

    /** SMS?? */
    private String smsAccount;

    /** SMS? */
    private String smsPassword;

    /** ?? */
    private String currencySign;

    /** ??? */
    private String currencyUnit;

    /**  */
    private Integer stockAlertCount;

    /** ? */
    private StockAllocationTime stockAllocationTime;

    /** ? */
    private Double defaultPointScale;

    /** ???? */
    private Boolean isDevelopmentEnabled;

    /** ?? */
    private Boolean isReviewEnabled;

    /** ? */
    private Boolean isReviewCheck;

    /** ?? */
    private ReviewAuthority reviewAuthority;

    /** ?? */
    private Boolean isConsultationEnabled;

    /** ? */
    private Boolean isConsultationCheck;

    /** ?? */
    private ConsultationAuthority consultationAuthority;

    /** ??? */
    private Boolean isInvoiceEnabled;

    /** ??? */
    private Boolean isTaxPriceEnabled;

    /**  */
    private Double taxRate;

    /** Cookie */
    private String cookiePath;

    /** Cookie */
    private String cookieDomain;

    /** 100?KEY */
    private String kuaidi100Key;

    /** ??CNZZ */
    private Boolean isCnzzEnabled;

    /** CNZZID */
    private String cnzzSiteId;

    /** CNZZ? */
    private String cnzzPassword;

    /**
     * ???
     * 
     * @return ??
     */
    @NotEmpty
    @Length(max = 200)
    public String getSiteName() {
        return siteName;
    }

    /**
     * ??
     * 
     * @param siteName
     *            ??
     */
    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotEmpty
    @Length(max = 200)
    public String getSiteUrl() {
        return siteUrl;
    }

    /**
     * ?
     * 
     * @param siteUrl
     *            ?
     */
    public void setSiteUrl(String siteUrl) {
        this.siteUrl = StringUtils.removeEnd(siteUrl, "/");
    }

    /**
     * ?logo
     * 
     * @return logo
     */
    @NotEmpty
    @Length(max = 200)
    public String getLogo() {
        return logo;
    }

    /**
     * logo
     * 
     * @param logo
     *            logo
     */
    public void setLogo(String logo) {
        this.logo = logo;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @Length(max = 200)
    public String getHotSearch() {
        return hotSearch;
    }

    /**
     * ?
     * 
     * @param hotSearch
     *            ?
     */
    public void setHotSearch(String hotSearch) {
        if (hotSearch != null) {
            hotSearch = hotSearch.replaceAll("[,\\s]*,[,\\s]*", ",").replaceAll("^,|,$", "");
        }
        this.hotSearch = hotSearch;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @Length(max = 200)
    public String getAddress() {
        return address;
    }

    /**
     * ??
     * 
     * @param address
     *            ??
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @Length(max = 200)
    public String getPhone() {
        return phone;
    }

    /**
     * ??
     * 
     * @param phone
     *            ??
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @Length(max = 200)
    public String getZipCode() {
        return zipCode;
    }

    /**
     * ?
     * 
     * @param zipCode
     *            ?
     */
    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    /**
     * ?E-mail
     * 
     * @return E-mail
     */
    @Email
    @Length(max = 200)
    public String getEmail() {
        return email;
    }

    /**
     * E-mail
     * 
     * @param email
     *            E-mail
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @Length(max = 200)
    public String getCerttext() {
        return certtext;
    }

    /**
     * ?
     * 
     * @param certtext
     *            ?
     */
    public void setCerttext(String certtext) {
        this.certtext = certtext;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    public Boolean getIsSiteEnabled() {
        return isSiteEnabled;
    }

    /**
     * ??
     * 
     * @param isSiteEnabled
     *            ??
     */
    public void setIsSiteEnabled(Boolean isSiteEnabled) {
        this.isSiteEnabled = isSiteEnabled;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotEmpty
    public String getSiteCloseMessage() {
        return siteCloseMessage;
    }

    /**
     * ?
     * 
     * @param siteCloseMessage
     *            ?
     */
    public void setSiteCloseMessage(String siteCloseMessage) {
        this.siteCloseMessage = siteCloseMessage;
    }

    /**
     * ??()
     * 
     * @return ?()
     */
    @NotNull
    @Min(1)
    public Integer getLargeProductImageWidth() {
        return largeProductImageWidth;
    }

    /**
     * ?()
     * 
     * @param largeProductImageWidth
     *            ?()
     */
    public void setLargeProductImageWidth(Integer largeProductImageWidth) {
        this.largeProductImageWidth = largeProductImageWidth;
    }

    /**
     * ??()
     * 
     * @return ?()
     */
    @NotNull
    @Min(1)
    public Integer getLargeProductImageHeight() {
        return largeProductImageHeight;
    }

    /**
     * ?()
     * 
     * @param largeProductImageHeight
     *            ?()
     */
    public void setLargeProductImageHeight(Integer largeProductImageHeight) {
        this.largeProductImageHeight = largeProductImageHeight;
    }

    /**
     * ??()
     * 
     * @return ?()
     */
    @NotNull
    @Min(1)
    public Integer getMediumProductImageWidth() {
        return mediumProductImageWidth;
    }

    /**
     * ?()
     * 
     * @param mediumProductImageWidth
     *            ?()
     */
    public void setMediumProductImageWidth(Integer mediumProductImageWidth) {
        this.mediumProductImageWidth = mediumProductImageWidth;
    }

    /**
     * ??()
     * 
     * @return ?()
     */
    @NotNull
    @Min(1)
    public Integer getMediumProductImageHeight() {
        return mediumProductImageHeight;
    }

    /**
     * ?()
     * 
     * @param mediumProductImageHeight
     *            ?()
     */
    public void setMediumProductImageHeight(Integer mediumProductImageHeight) {
        this.mediumProductImageHeight = mediumProductImageHeight;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(1)
    public Integer getThumbnailProductImageWidth() {
        return thumbnailProductImageWidth;
    }

    /**
     * ?
     * 
     * @param thumbnailProductImageWidth
     *            ?
     */
    public void setThumbnailProductImageWidth(Integer thumbnailProductImageWidth) {
        this.thumbnailProductImageWidth = thumbnailProductImageWidth;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(1)
    public Integer getThumbnailProductImageHeight() {
        return thumbnailProductImageHeight;
    }

    /**
     * ?
     * 
     * @param thumbnailProductImageHeight
     *            ?
     */
    public void setThumbnailProductImageHeight(Integer thumbnailProductImageHeight) {
        this.thumbnailProductImageHeight = thumbnailProductImageHeight;
    }

    /**
     * ??()
     * 
     * @return ?()
     */
    @NotEmpty
    @Length(max = 200)
    public String getDefaultLargeProductImage() {
        return defaultLargeProductImage;
    }

    /**
     * ?()
     * 
     * @param defaultLargeProductImage
     *            ?()
     */
    public void setDefaultLargeProductImage(String defaultLargeProductImage) {
        this.defaultLargeProductImage = defaultLargeProductImage;
    }

    /**
     * ??(?)
     * 
     * @return ?(?)
     */
    @NotEmpty
    @Length(max = 200)
    public String getDefaultMediumProductImage() {
        return defaultMediumProductImage;
    }

    /**
     * ?(?)
     * 
     * @param defaultMediumProductImage
     *            ?(?)
     */
    public void setDefaultMediumProductImage(String defaultMediumProductImage) {
        this.defaultMediumProductImage = defaultMediumProductImage;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotEmpty
    @Length(max = 200)
    public String getDefaultThumbnailProductImage() {
        return defaultThumbnailProductImage;
    }

    /**
     * 
     * 
     * @param defaultThumbnailProductImage
     *            
     */
    public void setDefaultThumbnailProductImage(String defaultThumbnailProductImage) {
        this.defaultThumbnailProductImage = defaultThumbnailProductImage;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    @Min(0)
    @Max(100)
    public Integer getWatermarkAlpha() {
        return watermarkAlpha;
    }

    /**
     * ??
     * 
     * @param watermarkAlpha
     *            ??
     */
    public void setWatermarkAlpha(Integer watermarkAlpha) {
        this.watermarkAlpha = watermarkAlpha;
    }

    /**
     * ??
     * 
     * @return ?
     */
    public String getWatermarkImage() {
        return watermarkImage;
    }

    /**
     * ?
     * 
     * @param watermarkImage
     *            ?
     */
    public void setWatermarkImage(String watermarkImage) {
        this.watermarkImage = watermarkImage;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    public WatermarkPosition getWatermarkPosition() {
        return watermarkPosition;
    }

    /**
     * ??
     * 
     * @param watermarkPosition
     *            ??
     */
    public void setWatermarkPosition(WatermarkPosition watermarkPosition) {
        this.watermarkPosition = watermarkPosition;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(0)
    @Max(3)
    public Integer getPriceScale() {
        return priceScale;
    }

    /**
     * ?
     * 
     * @param priceScale
     *            ?
     */
    public void setPriceScale(Integer priceScale) {
        this.priceScale = priceScale;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    public RoundType getPriceRoundType() {
        return priceRoundType;
    }

    /**
     * ?
     * 
     * @param priceRoundType
     *            ?
     */
    public void setPriceRoundType(RoundType priceRoundType) {
        this.priceRoundType = priceRoundType;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @NotNull
    public Boolean getIsShowMarketPrice() {
        return isShowMarketPrice;
    }

    /**
     * ???
     * 
     * @param isShowMarketPrice
     *            ???
     */
    public void setIsShowMarketPrice(Boolean isShowMarketPrice) {
        this.isShowMarketPrice = isShowMarketPrice;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(0)
    @Digits(integer = 3, fraction = 3)
    public Double getDefaultMarketPriceScale() {
        return defaultMarketPriceScale;
    }

    /**
     * ?
     * 
     * @param defaultMarketPriceScale
     *            ?
     */
    public void setDefaultMarketPriceScale(Double defaultMarketPriceScale) {
        this.defaultMarketPriceScale = defaultMarketPriceScale;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    public Boolean getIsRegisterEnabled() {
        return isRegisterEnabled;
    }

    /**
     * ?
     * 
     * @param isRegisterEnabled
     *            ?
     */
    public void setIsRegisterEnabled(Boolean isRegisterEnabled) {
        this.isRegisterEnabled = isRegisterEnabled;
    }

    /**
     * ???E-mail??
     * 
     * @return ??E-mail??
     */
    @NotNull
    public Boolean getIsDuplicateEmail() {
        return isDuplicateEmail;
    }

    /**
     * ??E-mail??
     * 
     * @param isDuplicateEmail
     *            ??E-mail??
     */
    public void setIsDuplicateEmail(Boolean isDuplicateEmail) {
        this.isDuplicateEmail = isDuplicateEmail;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @Length(max = 200)
    public String getDisabledUsername() {
        return disabledUsername;
    }

    /**
     * ???
     * 
     * @param disabledUsername
     *            ???
     */
    public void setDisabledUsername(String disabledUsername) {
        if (disabledUsername != null) {
            disabledUsername = disabledUsername.replaceAll("[,\\s]*,[,\\s]*", ",").replaceAll("^,|,$", "");
        }
        this.disabledUsername = disabledUsername;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @NotNull
    @Min(1)
    @Max(117)
    public Integer getUsernameMinLength() {
        return usernameMinLength;
    }

    /**
     * ???
     * 
     * @param usernameMinLength
     *            ???
     */
    public void setUsernameMinLength(Integer usernameMinLength) {
        this.usernameMinLength = usernameMinLength;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    @Min(1)
    @Max(117)
    public Integer getUsernameMaxLength() {
        return usernameMaxLength;
    }

    /**
     * ??
     * 
     * @param usernameMaxLength
     *            ??
     */
    public void setUsernameMaxLength(Integer usernameMaxLength) {
        this.usernameMaxLength = usernameMaxLength;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    @Min(1)
    @Max(117)
    public Integer getPasswordMinLength() {
        return passwordMinLength;
    }

    /**
     * ??
     * 
     * @param passwordMinLength
     *            ??
     */
    public void setPasswordMinLength(Integer passwordMinLength) {
        this.passwordMinLength = passwordMinLength;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(1)
    @Max(117)
    public Integer getPasswordMaxLength() {
        return passwordMaxLength;
    }

    /**
     * ?
     * 
     * @param passwordMaxLength
     *            ?
     */
    public void setPasswordMaxLength(Integer passwordMaxLength) {
        this.passwordMaxLength = passwordMaxLength;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(0)
    public Long getRegisterPoint() {
        return registerPoint;
    }

    /**
     * ?
     * 
     * @param registerPoint
     *            ?
     */
    public void setRegisterPoint(Long registerPoint) {
        this.registerPoint = registerPoint;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotEmpty
    public String getRegisterAgreement() {
        return registerAgreement;
    }

    /**
     * ??
     * 
     * @param registerAgreement
     *            ??
     */
    public void setRegisterAgreement(String registerAgreement) {
        this.registerAgreement = registerAgreement;
    }

    /**
     * ???E-mail
     * 
     * @return ??E-mail
     */
    @NotNull
    public Boolean getIsEmailLogin() {
        return isEmailLogin;
    }

    /**
     * ??E-mail
     * 
     * @param isEmailLogin
     *            ??E-mail
     */
    public void setIsEmailLogin(Boolean isEmailLogin) {
        this.isEmailLogin = isEmailLogin;
    }

    /**
     * ???
     * 
     * @return ??
     */
    public CaptchaType[] getCaptchaTypes() {
        return captchaTypes;
    }

    /**
     * ??
     * 
     * @param captchaTypes
     *            ??
     */
    public void setCaptchaTypes(CaptchaType[] captchaTypes) {
        this.captchaTypes = captchaTypes;
    }

    /**
     * ???
     * 
     * @return ??
     */
    public AccountLockType[] getAccountLockTypes() {
        return accountLockTypes;
    }

    /**
     * ??
     * 
     * @param accountLockTypes
     *            ??
     */
    public void setAccountLockTypes(AccountLockType[] accountLockTypes) {
        this.accountLockTypes = accountLockTypes;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotNull
    @Min(1)
    public Integer getAccountLockCount() {
        return accountLockCount;
    }

    /**
     * 
     * 
     * @param accountLockCount
     *            
     */
    public void setAccountLockCount(Integer accountLockCount) {
        this.accountLockCount = accountLockCount;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(0)
    public Integer getAccountLockTime() {
        return accountLockTime;
    }

    /**
     * ?
     * 
     * @param accountLockTime
     *            ?
     */
    public void setAccountLockTime(Integer accountLockTime) {
        this.accountLockTime = accountLockTime;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotNull
    @Min(0)
    public Integer getSafeKeyExpiryTime() {
        return safeKeyExpiryTime;
    }

    /**
     * 
     * 
     * @param safeKeyExpiryTime
     *            
     */
    public void setSafeKeyExpiryTime(Integer safeKeyExpiryTime) {
        this.safeKeyExpiryTime = safeKeyExpiryTime;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(0)
    public Integer getUploadMaxSize() {
        return uploadMaxSize;
    }

    /**
     * ?
     * 
     * @param uploadMaxSize
     *            ?
     */
    public void setUploadMaxSize(Integer uploadMaxSize) {
        this.uploadMaxSize = uploadMaxSize;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @Length(max = 200)
    public String getUploadImageExtension() {
        return uploadImageExtension;
    }

    /**
     * ???
     * 
     * @param uploadImageExtension
     *            ???
     */
    public void setUploadImageExtension(String uploadImageExtension) {
        if (uploadImageExtension != null) {
            uploadImageExtension = uploadImageExtension.replaceAll("[,\\s]*,[,\\s]*", ",").replaceAll("^,|,$", "")
                    .toLowerCase();
        }
        this.uploadImageExtension = uploadImageExtension;
    }

    /**
     * ??Flash??
     * 
     * @return ?Flash??
     */
    @Length(max = 200)
    public String getUploadFlashExtension() {
        return uploadFlashExtension;
    }

    /**
     * ?Flash??
     * 
     * @param uploadFlashExtension
     *            ?Flash??
     */
    public void setUploadFlashExtension(String uploadFlashExtension) {
        if (uploadFlashExtension != null) {
            uploadFlashExtension = uploadFlashExtension.replaceAll("[,\\s]*,[,\\s]*", ",").replaceAll("^,|,$", "")
                    .toLowerCase();
        }
        this.uploadFlashExtension = uploadFlashExtension;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @Length(max = 200)
    public String getUploadMediaExtension() {
        return uploadMediaExtension;
    }

    /**
     * ???
     * 
     * @param uploadMediaExtension
     *            ???
     */
    public void setUploadMediaExtension(String uploadMediaExtension) {
        if (uploadMediaExtension != null) {
            uploadMediaExtension = uploadMediaExtension.replaceAll("[,\\s]*,[,\\s]*", ",").replaceAll("^,|,$", "")
                    .toLowerCase();
        }
        this.uploadMediaExtension = uploadMediaExtension;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @Length(max = 200)
    public String getUploadFileExtension() {
        return uploadFileExtension;
    }

    /**
     * ???
     * 
     * @param uploadFileExtension
     *            ???
     */
    public void setUploadFileExtension(String uploadFileExtension) {
        if (uploadFileExtension != null) {
            uploadFileExtension = uploadFileExtension.replaceAll("[,\\s]*,[,\\s]*", ",").replaceAll("^,|,$", "")
                    .toLowerCase();
        }
        this.uploadFileExtension = uploadFileExtension;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotEmpty
    @Length(max = 200)
    public String getImageUploadPath() {
        return imageUploadPath;
    }

    /**
     * 
     * 
     * @param imageUploadPath
     *            
     */
    public void setImageUploadPath(String imageUploadPath) {
        if (imageUploadPath != null) {
            if (!imageUploadPath.startsWith("/")) {
                imageUploadPath = "/" + imageUploadPath;
            }
            if (!imageUploadPath.endsWith("/")) {
                imageUploadPath += "/";
            }
        }
        this.imageUploadPath = imageUploadPath;
    }

    /**
     * ?Flash
     * 
     * @return Flash
     */
    @NotEmpty
    @Length(max = 200)
    public String getFlashUploadPath() {
        return flashUploadPath;
    }

    /**
     * Flash
     * 
     * @param flashUploadPath
     *            Flash
     */
    public void setFlashUploadPath(String flashUploadPath) {
        if (flashUploadPath != null) {
            if (!flashUploadPath.startsWith("/")) {
                flashUploadPath = "/" + flashUploadPath;
            }
            if (!flashUploadPath.endsWith("/")) {
                flashUploadPath += "/";
            }
        }
        this.flashUploadPath = flashUploadPath;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotEmpty
    @Length(max = 200)
    public String getMediaUploadPath() {
        return mediaUploadPath;
    }

    /**
     * 
     * 
     * @param mediaUploadPath
     *            
     */
    public void setMediaUploadPath(String mediaUploadPath) {
        if (mediaUploadPath != null) {
            if (!mediaUploadPath.startsWith("/")) {
                mediaUploadPath = "/" + mediaUploadPath;
            }
            if (!mediaUploadPath.endsWith("/")) {
                mediaUploadPath += "/";
            }
        }
        this.mediaUploadPath = mediaUploadPath;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotEmpty
    @Length(max = 200)
    public String getFileUploadPath() {
        return fileUploadPath;
    }

    /**
     * 
     * 
     * @param fileUploadPath
     *            
     */
    public void setFileUploadPath(String fileUploadPath) {
        if (fileUploadPath != null) {
            if (!fileUploadPath.startsWith("/")) {
                fileUploadPath = "/" + fileUploadPath;
            }
            if (!fileUploadPath.endsWith("/")) {
                fileUploadPath += "/";
            }
        }
        this.fileUploadPath = fileUploadPath;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotEmpty
    @Email
    @Length(max = 200)
    public String getSmtpFromMail() {
        return smtpFromMail;
    }

    /**
     * ?
     * 
     * @param smtpFromMail
     *            ?
     */
    public void setSmtpFromMail(String smtpFromMail) {
        this.smtpFromMail = smtpFromMail;
    }

    /**
     * ?SMTP??
     * 
     * @return SMTP??
     */
    @NotEmpty
    @Length(max = 200)
    public String getSmtpHost() {
        return smtpHost;
    }

    /**
     * SMTP??
     * 
     * @param smtpHost
     *            SMTP??
     */
    public void setSmtpHost(String smtpHost) {
        this.smtpHost = smtpHost;
    }

    /**
     * ?SMTP??
     * 
     * @return SMTP??
     */
    @NotNull
    @Min(0)
    public Integer getSmtpPort() {
        return smtpPort;
    }

    /**
     * SMTP??
     * 
     * @param smtpPort
     *            SMTP??
     */
    public void setSmtpPort(Integer smtpPort) {
        this.smtpPort = smtpPort;
    }

    /**
     * ?SMTP??
     * 
     * @return SMTP??
     */
    @NotEmpty
    @Length(max = 200)
    public String getSmtpUsername() {
        return smtpUsername;
    }

    /**
     * SMTP??
     * 
     * @param smtpUsername
     *            SMTP??
     */
    public void setSmtpUsername(String smtpUsername) {
        this.smtpUsername = smtpUsername;
    }

    /**
     * ?SMTP?
     * 
     * @return SMTP?
     */
    @Length(max = 200)
    public String getSmtpPassword() {
        return smtpPassword;
    }

    /**
     * SMTP?
     * 
     * @param smtpPassword
     *            SMTP?
     */
    public void setSmtpPassword(String smtpPassword) {
        this.smtpPassword = smtpPassword;
    }

    /**
     * ?SMS???
     * 
     * @return SMS???
     */
    public String getSmsApiHost() {
        return smsApiHost;
    }

    /**
     * SMS???
     * 
     * @param smsApiHost
     *            SMS???
     */
    public void setSmsApiHost(String smsApiHost) {
        this.smsApiHost = smsApiHost;
    }

    /**
     *  ?SMS?
     * 
     * @return  SMS ?
     *           
     */

    public String getSmsApiKey() {
        return smsApiKey;
    }

    /**
     * SMS?
     * 
     * @param smsApiKey
     *            SMS?
     */
    public void setSmsApiKey(String smsApiKey) {
        this.smsApiKey = smsApiKey;
    }

    /**
     * ?SMS
     * 
     * @return SMTP?
     *            
     */
    public String getSmsAccount() {
        return smsAccount;
    }

    /**
     * SMS
     * 
     * @param smsAccount
     *            SMS
     */
    public void setSmsAccount(String smsAccount) {
        this.smsAccount = smsAccount;
    }

    /**
     * ?SMS?
     * 
     * @return SMS?
     */
    public String getSmsPassword() {
        return smsPassword;
    }

    /**
     * SMS?
     * 
     * @param smsPassword
     *            SMS?
     */
    public void setSmsPassword(String smsPassword) {
        this.smsPassword = smsPassword;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotEmpty
    @Length(max = 200)
    public String getCurrencySign() {
        return currencySign;
    }

    /**
     * ??
     * 
     * @param currencySign
     *            ??
     */
    public void setCurrencySign(String currencySign) {
        this.currencySign = currencySign;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @NotEmpty
    @Length(max = 200)
    public String getCurrencyUnit() {
        return currencyUnit;
    }

    /**
     * ???
     * 
     * @param currencyUnit
     *            ???
     */
    public void setCurrencyUnit(String currencyUnit) {
        this.currencyUnit = currencyUnit;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotNull
    @Min(0)
    public Integer getStockAlertCount() {
        return stockAlertCount;
    }

    /**
     * 
     * 
     * @param stockAlertCount
     *            
     */
    public void setStockAlertCount(Integer stockAlertCount) {
        this.stockAlertCount = stockAlertCount;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    public StockAllocationTime getStockAllocationTime() {
        return stockAllocationTime;
    }

    /**
     * ?
     * 
     * @param stockAllocationTime
     *            ?
     */
    public void setStockAllocationTime(StockAllocationTime stockAllocationTime) {
        this.stockAllocationTime = stockAllocationTime;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    @Min(0)
    @Digits(integer = 3, fraction = 3)
    public Double getDefaultPointScale() {
        return defaultPointScale;
    }

    /**
     * ?
     * 
     * @param defaultPointScale
     *            ?
     */
    public void setDefaultPointScale(Double defaultPointScale) {
        this.defaultPointScale = defaultPointScale;
    }

    /**
     * ?????
     * 
     * @return ????
     */
    @NotNull
    public Boolean getIsDevelopmentEnabled() {
        return isDevelopmentEnabled;
    }

    /**
     * ????
     * 
     * @param isDevelopmentEnabled
     *            ????
     */
    public void setIsDevelopmentEnabled(Boolean isDevelopmentEnabled) {
        this.isDevelopmentEnabled = isDevelopmentEnabled;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    public Boolean getIsReviewEnabled() {
        return isReviewEnabled;
    }

    /**
     * ??
     * 
     * @param isReviewEnabled
     *            ??
     */
    public void setIsReviewEnabled(Boolean isReviewEnabled) {
        this.isReviewEnabled = isReviewEnabled;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    public Boolean getIsReviewCheck() {
        return isReviewCheck;
    }

    /**
     * ?
     * 
     * @param isReviewCheck
     *            ?
     */
    public void setIsReviewCheck(Boolean isReviewCheck) {
        this.isReviewCheck = isReviewCheck;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    public ReviewAuthority getReviewAuthority() {
        return reviewAuthority;
    }

    /**
     * ??
     * 
     * @param reviewAuthority
     *            ??
     */
    public void setReviewAuthority(ReviewAuthority reviewAuthority) {
        this.reviewAuthority = reviewAuthority;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    public Boolean getIsConsultationEnabled() {
        return isConsultationEnabled;
    }

    /**
     * ??
     * 
     * @param isConsultationEnabled
     *            ??
     */
    public void setIsConsultationEnabled(Boolean isConsultationEnabled) {
        this.isConsultationEnabled = isConsultationEnabled;
    }

    /**
     * ??
     * 
     * @return ?
     */
    @NotNull
    public Boolean getIsConsultationCheck() {
        return isConsultationCheck;
    }

    /**
     * ?
     * 
     * @param isConsultationCheck
     *            ?
     */
    public void setIsConsultationCheck(Boolean isConsultationCheck) {
        this.isConsultationCheck = isConsultationCheck;
    }

    /**
     * ???
     * 
     * @return ??
     */
    @NotNull
    public ConsultationAuthority getConsultationAuthority() {
        return consultationAuthority;
    }

    /**
     * ??
     * 
     * @param consultationAuthority
     *            ??
     */
    public void setConsultationAuthority(ConsultationAuthority consultationAuthority) {
        this.consultationAuthority = consultationAuthority;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @NotNull
    public Boolean getIsInvoiceEnabled() {
        return isInvoiceEnabled;
    }

    /**
     * ???
     * 
     * @param isInvoiceEnabled
     *            ???
     */
    public void setIsInvoiceEnabled(Boolean isInvoiceEnabled) {
        this.isInvoiceEnabled = isInvoiceEnabled;
    }

    /**
     * ????
     * 
     * @return ???
     */
    @NotNull
    public Boolean getIsTaxPriceEnabled() {
        return isTaxPriceEnabled;
    }

    /**
     * ???
     * 
     * @param isTaxPriceEnabled
     *            ???
     */
    public void setIsTaxPriceEnabled(Boolean isTaxPriceEnabled) {
        this.isTaxPriceEnabled = isTaxPriceEnabled;
    }

    /**
     * ?
     * 
     * @return 
     */
    @NotNull
    @Min(0)
    @Digits(integer = 3, fraction = 3)
    public Double getTaxRate() {
        return taxRate;
    }

    /**
     * 
     * 
     * @param taxRate
     *            
     */
    public void setTaxRate(Double taxRate) {
        this.taxRate = taxRate;
    }

    /**
     * ?Cookie
     * 
     * @return Cookie
     */
    @NotEmpty
    @Length(max = 200)
    public String getCookiePath() {
        return cookiePath;
    }

    /**
     * Cookie
     * 
     * @param cookiePath
     *            Cookie
     */
    public void setCookiePath(String cookiePath) {
        if (cookiePath != null && !cookiePath.endsWith("/")) {
            cookiePath += "/";
        }
        this.cookiePath = cookiePath;
    }

    /**
     * ?Cookie
     * 
     * @return Cookie
     */
    @Length(max = 200)
    public String getCookieDomain() {
        return cookieDomain;
    }

    /**
     * Cookie
     * 
     * @param cookieDomain
     *            Cookie
     */
    public void setCookieDomain(String cookieDomain) {
        this.cookieDomain = cookieDomain;
    }

    /**
     * ?100?KEY
     * 
     * @return 100?KEY
     */
    @Length(max = 200)
    public String getKuaidi100Key() {
        return kuaidi100Key;
    }

    /**
     * 100?KEY
     * 
     * @param kuaidi100Key
     *            100?KEY
     */
    public void setKuaidi100Key(String kuaidi100Key) {
        this.kuaidi100Key = kuaidi100Key;
    }

    /**
     * ???CNZZ
     * 
     * @return ??CNZZ
     */
    public Boolean getIsCnzzEnabled() {
        return isCnzzEnabled;
    }

    /**
     * ??CNZZ
     * 
     * @param isCnzzEnabled
     *            ??CNZZ
     */
    public void setIsCnzzEnabled(Boolean isCnzzEnabled) {
        this.isCnzzEnabled = isCnzzEnabled;
    }

    /**
     * ?CNZZID
     * 
     * @return CNZZID
     */
    public String getCnzzSiteId() {
        return cnzzSiteId;
    }

    /**
     * CNZZID
     * 
     * @param cnzzSiteId
     *            CNZZID
     */
    public void setCnzzSiteId(String cnzzSiteId) {
        this.cnzzSiteId = cnzzSiteId;
    }

    /**
     * ?CNZZ?
     * 
     * @return CNZZ?
     */
    public String getCnzzPassword() {
        return cnzzPassword;
    }

    /**
     * CNZZ?
     * 
     * @param cnzzPassword
     *            CNZZ?
     */
    public void setCnzzPassword(String cnzzPassword) {
        this.cnzzPassword = cnzzPassword;
    }

    /**
     * ???
     * 
     * @return ??
     */
    public String[] getHotSearches() {
        return StringUtils.split(hotSearch, SEPARATOR);
    }

    /**
     * ????
     * 
     * @return ???
     */
    public String[] getDisabledUsernames() {
        return StringUtils.split(disabledUsername, SEPARATOR);
    }

    /**
     * ????
     * 
     * @return ???
     */
    public String[] getUploadImageExtensions() {
        return StringUtils.split(uploadImageExtension, SEPARATOR);
    }

    /**
     * ??Flash??
     * 
     * @return ?Flash??
     */
    public String[] getUploadFlashExtensions() {
        return StringUtils.split(uploadFlashExtension, SEPARATOR);
    }

    /**
     * ????
     * 
     * @return ???
     */
    public String[] getUploadMediaExtensions() {
        return StringUtils.split(uploadMediaExtension, SEPARATOR);
    }

    /**
     * ????
     * 
     * @return ???
     */
    public String[] getUploadFileExtensions() {
        return StringUtils.split(uploadFileExtension, SEPARATOR);
    }

    /**
     * 
     * 
     * @param amount
     *            
     * @return 
     */
    public BigDecimal setScale(BigDecimal amount) {
        if (amount == null) {
            return null;
        }
        int roundingMode;
        if (getPriceRoundType() == RoundType.roundUp) {
            roundingMode = BigDecimal.ROUND_UP;
        } else if (getPriceRoundType() == RoundType.roundDown) {
            roundingMode = BigDecimal.ROUND_DOWN;
        } else {
            roundingMode = BigDecimal.ROUND_HALF_UP;
        }
        return amount.setScale(getPriceScale(), roundingMode);
    }

}