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.

71 lines
1.9 KiB

package com.fr.plugin.third.party.jsdbabbe.config;
import com.fr.config.*;
import com.fr.config.holder.Conf;
import com.fr.config.holder.factory.Holders;
import java.util.HashMap;
import java.util.Map;
/**
* 配置数据保存
*/
@Visualization(category = "消息待办推送")
public class CustomDataConfig extends DefaultConfiguration {
public String getNameSpace() {
return this.getClass().getName();
}
private static volatile CustomDataConfig config = null;
public static CustomDataConfig getInstance() {
if (config == null) {
config = ConfigContext.getConfigInstance(CustomDataConfig.class);
}
return config;
}
@Identifier(value = "key", name = "key", description = "", status = Status.SHOW)
private Conf<String> key = Holders.simple("");
@Identifier(value = "username", name = "用户名(username)", description = "", status = Status.SHOW)
private Conf<String> username = Holders.simple("");
@Identifier(value = "password", name = "密码(password)", description = "", status = Status.SHOW)
private Conf<String> password = Holders.simple("");
public String getKey() {
return key.get();
}
public void setKey(String key) {
this.key.set(key);
}
public String getUsername() {
return username.get();
}
public void setUsername(String username) {
this.username.set(username);
}
public String getPassword() {
return password.get();
}
public void setPassword(String password) {
this.password.set(password);
}
@Override
public Object clone() throws CloneNotSupportedException {
CustomDataConfig cloned = (CustomDataConfig) super.clone();
cloned.key = (Conf<String>) key.clone();
cloned.username = (Conf<String>) username.clone();
cloned.password = (Conf<String>) password.clone();
return cloned;
}
}