From cc82281ca4a802dc0e20028715e97696094d0188 Mon Sep 17 00:00:00 2001 From: Santhosh Gandhe <1909520+san81@users.noreply.github.com> Date: Sun, 12 Jan 2025 16:25:23 -0800 Subject: [PATCH] better naming Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com> --- .../dataprepper/model/plugin/PluginConfigValueTranslator.java | 2 +- .../org/opensearch/dataprepper/plugin/VariableExpander.java | 2 +- .../plugins/aws/AwsSecretsPluginConfigValueTranslator.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/plugin/PluginConfigValueTranslator.java b/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/plugin/PluginConfigValueTranslator.java index 46063b34af..dbcce1090b 100644 --- a/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/plugin/PluginConfigValueTranslator.java +++ b/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/plugin/PluginConfigValueTranslator.java @@ -5,5 +5,5 @@ public interface PluginConfigValueTranslator { String getPrefix(); - PluginConfigVariable translateVariable(final String value); + PluginConfigVariable translateToPluginConfigVariable(final String value); } diff --git a/data-prepper-plugin-framework/src/main/java/org/opensearch/dataprepper/plugin/VariableExpander.java b/data-prepper-plugin-framework/src/main/java/org/opensearch/dataprepper/plugin/VariableExpander.java index df70d9453a..7b249f0389 100644 --- a/data-prepper-plugin-framework/src/main/java/org/opensearch/dataprepper/plugin/VariableExpander.java +++ b/data-prepper-plugin-framework/src/main/java/org/opensearch/dataprepper/plugin/VariableExpander.java @@ -49,7 +49,7 @@ public T translate(final JsonParser jsonParser, final Class destinationTy .map(entry -> { final String valueReferenceKey = entry.getKey().group(VALUE_REFERENCE_KEY); if (destinationType.equals(PluginConfigVariable.class)) { - return (T) entry.getValue().translateVariable(valueReferenceKey); + return (T) entry.getValue().translateToPluginConfigVariable(valueReferenceKey); } else { return objectMapper.convertValue( entry.getValue().translate(valueReferenceKey), destinationType); diff --git a/data-prepper-plugins/aws-plugin/src/main/java/org/opensearch/dataprepper/plugins/aws/AwsSecretsPluginConfigValueTranslator.java b/data-prepper-plugins/aws-plugin/src/main/java/org/opensearch/dataprepper/plugins/aws/AwsSecretsPluginConfigValueTranslator.java index 923f1631a4..adeb498bfb 100644 --- a/data-prepper-plugins/aws-plugin/src/main/java/org/opensearch/dataprepper/plugins/aws/AwsSecretsPluginConfigValueTranslator.java +++ b/data-prepper-plugins/aws-plugin/src/main/java/org/opensearch/dataprepper/plugins/aws/AwsSecretsPluginConfigValueTranslator.java @@ -46,7 +46,7 @@ public String getPrefix() { } @Override - public PluginConfigVariable translateVariable(String value) { + public PluginConfigVariable translateToPluginConfigVariable(String value) { final Matcher matcher = SECRETS_REF_PATTERN.matcher(value); if (!matcher.matches()) { throw new IllegalArgumentException(String.format(