tcdlpds 2 months ago
parent 82f7ad5d95
commit 8db1ed6625

@ -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);

@ -57,17 +57,14 @@ public class TenantMgtServiceComponent {
TenantManager tenantManager = new TenantManagerImpl();
TenantMgtDataHolder.getInstance().setTenantManager(tenantManager);
//todo
WhiteLabelManagementService whiteLabelManagementService = new WhiteLabelManagementServiceImpl();
componentContext.getBundleContext().registerService(WhiteLabelManagementService.class.getName(),
whiteLabelManagementService, null);
TenantMgtDataHolder.getInstance().setWhiteLabelManagementService(whiteLabelManagementService);
//todo
DeviceStatusManagementService deviceStatusManagementService = new DeviceStatusManagementServiceImpl();
componentContext.getBundleContext().registerService(DeviceStatusManagementService.class.getName(),
deviceStatusManagementService, null);
TenantMgtDataHolder.getInstance().setDeviceStatusManagementService(deviceStatusManagementService);
DeviceMgtTenantListener deviceMgtTenantListener = new DeviceMgtTenantListener();
if(log.isDebugEnabled()) {
log.info("Tenant management listener is registering");

Loading…
Cancel
Save