Class PropertyResolver

java.lang.Object
org.codice.ddf.configuration.PropertyResolver

public class PropertyResolver extends Object
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 Details

    • PropertyResolver

      public PropertyResolver(String propStr)
  • Method Details

    • getRawString

      public String getRawString()
      Returns the raw string passed in the ctor with any variables it might contain
      Returns:
    • getResolvedString

      public String getResolvedString()
      Returns a string with variables replaced by system property values if they exist
      Returns:
    • resolveProperties

      public static String resolveProperties(String str)
      Returns a string with variables replaced by system property values if they exist
      Returns:
    • resolveProperties

      public static List<String> resolveProperties(List<String> list)
      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 a Properties object and replaces system property values if they exist
      Parameters:
      propertiesLocation - location of the properties file
      Returns:
      Properties
      Throws:
      IOException
    • toString

      public String toString()
      Returns the resolved string
      Overrides:
      toString in class Object
      Returns: