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.
146 lines
5.2 KiB
146 lines
5.2 KiB
3 years ago
|
/*
|
||
|
* Copyright (C), 2018-2021
|
||
|
* Project: starter
|
||
|
* FileName: DingSynConfig
|
||
|
* Author: Louis
|
||
|
* Date: 2021/3/30 9:38
|
||
|
*/
|
||
|
package com.fr.plugin.xxxx.dingtalksyn.config;
|
||
|
|
||
|
import com.fanruan.api.util.StringKit;
|
||
|
import com.fr.config.*;
|
||
|
import com.fr.config.holder.Conf;
|
||
|
import com.fr.config.holder.factory.Holders;
|
||
|
|
||
|
/**
|
||
|
* <Function Description><br>
|
||
|
* <DingSynConfig>
|
||
|
*
|
||
|
* @author fr.open
|
||
|
* @since 1.0.0
|
||
|
*/
|
||
|
@Visualization(category = "Plugin-dingtalksyn_Group")
|
||
|
public class DingSynConfig extends DefaultConfiguration {
|
||
|
|
||
|
// 每天中午十二点触发
|
||
|
public static final String CRON_CONDITION = "0 0 12 * * ?";
|
||
|
public static final long ROOT_DEP_ID = 1;
|
||
|
private static volatile DingSynConfig config = null;
|
||
|
|
||
|
public static DingSynConfig getInstance() {
|
||
|
if (config == null) {
|
||
|
config = ConfigContext.getConfigInstance(DingSynConfig.class);
|
||
|
}
|
||
|
return config;
|
||
|
}
|
||
|
|
||
|
@Identifier(value = "cronCondition", name = "Plugin-dingtalksyn_Config_CronCondition", description = "Plugin-dingtalksyn_Config_CronCondition_Description", status = Status.SHOW)
|
||
|
private Conf<String> cronCondition = Holders.simple(CRON_CONDITION);
|
||
|
@Identifier(value = "appKey", name = "Plugin-dingtalksyn_Config_appKey", description = "Plugin-dingtalksyn_Config_appKey_Description", status = Status.SHOW)
|
||
|
private Conf<String> appKey = Holders.simple(StringKit.EMPTY);
|
||
|
@Identifier(value = "appSecret", name = "Plugin-dingtalksyn_Config_appSecret", description = "Plugin-dingtalksyn_Config_appSecret_Description", status = Status.SHOW)
|
||
|
private Conf<String> appSecret = Holders.simple(StringKit.EMPTY);
|
||
|
@Identifier(value = "corpId", name = "Plugin-dingtalksyn_Config_corpId", description = "Plugin-dingtalksyn_Config_corpId_Description", status = Status.SHOW)
|
||
|
private Conf<String> corpId = Holders.simple(StringKit.EMPTY);
|
||
|
@Identifier(value = "rootDepId", name = "Plugin-dingtalksyn_Config_rootDepId", description = "Plugin-dingtalksyn_Config_rootDepId_Description", status = Status.SHOW)
|
||
|
private Conf<Long> rootDepId = Holders.simple(ROOT_DEP_ID);
|
||
|
@Identifier(value = "token", name = "Plugin-dingtalksyn_Config_Token", description = "Plugin-dingtalksyn_Config_Token_Description", status = Status.SHOW)
|
||
|
private Conf<String> token = Holders.simple(StringKit.EMPTY);
|
||
|
@Identifier(value = "aesKey", name = "Plugin-dingtalksyn_Config_AesKey", description = "Plugin-dingtalksyn_Config_AesKey_Description", status = Status.SHOW)
|
||
|
private Conf<String> aesKey = Holders.simple(StringKit.EMPTY);
|
||
|
@Identifier(value = "ssoEnable", name = "Plugin-dingtalksyn_Config_SsoEnable", description = "Plugin-dingtalksyn_Config_SsoEnable_Description", status = Status.SHOW)
|
||
|
private Conf<Boolean> ssoEnable = Holders.simple(true);
|
||
|
|
||
|
private Conf<String> url = Holders.simple(StringKit.EMPTY);
|
||
|
private Conf<String> proxyServer = Holders.simple(StringKit.EMPTY);
|
||
|
private Conf<DingTalkMemberManagementConfig> memberManagementConfig = Holders.obj(new DingTalkMemberManagementConfig(), DingTalkMemberManagementConfig.class);
|
||
|
private Conf<DingTalkTimingTaskConfig> timingTaskConfig = Holders.obj(new DingTalkTimingTaskConfig(), DingTalkTimingTaskConfig.class);
|
||
|
|
||
|
public String getCronCondition() {
|
||
|
return cronCondition.get();
|
||
|
}
|
||
|
|
||
|
public void setCronCondition(String cronCondition) {
|
||
|
this.cronCondition.set(cronCondition);
|
||
|
}
|
||
|
|
||
|
public String getAppKey() {
|
||
|
return appKey.get();
|
||
|
}
|
||
|
|
||
|
public void setAppKey(String appKey) {
|
||
|
this.appKey.set(appKey);
|
||
|
}
|
||
|
|
||
|
public String getAppSecret() {
|
||
|
return appSecret.get();
|
||
|
}
|
||
|
|
||
|
public void setAppSecret(String appSecret) {
|
||
|
this.appSecret.set(appSecret);
|
||
|
}
|
||
|
|
||
|
public String getCorpId() {
|
||
|
return corpId.get();
|
||
|
}
|
||
|
|
||
|
public void setCorpId(String corpId) {
|
||
|
this.corpId.set(corpId);
|
||
|
}
|
||
|
|
||
|
public long getRootDepId() {
|
||
|
return rootDepId.get();
|
||
|
}
|
||
|
|
||
|
public void setRootDepId(long rootDepId) {
|
||
|
this.rootDepId.set(rootDepId);
|
||
|
}
|
||
|
|
||
|
public String getToken() {
|
||
|
return token.get();
|
||
|
}
|
||
|
|
||
|
public void setToken(String token) {
|
||
|
this.token.set(token);
|
||
|
}
|
||
|
|
||
|
public String getAesKey() {
|
||
|
return aesKey.get();
|
||
|
}
|
||
|
|
||
|
public void setAesKey(String aesKey) {
|
||
|
this.aesKey.set(aesKey);
|
||
|
}
|
||
|
|
||
|
public boolean getSsoEnable() {
|
||
|
return ssoEnable.get();
|
||
|
}
|
||
|
|
||
|
public void setSsoEnable(boolean ssoEnable) {
|
||
|
this.ssoEnable.set(ssoEnable);
|
||
|
}
|
||
|
|
||
|
public String getUrl() {
|
||
|
return (String) this.url.get();
|
||
|
}
|
||
|
|
||
|
public void setUrl(String url) {
|
||
|
this.url.set(url);
|
||
|
}
|
||
|
|
||
|
public String getProxyServer() {
|
||
|
return (String) this.proxyServer.get();
|
||
|
}
|
||
|
|
||
|
public void setProxyServer(String proxyServer) {
|
||
|
this.proxyServer.set(proxyServer);
|
||
|
}
|
||
|
|
||
|
public DingTalkMemberManagementConfig getMemberManagementConfig() {
|
||
|
return (DingTalkMemberManagementConfig) this.memberManagementConfig.get();
|
||
|
}
|
||
|
|
||
|
public DingTalkTimingTaskConfig getTimingTaskConfig() {
|
||
|
return (DingTalkTimingTaskConfig) this.timingTaskConfig.get();
|
||
|
}
|
||
|
}
|