Class RegexComponent

java.lang.Object
com.codingchili.core.configuration.RegexComponent

public class RegexComponent extends Object
Contains settings used for a single regex validator action.
  • Constructor Details

    • RegexComponent

      public RegexComponent()
  • Method Details

    • getAction

      public RegexAction getAction()
      Returns:
      the type of action to be taken whenever the regex matches.
    • setAction

      public RegexComponent setAction(RegexAction action)
      Parameters:
      action - the type of action to be taken whenever the regex matches.
      Returns:
      fluent.
    • getExpression

      public String getExpression()
      Returns:
      the regular expression.
    • setExpression

      public RegexComponent setExpression(String expression)
      Parameters:
      expression - the regular expression used for matching input.
      Returns:
      fluent.
    • getSubstitution

      public String getSubstitution()
      Returns:
      the replacement text used when action is RegexAction.SUBSTITUTE.
    • setSubstitution

      public RegexComponent setSubstitution(String substitution)
      Parameters:
      substitution - the replacement text to use when the expression matches the input and RegexAction.SUBSTITUTE is used.
      Returns:
      fluent.