Class StringLengthValidator

java.lang.Object
org.jboss.as.controller.operations.validation.ModelTypeValidator
org.jboss.as.controller.operations.validation.StringLengthValidator
All Implemented Interfaces:
MinMaxValidator, ParameterValidator
Direct Known Subclasses:
MulticastAddressValidator, SubnetValidator, URIValidator

public class StringLengthValidator extends ModelTypeValidator implements MinMaxValidator
Validates that the given parameter is a string of an allowed length.
Author:
Brian Stansberry (c) 2011 Red Hat Inc.
  • Field Details

    • min

      protected final int min
    • max

      protected final int max
  • Constructor Details

    • StringLengthValidator

      public StringLengthValidator(int min)
      Equivalent to this(min, Integer.MAX_VALUE, false, false).
      Parameters:
      min - the minimum length of the string
    • StringLengthValidator

      public StringLengthValidator(int min, int max)
    • StringLengthValidator

      public StringLengthValidator(int min, boolean nullable)
      Equivalent to this(min, Integer.MAX_VALUE, nullable, false).
      Parameters:
      min - the minimum length of the string
      nullable - true is an ModelType.UNDEFINED value is valid
    • StringLengthValidator

      public StringLengthValidator(int min, int max, boolean nullable, boolean allowExpressions)
      Creates a new StringLengthValidator.
      Parameters:
      min - the minimum length of the string
      max - the maximum length of the string
      nullable - true if an ModelType.UNDEFINED value is valid
      allowExpressions - true if an ModelType.EXPRESSION value is valid
    • StringLengthValidator

      public StringLengthValidator(int min, boolean nullable, boolean allowExpressions)
      Equivalent to this(min, Integer.MAX_VALUE, nullable, allowExpressions).
      Parameters:
      min - the minimum length of the string
      nullable - true if an ModelType.UNDEFINED value is valid
      allowExpressions - true if an ModelType.EXPRESSION value is valid
  • Method Details