From e92860f552c37fe1274a924f491a6883f43f4b36 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 11 Jul 2016 13:14:36 -0700 Subject: [PATCH] Plugin node modules/services rename to guice related See elastic/elasticsearchelastic/elasticsearch#19371 Original commit: elastic/x-pack-elasticsearch@40f7e43cc5f86220e3610892d5bcca2adb0d6760 --- .../main/java/org/elasticsearch/xpack/graph/Graph.java | 4 ++-- .../xpack/security/transport/TransportFilterTests.java | 2 +- .../main/java/org/elasticsearch/xpack/XPackPlugin.java | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/elasticsearch/x-pack/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java b/elasticsearch/x-pack/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java index bac749c7836..9bc973d3219 100644 --- a/elasticsearch/x-pack/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java +++ b/elasticsearch/x-pack/graph/src/main/java/org/elasticsearch/xpack/graph/Graph.java @@ -42,12 +42,12 @@ public class Graph extends Plugin implements ActionPlugin { return XPackPlugin.featureEnabled(settings, NAME, true); } - public Collection nodeModules() { + public Collection createGuiceModules() { return Collections.singletonList(new GraphModule(enabled, transportClientMode)); } @Override - public Collection> nodeServices() { + public Collection> getGuiceServiceClasses() { if (enabled == false|| transportClientMode) { return Collections.emptyList(); } diff --git a/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/TransportFilterTests.java b/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/TransportFilterTests.java index 73e7d374691..c053fa9c2f5 100644 --- a/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/TransportFilterTests.java +++ b/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/TransportFilterTests.java @@ -116,7 +116,7 @@ public class TransportFilterTests extends ESIntegTestCase { public static class InternalPlugin extends Plugin { @Override - public Collection nodeModules() { + public Collection createGuiceModules() { return Collections.singletonList(new TestTransportFilterModule()); } } diff --git a/elasticsearch/x-pack/src/main/java/org/elasticsearch/xpack/XPackPlugin.java b/elasticsearch/x-pack/src/main/java/org/elasticsearch/xpack/XPackPlugin.java index 411bd6d2199..d3d1aa4e49a 100644 --- a/elasticsearch/x-pack/src/main/java/org/elasticsearch/xpack/XPackPlugin.java +++ b/elasticsearch/x-pack/src/main/java/org/elasticsearch/xpack/XPackPlugin.java @@ -140,7 +140,7 @@ public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin { } @Override - public Collection nodeModules() { + public Collection createGuiceModules() { ArrayList modules = new ArrayList<>(); modules.add(b -> b.bind(Clock.class).toInstance(getClock())); modules.addAll(notification.nodeModules()); @@ -148,7 +148,7 @@ public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin { modules.addAll(security.nodeModules()); modules.addAll(watcher.nodeModules()); modules.addAll(monitoring.nodeModules()); - modules.addAll(graph.nodeModules()); + modules.addAll(graph.createGuiceModules()); if (transportClientMode == false) { modules.add(new HttpClientModule()); @@ -158,14 +158,14 @@ public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin { } @Override - public Collection> nodeServices() { + public Collection> getGuiceServiceClasses() { ArrayList> services = new ArrayList<>(); services.addAll(notification.nodeServices()); services.addAll(licensing.nodeServices()); services.addAll(security.nodeServices()); services.addAll(watcher.nodeServices()); services.addAll(monitoring.nodeServices()); - services.addAll(graph.nodeServices()); + services.addAll(graph.getGuiceServiceClasses()); return services; }