public class RequiredChecker extends Object implements FieldConstraintDocChecker
| Constructor and Description |
|---|
RequiredChecker() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConstraint(ConstraintValidator validator,
FieldTreeNode fieldMetadata,
Path fieldMetadataPath,
FieldConstraint constraint,
JsonDoc doc)
Field constraint checker function that is run once for the document
|
static List<Path> |
getMissingFields(Path fieldMetadataPath,
JsonDoc doc)
Returns the list of fields that are missing in the doc
|
public void checkConstraint(ConstraintValidator validator, FieldTreeNode fieldMetadata, Path fieldMetadataPath, FieldConstraint constraint, JsonDoc doc)
FieldConstraintDocCheckercheckConstraint in interface FieldConstraintDocCheckervalidator - The constraint validator instance from which the
implementation can access the metadata and context informationfieldMetadataPath - The path for the field metadata (i.e. may
contain *)constraint - field constraintdoc - The document
The function should add the errors to validatorCopyright © 2016. All rights reserved.