Co-authored-by: dailidong <dailidong66@gmail.com>
@ -56,7 +56,7 @@ public class EmailAlertPlugin implements AlertPlugin {
@Override
public String getId() {
return Constants.PLUGIN_DEFAULT_EMAIL;
return Constants.PLUGIN_DEFAULT_EMAIL_ID;
}
@ -80,7 +80,7 @@ public class AlertSender {
alertInfo.addProp("receivers", receviersList);
AlertPlugin emailPlugin = pluginManager.findOne(Constants.PLUGIN_DEFAULT_EMAIL);
AlertPlugin emailPlugin = pluginManager.findOne(Constants.PLUGIN_DEFAULT_EMAIL_ID);
retMaps = emailPlugin.process(alertInfo);
if (retMaps == null) {
@ -179,7 +179,7 @@ public class Constants {
*/
public static final String PLUGIN_DIR = "plugin.dir";
public static final String PLUGIN_DEFAULT_EMAIL = "email";
public static final String PLUGIN_DEFAULT_EMAIL_ID = "email";
public static final String PLUGIN_DEFAULT_EMAIL_CH = "邮件";
@ -47,7 +47,7 @@ public class EmailAlertPluginTest {
@Test
public void getId() {
String id = plugin.getId();
assertEquals(Constants.PLUGIN_DEFAULT_EMAIL, id);
assertEquals(Constants.PLUGIN_DEFAULT_EMAIL_ID, id);
@ -90,8 +90,8 @@ public class FilePluginManager implements PluginManager {
public AlertPlugin findOne(String name) {
return pluginMap.get(name);
public AlertPlugin findOne(String pluginId) {
return pluginMap.get(pluginId);