Class EnumHelper
java.lang.Object
org.forgerock.json.schema.validator.helpers.EnumHelper
- All Implemented Interfaces:
SimpleValidator<Object>
This class implements "enum" validation on all types of objects as defined in
the paragraph 5.19 of the JSON Schema specification.
This implementation relies on the equals
method.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
validate
(Object node, JsonPointer at, ErrorHandler handler) Validates thenode
value against the embedded schema object.
-
Constructor Details
-
EnumHelper
Construct a new enum helper.- Parameters:
enumValues
- The values.
-
-
Method Details
-
validate
Description copied from interface:SimpleValidator
Validates thenode
value against the embedded schema object.The selected error handler defines the behaviour of the validator. The
FailFastErrorHandler
throws exception at firs violation. Other customisedErrorHandler
can collect all exceptions and after the validation the examination of thehandler
contains the final result.- Specified by:
validate
in interfaceSimpleValidator<Object>
- Parameters:
node
- value to validateat
- JSONPath of the node. null means it's the root nodehandler
- customised error handler likeFailFastErrorHandler
- Throws:
SchemaException
- when thenode
violates with the schema
-