Class ProfileVariableSubstitutor

java.lang.Object
org.apache.commons.lang.text.StrSubstitutor
com.day.cq.mailer.commons.ProfileVariableSubstitutor

@Deprecated public class ProfileVariableSubstitutor extends StrSubstitutor
Deprecated.
use org.apache.commons.text.StringSubstitutor and, where needed, org.apache.commons.text.StringLookup instead.
Extents the StrSubstitutor to clean up variables that have not been replaced.
Since:
5.4
See Also:
  • Constructor Details

    • ProfileVariableSubstitutor

      public ProfileVariableSubstitutor(StrLookup lookup)
      Deprecated.
  • Method Details

    • replace

      public String replace(String source, boolean doCleanup)
      Deprecated.
      Replaces all the occurrences of variables with their matching values from the resolver using the given source string as a template. if doCleanup non replaced variables are removed (i.e. replaced by "").
      Parameters:
      source - - the string to replace in, null returns null
      doCleanup - - True to do the clean up
      Returns:
      the result of the replace operation