From 54f9d02ebb1482ff59898fa3a86d4aaf38ca2485 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Sat, 28 May 2016 11:10:22 +0530 Subject: [PATCH] Code cleanup --- .../service/api/ActivityInfoProviderService.java | 2 +- .../jaxrs/service/api/DeviceManagementService.java | 2 +- .../service/impl/ActivityProviderServiceImpl.java | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java index 565c7366ea..301bb0f45f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java @@ -55,7 +55,7 @@ public interface ActivityInfoProviderService { code = 200, message = "OK. \n Activity details are successfully fetched", response = Activity.class, - responseHeaders = { + responseHeaders = { @ResponseHeader( name = "Content-Type", description = "The content type of the body"), diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java index d07290f1f7..7ebb168634 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java @@ -504,7 +504,7 @@ public interface DeviceManagementService { value = { @ApiResponse( code = 200, - message = "OK. \n Device has successfully been enrolled. Location header " + + message = "OK. \n Device list searched for has successfully been retrieved. Location header " + "contains URL of newly enrolled device", response = DeviceWrapper.class, responseContainer = "List", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ActivityProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ActivityProviderServiceImpl.java index dca5f7e1e2..1664f31591 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ActivityProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ActivityProviderServiceImpl.java @@ -26,17 +26,16 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.jaxrs.service.api.ActivityInfoProviderService; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; +import javax.ws.rs.*; import javax.ws.rs.core.Response; import java.util.List; + public class ActivityProviderServiceImpl implements ActivityInfoProviderService { private static final Log log = LogFactory.getLog(ActivityProviderServiceImpl.class); + @GET @Override @Path("/{id}") public Response getActivity( @@ -55,10 +54,11 @@ public class ActivityProviderServiceImpl implements ActivityInfoProviderService return Response.status(Response.Status.OK).entity(operation).build(); } + @GET @Override - @Path("/") public Response getActivities( - @QueryParam("timestamp") String timestamp) { + @QueryParam("timestamp") String timestamp, + @HeaderParam("If-Modified-Since") String ifModifiedSince) { List activities = null; DeviceManagementProviderService dmService; try {