public class ListValidator extends ModelTypeValidator implements ParameterValidator
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 |
---|---|
void |
validateParameter(String parameterName,
org.jboss.dmr.ModelNode value)
Validate the parameter with the given name.
|
validateResolvedParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validateResolvedParameter
public ListValidator(ParameterValidator elementValidator)
ListValidator
elementValidator
- 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.UNDEFINED
public 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.UNDEFINED
public 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.UNDEFINED
minSize
- 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.UNDEFINED
minSize
- 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
ModelTypeValidator
validateParameter
in interface ParameterValidator
validateParameter
in class ModelTypeValidator
parameterName
- the name of the parameter. Cannot be null
value
- the parameter value. Cannot be null
OperationFailedException
- if the value is not validCopyright © 2023 JBoss by Red Hat. All rights reserved.