Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
Signed-off-by: Václav Muzikář <[email protected]>
  • Loading branch information
vmuzikar committed Nov 18, 2024
1 parent 5c5d8d9 commit 817d6f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public boolean matchesWildcardOptionName(String name) {
return optionNameWildcardPattern.matcher(name).matches();
}

// Expects an option name without the "kc." prefix
public Optional<String> getWildcardValue(String option) {
if (!hasWildcard()) {
throw new IllegalStateException("Option does not have wildcard");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-<category>.
*
* @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<String, ConfigValue> getKcConfigValues(Option<?> option) {
if (!option.hasWildcard()) {
throw new IllegalArgumentException("Option does not have wildcard");
Expand Down

0 comments on commit 817d6f5

Please sign in to comment.