Class AbstractPropertyReplacement

java.lang.Object
flexagon.fd.core.utils.AbstractPropertyReplacement
Direct Known Subclasses:
FilePropertyReplacement, InMemoryPropertyReplacement, StringPropertyReplacement

public class AbstractPropertyReplacement extends Object
Abstract implementation for replacing properties with their defined value from the PropertyReplacementContext. Properties are defined within a given source using the notation ${{PropertyName}}. The property names case sensitive.
  • Field Details

  • Constructor Details

  • Method Details

    • replace

      protected String replace(String pString) throws FlexCheckedException
      Replaces any properties within the given source with the key/values found in the PropertyReplacementContext.
      Parameters:
      pString - the source containing property replacement keys
      Returns:
      the new source with property values replaced
      Throws:
      FlexCheckedException - if a property replacement fails
    • hasReplacementToken

      protected boolean hasReplacementToken(String pString)
      Returns whether the given source text contains one or more replacement properties.
      Parameters:
      pString - the source containing property replacement keys
      Returns:
      true if the source contains replacement properties; false otherwise.