added changes in feature extraction for device types

revert-dabc3590
ayyoob 8 years ago
parent 76827640f0
commit 23138855a7

@ -17,6 +17,7 @@
package org.wso2.carbon.device.mgt.iot.androidsense.plugin.impl.feature;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceTypeIdentifier;
import org.wso2.carbon.device.mgt.common.Feature;
import org.wso2.carbon.device.mgt.common.FeatureManager;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.GenericFeatureManager;
@ -38,13 +39,13 @@ public class AndroidSenseFeatureManager implements FeatureManager {
@Override
public Feature getFeature(String name) throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeature(AndroidSenseConstants.DEVICE_TYPE, name);
return genericFeatureManager.getFeature(new DeviceTypeIdentifier(AndroidSenseConstants.DEVICE_TYPE), name);
}
@Override
public List<Feature> getFeatures() throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeatures(AndroidSenseConstants.DEVICE_TYPE);
return genericFeatureManager.getFeatures(new DeviceTypeIdentifier(AndroidSenseConstants.DEVICE_TYPE));
}
@Override

@ -17,6 +17,7 @@
package org.wso2.carbon.device.mgt.iot.arduino.plugin.impl.feature;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceTypeIdentifier;
import org.wso2.carbon.device.mgt.common.Feature;
import org.wso2.carbon.device.mgt.common.FeatureManager;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.GenericFeatureManager;
@ -38,13 +39,13 @@ public class ArduinoFeatureManager implements FeatureManager {
@Override
public Feature getFeature(String name) throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeature(ArduinoConstants.DEVICE_TYPE, name);
return genericFeatureManager.getFeature(new DeviceTypeIdentifier(ArduinoConstants.DEVICE_TYPE), name);
}
@Override
public List<Feature> getFeatures() throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeatures(ArduinoConstants.DEVICE_TYPE);
return genericFeatureManager.getFeatures(new DeviceTypeIdentifier(ArduinoConstants.DEVICE_TYPE));
}
@Override

@ -16,6 +16,7 @@
package org.wso2.carbon.device.mgt.iot.raspberrypi.plugin.impl.feature;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceTypeIdentifier;
import org.wso2.carbon.device.mgt.common.Feature;
import org.wso2.carbon.device.mgt.common.FeatureManager;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.GenericFeatureManager;
@ -37,13 +38,13 @@ public class RaspberrypiFeatureManager implements FeatureManager {
@Override
public Feature getFeature(String name) throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeature(RaspberrypiConstants.DEVICE_TYPE, name);
return genericFeatureManager.getFeature(new DeviceTypeIdentifier(RaspberrypiConstants.DEVICE_TYPE), name);
}
@Override
public List<Feature> getFeatures() throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeatures(RaspberrypiConstants.DEVICE_TYPE);
return genericFeatureManager.getFeatures(new DeviceTypeIdentifier(RaspberrypiConstants.DEVICE_TYPE));
}
@Override

@ -16,6 +16,7 @@
package org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl.feature;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceTypeIdentifier;
import org.wso2.carbon.device.mgt.common.Feature;
import org.wso2.carbon.device.mgt.common.FeatureManager;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.GenericFeatureManager;
@ -37,13 +38,13 @@ public class VirtualFirealarmFeatureManager implements FeatureManager{
@Override
public Feature getFeature(String name) throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeature(VirtualFireAlarmConstants.DEVICE_TYPE, name);
return genericFeatureManager.getFeature(new DeviceTypeIdentifier(VirtualFireAlarmConstants.DEVICE_TYPE), name);
}
@Override
public List<Feature> getFeatures() throws DeviceManagementException {
GenericFeatureManager genericFeatureManager = GenericFeatureManager.getInstance();
return genericFeatureManager.getFeatures(VirtualFireAlarmConstants.DEVICE_TYPE);
return genericFeatureManager.getFeatures(new DeviceTypeIdentifier(VirtualFireAlarmConstants.DEVICE_TYPE));
}
@Override

Loading…
Cancel
Save