package ink.wgink.properties;

/**
 * @ClassName: FileCenterProperties
 * @Description: 文件中心
 * @Author: wanggeng
 * @Date: 2022/8/5 20:33
 * @Version: 1.0
 */
public class FileCenterProperties {

    private String uploadUrl;
    private String showUrl;
    private String accessKey;
    private String accessSecret;

    public String getUploadUrl() {
        if (uploadUrl == null) {
            return null;
        }
        uploadUrl = uploadUrl.trim();
        if (uploadUrl.endsWith("/")) {
            uploadUrl = uploadUrl.substring(0, uploadUrl.length() - 1);
        }
        return uploadUrl;
    }

    public void setUploadUrl(String uploadUrl) {
        this.uploadUrl = uploadUrl;
    }

    public String getShowUrl() {
        if (showUrl == null) {
            return null;
        }
        showUrl = showUrl.trim();
        if (showUrl.endsWith("/")) {
            showUrl = showUrl.substring(0, showUrl.length() - 1);
        }
        return showUrl;
    }

    public void setShowUrl(String showUrl) {
        this.showUrl = showUrl;
    }

    public String getAccessKey() {
        return accessKey == null ? "" : accessKey.trim();
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getAccessSecret() {
        return accessSecret == null ? "" : accessSecret.trim();
    }

    public void setAccessSecret(String accessSecret) {
        this.accessSecret = accessSecret;
    }
}
