public class MetricTypeValidator
extends org.jboss.as.controller.operations.validation.ModelTypeValidator
implements org.jboss.as.controller.operations.validation.AllowedValuesValidator
ParameterValidator that validates the value is a string matching one of the MetricType names.
This follows the design pattern of org.jboss.as.controller.operations.validation.TimeUnitValidator.| Modifier and Type | Field and Description |
|---|---|
static MetricTypeValidator |
ANY_OPTIONAL
any value is valid, as is an undefined value
|
static MetricTypeValidator |
ANY_REQUIRED
any value is valid, but an undefined value is not
|
| Constructor and Description |
|---|
MetricTypeValidator(boolean nullable,
boolean allowExpressions) |
MetricTypeValidator(boolean nullable,
boolean allowExpressions,
org.hawkular.metrics.client.common.MetricType... allowed) |
MetricTypeValidator(boolean nullable,
org.hawkular.metrics.client.common.MetricType... allowed) |
| Modifier and Type | Method and Description |
|---|---|
List<org.jboss.dmr.ModelNode> |
getAllowedValues() |
void |
validateParameter(String parameterName,
org.jboss.dmr.ModelNode value) |
public static final MetricTypeValidator ANY_REQUIRED
public static final MetricTypeValidator ANY_OPTIONAL
public MetricTypeValidator(boolean nullable,
org.hawkular.metrics.client.common.MetricType... allowed)
public MetricTypeValidator(boolean nullable,
boolean allowExpressions)
public MetricTypeValidator(boolean nullable,
boolean allowExpressions,
org.hawkular.metrics.client.common.MetricType... allowed)
public void validateParameter(String parameterName, org.jboss.dmr.ModelNode value) throws org.jboss.as.controller.OperationFailedException
validateParameter in interface org.jboss.as.controller.operations.validation.ParameterValidatorvalidateParameter in class org.jboss.as.controller.operations.validation.ModelTypeValidatororg.jboss.as.controller.OperationFailedExceptionpublic List<org.jboss.dmr.ModelNode> getAllowedValues()
getAllowedValues in interface org.jboss.as.controller.operations.validation.AllowedValuesValidatorCopyright © 2015–2017 Red Hat, Inc.. All rights reserved.