From 9dddaa5c48838bd224aa39b9d16dbbead299a610 Mon Sep 17 00:00:00 2001 From: Kaituo Li Date: Thu, 20 Jul 2023 17:24:47 -0700 Subject: [PATCH] improve comment Signed-off-by: Kaituo Li --- .../org/opensearch/timeseries/util/ParseUtils.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/opensearch/timeseries/util/ParseUtils.java b/src/main/java/org/opensearch/timeseries/util/ParseUtils.java index 961dd5ac8..b2d512a0b 100644 --- a/src/main/java/org/opensearch/timeseries/util/ParseUtils.java +++ b/src/main/java/org/opensearch/timeseries/util/ParseUtils.java @@ -531,8 +531,15 @@ public static void getConfig( } /** - * This method processes the GetResponse and applies the consumer function if the user has permissions - * or if the filterByBackendRole is disabled. It uses a ConfigFactory to parse the correct type of Config. + * Processes a GetResponse by leveraging the factory method Config.parseConfig to + * appropriately parse the specified type of Config. The execution of the provided + * consumer function depends on the state of the 'filterByBackendRole' setting: + * + * - If 'filterByBackendRole' is disabled, the consumer function will be invoked + * irrespective of the user's permissions. + * + * - If 'filterByBackendRole' is enabled, the consumer function will only be invoked + * provided the user holds the requisite permissions. * * @param The type of Config to be processed in this method, which extends from the Config base type. * @param response The GetResponse from the getConfig request. This contains the information about the config that is to be processed.