Bug 5528 - Preparing enviroment for impl of restful services
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / netconf / sal / rest / api / RestconfService.java
index 17731de775d582fa4c21e94c998c0acd3d43d8ed..ade5a41d5878729fa9a238ec1989aeb0fed81de7 100644 (file)
@@ -26,6 +26,11 @@ 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.services.api.RestconfModulesService;
+import org.opendaylight.restconf.rest.services.api.RestconfOperationsService;
+import org.opendaylight.restconf.rest.services.api.RestconfStreamsService;
+import org.opendaylight.restconf.restful.services.api.RestconfDataService;
+import org.opendaylight.restconf.restful.services.api.RestconfInvokeOperationsService;
 
 /**
  * The URI hierarchy for the RESTCONF resources consists of an entry point container, 4 top-level resources, and 1
@@ -58,36 +63,66 @@ public interface RestconfService {
     @GET
     public Object getRoot();
 
+    /**
+     * @deprecated do not use this method. It will be 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 will be 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 will be 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 will be 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 will be replaced by
+     *             {@link RestconfOperationsService#getOperations(String, UriInfo)}
+     */
+    @Deprecated
     @GET
     @Path("/operations/{identifier:.+}")
     @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getOperations(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfInvokeOperationsService#invokeRpc(String, NormalizedNodeContext, UriInfo)}
+     */
+    @Deprecated
     @POST
     @Path("/operations/{identifier:.+}")
     @Produces({ Draft02.MediaTypes.OPERATION + JSON, Draft02.MediaTypes.OPERATION + XML,
@@ -108,6 +143,11 @@ public interface RestconfService {
     public NormalizedNodeContext invokeRpc(@Encoded @PathParam("identifier") String identifier,
             @DefaultValue("") String noPayload, @Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#readData(String, UriInfo)}
+     */
+    @Deprecated
     @GET
     @Path("/config/{identifier:.+}")
     @Produces({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
@@ -115,6 +155,11 @@ public interface RestconfService {
     public NormalizedNodeContext readConfigurationData(@Encoded @PathParam("identifier") String identifier,
             @Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#readData(String, UriInfo)}
+     */
+    @Deprecated
     @GET
     @Path("/operational/{identifier:.+}")
     @Produces({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
@@ -122,12 +167,22 @@ public interface RestconfService {
     public NormalizedNodeContext readOperationalData(@Encoded @PathParam("identifier") String identifier,
             @Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#putData(String, NormalizedNodeContext)}
+     */
+    @Deprecated
     @PUT
     @Path("/config/{identifier:.+}")
     @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public Response updateConfigurationData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#postData(String, NormalizedNodeContext, UriInfo)}
+     */
+    @Deprecated
     @POST
     @Path("/config/{identifier:.+}")
     @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
@@ -135,12 +190,22 @@ public interface RestconfService {
     public Response createConfigurationData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload,
             @Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#postData(NormalizedNodeContext, UriInfo)}
+     */
+    @Deprecated
     @POST
     @Path("/config")
     @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public Response createConfigurationData(NormalizedNodeContext payload, @Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#deleteData(String)}
+     */
+    @Deprecated
     @DELETE
     @Path("/config/{identifier:.+}")
     public Response deleteConfigurationData(@Encoded @PathParam("identifier") String identifier);
@@ -149,12 +214,22 @@ 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 will be replaced by
+     *             {@link RestconfStreamsService#getAvailableStreams(UriInfo)}
+     */
+    @Deprecated
     @GET
     @Path("/streams")
     @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON,
             MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getAvailableStreams(@Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#patchData(String, PATCHContext, UriInfo)}
+     */
+    @Deprecated
     @PATCH
     @Path("/config/{identifier:.+}")
     @Consumes({MediaTypes.PATCH + JSON, MediaTypes.PATCH + XML})
@@ -162,6 +237,11 @@ public interface RestconfService {
     PATCHStatusContext patchConfigurationData(@Encoded @PathParam("identifier") String identifier, PATCHContext
             context, @Context UriInfo uriInfo);
 
+    /**
+     * @deprecated do not use this method. It will be replaced by
+     *             {@link RestconfDataService#patchData(PATCHContext, UriInfo)}
+     */
+    @Deprecated
     @PATCH
     @Path("/config")
     @Consumes({MediaTypes.PATCH + JSON, MediaTypes.PATCH + XML})