Class MapValidator
- java.lang.Object
-
- org.jboss.as.controller.operations.validation.ModelTypeValidator
-
- org.jboss.as.controller.operations.validation.MapValidator
-
- All Implemented Interfaces:
ParameterValidator
public class MapValidator extends ModelTypeValidator implements ParameterValidator
Validates parameters of typeModelType.OBJECT
.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc.
-
-
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 Description MapValidator(ParameterValidator elementValidator)
Constructs a newMapValidator
MapValidator(ParameterValidator elementValidator, boolean nullable)
Constructs a newMapValidator
MapValidator(ParameterValidator elementValidator, boolean nullable, int minSize, int maxSize)
Constructs a newMapValidator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validateParameter(String parameterName, org.jboss.dmr.ModelNode value)
Validate the parameter with the given name.
-
-
-
Constructor Detail
-
MapValidator
public MapValidator(ParameterValidator elementValidator)
Constructs a newMapValidator
- Parameters:
elementValidator
- validator for list elements
-
MapValidator
public MapValidator(ParameterValidator elementValidator, boolean nullable)
Constructs a newMapValidator
- Parameters:
elementValidator
- validator for map valuesnullable
-true
if the model node for the list can benull
orModelType.UNDEFINED
-
MapValidator
public MapValidator(ParameterValidator elementValidator, boolean nullable, int minSize, int maxSize)
Constructs a newMapValidator
- Parameters:
elementValidator
- validator for map valuesnullable
-true
if the model node for the map can benull
orModelType.UNDEFINED
minSize
- minimum number of elements in the listmaxSize
- maximum number of elements in the list
-
-
Method Detail
-
validateParameter
public void validateParameter(String parameterName, org.jboss.dmr.ModelNode value) throws OperationFailedException
Description copied from class:ModelTypeValidator
Validate the parameter with the given name.- Specified by:
validateParameter
in interfaceParameterValidator
- Overrides:
validateParameter
in classModelTypeValidator
- Parameters:
parameterName
- the name of the parameter. Cannot benull
value
- the parameter value. Cannot benull
- Throws:
OperationFailedException
- if the value is not valid
-
-