Making the plug-in implementations compatible with the changes introduced to DeviceManagementService SPI

revert-dabc3590
prabathabey 9 years ago
parent 84942194ae
commit cfbc36ff2d

@ -16,19 +16,16 @@
package org.wso2.carbon.device.mgt.iot.androidsense.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.androidsense.plugin.constants.AndroidSenseConstants;
import java.util.List;
public class AndroidSenseManagerService implements DeviceManagementService {
private DeviceManager deviceManager;
@Override
@ -36,16 +33,6 @@ public class AndroidSenseManagerService implements DeviceManagementService {
return AndroidSenseConstants.DEVICE_TYPE;
}
@Override
public String getProviderTenantDomain() {
return AndroidSenseConstants.DEVICE_TYPE_PROVIDER_DOMAIN;
}
@Override
public boolean isSharedWithAllTenants() {
return true;
}
@Override
public void init() throws DeviceManagementException {
this.deviceManager=new AndroidSenseManager();
@ -61,9 +48,14 @@ public class AndroidSenseManagerService implements DeviceManagementService {
return null;
}
@Override public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> list)
throws DeviceManagementException {
@Override
public ProvisioningConfig getProvisioningConfig() {
return new ProvisioningConfig(AndroidSenseConstants.DEVICE_TYPE_PROVIDER_DOMAIN, true);
}
}
@Override
public PushNotificationConfig getPushNotificationConfig() {
return null;
}
}

@ -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();
@ -65,10 +52,14 @@ public class ArduinoManagerService implements DeviceManagementService {
return null;
}
@Override
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIds)
throws DeviceManagementException {
@Override
public ProvisioningConfig getProvisioningConfig() {
return new ProvisioningConfig(DEVICE_TYPE_PROVIDER_DOMAIN, true);
}
}
@Override
public PushNotificationConfig getPushNotificationConfig() {
return null;
}
}

@ -18,18 +18,14 @@
package org.wso2.carbon.device.mgt.iot.raspberrypi.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.raspberrypi.plugin.constants.RaspberrypiConstants;
import java.util.List;
public class RaspberrypiManagerService implements DeviceManagementService {
private DeviceManager deviceManager;
@ -39,16 +35,6 @@ public class RaspberrypiManagerService implements DeviceManagementService {
return RaspberrypiConstants.DEVICE_TYPE;
}
@Override
public String getProviderTenantDomain() {
return RaspberrypiConstants.DEVICE_TYPE_PROVIDER_DOMAIN;
}
@Override
public boolean isSharedWithAllTenants() {
return true;
}
@Override
public void init() throws DeviceManagementException {
deviceManager = new RaspberrypiManager();
@ -64,10 +50,15 @@ public class RaspberrypiManagerService implements DeviceManagementService {
return null;
}
@Override
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIds)
throws DeviceManagementException {
@Override
public ProvisioningConfig getProvisioningConfig() {
return new ProvisioningConfig(RaspberrypiConstants.DEVICE_TYPE_PROVIDER_DOMAIN, true);
}
@Override
public PushNotificationConfig getPushNotificationConfig() {
return null;
}
}
}

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

@ -21,10 +21,12 @@ package org.wso2.carbon.device.mgt.mobile.android.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.ProvisioningConfig;
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.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 java.util.List;
@ -43,16 +45,6 @@ public class AndroidDeviceManagementService implements DeviceManagementService {
return AndroidDeviceManagementService.DEVICE_TYPE_ANDROID;
}
@Override
public String getProviderTenantDomain() {
return SUPER_TENANT_DOMAIN;
}
@Override
public boolean isSharedWithAllTenants() {
return false;
}
@Override
public void init() throws DeviceManagementException {
this.deviceManager = new AndroidDeviceManager();
@ -69,9 +61,13 @@ public class AndroidDeviceManagementService implements DeviceManagementService {
}
@Override
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIdentifiers)
throws DeviceManagementException {
public ProvisioningConfig getProvisioningConfig() {
return new ProvisioningConfig(SUPER_TENANT_DOMAIN, true);
}
@Override
public PushNotificationConfig getPushNotificationConfig() {
return null;
}
}

@ -23,6 +23,7 @@ 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.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 java.util.List;
@ -41,16 +42,6 @@ public class AndroidDeviceManagementService implements DeviceManagementService {
return AndroidDeviceManagementService.DEVICE_TYPE_ANDROID;
}
@Override
public String getProviderTenantDomain() {
return SUPER_TENANT_DOMAIN;
}
@Override
public boolean isSharedWithAllTenants() {
return true;
}
@Override
public void init() throws DeviceManagementException {
this.deviceManager = new AndroidDeviceManager();
@ -67,9 +58,13 @@ public class AndroidDeviceManagementService implements DeviceManagementService {
}
@Override
public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIdentifiers)
throws DeviceManagementException {
public ProvisioningConfig getProvisioningConfig() {
return new ProvisioningConfig(SUPER_TENANT_DOMAIN, true);
}
@Override
public PushNotificationConfig getPushNotificationConfig() {
return null;
}
}

@ -21,10 +21,12 @@ package org.wso2.carbon.device.mgt.mobile.impl.windows;
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.ProvisioningConfig;
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.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 java.util.List;
@ -43,16 +45,6 @@ public class WindowsDeviceManagementService implements DeviceManagementService {
return WindowsDeviceManagementService.DEVICE_TYPE_WINDOWS;
}
@Override
public String getProviderTenantDomain() {
return SUPER_TENANT_DOMAIN;
}
@Override
public boolean isSharedWithAllTenants() {
return true;
}
@Override
public void init() throws DeviceManagementException {
this.deviceManager = new WindowsDeviceManager();
@ -68,9 +60,14 @@ public class WindowsDeviceManagementService implements DeviceManagementService {
return null;
}
@Override public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIdentifiers)
throws DeviceManagementException {
@Override
public ProvisioningConfig getProvisioningConfig() {
return new ProvisioningConfig(SUPER_TENANT_DOMAIN, true);
}
@Override
public PushNotificationConfig getPushNotificationConfig() {
return null;
}
}

@ -21,10 +21,12 @@ package org.wso2.carbon.device.mgt.mobile.windows.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.ProvisioningConfig;
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.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 java.util.List;
@ -43,16 +45,6 @@ public class WindowsDeviceManagementService implements DeviceManagementService {
return WindowsDeviceManagementService.DEVICE_TYPE_WINDOWS;
}
@Override
public String getProviderTenantDomain() {
return DEVICE_TYPE_PROVIDER_DOMAIN;
}
@Override
public boolean isSharedWithAllTenants() {
return true;
}
@Override
public void init() throws DeviceManagementException {
this.deviceManager = new WindowsDeviceManager();
@ -68,9 +60,14 @@ public class WindowsDeviceManagementService implements DeviceManagementService {
return null;
}
@Override public void notifyOperationToDevices(Operation operation, List<DeviceIdentifier> deviceIdentifiers)
throws DeviceManagementException {
@Override
public ProvisioningConfig getProvisioningConfig() {
return new ProvisioningConfig(DEVICE_TYPE_PROVIDER_DOMAIN, true);
}
@Override
public PushNotificationConfig getPushNotificationConfig() {
return null;
}
}

Loading…
Cancel
Save