|
|
|
@ -3,10 +3,14 @@ package com.fr.plugin.file.submit.oss.conf;
|
|
|
|
|
import com.fr.config.ConfigContext; |
|
|
|
|
import com.fr.config.DefaultConfiguration; |
|
|
|
|
import com.fr.config.Identifier; |
|
|
|
|
import com.fr.config.Status; |
|
|
|
|
import com.fr.config.Visualization; |
|
|
|
|
import com.fr.config.holder.Conf; |
|
|
|
|
import com.fr.config.holder.factory.Holders; |
|
|
|
|
import com.fr.config.holder.impl.ColConf; |
|
|
|
|
import com.fr.config.holder.impl.ObjConf; |
|
|
|
|
import com.fr.intelli.record.Focus; |
|
|
|
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.third.org.apache.commons.collections4.CollectionUtils; |
|
|
|
|
|
|
|
|
@ -19,6 +23,8 @@ import java.util.Set;
|
|
|
|
|
/** |
|
|
|
|
* OSS文件上传下载所使用的OSS配置 |
|
|
|
|
*/ |
|
|
|
|
@Visualization(category = "Plugin-Oss_Settings") |
|
|
|
|
@EnableMetrics |
|
|
|
|
public class FileSubmitOssServerConfig extends DefaultConfiguration { |
|
|
|
|
|
|
|
|
|
private static volatile FileSubmitOssServerConfig instance = null; |
|
|
|
@ -31,16 +37,16 @@ public class FileSubmitOssServerConfig extends DefaultConfiguration {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 地域节点配置信息
|
|
|
|
|
@Identifier("endPoint") |
|
|
|
|
@Identifier(value = "endPoint", name = "EndPoint", description = "Plugin-Oss_End_Point", status = Status.SHOW) |
|
|
|
|
private Conf<String> endPoint = Holders.simple(StringUtils.EMPTY); |
|
|
|
|
|
|
|
|
|
@Identifier("accessKeyId") |
|
|
|
|
@Identifier(value = "accessKeyId", name = "AccessKeyId", description = "Plugin-Oss_AccessKeyId", status = Status.SHOW) |
|
|
|
|
private Conf<String> accessKeyId = Holders.simple(StringUtils.EMPTY); |
|
|
|
|
|
|
|
|
|
@Identifier("accessKeySecret") |
|
|
|
|
@Identifier(value = "accessKeySecret", name = "AccessKeySecret", description = "Plugin-Oss_AccessKeySecret", status = Status.SHOW) |
|
|
|
|
private Conf<String> accessKeySecret = Holders.simple(StringUtils.EMPTY); |
|
|
|
|
|
|
|
|
|
@Identifier("buckets") |
|
|
|
|
@Identifier(value = "buckets", name = "Buckets", description = "Plugin-Oss_Buckets", status = Status.SHOW) |
|
|
|
|
private ColConf<Collection<String>> buckets = Holders.collection(new ArrayList<String>(), String.class); |
|
|
|
|
|
|
|
|
|
public String getEndPoint() { |
|
|
|
@ -81,6 +87,7 @@ public class FileSubmitOssServerConfig extends DefaultConfiguration {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Focus(id="com.fr.plugin.file.submit.oss", text = "Plugin-File_Submit_Oss") |
|
|
|
|
public Object clone() throws CloneNotSupportedException { |
|
|
|
|
FileSubmitOssServerConfig cloned = (FileSubmitOssServerConfig) super.clone(); |
|
|
|
|
cloned.endPoint = (Conf<String>) endPoint.clone(); |
|
|
|
|