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.

79 lines
2.5 KiB

package com.eco.plugin.xx.zcgjsync.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.zcgjsync.config", text = "数据同步配置", source = Original.PLUGIN)
public static PluginSimpleConfig getInstance() {
if (config == null) {
config = ConfigContext.getConfigInstance(PluginSimpleConfig.class);
}
return config;
}
@Identifier(value = "clientId", name = "应用id", description = "应用id", status = Status.SHOW)
private Conf<String> clientId = Holders.simple("");
@Identifier(value = "secret", name = "应用key", description = "应用key", status = Status.SHOW)
private Conf<String> secret = Holders.simple("");
@Identifier(value = "privatekey", name = "解密私钥", description = "解密私钥", status = Status.SHOW)
private Conf<String> privatekey = Holders.simple("");
@Identifier(value = "timeout", name = "鉴权超时时间(秒)", description = "鉴权超时时间(秒)", status = Status.SHOW)
private Conf<Integer> timeout = Holders.simple(100);
public String getClientId() {
return clientId.get();
}
public void setClientId(String url) {
this.clientId.set(url);
}
public String getSecret() {
return secret.get();
}
public void setSecret(String url) {
this.secret.set(url);
}
public String getPrivatekey() {
return privatekey.get();
}
public void setPrivatekey(String url) {
this.privatekey.set(url);
}
public Integer getTimeout() {
return timeout.get();
}
public void setTimeout(Integer url) {
this.timeout.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;
}
}