You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.7 KiB
54 lines
1.7 KiB
2 years ago
|
package com.fr.plugin.cpic.config;
|
||
|
|
||
|
import com.fr.config.*;
|
||
|
import com.fr.config.holder.Conf;
|
||
|
import com.fr.config.holder.factory.Holders;
|
||
|
|
||
|
/**
|
||
|
* 插件参数配置
|
||
|
**/
|
||
|
@Visualization(category = "cpic-插件设置")
|
||
|
public class CpicCustomConfig extends DefaultConfiguration {
|
||
|
|
||
|
private static volatile CpicCustomConfig config = null;
|
||
|
|
||
|
public static CpicCustomConfig getInstance() {
|
||
|
if (config == null) {
|
||
|
config = ConfigContext.getConfigInstance(CpicCustomConfig.class);
|
||
|
}
|
||
|
return config;
|
||
|
}
|
||
|
|
||
|
// IP白名单
|
||
|
@Identifier(value = "ipWhiteValue", name = "IP白名单", description = "IP白名单,支持配置多个,用英文分号(;)分隔,示例:192.168.1.1;192.168.2.*;192.168.3.17-192.168.3.38", status = Status.SHOW)
|
||
|
private Conf<String> ipWhiteValue = Holders.simple("");
|
||
|
|
||
|
// 报表快照缓存地址
|
||
|
@Identifier(value = "cachePath", name = "报表快照缓存地址", description = "请输入绝对地址,示例:(windows)D:\\cache; (linux)/tmp/cache", status = Status.SHOW)
|
||
|
private Conf<String> cachePath = Holders.simple("");
|
||
|
|
||
|
public String getIpWhiteValue() {
|
||
|
return ipWhiteValue.get();
|
||
|
}
|
||
|
|
||
|
public void setIpWhiteValue(String ipWhiteValue) {
|
||
|
this.ipWhiteValue.set(ipWhiteValue);
|
||
|
}
|
||
|
|
||
|
public String getCachePath() {
|
||
|
return cachePath.get();
|
||
|
}
|
||
|
|
||
|
public void setCachePath(String cachePath) {
|
||
|
this.cachePath.set(cachePath);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Object clone() throws CloneNotSupportedException {
|
||
|
CpicCustomConfig cloned = (CpicCustomConfig) super.clone();
|
||
|
cloned.ipWhiteValue = (Conf<String>) ipWhiteValue.clone();
|
||
|
cloned.cachePath = (Conf<String>) cachePath.clone();
|
||
|
return cloned;
|
||
|
}
|
||
|
}
|