X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Frestful%2Fservices%2Fapi%2FRestconfDataService.java;h=df0ac51928b00ab6de06a621ad2db57efc3e2285;hb=9d68f579466ee3d94a75680d5ef2a6a017956bde;hp=f1f3b7e348f7ae07b87b9c074a709b5e73b68de8;hpb=03cd91edfcb91ebad953158eca8418806314b335;p=netconf.git diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfDataService.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfDataService.java index f1f3b7e348..df0ac51928 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfDataService.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfDataService.java @@ -24,7 +24,7 @@ import org.opendaylight.netconf.sal.rest.impl.PATCH; import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext; import org.opendaylight.netconf.sal.restconf.impl.PATCHContext; import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext; -import org.opendaylight.restconf.Draft15; +import org.opendaylight.restconf.Draft16; import org.opendaylight.restconf.utils.RestconfConstants; /** @@ -45,7 +45,7 @@ public interface RestconfDataService { */ @GET @Path("/data/{identifier:.+}") - @Produces({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA, MediaType.APPLICATION_JSON, + @Produces({ Draft16.MediaTypes.DATA + RestconfConstants.JSON, Draft16.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) Response readData(@Encoded @PathParam("identifier") String identifier, @Context UriInfo uriInfo); @@ -61,7 +61,7 @@ public interface RestconfDataService { */ @PUT @Path("/data/{identifier:.+}") - @Consumes({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA, MediaType.APPLICATION_JSON, + @Consumes({ Draft16.MediaTypes.DATA + RestconfConstants.JSON, Draft16.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) Response putData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload); @@ -78,7 +78,7 @@ public interface RestconfDataService { */ @POST @Path("/data/{identifier:.+}") - @Consumes({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA, MediaType.APPLICATION_JSON, + @Consumes({ Draft16.MediaTypes.DATA + RestconfConstants.JSON, Draft16.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) Response postData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload, @Context UriInfo uriInfo); @@ -94,7 +94,7 @@ public interface RestconfDataService { */ @POST @Path("/data") - @Consumes({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA, MediaType.APPLICATION_JSON, + @Consumes({ Draft16.MediaTypes.DATA + RestconfConstants.JSON, Draft16.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) Response postData(NormalizedNodeContext payload, @Context UriInfo uriInfo); @@ -123,9 +123,9 @@ public interface RestconfDataService { */ @PATCH @Path("/data/{identifier:.+}") - @Consumes({ Draft15.MediaTypes.PATCH + RestconfConstants.JSON, Draft15.MediaTypes.PATCH + RestconfConstants.XML }) - @Produces({ Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.JSON, - Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.XML }) + @Consumes({ Draft16.MediaTypes.PATCH + RestconfConstants.JSON, Draft16.MediaTypes.PATCH + RestconfConstants.XML }) + @Produces({ Draft16.MediaTypes.PATCH_STATUS + RestconfConstants.JSON, + Draft16.MediaTypes.PATCH_STATUS + RestconfConstants.XML }) PATCHStatusContext patchData(@Encoded @PathParam("identifier") String identifier, PATCHContext context, @Context UriInfo uriInfo); @@ -140,8 +140,8 @@ public interface RestconfDataService { */ @PATCH @Path("/data") - @Consumes({ Draft15.MediaTypes.PATCH + RestconfConstants.JSON, Draft15.MediaTypes.PATCH + RestconfConstants.XML }) - @Produces({ Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.JSON, - Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.XML }) + @Consumes({ Draft16.MediaTypes.PATCH + RestconfConstants.JSON, Draft16.MediaTypes.PATCH + RestconfConstants.XML }) + @Produces({ Draft16.MediaTypes.PATCH_STATUS + RestconfConstants.JSON, + Draft16.MediaTypes.PATCH_STATUS + RestconfConstants.XML }) PATCHStatusContext patchData(PATCHContext context, @Context UriInfo uriInfo); }