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.
81 lines
2.7 KiB
81 lines
2.7 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 MTConfig extends DefaultConfiguration { |
|
|
|
private static volatile MTConfig config = null; |
|
|
|
public static MTConfig getInstance() { |
|
if (config == null) { |
|
config = ConfigContext.getConfigInstance(MTConfig.class); |
|
} |
|
return config; |
|
} |
|
|
|
@Identifier(value = "clientId", name = "clientId", description = "描述", 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 = "notExistUrl", name = "用户不存在调整地址", description = "用户不存在调整地址URL", status = Status.SHOW) |
|
private Conf<String> notExistUrl = Holders.simple("https://xx/bi/has-error?message=%22%E7%94%A8%E6%88%B7%E4%B8%8D%E5%AD%98%E5%9C%A8%22"); |
|
@Identifier(value = "apiUrl", name = "接口地址", description = "描述", status = Status.SHOW) |
|
private Conf<String> apiUrl = Holders.simple(""); |
|
@Identifier(value = "frUrl", name = "fr地址", description = "描述", status = Status.SHOW) |
|
private Conf<String> frUrl = Holders.simple("http://localhost:8080/webroot/decision/"); |
|
|
|
public String getNotExistUrl() { |
|
return notExistUrl.get(); |
|
} |
|
|
|
public void setNotExistUrl( String notExistUrl) { |
|
this.notExistUrl .set(notExistUrl); |
|
} |
|
|
|
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 clientSecret) { |
|
this.clientSecret.set(clientSecret); |
|
} |
|
|
|
public String getApiUrl() { |
|
return apiUrl.get(); |
|
} |
|
|
|
public void setApiUrl(String apiUrl) { |
|
this.apiUrl.set(apiUrl); |
|
} |
|
|
|
public String getFrUrl() { |
|
return frUrl.get(); |
|
} |
|
|
|
public void setFrUrl(String frUrl) { |
|
this.frUrl.set(frUrl); |
|
} |
|
|
|
@Override |
|
public Object clone() throws CloneNotSupportedException { |
|
MTConfig cloned = (MTConfig) super.clone(); |
|
cloned.clientId = (Conf<String>) this.clientId.clone(); |
|
cloned.clientSecret = (Conf<String>) this.clientSecret.clone(); |
|
cloned.apiUrl = (Conf<String>) this.apiUrl.clone(); |
|
cloned.frUrl = (Conf<String>) this.frUrl.clone(); |
|
cloned.notExistUrl = (Conf<String>) this.notExistUrl.clone(); |
|
return cloned; |
|
} |
|
|
|
} |