|
|
|
@ -18,19 +18,16 @@
|
|
|
|
|
|
|
|
|
|
package org.wso2.carbon.device.mgt.iot.arduino.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.arduino.plugin.constants.ArduinoConstants;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public class ArduinoManagerService implements DeviceManagementService {
|
|
|
|
|
|
|
|
|
|
private DeviceManager deviceManager;
|
|
|
|
|
private final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super";
|
|
|
|
|
|
|
|
|
@ -39,16 +36,6 @@ public class ArduinoManagerService implements DeviceManagementService {
|
|
|
|
|
return ArduinoConstants.DEVICE_TYPE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getProviderTenantDomain() {
|
|
|
|
|
return DEVICE_TYPE_PROVIDER_DOMAIN;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean isSharedWithAllTenants() {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void init() throws DeviceManagementException {
|
|
|
|
|
deviceManager=new ArduinoManager();
|
|
|
|
@ -66,9 +53,13 @@ public class ArduinoManagerService implements DeviceManagementService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIds)
|
|
|
|
|
throws DeviceManagementException {
|
|
|
|
|
public ProvisioningConfig getProvisioningConfig() {
|
|
|
|
|
return new ProvisioningConfig(DEVICE_TYPE_PROVIDER_DOMAIN, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PushNotificationConfig getPushNotificationConfig() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|