Class ChainedParameterValidator
- java.lang.Object
-
- org.jboss.as.controller.operations.validation.ChainedParameterValidator
-
- All Implemented Interfaces:
AllowedValuesValidator
,MinMaxValidator
,ParameterValidator
public class ChainedParameterValidator extends Object implements ParameterValidator, MinMaxValidator, AllowedValuesValidator
- Author:
- Carlo de Wolf
-
-
Constructor Summary
Constructors Constructor Description ChainedParameterValidator(ParameterValidator... validators)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParameterValidator
chain(ParameterValidator... validators)
List<org.jboss.dmr.ModelNode>
getAllowedValues()
Gets the allowed values, ornull
if any value is allowed.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.
-
-
-
Constructor Detail
-
ChainedParameterValidator
public ChainedParameterValidator(ParameterValidator... validators)
-
-
Method Detail
-
chain
public static ParameterValidator chain(ParameterValidator... validators)
-
validateParameter
public void validateParameter(String parameterName, org.jboss.dmr.ModelNode value) throws OperationFailedException
Description copied from interface:ParameterValidator
Validate the parameter with the given name.- Specified by:
validateParameter
in interfaceParameterValidator
- Parameters:
parameterName
- the name of the parameter. Cannot benull
value
- the parameter value. Cannot benull
- Throws:
OperationFailedException
- if the value is not valid
-
getMin
public Long getMin()
Description copied from interface:MinMaxValidator
Gets the minimum, if there is one.- Specified by:
getMin
in interfaceMinMaxValidator
- Returns:
- the minimum value, or
null
if there is no minimum
-
getMax
public Long getMax()
Description copied from interface:MinMaxValidator
Gets the maximum, if there is one.- Specified by:
getMax
in interfaceMinMaxValidator
- Returns:
- the maximum value, or
null
if there is no minimum
-
getAllowedValues
public List<org.jboss.dmr.ModelNode> getAllowedValues()
Description copied from interface:AllowedValuesValidator
Gets the allowed values, ornull
if any value is allowed.- Specified by:
getAllowedValues
in interfaceAllowedValuesValidator
- Returns:
- the allowed values, or
null
-
-