public class BytesValidator extends ModelTypeValidator implements MinMaxValidator
BIGDECIMAL_MAX, BIGDECIMAL_MIN, BIGINTEGER_MAX, BIGINTEGER_MIN, nullable, strictType, validTypes| Constructor and Description |
|---|
BytesValidator(int min,
int max,
boolean nullable)
Creates a BytesValidator that allows potentially more than one type.
|
BytesValidator(int min,
int max,
org.jboss.dmr.ModelType... otherValidTypes)
Creates a BytesValidator
|
| Modifier and Type | Method and Description |
|---|---|
static BytesValidator |
createSha1(boolean nullable) |
Long |
getMax()
Gets the maximum, if there is one.
|
Long |
getMin()
Gets the minimum, if there is one.
|
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 BytesValidator(int min,
int max,
boolean nullable)
min - the minimum length of the byte[]max - the maximum length of the byte[]nullable - whether an undefined value is allowedpublic BytesValidator(int min,
int max,
org.jboss.dmr.ModelType... otherValidTypes)
min - the minimum length of the byte[]max - the maximum length of the byte[]otherValidTypes - additional valid types (i.e one of those whose value can convert to a byte[].) May be nullpublic static BytesValidator createSha1(boolean nullable)
public Long getMin()
MinMaxValidatorgetMin in interface MinMaxValidatornull if there is no minimumpublic Long getMax()
MinMaxValidatorgetMax in interface MinMaxValidatornull if there is no minimumpublic void validateParameter(String parameterName, org.jboss.dmr.ModelNode value) throws OperationFailedException
validateParameter 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 validCopyright © 2021 JBoss by Red Hat. All rights reserved.