import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
import javax.ws.rs.Encoded;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import org.opendaylight.netconf.sal.rest.api.Draft02.MediaTypes;
-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.base.services.api.RestconfOperationsService;
-import org.opendaylight.restconf.restful.services.api.RestconfDataService;
-import org.opendaylight.restconf.restful.services.api.RestconfInvokeOperationsService;
-import org.opendaylight.restconf.restful.services.api.RestconfStreamsSubscriptionService;
+import org.opendaylight.restconf.common.context.NormalizedNodeContext;
+import org.opendaylight.restconf.common.patch.Patch;
+import org.opendaylight.restconf.common.patch.PatchContext;
+import org.opendaylight.restconf.common.patch.PatchStatusContext;
/**
* The URI hierarchy for the RESTCONF resources consists of an entry point
/**
* Get all modules supported by controller.
*
- * @param uriInfo URI info
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#readData(UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#readData(UriInfo)
*/
@Deprecated
@GET
@Path("/modules")
- @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+ @Produces({
+ Draft02.MediaTypes.API + JSON,
+ Draft02.MediaTypes.API + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext getModules(@Context UriInfo uriInfo);
/**
* Get all modules supported by mount point.
*
- * @param identifier mount point identifier
- * @param uriInfo URI info
+ * @param identifier
+ * mount point identifier
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#readData(String, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#readData(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 })
+ @Produces({
+ Draft02.MediaTypes.API + JSON,
+ Draft02.MediaTypes.API + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext getModules(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
/**
* Get module.
*
- * @param identifier path to target
- * @param uriInfo URI info
+ * @param identifier
+ * path to target
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#readData(String, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#readData(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 })
+ @Produces({
+ Draft02.MediaTypes.API + JSON,
+ Draft02.MediaTypes.API + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext getModule(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
/**
* List of rpc or action operations supported by the server.
*
- * @param uriInfo URI information
+ * @param uriInfo
+ * URI information
* @return {@link NormalizedNodeContext}
* @deprecated do not use this method. It will be replaced by
- * {@link RestconfOperationsService#getOperations(UriInfo)}
+ * 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 })
+ @Produces({
+ Draft02.MediaTypes.API + JSON,
+ Draft02.MediaTypes.API + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext getOperations(@Context UriInfo uriInfo);
/**
* Valid for mount points. List of operations supported by the server.
*
- * @param identifier path parameter
- * @param uriInfo URI information
+ * @param identifier
+ * path parameter
+ * @param uriInfo
+ * URI information
* @return {@link NormalizedNodeContext}
* @deprecated do not use this method. It will be replaced by
- * {@link RestconfOperationsService#getOperations(String, UriInfo)}
+ * 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 })
+ @Produces({
+ Draft02.MediaTypes.API + JSON,
+ Draft02.MediaTypes.API + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext getOperations(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
/**
* Invoke RPC operation.
*
- * @param identifier module name and rpc identifier string for the desired operation
- * @param payload {@link NormalizedNodeContext} - the body of the operation
- * @param uriInfo URI info
+ * @param identifier
+ * module name and rpc identifier string for the desired operation
+ * @param payload
+ * {@link NormalizedNodeContext} - the body of the operation
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
* @deprecated do not use this method. It will be replaced by
- * {@link RestconfInvokeOperationsService#invokeRpc(String, NormalizedNodeContext, UriInfo)}
+ * RestconfInvokeOperationsService#invokeRpc(String, NormalizedNodeContext, UriInfo)
*/
@Deprecated
@POST
@Path("/operations/{identifier:.+}")
- @Produces({ Draft02.MediaTypes.OPERATION + JSON, Draft02.MediaTypes.OPERATION + XML,
- Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
- @Consumes({ Draft02.MediaTypes.OPERATION + JSON, Draft02.MediaTypes.OPERATION + XML,
- Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+ @Produces({
+ Draft02.MediaTypes.OPERATION + JSON,
+ Draft02.MediaTypes.OPERATION + XML,
+ Draft02.MediaTypes.DATA + JSON,
+ Draft02.MediaTypes.DATA + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
+ @Consumes({
+ Draft02.MediaTypes.OPERATION + JSON,
+ Draft02.MediaTypes.OPERATION + XML,
+ Draft02.MediaTypes.DATA + JSON,
+ Draft02.MediaTypes.DATA + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext invokeRpc(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload,
@Context UriInfo uriInfo);
- /**
- * Invoke RPC with default empty payload.
- *
- * @param identifier module name and rpc identifier string for the desired operation
- * @param noPayload the body of the operation
- * @param uriInfo URI info
- * @return {@link NormalizedNodeContext}
- * @deprecated Method is not used and will be removed
- */
- @POST
- @Path("/operations/{identifier:.+}")
- @Produces({ Draft02.MediaTypes.OPERATION + JSON, Draft02.MediaTypes.OPERATION + XML,
- Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
- @Deprecated // method isn't use anywhere
- NormalizedNodeContext invokeRpc(@Encoded @PathParam("identifier") String identifier,
- @DefaultValue("") String noPayload, @Context UriInfo uriInfo);
-
/**
* Get target data resource from config data store.
*
- * @param identifier path to target
- * @param uriInfo URI info
+ * @param identifier
+ * path to target
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#readData(String, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#readData(String,
+ * UriInfo)
*/
@Deprecated
@GET
@Path("/config/{identifier:.+}")
- @Produces({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+ @Produces({
+ Draft02.MediaTypes.DATA + JSON,
+ Draft02.MediaTypes.DATA + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext readConfigurationData(@Encoded @PathParam("identifier") String identifier,
@Context UriInfo uriInfo);
/**
* Get target data resource from operational data store.
*
- * @param identifier path to target
- * @param uriInfo URI info
+ * @param identifier
+ * path to target
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#readData(String, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#readData(String,
+ * UriInfo)
*/
@Deprecated
@GET
@Path("/operational/{identifier:.+}")
- @Produces({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+ @Produces({
+ Draft02.MediaTypes.DATA + JSON,
+ Draft02.MediaTypes.DATA + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext readOperationalData(@Encoded @PathParam("identifier") String identifier,
@Context UriInfo uriInfo);
/**
* Create or replace the target data resource.
*
- * @param identifier path to target
- * @param payload data node for put to config DS
+ * @param identifier
+ * path to target
+ * @param payload
+ * data node for put to config DS
* @return {@link Response}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#putData(String, NormalizedNodeContext, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#putData(String,
+ * NormalizedNodeContext, UriInfo)
*/
@Deprecated
@PUT
@Path("/config/{identifier:.+}")
- @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+ @Consumes({
+ Draft02.MediaTypes.DATA + JSON,
+ Draft02.MediaTypes.DATA + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
Response updateConfigurationData(@Encoded @PathParam("identifier") String identifier,
NormalizedNodeContext payload, @Context UriInfo uriInfo);
/**
* Create a data resource in target.
*
- * @param identifier path to target
- * @param payload new data
- * @param uriInfo URI info
+ * @param identifier
+ * path to target
+ * @param payload
+ * new data
+ * @param uriInfo
+ * URI info
* @return {@link Response}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#postData(String, NormalizedNodeContext, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#postData(String,
+ * NormalizedNodeContext, UriInfo)
*/
@Deprecated
@POST
@Path("/config/{identifier:.+}")
- @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+ @Consumes({
+ Draft02.MediaTypes.DATA + JSON,
+ Draft02.MediaTypes.DATA + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
Response createConfigurationData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload,
@Context UriInfo uriInfo);
/**
* Create a data resource.
*
- * @param payload new data
- * @param uriInfo URI info
+ * @param payload
+ * new data
+ * @param uriInfo
+ * URI info
* @return {@link Response}
* @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#postData(NormalizedNodeContext, UriInfo)}
+ * 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 })
+ @Consumes({
+ Draft02.MediaTypes.DATA + JSON,
+ Draft02.MediaTypes.DATA + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
Response createConfigurationData(NormalizedNodeContext payload, @Context UriInfo uriInfo);
/**
* Delete the target data resource.
*
- * @param identifier path to target
+ * @param identifier
+ * path to target
* @return {@link Response}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#deleteData(String)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#deleteData(String)
*/
@Deprecated
@DELETE
/**
* Subscribe to stream.
*
- * @param identifier stream identifier
- * @param uriInfo URI info
+ * @param identifier
+ * stream identifier
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
* @deprecated do not use this method. It will be replaced by
- * {@link RestconfStreamsSubscriptionService#subscribeToStream(String, UriInfo)}
+ * RestconfStreamsSubscriptionService#subscribeToStream(String, UriInfo)
*/
@Deprecated
@GET
/**
* Get list of all streams.
*
- * @param uriInfo URI info
+ * @param uriInfo
+ * URI info
* @return {@link NormalizedNodeContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#readData(String, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#readData(String,
+ * UriInfo)
**/
@Deprecated
@GET
@Path("/streams")
- @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON,
- MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+ @Produces({
+ Draft02.MediaTypes.API + JSON,
+ Draft02.MediaTypes.API + XML,
+ MediaType.APPLICATION_JSON,
+ MediaType.APPLICATION_XML,
+ MediaType.TEXT_XML
+ })
NormalizedNodeContext getAvailableStreams(@Context UriInfo uriInfo);
/**
* Ordered list of edits that are applied to the target datastore by the server.
*
- * @param identifier path to target
- * @param context edits
- * @param uriInfo URI info
+ * @param identifier
+ * path to target
+ * @param context
+ * edits
+ * @param uriInfo
+ * URI info
* @return {@link PatchStatusContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#patchData(String, PatchContext, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#patchData(String,
+ * PatchContext, UriInfo)
*/
@Deprecated
@Patch
@Path("/config/{identifier:.+}")
- @Consumes({MediaTypes.PATCH + JSON, MediaTypes.PATCH + XML})
- @Produces({MediaTypes.PATCH_STATUS + JSON, MediaTypes.PATCH_STATUS + XML})
+ @Consumes({
+ MediaTypes.PATCH + JSON,
+ MediaTypes.PATCH + XML
+ })
+ @Produces({
+ MediaTypes.PATCH_STATUS + JSON,
+ MediaTypes.PATCH_STATUS + XML
+ })
PatchStatusContext patchConfigurationData(@Encoded @PathParam("identifier") String identifier, PatchContext
context, @Context UriInfo uriInfo);
/**
* Ordered list of edits that are applied to the datastore by the server.
*
- * @param context edits
- * @param uriInfo URI info
+ * @param context
+ * edits
+ * @param uriInfo
+ * URI info
* @return {@link PatchStatusContext}
- * @deprecated do not use this method. It will be replaced by
- * {@link RestconfDataService#patchData(PatchContext, UriInfo)}
+ * @deprecated do not use this method. It will be replaced by RestconfDataService#patchData(PatchContext,
+ * UriInfo)
*/
@Deprecated
@Patch
@Path("/config")
- @Consumes({MediaTypes.PATCH + JSON, MediaTypes.PATCH + XML})
- @Produces({MediaTypes.PATCH_STATUS + JSON, MediaTypes.PATCH_STATUS + XML})
+ @Consumes({
+ MediaTypes.PATCH + JSON,
+ MediaTypes.PATCH + XML
+ })
+ @Produces({
+ MediaTypes.PATCH_STATUS + JSON,
+ MediaTypes.PATCH_STATUS + XML
+ })
PatchStatusContext patchConfigurationData(PatchContext context, @Context UriInfo uriInfo);
}