Package org.codice.ddf.configuration
Class PropertyResolver
java.lang.Object
org.codice.ddf.configuration.PropertyResolver
Class holds a string potentially containing variables of the format ${system.prop} and handles
resolving those variables by trying to replace them with system properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the raw string passed in the ctor with any variables it might containReturns a string with variables replaced by system property values if they existstatic StringresolveProperties(String str) Returns a string with variables replaced by system property values if they existresolveProperties(List<String> list) Returns a List with variables replaced by system property values if they existstatic PropertiesresolvePropertiesFromLocation(String propertiesLocation) Reads the properties from the given properties locations into aPropertiesobject and replaces system property values if they existtoString()Returns the resolved string
-
Constructor Details
-
PropertyResolver
-
-
Method Details
-
getRawString
Returns the raw string passed in the ctor with any variables it might contain- Returns:
-
getResolvedString
Returns a string with variables replaced by system property values if they exist- Returns:
-
resolveProperties
Returns a string with variables replaced by system property values if they exist- Returns:
-
resolveProperties
Returns a List with variables replaced by system property values if they exist- Returns:
-
resolvePropertiesFromLocation
public static Properties resolvePropertiesFromLocation(String propertiesLocation) throws IOException Reads the properties from the given properties locations into aPropertiesobject and replaces system property values if they exist- Parameters:
propertiesLocation- location of the properties file- Returns:
Properties- Throws:
IOException
-
toString
Returns the resolved string
-