X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frest%2Fapi%2FRestconfService.java;h=5d08b3e7b6cb27bec3e2bbb68c5c1f9927f603aa;hb=4bf903ba60c5bb2b5cdde1c7282e9a93e27e49c8;hp=a22ea623975049cd3bd37c8af3103fecce4317e4;hpb=90e562e3dcc64e46a657ef4ab3047b2b709339c7;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java index a22ea62397..5d08b3e7b6 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java @@ -7,14 +7,13 @@ */ package org.opendaylight.controller.sal.rest.api; -import static org.opendaylight.controller.sal.restconf.impl.MediaTypes.API; - import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.opendaylight.controller.sal.restconf.impl.StructuredData; @@ -58,42 +57,51 @@ public interface RestconfService extends RestconfServiceLegacy { @GET @Path("/modules") - @Produces({API+JSON,API+XML}) + @Produces({Draft01.MediaTypes.API+JSON,Draft01.MediaTypes.API+XML, + Draft02.MediaTypes.API+JSON,Draft02.MediaTypes.API+XML}) public StructuredData getModules(); @POST @Path("/operations/{identifier}") - @Produces({Draft02.MediaTypes.API+JSON,Draft02.MediaTypes.API+XML,API+JSON,API+XML}) + @Produces({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML, + Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public StructuredData invokeRpc(@PathParam("identifier") String identifier, CompositeNode payload); @GET @Path("/config/{identifier:.+}") - @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML}) + @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public StructuredData readConfigurationData(@PathParam("identifier") String identifier); - @PUT + @POST @Path("/config/{identifier:.+}") - @Produces({API+JSON,API+XML}) + @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public Response createConfigurationData(@PathParam("identifier") String identifier, CompositeNode payload); - @POST + @PUT @Path("/config/{identifier:.+}") - @Produces({API+JSON,API+XML}) + @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public Response updateConfigurationData(@PathParam("identifier") String identifier, CompositeNode payload); @GET @Path("/operational/{identifier:.+}") - @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML}) + @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public StructuredData readOperationalData(@PathParam("identifier") String identifier); - @PUT + @POST @Path("/operational/{identifier:.+}") - @Produces({API+JSON,API+XML}) + @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public Response createOperationalData(@PathParam("identifier") String identifier, CompositeNode payload); - @POST + @PUT @Path("/operational/{identifier:.+}") - @Produces({API+JSON,API+XML}) + @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public Response updateOperationalData(@PathParam("identifier") String identifier, CompositeNode payload); }