Repository: deltaspike Updated Branches: refs/heads/master f569c957e -> c58aae597
DELTASPIKE-841 make getConfigSources public needed to write a small UI to show and log out configured values in a system. Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/c58aae59 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/c58aae59 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/c58aae59 Branch: refs/heads/master Commit: c58aae597832e957aea3a0e2e92abbb080a08fdb Parents: f569c95 Author: Mark Struberg <[email protected]> Authored: Fri Feb 27 08:42:39 2015 +0100 Committer: Mark Struberg <[email protected]> Committed: Fri Feb 27 08:42:39 2015 +0100 ---------------------------------------------------------------------- .../deltaspike/core/api/config/ConfigResolver.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c58aae59/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java ---------------------------------------------------------------------- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java index 69de6fb..2449004 100644 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java @@ -384,7 +384,7 @@ public final class ConfigResolver return Collections.unmodifiableMap(result); } - private static synchronized ConfigSource[] getConfigSources() + public static synchronized ConfigSource[] getConfigSources() { ClassLoader currentClassLoader = ClassUtils.getClassLoader(null); @@ -482,7 +482,12 @@ public final class ConfigResolver return value; } - private static String filterConfigValue(String key, String value) + /** + * Filter the configured value. + * This can e.g. be used for decryption. + * @return the filtered value + */ + public static String filterConfigValue(String key, String value) { List<ConfigFilter> currentConfigFilters = getInternalConfigFilters(); @@ -495,7 +500,12 @@ public final class ConfigResolver return filteredValue; } - private static String filterConfigValueForLog(String key, String value) + /** + * Filter the configured value for logging. + * This can e.g. be used for displaying ***** instead of a real password. + * @return the filtered value + */ + public static String filterConfigValueForLog(String key, String value) { List<ConfigFilter> currentConfigFilters = getInternalConfigFilters();
