public class PropertyUtils extends Object
TODO Make the lookup method generic by passing in the properties to use for the expansion, rather than hard coding as system properties. The expansion code has greater potential for re-use that way.
TODO Some more property related code could be added to this utils class, which might more appropriately reside under org.apache.qpid.util. For example standardised code to load properties from a resource name, currently found in QpidProperties and possibly other places could be moved here.
| Modifier and Type | Method and Description |
|---|---|
static String |
replaceProperties(String value)
Given a string that contains substrings of the form
${xxx}, looks up the valuea of 'xxx' as a
system properties and substitutes tham back into the original string, to provide a property value expanded
string. |
public static String replaceProperties(String value) throws PropertyException
${xxx}, looks up the valuea of 'xxx' as a
system properties and substitutes tham back into the original string, to provide a property value expanded
string.value - The string to be scanned for property references. May be null, in which case this
method returns immediately with no effect.null if the original string is
null.PropertyException - If the string contains an opening ${ without a balancing },
or if the property to expand does not exist as a system property.Copyright © 2006–2015 The Apache Software Foundation. All rights reserved.