/** * Perform substitution on a property set * * @param properties the property set to perform substitution on */ public static void performSubstitution(Map<String,String> properties) { performSubstitution(properties, (BundleContext) null); }
/** * <p> * This method performs property variable substitution on the * specified value. If the specified value contains the syntax * <tt>${<prop-name>}</tt>, where <tt><prop-name></tt> * refers to either a configuration property or a system property, * then the corresponding property value is substituted for the variable * placeholder. Multiple variable placeholders may exist in the * specified value as well as nested variable placeholders, which * are substituted from inner most to outer most. Configuration * properties override system properties. * </p> * * @param val The string on which to perform property substitution. * @param currentKey The key of the property being evaluated used to * detect cycles. * @param cycleMap Map of variable references used to detect nested cycles. * @param configProps Set of configuration properties. * @return The value of the specified string after system property substitution. * @throws IllegalArgumentException If there was a syntax error in the * property placeholder syntax or a recursive variable reference. **/ public static String substVars(String val, String currentKey, Map<String,String> cycleMap, Map<String,String> configProps) throws IllegalArgumentException { return substVars(val, currentKey, cycleMap, configProps, (SubstitutionCallback) null); }
/** * Callback for substitution */ public interface SubstitutionCallback { String getValue(String key); }
val = doSubstVars(val, currentKey, cycleMap, configProps, callback);
val = doSubstVars(val, currentKey, cycleMap, configProps, callback, substituteFromConfig, substituteFromSystemProperties, defaultsToEmptyString);
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on */ public static void performSubstitution(Map<String,String> properties) { performSubstitution(properties, (BundleContext) null); }
/** * <p> * This method performs property variable substitution on the * specified value. If the specified value contains the syntax * <tt>${<prop-name>}</tt>, where <tt><prop-name></tt> * refers to either a configuration property or a system property, * then the corresponding property value is substituted for the variable * placeholder. Multiple variable placeholders may exist in the * specified value as well as nested variable placeholders, which * are substituted from inner most to outer most. Configuration * properties override system properties. * </p> * * @param val The string on which to perform property substitution. * @param currentKey The key of the property being evaluated used to * detect cycles. * @param cycleMap Map of variable references used to detect nested cycles. * @param configProps Set of configuration properties. * @return The value of the specified string after system property substitution. * @throws IllegalArgumentException If there was a syntax error in the * property placeholder syntax or a recursive variable reference. **/ public static String substVars(String val, String currentKey, Map<String,String> cycleMap, Map<String,String> configProps) throws IllegalArgumentException { return substVars(val, currentKey, cycleMap, configProps, (SubstitutionCallback) null); }
/** * Callback for substitution */ public interface SubstitutionCallback { String getValue(String key); }
val = doSubstVars(val, currentKey, cycleMap, configProps, callback, substituteFromConfig, substituteFromSystemProperties, defaultsToEmptyString);
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on */ public static void performSubstitution(Map<String,String> properties) { performSubstitution(properties, (BundleContext) null); }
/** * <p> * This method performs property variable substitution on the * specified value. If the specified value contains the syntax * <tt>${<prop-name>}</tt>, where <tt><prop-name></tt> * refers to either a configuration property or a system property, * then the corresponding property value is substituted for the variable * placeholder. Multiple variable placeholders may exist in the * specified value as well as nested variable placeholders, which * are substituted from inner most to outer most. Configuration * properties override system properties. * </p> * * @param val The string on which to perform property substitution. * @param currentKey The key of the property being evaluated used to * detect cycles. * @param cycleMap Map of variable references used to detect nested cycles. * @param configProps Set of configuration properties. * @return The value of the specified string after system property substitution. * @throws IllegalArgumentException If there was a syntax error in the * property placeholder syntax or a recursive variable reference. **/ public static String substVars(String val, String currentKey, Map<String,String> cycleMap, Map<String,String> configProps) throws IllegalArgumentException { return substVars(val, currentKey, cycleMap, configProps, (SubstitutionCallback) null); }
/** * Callback for substitution */ public interface SubstitutionCallback { String getValue(String key); }
val = doSubstVars(val, currentKey, cycleMap, configProps, callback, substituteFromConfig, substituteFromSystemProperties, defaultsToEmptyString);
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on * @param callback Callback for substituion */ public static void performSubstitution(Map<String,String> properties, SubstitutionCallback callback) { performSubstitution(properties, callback, true, true, true); }
/** * <p> * This method performs property variable substitution on the * specified value. If the specified value contains the syntax * <tt>${<prop-name>}</tt>, where <tt><prop-name></tt> * refers to either a configuration property or a system property, * then the corresponding property value is substituted for the variable * placeholder. Multiple variable placeholders may exist in the * specified value as well as nested variable placeholders, which * are substituted from inner most to outer most. Configuration * properties override system properties. * </p> * * @param val The string on which to perform property substitution. * @param currentKey The key of the property being evaluated used to * detect cycles. * @param cycleMap Map of variable references used to detect nested cycles. * @param configProps Set of configuration properties. * @return The value of the specified string after system property substitution. * @throws IllegalArgumentException If there was a syntax error in the * property placeholder syntax or a recursive variable reference. **/ public static String substVars(String val, String currentKey, Map<String,String> cycleMap, Map<String,String> configProps) throws IllegalArgumentException { return substVars(val, currentKey, cycleMap, configProps, (SubstitutionCallback) null); }
throws IllegalArgumentException return unescape(doSubstVars(val, currentKey, cycleMap, configProps, callback));
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on * @param callback Callback for substituion */ public static void performSubstitution(Map<String,String> properties, SubstitutionCallback callback) { performSubstitution(properties, callback, true, true, true); }
throws IllegalArgumentException return substVars(val, currentKey, cycleMap, configProps, callback, true, true, true);
/** * Perform substitution on a property set * * @param properties the property set to perform substitution on */ public static void performSubstitution(Map<String,String> properties) { performSubstitution(properties, (BundleContext) null); }
throws IllegalArgumentException return substVars(val, currentKey, cycleMap, configProps, callback, true, true, true);