Class StringPropertyReplacement

java.lang.Object
flexagon.fd.core.utils.AbstractPropertyReplacement
flexagon.fd.core.utils.StringPropertyReplacement

public class StringPropertyReplacement extends AbstractPropertyReplacement
Concrete implementation for property replacement on a String. Properties are defined within a given source using the notation ${{PropertyName}}. The property names are case-sensitive.
  • Constructor Details

    • StringPropertyReplacement

      public StringPropertyReplacement(PropertyReplacementContext pPropertyReplacementContext)
      Constructs this utility for use with the given property replacement context.
      Parameters:
      pPropertyReplacementContext - the property replacement context This is a fairly expensive operation. Do this once, and then use the StringPropertyReplacement many times.
  • Method Details

    • replaceProperties

      public String replaceProperties(String pString) throws FlexCheckedException
      Replaces all properties within the given source with the key/values found in the PropertyReplacementContext.
      Parameters:
      pString - the input source containing properties to replace
      Returns:
      the new String with property values replaced
      Throws:
      FlexCheckedException - if a property replacement fails