+ /**
+ * Delete a JSON Object using the object identifier.
+ *
+ * @param jsonObjectId the JSON object identifier.
+ * @return a HTTP response.
+ */
+ @DELETE
+ @Path("json-object/{id}")
+ public final Response deleteJsonObjectById(@PathParam("id") int jsonObjectId) {
+ try {
+ cpService.deleteJsonById(jsonObjectId);
+ return Response.status(Status.OK).entity(Status.OK.toString()).build();
+ } catch (final EmptyResultDataAccessException e) {
+ return Response.status(Status.NOT_FOUND).entity(Status.NOT_FOUND.toString()).build();
+ } catch (final Exception e) {
+ return Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
+ }
+ }
+