Class EventValidator
- java.lang.Object
-
- com.axis.jenkins.plugins.eiffel.eiffelbroadcaster.eiffel.EventValidator
-
public class EventValidator extends Object
Validates an Eiffel event against the available schemas.
-
-
Constructor Summary
Constructors Constructor Description EventValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(String eventName, String eventVersion, com.fasterxml.jackson.databind.JsonNode eventJson)
Validates an Eiffel event and raises am exception if unsuccessful.
-
-
-
Method Detail
-
validate
public void validate(String eventName, String eventVersion, @NonNull com.fasterxml.jackson.databind.JsonNode eventJson) throws EventValidationFailedException, SchemaUnavailableException
Validates an Eiffel event and raises am exception if unsuccessful. Will useBundledSchemaProvider
to locate a schema that fits the event.- Parameters:
eventName
- the name of the payload's event typeeventVersion
- the version of the event typeeventJson
- the event payload- Throws:
EventValidationFailedException
- if the event fails validationSchemaUnavailableException
- if a schema can't be located
-
-