|
|
|
@ -18,19 +18,16 @@
|
|
|
|
|
|
|
|
|
|
package org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl;
|
|
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceManager;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
|
|
|
|
|
import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
public class VirtualFireAlarmManagerService implements DeviceManagementService {
|
|
|
|
|
|
|
|
|
|
public class VirtualFireAlarmManagerService implements DeviceManagementService{
|
|
|
|
|
private DeviceManager deviceManager;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -38,20 +35,9 @@ public class VirtualFireAlarmManagerService implements DeviceManagementService{
|
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getProviderTenantDomain() {
|
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE_PROVIDER_DOMAIN;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean isSharedWithAllTenants() {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void init() throws DeviceManagementException {
|
|
|
|
|
this.deviceManager=new VirtualFireAlarmManager();
|
|
|
|
|
this.deviceManager = new VirtualFireAlarmManager();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -65,9 +51,13 @@ public class VirtualFireAlarmManagerService implements DeviceManagementService{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIds)
|
|
|
|
|
throws DeviceManagementException {
|
|
|
|
|
public ProvisioningConfig getProvisioningConfig() {
|
|
|
|
|
return new ProvisioningConfig(VirtualFireAlarmConstants.DEVICE_TYPE_PROVIDER_DOMAIN, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PushNotificationConfig getPushNotificationConfig() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|