public class ListValidator extends ModelTypeValidator implements ParameterValidator, MinMaxValidator
ModelType.LIST.BIGDECIMAL_MAX, BIGDECIMAL_MIN, BIGINTEGER_MAX, BIGINTEGER_MIN, nullable, strictType, validTypes| Constructor and Description |
|---|
ListValidator(ParameterValidator elementValidator)
Constructs a new
ListValidator |
ListValidator(ParameterValidator elementValidator,
boolean nullable) |
ListValidator(ParameterValidator elementValidator,
boolean nullable,
boolean allowDuplicates) |
ListValidator(ParameterValidator elementValidator,
boolean nullable,
int minSize,
int maxSize) |
ListValidator(ParameterValidator elementValidator,
boolean nullable,
int minSize,
int maxSize,
boolean allowDuplicates) |
| Modifier and Type | Method and Description |
|---|---|
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 ListValidator(ParameterValidator elementValidator)
ListValidatorelementValidator - validator for list elementspublic ListValidator(ParameterValidator elementValidator, boolean nullable)
elementValidator - validator for list elementsnullable - true if the model node for the list can be null or ModelType.UNDEFINEDpublic ListValidator(ParameterValidator elementValidator, boolean nullable, boolean allowDuplicates)
elementValidator - validator for list elementsnullable - true if the model node for the list can be null or ModelType.UNDEFINEDpublic ListValidator(ParameterValidator elementValidator, boolean nullable, int minSize, int maxSize)
elementValidator - validator for list elementsnullable - true if the model node for the list can be null or ModelType.UNDEFINEDminSize - minimum number of elements in the listmaxSize - maximum number of elements in the listpublic ListValidator(ParameterValidator elementValidator, boolean nullable, int minSize, int maxSize, boolean allowDuplicates)
elementValidator - validator for list elementsnullable - true if the model node for the list can be null or ModelType.UNDEFINEDminSize - minimum number of elements in the listmaxSize - maximum number of elements in the listallowDuplicates - validate duplicates in list or notpublic 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 Long getMin()
MinMaxValidatorgetMin in interface MinMaxValidatornull if there is no minimumpublic Long getMax()
MinMaxValidatorgetMax in interface MinMaxValidatornull if there is no minimumCopyright © 2022 JBoss by Red Hat. All rights reserved.