From 817d6f543e1173d300ec6b246821f33e3a50ed10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Muzik=C3=A1=C5=99?= Date: Mon, 18 Nov 2024 17:41:06 +0100 Subject: [PATCH] Comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Muzikář --- .../src/main/java/org/keycloak/config/Option.java | 1 + .../quarkus/runtime/configuration/Configuration.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/quarkus/config-api/src/main/java/org/keycloak/config/Option.java b/quarkus/config-api/src/main/java/org/keycloak/config/Option.java index ed237aca7a50..523c8154c540 100644 --- a/quarkus/config-api/src/main/java/org/keycloak/config/Option.java +++ b/quarkus/config-api/src/main/java/org/keycloak/config/Option.java @@ -99,6 +99,7 @@ public boolean matchesWildcardOptionName(String name) { return optionNameWildcardPattern.matcher(name).matches(); } + // Expects an option name without the "kc." prefix public Optional getWildcardValue(String option) { if (!hasWildcard()) { throw new IllegalStateException("Option does not have wildcard"); diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/Configuration.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/Configuration.java index cafdf9e9e379..a805a3c8a330 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/Configuration.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/Configuration.java @@ -113,6 +113,13 @@ public static ConfigValue getKcConfigValue(String propertyName) { return getConfigValue(NS_KEYCLOAK_PREFIX.concat(propertyName)); } + /** + * Get all Keycloak multivalued config values for a given option. A multivalued config option is a config option that + * has a wildcard in its name, e.g. log-level-. + * + * @param option + * @return a map of config values where the key is the resolved wildcard (e.g. category) and the value is the config value + */ public static Map getKcConfigValues(Option option) { if (!option.hasWildcard()) { throw new IllegalArgumentException("Option does not have wildcard");