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.
83 lines
2.8 KiB
83 lines
2.8 KiB
/* |
|
* Copyright (C), 2018-2021 |
|
* Project: starter |
|
* FileName: OneAccessConfig |
|
* Author: Louis |
|
* Date: 2021/3/30 9:38 |
|
*/ |
|
package com.fr.plugin.dingtalksyn.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 static com.fr.plugin.dingtalksyn.provider.LocaleFinder.PLUGIN_ID; |
|
|
|
/** |
|
* <Function Description><br> |
|
* <OneAccessConfig> |
|
* |
|
* @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 String APP_KEY = "xxxx"; |
|
public static final String APP_SECRET = "xxxx"; |
|
public static final long ROOT_DEP_ID = 1; |
|
private static volatile DingSynConfig config = null; |
|
|
|
@Focus(id = PLUGIN_ID, text = "Plugin-dingtalksyn", source = Original.PLUGIN) |
|
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(APP_KEY); |
|
@Identifier(value = "appSecret", name = "Plugin-dingtalksyn_Config_appSecret", description = "Plugin-dingtalksyn_Config_appSecret_Description", status = Status.SHOW) |
|
private Conf<String> appSecret = Holders.simple(APP_SECRET); |
|
@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); |
|
|
|
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 long getRootDepId() { |
|
return rootDepId.get(); |
|
} |
|
|
|
public void setRootDepId(long rootDepId) { |
|
this.rootDepId.set(rootDepId); |
|
} |
|
} |