|
|
|
@ -18,56 +18,46 @@
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
private DeviceManager deviceManager;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getType() {
|
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getType() {
|
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void init() throws DeviceManagementException {
|
|
|
|
|
this.deviceManager = new VirtualFireAlarmManager();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getProviderTenantDomain() {
|
|
|
|
|
return VirtualFireAlarmConstants.DEVICE_TYPE_PROVIDER_DOMAIN;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public DeviceManager getDeviceManager() {
|
|
|
|
|
return deviceManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean isSharedWithAllTenants() {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public ApplicationManager getApplicationManager() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void init() throws DeviceManagementException {
|
|
|
|
|
this.deviceManager=new VirtualFireAlarmManager();
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public ProvisioningConfig getProvisioningConfig() {
|
|
|
|
|
return new ProvisioningConfig(VirtualFireAlarmConstants.DEVICE_TYPE_PROVIDER_DOMAIN, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public DeviceManager getDeviceManager() {
|
|
|
|
|
return deviceManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ApplicationManager getApplicationManager() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIds)
|
|
|
|
|
throws DeviceManagementException {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public PushNotificationConfig getPushNotificationConfig() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|