|
|
|
@ -27,7 +27,13 @@ import org.apache.commons.logging.Log;
|
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
|
import org.wso2.carbon.context.CarbonContext;
|
|
|
|
|
|
|
|
|
|
import javax.ws.rs.*;
|
|
|
|
|
import javax.ws.rs.Consumes;
|
|
|
|
|
import javax.ws.rs.GET;
|
|
|
|
|
import javax.ws.rs.PUT;
|
|
|
|
|
import javax.ws.rs.Path;
|
|
|
|
|
import javax.ws.rs.PathParam;
|
|
|
|
|
import javax.ws.rs.Produces;
|
|
|
|
|
import javax.ws.rs.QueryParam;
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -43,17 +49,10 @@ public class DeviceStatusFilterServiceImpl implements DeviceStatusFilterService
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/{deviceType}")
|
|
|
|
|
public Response getDeviceStatusFilters(@PathParam("deviceType") String deviceType) {
|
|
|
|
|
// List<String> result;
|
|
|
|
|
// int tenantId = ;
|
|
|
|
|
try {
|
|
|
|
|
DeviceStatusManagementService deviceManagementProviderService = DeviceMgtAPIUtils.getDeviceStatusManagmentService();
|
|
|
|
|
return Response.status(Response.Status.OK).entity(deviceManagementProviderService
|
|
|
|
|
.getDeviceStatusFilters(deviceType, CarbonContext.getThreadLocalCarbonContext().getTenantId())).build();
|
|
|
|
|
// result = deviceManagementProviderService.getDeviceStatusFilters(deviceType, tenantId);
|
|
|
|
|
// if (result != null) {
|
|
|
|
|
// return Response.status(Response.Status.OK).entity(result).build();
|
|
|
|
|
// }
|
|
|
|
|
// return Response.status(Response.Status.NO_CONTENT).entity(false).build();
|
|
|
|
|
} catch (MetadataKeyNotFoundException e) {
|
|
|
|
|
String msg = "Couldn't find the device status filter details for device type: " + deviceType;
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|