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.
57 lines
1.9 KiB
57 lines
1.9 KiB
package com.eco.plugin.xx.cjccfilter.config; |
|
|
|
import com.fr.config.*; |
|
import com.fr.config.holder.Conf; |
|
import com.fr.config.holder.factory.Holders; |
|
import com.fr.intelli.record.Focus; |
|
import com.fr.intelli.record.Original; |
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
@Visualization(category = "防盗链白名单配置") |
|
@EnableMetrics |
|
public class PluginSimpleConfig extends DefaultConfiguration { |
|
|
|
private static volatile PluginSimpleConfig config = null; |
|
|
|
@Focus(id="com.eco.plugin.xx.cjccfilter.config", text = "防盗链白名单配置", source = Original.PLUGIN) |
|
public static PluginSimpleConfig getInstance() { |
|
if (config == null) { |
|
config = ConfigContext.getConfigInstance(PluginSimpleConfig.class); |
|
} |
|
return config; |
|
} |
|
|
|
// @Identifier(value = "white", name = "白名单", description = "多个用英文逗号分隔", status = Status.SHOW) |
|
// private Conf<String> white = Holders.simple(""); |
|
|
|
@Identifier(value = "errorpage", name = "错误页面地址", description = "错误页面地址", status = Status.SHOW) |
|
private Conf<String> errorpage = Holders.simple(""); |
|
|
|
// public String getWhite() { |
|
// return white.get(); |
|
// } |
|
// |
|
// public void setWhite(String url) { |
|
// this.white.set(url); |
|
// } |
|
|
|
public String getErrorpage() { |
|
return errorpage.get(); |
|
} |
|
|
|
public void setErrorpage(String url) { |
|
this.errorpage.set(url); |
|
} |
|
|
|
@Override |
|
public Object clone() throws CloneNotSupportedException { |
|
PluginSimpleConfig cloned = (PluginSimpleConfig) super.clone(); |
|
// cloned.text = (Conf<String>) text.clone(); |
|
// cloned.count = (Conf<Integer>) count.clone(); |
|
// cloned.price = (Conf<Double>) price.clone(); |
|
// cloned.time = (Conf<Long>) time.clone(); |
|
// cloned.student = (Conf<Boolean>) student.clone(); |
|
return cloned; |
|
} |
|
|
|
}
|
|
|