From 867ea1d4235b1818a24da6114ba527a967f43388 Mon Sep 17 00:00:00 2001 From: Yohan Avishke Date: Tue, 10 Dec 2019 05:11:38 +0530 Subject: [PATCH] Bring consuming media type to method level --- .../service/api/AnalyticsArtifactsManagementService.java | 7 ++++++- .../impl/AnalyticsArtifactsManagementServiceImpl.java | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java index e2d5064a4d..caacc59b39 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java @@ -112,10 +112,10 @@ import javax.ws.rs.core.Response; description = "This API corresponds to services related to Analytics Artifacts management" ) @Path("/analytics/artifacts") -@Consumes(MediaType.APPLICATION_JSON) public interface AnalyticsArtifactsManagementService { @POST + @Consumes(MediaType.APPLICATION_JSON) @Path("/stream/{id}") @ApiOperation( httpMethod = "POST", @@ -179,6 +179,7 @@ public interface AnalyticsArtifactsManagementService { @Valid EventStream stream); @POST + @Consumes(MediaType.APPLICATION_JSON) @Path("/stream") @ApiOperation( httpMethod = "POST", @@ -296,6 +297,7 @@ public interface AnalyticsArtifactsManagementService { ); @POST + @Consumes(MediaType.APPLICATION_JSON) @Path("/receiver/{name}") @ApiOperation( httpMethod = "POST", @@ -360,6 +362,7 @@ public interface AnalyticsArtifactsManagementService { @Valid Adapter receiver); @POST + @Consumes(MediaType.APPLICATION_JSON) @Path("/receiver") @ApiOperation( httpMethod = "POST", @@ -478,6 +481,7 @@ public interface AnalyticsArtifactsManagementService { @PathParam("name") String name); @POST + @Consumes(MediaType.APPLICATION_JSON) @Path("/publisher/{name}") @ApiOperation( httpMethod = "POST", @@ -542,6 +546,7 @@ public interface AnalyticsArtifactsManagementService { @Valid Adapter publisher); @POST + @Consumes(MediaType.APPLICATION_JSON) @Path("/publisher") @ApiOperation( httpMethod = "POST", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/AnalyticsArtifactsManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/AnalyticsArtifactsManagementServiceImpl.java index b6cdd9a650..a73baa90cb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/AnalyticsArtifactsManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/AnalyticsArtifactsManagementServiceImpl.java @@ -780,7 +780,6 @@ public class AnalyticsArtifactsManagementServiceImpl deployPublisherWithoutMapping(publisherName, eventStreamWithVersion, adapterType , eventPublisherAdminServiceStub, basicOutputAdapterPropertyDtos); } - } finally { cleanup(eventPublisherAdminServiceStub); }