From: Jakub Toth Date: Fri, 22 Apr 2016 09:12:40 +0000 (+0200) Subject: Bug 5526 - Mark old services methods with @Deprecated X-Git-Tag: release/boron~124 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=6cc37b384495fc9e4eb37e767fe059c4ba84e71d;p=netconf.git Bug 5526 - Mark old services methods with @Deprecated Change-Id: I8f65897d45327d2bf257f51fc541f9fc1210cc08 Signed-off-by: Jakub Toth --- diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaRetrievalService.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaRetrievalService.java index 3020ab08ed..52999a5cd2 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaRetrievalService.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaRetrievalService.java @@ -12,7 +12,13 @@ import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import org.opendaylight.restconf.rest.api.services.schema.RestconfSchemaService; +/** + * @deprecated do not use this api. It is replaced by + * {@link RestconfSchemaService} + */ +@Deprecated @Beta public interface SchemaRetrievalService { diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java index 17731de775..5bb80f7d2e 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java @@ -26,6 +26,9 @@ 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.rest.api.services.RestconfModulesService; +import org.opendaylight.restconf.rest.api.services.RestconfOperationsService; +import org.opendaylight.restconf.rest.api.services.RestconfStreamsService; /** * The URI hierarchy for the RESTCONF resources consists of an entry point container, 4 top-level resources, and 1 @@ -58,30 +61,55 @@ public interface RestconfService { @GET public Object getRoot(); + /** + * @deprecated do not use this method. It is replaced by + * {@link RestconfModulesService#getModules(UriInfo)} + */ + @Deprecated @GET @Path("/modules") @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) public NormalizedNodeContext getModules(@Context UriInfo uriInfo); + /** + * @deprecated do not use this method. It is replaced by + * {@link RestconfModulesService#getModules(String, UriInfo)} + */ + @Deprecated @GET @Path("/modules/{identifier:.+}") @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) public NormalizedNodeContext getModules(@PathParam("identifier") String identifier, @Context UriInfo uriInfo); + /** + * @deprecated do not use this method. It is replaced by + * {@link RestconfModulesService#getModule(String, UriInfo)} + */ + @Deprecated @GET @Path("/modules/module/{identifier:.+}") @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) public NormalizedNodeContext getModule(@PathParam("identifier") String identifier, @Context UriInfo uriInfo); + /** + * @deprecated do not use this method. It is replaced by + * {@link RestconfOperationsService#getOperations(UriInfo)} + */ + @Deprecated @GET @Path("/operations") @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) public NormalizedNodeContext getOperations(@Context UriInfo uriInfo); + /** + * @deprecated do not use this method. It is replaced by + * {@link RestconfOperationsService#getOperations(String, UriInfo)} + */ + @Deprecated @GET @Path("/operations/{identifier:.+}") @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, @@ -149,6 +177,11 @@ public interface RestconfService { @Path("/streams/stream/{identifier:.+}") public Response subscribeToStream(@Encoded @PathParam("identifier") String identifier, @Context UriInfo uriInfo); + /** + * @deprecated do not use this method. It is replaced by + * {@link RestconfStreamsService#getAvailableStreams(UriInfo)} + */ + @Deprecated @GET @Path("/streams") @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON,