|
|
@ -18,56 +18,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl;
|
|
|
|
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.DeviceManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceManager;
|
|
|
|
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.ProvisioningConfig;
|
|
|
|
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
|
|
|
|
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.common.spi.DeviceManagementService;
|
|
|
|
import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants;
|
|
|
|
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;
|
|
|
|
private DeviceManager deviceManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getType() {
|
|
|
|
public String getType() {
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE;
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void init() throws DeviceManagementException {
|
|
|
|
|
|
|
|
this.deviceManager = new VirtualFireAlarmManager();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getProviderTenantDomain() {
|
|
|
|
public DeviceManager getDeviceManager() {
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE_PROVIDER_DOMAIN;
|
|
|
|
return deviceManager;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean isSharedWithAllTenants() {
|
|
|
|
public ApplicationManager getApplicationManager() {
|
|
|
|
return true;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void init() throws DeviceManagementException {
|
|
|
|
public ProvisioningConfig getProvisioningConfig() {
|
|
|
|
this.deviceManager=new VirtualFireAlarmManager();
|
|
|
|
return new ProvisioningConfig(VirtualFireAlarmConstants.DEVICE_TYPE_PROVIDER_DOMAIN, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DeviceManager getDeviceManager() {
|
|
|
|
public PushNotificationConfig getPushNotificationConfig() {
|
|
|
|
return deviceManager;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public ApplicationManager getApplicationManager() {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIds)
|
|
|
|
|
|
|
|
throws DeviceManagementException {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|