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.
60 lines
2.2 KiB
60 lines
2.2 KiB
package com.fr.plugin; |
|
|
|
import com.fr.config.*; |
|
import com.fr.config.holder.Conf; |
|
import com.fr.config.holder.factory.Holders; |
|
|
|
@Visualization(category = "新xx单点配置") |
|
public class NEWLANConfig extends DefaultConfiguration { |
|
|
|
private static volatile NEWLANConfig config = null; |
|
|
|
public static NEWLANConfig getInstance() { |
|
if (config == null) { |
|
config = ConfigContext.getConfigInstance(NEWLANConfig.class); |
|
} |
|
return config; |
|
} |
|
@Identifier(value = "apiUrl", name = "xx接口地址", description = "xx接口地址", status = Status.SHOW) |
|
private Conf<String> apiUrl = Holders.simple(""); |
|
@Identifier(value = "clientId", name = "clientId", description = "clientId", status = Status.SHOW) |
|
private Conf<String> clientId = Holders.simple(""); |
|
@Identifier(value = "clientSecret", name = "clientSecret", description = "描述", status = Status.SHOW) |
|
private Conf<String> clientSecret = Holders.simple(""); |
|
@Identifier(value = "authUrl", name = "xx认证域名", description = "xx接口地址", status = Status.SHOW) |
|
private Conf<String> authUrl = Holders.simple(""); |
|
public String getApiUrl() { |
|
return apiUrl.get(); |
|
} |
|
public void setApiUrl(String apiUrl) { |
|
this.apiUrl.set(apiUrl); |
|
} |
|
public String getClientId() { |
|
return clientId.get(); |
|
} |
|
public void setClientId(String clientId) { |
|
this.clientId.set(clientId); |
|
} |
|
public String getClientSecret() { |
|
return clientSecret.get(); |
|
} |
|
public void setClientSecret(String configName) { |
|
this.clientSecret.set(configName); |
|
} |
|
public String getAuthUrl() { |
|
return authUrl.get(); |
|
} |
|
public void setAuthUrl(String authUrl) { |
|
this.authUrl.set(authUrl); |
|
} |
|
@Override |
|
public Object clone() throws CloneNotSupportedException { |
|
NEWLANConfig cloned = (NEWLANConfig) super.clone(); |
|
cloned.apiUrl = (Conf<String>) this.apiUrl.clone(); |
|
cloned.clientId = (Conf<String>) this.clientId.clone(); |
|
cloned.clientSecret = (Conf<String>) this.clientSecret.clone(); |
|
cloned.authUrl = (Conf<String>) this.authUrl.clone(); |
|
return cloned; |
|
} |
|
|
|
} |