Modifier and Type | Field and Description |
---|---|
static List<ModelType> |
NEVER_OPTIONAL_MODEL |
static String |
OPTIONAL_VARIABLE_SUFFIX |
static String |
PREFIX |
Constructor and Description |
---|
ModelValidator(String model) |
Modifier and Type | Method and Description |
---|---|
protected ParserValidator<?> |
createParserValidator()
Returns a registered parser validator based on the model syntax.
|
static ParserValidator<?> |
newParserValidator(ModelType type,
String model) |
String |
validate(String parameterValue,
ModelValidatorContext context,
boolean isVariableHidden)
Check whether the specified
value is valid. |
public static final String PREFIX
public static final String OPTIONAL_VARIABLE_SUFFIX
public ModelValidator(String model)
public String validate(String parameterValue, ModelValidatorContext context, boolean isVariableHidden) throws ValidationException
Validator
value
is valid. If not, a
checked exception that contains the cause is thrown.validate
in interface Validator<String>
parameterValue
- the value to check.context
- a context object, if needed by the validatorisVariableHidden
- true is the variable is hiddenValidationException
- if the parameter value is invalid.protected ParserValidator<?> createParserValidator() throws ModelSyntaxException
ModelSyntaxException
- if an error occurred during the parser creationpublic static ParserValidator<?> newParserValidator(ModelType type, String model) throws ModelSyntaxException
ModelSyntaxException