org.modeshape.jboss.subsystem

## Class RegexValidator

- java.lang.Object
- - org.jboss.as.controller.operations.validation.ModelTypeValidator
  - - org.modeshape.jboss.subsystem.RegexValidator

- All Implemented Interfaces:
    org.jboss.as.controller.operations.validation.ParameterValidator

      public class RegexValidator
      extends org.jboss.as.controller.operations.validation.ModelTypeValidator

  A ParameterValidator that validates a value matches a predefined regular expression.

- - ### Field Summary

    - ### Fields inherited from class org.jboss.as.controller.operations.validation.ModelTypeValidator

      `BIGDECIMAL_MAX, BIGDECIMAL_MIN, BIGINTEGER_MAX, BIGINTEGER_MIN, nullable, strictType, validTypes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegexValidator(String regularExpression, boolean nullable)` Creates a ParameterValidator that allows values that satisfy a single regular expression string.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `validateParameter(String parameterName, org.jboss.dmr.ModelNode value)`

    - ### Methods inherited from class org.jboss.as.controller.operations.validation.ModelTypeValidator

      `validateResolvedParameter`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RegexValidator

          public RegexValidator(String regularExpression,
                        boolean nullable)

      Creates a ParameterValidator that allows values that satisfy a single regular expression string.
      Parameters:
        `regularExpression` - the regular expression
        `nullable` - whether `ModelType.UNDEFINED` is allowed

  - ### Method Detail

    - #### validateParameter

          public void validateParameter(String parameterName,
                               org.jboss.dmr.ModelNode value)
                                 throws org.jboss.as.controller.OperationFailedException

      Specified by:
        `validateParameter` in interface `org.jboss.as.controller.operations.validation.ParameterValidator`
      Overrides:
        `validateParameter` in class `org.jboss.as.controller.operations.validation.ModelTypeValidator`
      Throws:
        `org.jboss.as.controller.OperationFailedException`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.