public class ChainedParameterValidator extends AbstractParameterValidator implements MinMaxValidator, AllowedValuesValidator
Constructor and Description |
---|
ChainedParameterValidator(ParameterValidator... validators) |
Modifier and Type | Method and Description |
---|---|
static ParameterValidator |
chain(ParameterValidator... validators) |
List<org.jboss.dmr.ModelNode> |
getAllowedValues()
Gets the allowed values, or
null 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.
|
validateResolvedParameter
public ChainedParameterValidator(ParameterValidator... validators)
public static ParameterValidator chain(ParameterValidator... validators)
public void validateParameter(String parameterName, org.jboss.dmr.ModelNode value) throws OperationFailedException
ParameterValidator
validateParameter
in interface ParameterValidator
parameterName
- the name of the parameter. Cannot be null
value
- the parameter value. Cannot be null
OperationFailedException
- if the value is not validpublic Long getMin()
MinMaxValidator
getMin
in interface MinMaxValidator
null
if there is no minimumpublic Long getMax()
MinMaxValidator
getMax
in interface MinMaxValidator
null
if there is no minimumpublic List<org.jboss.dmr.ModelNode> getAllowedValues()
AllowedValuesValidator
null
if any value is allowed.getAllowedValues
in interface AllowedValuesValidator
null
Copyright © 2023 JBoss by Red Hat. All rights reserved.