Skip to content

Commit d3a7163

Browse files
authored
Move EnrichMetadata to xpack core (#96621)
This commit moves the `EnrichMetadata` class into the `xpack/core` plugin, so that it can be accessed by other xpack plugins without having a dependency on enrich itself. Resolves #96596
1 parent 28a1558 commit d3a7163

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichMetadata.java renamed to x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/EnrichMetadata.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* 2.0; you may not use this file except in compliance with the Elastic License
55
* 2.0.
66
*/
7-
package org.elasticsearch.xpack.enrich;
7+
package org.elasticsearch.xpack.core.enrich;
88

99
import org.elasticsearch.ElasticsearchParseException;
1010
import org.elasticsearch.TransportVersion;
@@ -17,7 +17,6 @@
1717
import org.elasticsearch.xcontent.ParseField;
1818
import org.elasticsearch.xcontent.ToXContent;
1919
import org.elasticsearch.xcontent.XContentParser;
20-
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
2120

2221
import java.io.IOException;
2322
import java.util.Collections;
@@ -32,7 +31,7 @@
3231
*/
3332
public final class EnrichMetadata extends AbstractNamedDiffable<Metadata.Custom> implements Metadata.Custom {
3433

35-
static final String TYPE = "enrich";
34+
public static final String TYPE = "enrich";
3635

3736
static final ParseField POLICIES = new ParseField("policies");
3837

x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.elasticsearch.xpack.core.XPackPlugin;
4343
import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction;
4444
import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction;
45+
import org.elasticsearch.xpack.core.enrich.EnrichMetadata;
4546
import org.elasticsearch.xpack.core.enrich.action.DeleteEnrichPolicyAction;
4647
import org.elasticsearch.xpack.core.enrich.action.EnrichStatsAction;
4748
import org.elasticsearch.xpack.core.enrich.action.ExecuteEnrichPolicyAction;

x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichStore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.elasticsearch.cluster.service.ClusterService;
2121
import org.elasticsearch.common.Strings;
2222
import org.elasticsearch.core.SuppressForbidden;
23+
import org.elasticsearch.xpack.core.enrich.EnrichMetadata;
2324
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
2425

2526
import java.util.Arrays;

x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichMetadataTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.elasticsearch.test.AbstractChunkedSerializingTestCase;
1212
import org.elasticsearch.xcontent.XContentParser;
1313
import org.elasticsearch.xcontent.XContentType;
14+
import org.elasticsearch.xpack.core.enrich.EnrichMetadata;
1415
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
1516

1617
import java.io.IOException;

x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutorTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.elasticsearch.threadpool.TestThreadPool;
3232
import org.elasticsearch.threadpool.ThreadPool;
3333
import org.elasticsearch.xcontent.XContentType;
34+
import org.elasticsearch.xpack.core.enrich.EnrichMetadata;
3435
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
3536
import org.elasticsearch.xpack.core.enrich.action.ExecuteEnrichPolicyAction;
3637
import org.elasticsearch.xpack.enrich.action.InternalExecutePolicyAction;

0 commit comments

Comments
 (0)