From 16a7991d6d040027ff581dadf002d2ecd8a97dca Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Fri, 24 Oct 2014 14:31:20 +0200 Subject: [PATCH] Rename and move the plugin class. Original commit: elastic/x-pack-elasticsearch@b6f7a0490ecb8828174e55d3af40712cc89d4279 --- .../plugin/AlertsPlugin.java} | 9 +++++---- src/main/resources/es-plugin.properties | 2 +- .../java/org/elasticsearch/alerts/BasicAlertingTest.java | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) rename src/main/java/org/elasticsearch/{plugin/alerting/AlertingPlugin.java => alerts/plugin/AlertsPlugin.java} (87%) diff --git a/src/main/java/org/elasticsearch/plugin/alerting/AlertingPlugin.java b/src/main/java/org/elasticsearch/alerts/plugin/AlertsPlugin.java similarity index 87% rename from src/main/java/org/elasticsearch/plugin/alerting/AlertingPlugin.java rename to src/main/java/org/elasticsearch/alerts/plugin/AlertsPlugin.java index 49c1ea2cfe3..c4373dbf5bb 100644 --- a/src/main/java/org/elasticsearch/plugin/alerting/AlertingPlugin.java +++ b/src/main/java/org/elasticsearch/alerts/plugin/AlertsPlugin.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.plugin.alerting; +package org.elasticsearch.alerts.plugin; import org.elasticsearch.alerts.AlertManager; import org.elasticsearch.alerts.scheduler.AlertScheduler; @@ -15,13 +15,14 @@ import org.elasticsearch.plugins.AbstractPlugin; import java.util.Collection; -public class AlertingPlugin extends AbstractPlugin { +public class AlertsPlugin extends AbstractPlugin { + @Override public String name() { - return "alerting-plugin"; + return "alerts"; } @Override public String description() { - return "Alerting Plugin Description"; + return "Elasticsearch Alerts"; } @Override diff --git a/src/main/resources/es-plugin.properties b/src/main/resources/es-plugin.properties index ecf11df7a6c..d7b845cbc39 100644 --- a/src/main/resources/es-plugin.properties +++ b/src/main/resources/es-plugin.properties @@ -1,2 +1,2 @@ -plugin=org.elasticsearch.plugin.alerting.AlertingPlugin +plugin=org.elasticsearch.alerts.plugin.AlertsPlugin version=${project.version} \ No newline at end of file diff --git a/src/test/java/org/elasticsearch/alerts/BasicAlertingTest.java b/src/test/java/org/elasticsearch/alerts/BasicAlertingTest.java index 8f48ce87523..3e494b7c441 100644 --- a/src/test/java/org/elasticsearch/alerts/BasicAlertingTest.java +++ b/src/test/java/org/elasticsearch/alerts/BasicAlertingTest.java @@ -8,6 +8,7 @@ package org.elasticsearch.alerts; import org.elasticsearch.alerts.actions.AlertAction; import org.elasticsearch.alerts.actions.AlertActionFactory; import org.elasticsearch.alerts.actions.AlertActionManager; +import org.elasticsearch.alerts.plugin.AlertsPlugin; import org.elasticsearch.alerts.scheduler.AlertScheduler; import org.elasticsearch.alerts.triggers.AlertTrigger; import org.elasticsearch.alerts.triggers.ScriptedAlertTrigger; @@ -15,7 +16,6 @@ import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.plugin.alerting.AlertingPlugin; import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.junit.Test; @@ -36,8 +36,8 @@ public class BasicAlertingTest extends ElasticsearchIntegrationTest { protected Settings nodeSettings(int nodeOrdinal) { return ImmutableSettings.builder() .put(super.nodeSettings(nodeOrdinal)) - .put("plugin.mandatory", "alerting-plugin") - .put("plugin.types", AlertingPlugin.class.getName()) + .put("plugin.mandatory", "alerts") + .put("plugin.types", AlertsPlugin.class.getName()) .put("node.mode", "network") .put("plugins.load_classpath_plugins", false) .build();