public class TimeUnitValidator extends ModelTypeValidator implements AllowedValuesValidator
ParameterValidator that validates the value is a string matching one of the TimeUnit names.| Modifier and Type | Field and Description |
|---|---|
static TimeUnitValidator |
ANY_OPTIONAL
TimeUnitValidator where any TimeUnit is valid, as is an undefined value
|
static TimeUnitValidator |
ANY_REQUIRED
TimeUnitValidator where any TimeUnit is valid, but an undefined value is not
|
BIGDECIMAL_MAX, BIGDECIMAL_MIN, BIGINTEGER_MAX, BIGINTEGER_MIN, nullable, strictType, validTypes| Constructor and Description |
|---|
TimeUnitValidator(boolean nullable,
boolean allowExpressions) |
TimeUnitValidator(boolean nullable,
boolean allowExpressions,
TimeUnit... allowed) |
TimeUnitValidator(boolean nullable,
TimeUnit... allowed) |
| Modifier and Type | Method and Description |
|---|---|
List<org.jboss.dmr.ModelNode> |
getAllowedValues()
Gets the allowed values, or
null if any value is allowed. |
void |
validateParameter(String parameterName,
org.jboss.dmr.ModelNode value)
Validate the parameter with the given name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidateResolvedParameterpublic static final TimeUnitValidator ANY_REQUIRED
public static final TimeUnitValidator ANY_OPTIONAL
public TimeUnitValidator(boolean nullable,
TimeUnit... allowed)
public TimeUnitValidator(boolean nullable,
boolean allowExpressions)
public TimeUnitValidator(boolean nullable,
boolean allowExpressions,
TimeUnit... allowed)
public void validateParameter(String parameterName, org.jboss.dmr.ModelNode value) throws OperationFailedException
ModelTypeValidatorvalidateParameter in interface ParameterValidatorvalidateParameter in class ModelTypeValidatorparameterName - the name of the parameter. Cannot be nullvalue - the parameter value. Cannot be nullOperationFailedException - if the value is not validpublic List<org.jboss.dmr.ModelNode> getAllowedValues()
AllowedValuesValidatornull if any value is allowed.getAllowedValues in interface AllowedValuesValidatornullCopyright © 2019 JBoss by Red Hat. All rights reserved.