public void substitute(final SubstitutionCallback cb) { if (!substitute) { return; } final SubstitutionCallback callback = cb != null ? cb : new SubstitutionCallback() { public String getValue(String name, String key, String value) { if (value.startsWith(ENV_PREFIX)) { return System.getenv(value.substring(ENV_PREFIX.length())); } else { return System.getProperty(value); } } }; //wrap(new BundleContextSubstitutionCallback(null)); Map<String, TypedProperties> props = Collections.singletonMap("root", this); substitute(props, prepare(props), callback, true); }
public void substitute(final SubstitutionCallback cb) { if (!substitute) { return; } final SubstitutionCallback callback = cb != null ? cb : new SubstitutionCallback() { public String getValue(String name, String key, String value) { if (value.startsWith(ENV_PREFIX)) { return System.getenv(value.substring(ENV_PREFIX.length())); } else { return System.getProperty(value); } } }; //wrap(new BundleContextSubstitutionCallback(null)); Map<String, TypedProperties> props = Collections.singletonMap("root", this); substitute(props, prepare(props), callback, true); }
public void substitute(final SubstitutionCallback cb) { if (!substitute) { return; } final SubstitutionCallback callback = cb != null ? cb : new SubstitutionCallback() { public String getValue(String name, String key, String value) { if (value.startsWith(ENV_PREFIX)) { return System.getenv(value.substring(ENV_PREFIX.length())); } else { return System.getProperty(value); } } }; //wrap(new BundleContextSubstitutionCallback(null)); Map<String, TypedProperties> props = Collections.singletonMap("root", this); substitute(props, prepare(props), callback, true); }
final Map<String, Map<String, String>> dynamic = TypedProperties.prepare(originals); TypedProperties.substitute(originals, dynamic, (pid, key, value) -> { if (value != null) {
final Map<String, Map<String, String>> dynamic = TypedProperties.prepare(originals); TypedProperties.substitute(originals, dynamic, (pid, key, value) -> { if (value != null) {