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.

176 lines
5.8 KiB

package com.fr.plugin.ztzzSSO.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.fr.plugin.ztsso.config.simple", text = "单点登录配置", source = Original.PLUGIN)
public static PluginSimpleConfig getInstance() {
if (config == null) {
config = ConfigContext.getConfigInstance(PluginSimpleConfig.class);
}
return config;
}
@Identifier(value = "frDomain", name = "帆软系统域名", description = "帆软系统域名", status = Status.SHOW)
private Conf<String> frDomain = Holders.simple("http://localhost:8075");
@Identifier(value = "clientId", name = "clientId", description = "client_id", status = Status.SHOW)
private Conf<String> appId = Holders.simple("fanruan");
@Identifier(value = "secret", name = "clientsecret", description = "client_secret", status = Status.SHOW)
private Conf<String> host = Holders.simple("xxx");
@Identifier(value = "codeUrl", name = "获取授权码接口地址", description = "authorize", status = Status.SHOW)
private Conf<String> codeUrl = Holders.simple("https://xxx/idp/oauth2/authorize");
@Identifier(value = "tokenUrl", name = "获取token接口地址", description = "getToken", status = Status.SHOW)
private Conf<String> tokenUrl = Holders.simple("https://xxx/idp/oauth2/getToken");
@Identifier(value = "userInfoUrl", name = "获取用户信息接口地址", description = "getUserInfo", status = Status.SHOW)
private Conf<String> userInfoUrl = Holders.simple("https://xxx/idp/oauth2/getUserInfo");
@Identifier(value = "logoutUrl", name = "登出接口地址", description = "GLO", status = Status.SHOW)
private Conf<String> logoutUrl = Holders.simple("https://xxx/idp/oauth2//Redirect/GLO");
@Identifier(value = "rzzxUrl", name = "认证中心登录地址", description = "认证中心登录地址", status = Status.SHOW)
private Conf<String> rzzxUrl = Holders.simple("https://xxx/idp/oauth2//Redirect/GLO");
// -----------------------------------用户同步---------------------------------
@Identifier(value = "username", name = "用户名-数据同步", description = "用户名-数据同步", status = Status.SHOW)
private Conf<String> username = Holders.simple("xxx");
@Identifier(value = "psd", name = "密码-数据同步", description = "密码-数据同步", status = Status.SHOW)
private Conf<String> psd = Holders.simple("000000");
@Identifier(value = "tokenUrl2", name = "token接口-数据同步", description = "获取token-数据同步", status = Status.SHOW)
private Conf<String> tokenUrl2 = Holders.simple("http://xxx/api/users/login");
@Identifier(value = "orgUrl", name = "组织接口-数据同步", description = "组织接口-数据同步", status = Status.SHOW)
private Conf<String> orgUrl = Holders.simple("http://xxx/api/mdm/m_organization/query");
@Identifier(value = "userUrl", name = "用户接口-数据同步", description = "用户接口-数据同步", status = Status.SHOW)
private Conf<String> userUrl = Holders.simple("http://xxx/api/mdm/m_person_basic_info/query");
public String getRzzxUrl() {
return rzzxUrl.get();
}
public void settRzzxUrl(String userInfoUrl) {
this.rzzxUrl.set(userInfoUrl);
}
public String getFrDomain() {
return frDomain.get();
}
public void setFrDomain(String url) {
this.frDomain.set(url);
}
public String getAppId() {
return appId.get();
}
public void setAppId(String url) {
this.appId.set(url);
}
public String getHost() {
return host.get();
}
public void setHost(String url) {
this.host.set(url);
}
public String getCodeUrl() {
return codeUrl.get();
}
public void setCodeUrl(String codeUrl) {
this.codeUrl.set(codeUrl);
}
public String getTokenUrl() {
return tokenUrl.get();
}
public void setTokenUrl(String tokenUrl) {
this.tokenUrl.set(tokenUrl);
}
public String getTokenUrl2() {
return tokenUrl2.get();
}
public void setTokenUrl2(String tokenUrl) {
this.tokenUrl2.set(tokenUrl);
}
public String getUserInfoUrl() {
return userInfoUrl.get();
}
public void setUserInfoUrl(String userInfoUrl) {
this.userInfoUrl.set(userInfoUrl);
}
public String getLogoutUrl() {
return logoutUrl.get();
}
public void setLogoutUrl(String userInfoUrl) {
this.logoutUrl.set(userInfoUrl);
}
public String getUsername() {
return username.get();
}
public void setUsername(String url) {
this.username.set(url);
}
public String getPsd() { return psd.get(); }
public void setPsd(String url) {
this.psd.set(url);
}
public String getOrgUrl() { return orgUrl.get(); }
public void setOrgUrl(String url) {
this.orgUrl.set(url);
}
public String getUserUrl() { return userUrl.get(); }
public void setUserUrl(String url) {
this.userUrl.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;
}
}