Package com.dtolabs.rundeck.core.utils
Class PropertyUtil
- java.lang.Object
-
- com.dtolabs.rundeck.core.utils.PropertyUtil
-
public class PropertyUtil extends java.lang.Object
expands nested property references within a provided string
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PropertyUtil.PropertyUtilException
-
Constructor Summary
Constructors Constructor Description PropertyUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
expand(java.lang.String keyString, java.util.Map properties)
expand a keyString that may contain references other properties located in provided Map object NOTE: this is a recursive method in case references to properties are nested within another referencestatic java.lang.String
expand(java.lang.String keyString, java.util.Properties properties)
expand a keyString that may contain references to properties located in provided Properties objectstatic java.lang.String
expand(java.lang.String keyString, org.apache.tools.ant.Project project)
expand a keyString that may contain referecnes to other propertiesstatic java.util.Properties
expand(java.util.Map properties)
expand a given Properties object and return a new one.
-
-
-
Method Detail
-
expand
public static java.util.Properties expand(java.util.Map properties)
expand a given Properties object and return a new one. This will process each key to a given Properties object, get its value and expand it. Each value may contain references to other keys within this given Properties object, and if so, all keys and their expanded keyValues will be resolved into a new Properties object that will be returned.- Parameters:
properties
- input- Returns:
- properties
-
expand
public static java.lang.String expand(java.lang.String keyString, java.util.Properties properties)
expand a keyString that may contain references to properties located in provided Properties object- Parameters:
keyString
- stringproperties
- properties- Returns:
- expanded
-
expand
public static java.lang.String expand(java.lang.String keyString, java.util.Map properties)
expand a keyString that may contain references other properties located in provided Map object NOTE: this is a recursive method in case references to properties are nested within another reference- Parameters:
keyString
- stringproperties
- properties- Returns:
- expanded
-
expand
public static java.lang.String expand(java.lang.String keyString, org.apache.tools.ant.Project project)
expand a keyString that may contain referecnes to other properties- Parameters:
keyString
- string containing propsproject
- Ant project- Returns:
- expanded string
-
-