|
|
@ -58,7 +58,7 @@ public class WindowsFeatureManager implements FeatureManager {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean addFeatures(List<Feature> features) throws DeviceManagementException {
|
|
|
|
public boolean addFeatures(List<Feature> features) throws DeviceManagementException {
|
|
|
|
List<MobileFeature> mobileFeatures = new ArrayList<MobileFeature>();
|
|
|
|
List<MobileFeature> mobileFeatures = new ArrayList<MobileFeature>(features.size());
|
|
|
|
for (Feature feature : features) {
|
|
|
|
for (Feature feature : features) {
|
|
|
|
mobileFeatures.add(MobileDeviceManagementUtil.convertToMobileFeature(feature));
|
|
|
|
mobileFeatures.add(MobileDeviceManagementUtil.convertToMobileFeature(feature));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -92,10 +92,10 @@ public class WindowsFeatureManager implements FeatureManager {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<Feature> getFeatures() throws DeviceManagementException {
|
|
|
|
public List<Feature> getFeatures() throws DeviceManagementException {
|
|
|
|
|
|
|
|
|
|
|
|
List<Feature> featureList = new ArrayList<Feature>();
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
WindowsDAOFactory.openConnection();
|
|
|
|
WindowsDAOFactory.openConnection();
|
|
|
|
List<MobileFeature> mobileFeatures = featureDAO.getAllFeatures();
|
|
|
|
List<MobileFeature> mobileFeatures = featureDAO.getAllFeatures();
|
|
|
|
|
|
|
|
List<Feature> featureList = new ArrayList<Feature>(mobileFeatures.size());
|
|
|
|
for (MobileFeature mobileFeature : mobileFeatures) {
|
|
|
|
for (MobileFeature mobileFeature : mobileFeatures) {
|
|
|
|
featureList.add(MobileDeviceManagementUtil.convertToFeature(mobileFeature));
|
|
|
|
featureList.add(MobileDeviceManagementUtil.convertToFeature(mobileFeature));
|
|
|
|
}
|
|
|
|
}
|
|
|
|