@Produces(value="application/json;charset=UTF-8") @Path(value="/jsonSchema") public class JsonSchemaEndPoint extends Object
Constructor and Description |
---|
JsonSchemaEndPoint() |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getInstalledJsonSchemaIds()
Get the list of installed Json Schema Ids
|
String |
getSchema(String id)
Get a schema by it's id
|
boolean |
remove(String id)
Deletes a JSON schema by it's id.
|
javax.ws.rs.core.Response |
save(String jsonSchema)
Save a JSON schema
|
void |
setSchemaService(SchemaService schemaService) |
Collection<ValidationError> |
validateEvent(String event)
Being able to validate a given event is useful when you want to develop custom events and associated schemas
|
Map<String,Set<ValidationError>> |
validateEvents(String events)
Being able to validate a given list of event is useful when you want to develop custom events and associated schemas
|
public void setSchemaService(SchemaService schemaService)
@GET @Path(value="/") public Set<String> getInstalledJsonSchemaIds()
@POST @Path(value="/query") public String getSchema(String id)
id
- of the schema@POST @Path(value="/") @Consumes(value={"text/plain","application/json"}) @Produces(value="application/json") public javax.ws.rs.core.Response save(String jsonSchema)
jsonSchema
- the schema as string to save@POST @Path(value="/delete") public boolean remove(String id)
id
- the identifier of the JSON schema that we want to delete@POST @Produces(value="application/json;charset=UTF-8") @Consumes(value={"text/plain","application/json"}) @Path(value="/validateEvent") public Collection<ValidationError> validateEvent(String event)
event
- the event to be validated@POST @Produces(value="application/json;charset=UTF-8") @Consumes(value={"text/plain","application/json"}) @Path(value="/validateEvents") public Map<String,Set<ValidationError>> validateEvents(String events)
events
- the events to be validatedCopyright © 2014–2023 Apache Software Foundation. All rights reserved.