Incorporating API changes introduced into the device management core

revert-dabc3590
prabathabey 10 years ago
parent 7f436f4f75
commit fd7ab1aa54

@ -19,6 +19,9 @@
package org.wso2.carbon.device.mgt.mobile; package org.wso2.carbon.device.mgt.mobile;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager;
import java.util.List; import java.util.List;

@ -20,12 +20,12 @@ package org.wso2.carbon.device.mgt.mobile.impl.android;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOException; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOException;
import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice; import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice;
import org.wso2.carbon.device.mgt.mobile.util.MobileDeviceManagementUtil; import org.wso2.carbon.device.mgt.mobile.util.MobileDeviceManagementUtil;
import org.wso2.carbon.device.mgt.common.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -33,21 +33,21 @@ import java.util.List;
/** /**
* This represents the Android implementation of DeviceManagerService. * This represents the Android implementation of DeviceManagerService.
*/ */
public class AndroidDeviceManagerService implements DeviceManagerService { public class AndroidDeviceManagerService implements DeviceManager {
private static final Log log = LogFactory.getLog(AndroidDeviceManagerService.class); private static final Log log = LogFactory.getLog(AndroidDeviceManagerService.class);
private OperationManager operationManager;
public AndroidDeviceManagerService() {
this.operationManager = new AndroidMobileOperationManager();
}
@Override @Override
public String getProviderType() { public String getProviderType() {
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID; return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID;
} }
@Override @Override
public FeatureManager getFeatureManager() {
return null;
}
@Override
public boolean enrollDevice(Device device) throws DeviceManagementException { public boolean enrollDevice(Device device) throws DeviceManagementException {
boolean status; boolean status;
MobileDevice mobileDevice = MobileDeviceManagementUtil.convertToMobileDevice(device); MobileDevice mobileDevice = MobileDeviceManagementUtil.convertToMobileDevice(device);
@ -180,9 +180,4 @@ public class AndroidDeviceManagerService implements DeviceManagerService {
return devices; return devices;
} }
@Override
public OperationManager getOperationManager() throws DeviceManagementException {
return operationManager;
}
} }

@ -21,6 +21,8 @@ package org.wso2.carbon.device.mgt.mobile.impl.android;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.mobile.AbstractMobileOperationManager; import org.wso2.carbon.device.mgt.mobile.AbstractMobileOperationManager;
import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOException; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOException;
import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory;
@ -35,160 +37,156 @@ import java.util.List;
public class AndroidMobileOperationManager extends AbstractMobileOperationManager { public class AndroidMobileOperationManager extends AbstractMobileOperationManager {
private static final Log log = LogFactory.getLog(AndroidMobileOperationManager.class); private static final Log log = LogFactory.getLog(AndroidMobileOperationManager.class);
@Override @Override
public boolean addOperation(Operation operation, List<DeviceIdentifier> devices) throws public boolean addOperation(Operation operation,
OperationManagementException { List<DeviceIdentifier> devices) throws OperationManagementException {
boolean status = false; boolean status = false;
try { try {
MobileDeviceOperationMapping mobileDeviceOperationMapping = null; MobileDeviceOperationMapping mobileDeviceOperationMapping = null;
MobileOperation mobileOperation = MobileOperation mobileOperation =
MobileDeviceManagementUtil.convertToMobileOperation(operation); MobileDeviceManagementUtil.convertToMobileOperation(operation);
int operationId = MobileDeviceManagementDAOFactory.getMobileOperationDAO() int operationId = MobileDeviceManagementDAOFactory.getMobileOperationDAO()
.addMobileOperation(mobileOperation); .addMobileOperation(mobileOperation);
if (operationId > 0) { if (operationId > 0) {
for (MobileOperationProperty operationProperty : mobileOperation.getProperties()) { for (MobileOperationProperty operationProperty : mobileOperation.getProperties()) {
operationProperty.setOperationId(operationId); operationProperty.setOperationId(operationId);
status = MobileDeviceManagementDAOFactory.getMobileOperationPropertyDAO() status = MobileDeviceManagementDAOFactory.getMobileOperationPropertyDAO()
.addMobileOperationProperty( .addMobileOperationProperty(
operationProperty); operationProperty);
} }
for (DeviceIdentifier deviceIdentifier : devices) { for (DeviceIdentifier deviceIdentifier : devices) {
mobileDeviceOperationMapping = new MobileDeviceOperationMapping(); mobileDeviceOperationMapping = new MobileDeviceOperationMapping();
mobileDeviceOperationMapping.setOperationId(operationId); mobileDeviceOperationMapping.setOperationId(operationId);
mobileDeviceOperationMapping.setDeviceId(deviceIdentifier.getId()); mobileDeviceOperationMapping.setDeviceId(deviceIdentifier.getId());
mobileDeviceOperationMapping.setStatus(MobileDeviceOperationMapping.Status.NEW); mobileDeviceOperationMapping.setStatus(MobileDeviceOperationMapping.Status.NEW);
status = MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO() status = MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO()
.addMobileDeviceOperationMapping( .addMobileDeviceOperationMapping(
mobileDeviceOperationMapping); mobileDeviceOperationMapping);
} }
} }
} catch (MobileDeviceManagementDAOException e) { } catch (MobileDeviceManagementDAOException e) {
String msg = String msg = "Error while adding an operation " + operation.getCode() + "to Android devices";
"Error while adding an operation " + operation.getCode() + "to Android devices"; log.error(msg, e);
log.error(msg, e); throw new OperationManagementException(msg, e);
throw new OperationManagementException(msg, e); }
} return status;
return status; }
}
@Override @Override
public List<Operation> getOperations(DeviceIdentifier deviceIdentifier) public List<Operation> getOperations(DeviceIdentifier deviceIdentifier)
throws OperationManagementException { throws OperationManagementException {
List<Operation> operations = new ArrayList<Operation>(); List<Operation> operations = new ArrayList<Operation>();
List<MobileDeviceOperationMapping> mobileDeviceOperationMappings = null; List<MobileDeviceOperationMapping> mobileDeviceOperationMappings = null;
List<MobileOperationProperty> operationProperties = null; List<MobileOperationProperty> operationProperties = null;
MobileOperation mobileOperation = null; MobileOperation mobileOperation = null;
try { try {
mobileDeviceOperationMappings = MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO() mobileDeviceOperationMappings = MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO()
.getAllMobileDeviceOperationMappingsOfDevice( .getAllMobileDeviceOperationMappingsOfDevice(
deviceIdentifier deviceIdentifier
.getId()); .getId());
if (mobileDeviceOperationMappings.size() > 0) { if (mobileDeviceOperationMappings.size() > 0) {
List<Integer> operationIds = MobileDeviceManagementUtil List<Integer> operationIds = MobileDeviceManagementUtil
.getMobileOperationIdsFromMobileDeviceOperations( .getMobileOperationIdsFromMobileDeviceOperations(
mobileDeviceOperationMappings); mobileDeviceOperationMappings);
for (Integer operationId : operationIds) { for (Integer operationId : operationIds) {
mobileOperation = MobileDeviceManagementDAOFactory.getMobileOperationDAO() mobileOperation = MobileDeviceManagementDAOFactory.getMobileOperationDAO().getMobileOperation(
.getMobileOperation( operationId);
operationId); operationProperties =
operationProperties = MobileDeviceManagementDAOFactory.getMobileOperationPropertyDAO()
MobileDeviceManagementDAOFactory.getMobileOperationPropertyDAO() .getAllMobileOperationPropertiesOfOperation(
.getAllMobileOperationPropertiesOfOperation( operationId);
operationId); mobileOperation.setProperties(operationProperties);
mobileOperation.setProperties(operationProperties); operations.add(MobileDeviceManagementUtil.convertMobileOperationToOperation(mobileOperation));
operations.add(MobileDeviceManagementUtil }
.convertMobileOperationToOperation(mobileOperation)); }
} } catch (MobileDeviceManagementDAOException e) {
} String msg =
} catch (MobileDeviceManagementDAOException e) { "Error while fetching the operations for the android device " +
String msg = deviceIdentifier.getId();
"Error while fetching the operations for the android device " + log.error(msg, e);
deviceIdentifier.getId(); throw new OperationManagementException(msg, e);
log.error(msg, e); }
throw new OperationManagementException(msg, e); return operations;
} }
return operations;
}
@Override @Override
public List<Operation> getPendingOperations(DeviceIdentifier deviceIdentifier) public List<Operation> getPendingOperations(DeviceIdentifier deviceIdentifier)
throws OperationManagementException { throws OperationManagementException {
List<Operation> operations = new ArrayList<Operation>(); List<Operation> operations = new ArrayList<Operation>();
List<MobileDeviceOperationMapping> mobileDeviceOperationMappings = null; List<MobileDeviceOperationMapping> mobileDeviceOperationMappings = null;
List<MobileOperationProperty> operationProperties = null; List<MobileOperationProperty> operationProperties = null;
MobileOperation mobileOperation = null; MobileOperation mobileOperation = null;
try { try {
//Get the list of pending operations for the given device //Get the list of pending operations for the given device
mobileDeviceOperationMappings = MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO() mobileDeviceOperationMappings = MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO()
.getAllPendingOperationMappingsOfMobileDevice( .getAllPendingOperationMappingsOfMobileDevice(
deviceIdentifier deviceIdentifier
.getId()); .getId());
//Go through each operation mapping for retrieving the data corresponding to each operation //Go through each operation mapping for retrieving the data corresponding to each operation
for (MobileDeviceOperationMapping operation : mobileDeviceOperationMappings) { for (MobileDeviceOperationMapping operation : mobileDeviceOperationMappings) {
//Get the MobileOperation data //Get the MobileOperation data
mobileOperation = MobileDeviceManagementDAOFactory.getMobileOperationDAO() mobileOperation = MobileDeviceManagementDAOFactory.getMobileOperationDAO()
.getMobileOperation(operation .getMobileOperation(operation
.getOperationId()); .getOperationId());
//Get properties of the operation //Get properties of the operation
operationProperties = operationProperties =
MobileDeviceManagementDAOFactory.getMobileOperationPropertyDAO() MobileDeviceManagementDAOFactory.getMobileOperationPropertyDAO()
.getAllMobileOperationPropertiesOfOperation( .getAllMobileOperationPropertiesOfOperation(
operation.getOperationId()); operation.getOperationId());
mobileOperation.setProperties(operationProperties); mobileOperation.setProperties(operationProperties);
operations.add(MobileDeviceManagementUtil operations.add(MobileDeviceManagementUtil
.convertMobileOperationToOperation(mobileOperation)); .convertMobileOperationToOperation(mobileOperation));
//Update the MobileDeviceOperationMapping data to the In-Progress state //Update the MobileDeviceOperationMapping data to the In-Progress state
operation.setStatus(MobileDeviceOperationMapping.Status.INPROGRESS); operation.setStatus(MobileDeviceOperationMapping.Status.INPROGRESS);
operation.setSentDate(new Date().getTime()); operation.setSentDate(new Date().getTime());
MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO() MobileDeviceManagementDAOFactory.getMobileDeviceOperationDAO()
.updateMobileDeviceOperationMappingToInProgress( .updateMobileDeviceOperationMappingToInProgress(
operation.getDeviceId(), operation.getDeviceId(),
operation.getOperationId()); operation.getOperationId());
} }
} catch (MobileDeviceManagementDAOException e) { } catch (MobileDeviceManagementDAOException e) {
String msg = String msg =
"Error while fetching the operations for the android device " + "Error while fetching the operations for the android device " +
deviceIdentifier.getId(); deviceIdentifier.getId();
log.error(msg, e); log.error(msg, e);
throw new OperationManagementException(msg, e); throw new OperationManagementException(msg, e);
} }
return operations; return operations;
} }
@Override
public List<Feature> getFeatures(String deviceType) throws FeatureManagementException {
MobileFeatureDAO featureDAO = MobileDeviceManagementDAOFactory.getFeatureDAO();
MobileFeaturePropertyDAO featurePropertyDAO = MobileDeviceManagementDAOFactory.getFeaturePropertyDAO();
List<Feature> features = new ArrayList<Feature>();
try {
List<MobileFeature> mobileFeatures = featureDAO.getMobileFeatureByDeviceType(deviceType);
for (MobileFeature mobileFeature : mobileFeatures) {
Feature feature = new Feature();
feature.setId(mobileFeature.getId());
feature.setDeviceType(mobileFeature.getDeviceType());
feature.setName(mobileFeature.getName());
feature.setDescription(mobileFeature.getDescription());
List<Feature.MetadataEntry> metadataEntries = new ArrayList<Feature.MetadataEntry>();
List<MobileFeatureProperty> properties =
featurePropertyDAO.getFeaturePropertiesOfFeature(mobileFeature.getId());
for (MobileFeatureProperty property : properties) {
Feature.MetadataEntry metaEntry = new Feature.MetadataEntry();
metaEntry.setId(property.getFeatureID());
metaEntry.setValue(property.getProperty());
metadataEntries.add(metaEntry);
}
feature.setMetadataEntries(metadataEntries);
features.add(feature);
}
} catch (MobileDeviceManagementDAOException e) {
String msg = "Error while fetching the features for the device type " + deviceType;
log.error(msg, e);
throw new FeatureManagementException(msg, e);
}
return features;
}
@Override
public List<Feature> getFeaturesForDeviceType(String deviceType) throws FeatureManagementException {
MobileFeatureDAO featureDAO = MobileDeviceManagementDAOFactory.getFeatureDAO();
MobileFeaturePropertyDAO featurePropertyDAO = MobileDeviceManagementDAOFactory.getFeaturePropertyDAO();
List<Feature> features = new ArrayList<Feature>();
try {
List<MobileFeature> mobileFeatures = featureDAO.getMobileFeatureByDeviceType(deviceType);
for (MobileFeature mobileFeature : mobileFeatures) {
Feature feature = new Feature();
feature.setId(mobileFeature.getId());
feature.setDeviceType(mobileFeature.getDeviceType());
feature.setName(mobileFeature.getName());
feature.setDescription(mobileFeature.getDescription());
List<Feature.MetadataEntry> metadataEntries = new ArrayList<Feature.MetadataEntry>();
List<MobileFeatureProperty> properties =
featurePropertyDAO.getFeaturePropertiesOfFeature(mobileFeature.getId());
for (MobileFeatureProperty property : properties) {
Feature.MetadataEntry metaEntry = new Feature.MetadataEntry();
metaEntry.setId(property.getFeatureID());
metaEntry.setValue(property.getProperty());
metadataEntries.add(metaEntry);
}
feature.setMetadataEntries(metadataEntries);
features.add(feature);
}
} catch (MobileDeviceManagementDAOException e) {
String msg =
"Error while fetching the features for the device type " +
deviceType;
log.error(msg, e);
throw new FeatureManagementException(msg, e);
}
return features;
}
} }

@ -19,20 +19,25 @@
package org.wso2.carbon.device.mgt.mobile.impl.ios; package org.wso2.carbon.device.mgt.mobile.impl.ios;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import java.util.List; import java.util.List;
/** /**
* This represents the iOS implementation of DeviceManagerService. * This represents the iOS implementation of DeviceManagerService.
*/ */
public class IOSDeviceManagerService implements DeviceManagerService { public class IOSDeviceManagerService implements DeviceManager {
@Override @Override
public String getProviderType() { public String getProviderType() {
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS; return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS;
} }
@Override
public FeatureManager getFeatureManager() {
return null;
}
@Override @Override
public boolean enrollDevice(Device device) throws DeviceManagementException { public boolean enrollDevice(Device device) throws DeviceManagementException {
return true; return true;
@ -80,11 +85,6 @@ public class IOSDeviceManagerService implements DeviceManagerService {
return true; return true;
} }
@Override
public OperationManager getOperationManager() throws DeviceManagementException {
return null;
}
@Override @Override
public boolean updateDeviceInfo(Device device) throws DeviceManagementException { public boolean updateDeviceInfo(Device device) throws DeviceManagementException {
return true; return true;

@ -19,20 +19,25 @@
package org.wso2.carbon.device.mgt.mobile.impl.windows; package org.wso2.carbon.device.mgt.mobile.impl.windows;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import java.util.List; import java.util.List;
/** /**
* This represents the Windows implementation of DeviceManagerService. * This represents the Windows implementation of DeviceManagerService.
*/ */
public class WindowsDeviceManagerService implements DeviceManagerService { public class WindowsDeviceManagerService implements DeviceManager {
@Override @Override
public String getProviderType() { public String getProviderType() {
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS; return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS;
} }
@Override
public FeatureManager getFeatureManager() {
return null;
}
@Override @Override
public boolean enrollDevice(Device device) throws DeviceManagementException { public boolean enrollDevice(Device device) throws DeviceManagementException {
return true; return true;
@ -79,11 +84,6 @@ public class WindowsDeviceManagerService implements DeviceManagerService {
return true; return true;
} }
@Override
public OperationManager getOperationManager() throws DeviceManagementException {
return null;
}
@Override @Override
public boolean updateDeviceInfo(Device device) throws DeviceManagementException { public boolean updateDeviceInfo(Device device) throws DeviceManagementException {
return true; return true;

@ -25,17 +25,17 @@ import org.wso2.carbon.apimgt.api.APIManagementException;
import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.APIProvider;
import org.wso2.carbon.apimgt.impl.APIManagerFactory; import org.wso2.carbon.apimgt.impl.APIManagerFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import org.wso2.carbon.device.mgt.mobile.DataSourceListener; import org.wso2.carbon.device.mgt.mobile.DataSourceListener;
import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.config.APIConfig; import org.wso2.carbon.device.mgt.mobile.config.APIConfig;
import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager; import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager;
import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceManagementConfig; import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceManagementConfig;
import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig; import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig;
import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.impl.ios.IOSDeviceManagerService; import org.wso2.carbon.device.mgt.mobile.impl.ios.IOSDeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.util.DeviceManagementAPIPublisherUtil;
import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManagerService; import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManagerService;
import org.wso2.carbon.device.mgt.mobile.util.DeviceManagementAPIPublisherUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -69,13 +69,13 @@ public class MobileDeviceManagementBundleActivator implements BundleActivator, B
MobileDeviceManagementDAOFactory.setMobileDataSourceConfig(dsConfig); MobileDeviceManagementDAOFactory.setMobileDataSourceConfig(dsConfig);
androidServiceRegRef = androidServiceRegRef =
bundleContext.registerService(DeviceManagerService.class.getName(), bundleContext.registerService(DeviceManager.class.getName(),
new AndroidDeviceManagerService(), null); new AndroidDeviceManagerService(), null);
iOSServiceRegRef = iOSServiceRegRef =
bundleContext.registerService(DeviceManagerService.class.getName(), bundleContext.registerService(DeviceManager.class.getName(),
new IOSDeviceManagerService(), null); new IOSDeviceManagerService(), null);
windowsServiceRegRef = windowsServiceRegRef =
bundleContext.registerService(DeviceManagerService.class.getName(), bundleContext.registerService(DeviceManager.class.getName(),
new WindowsDeviceManagerService(), null); new WindowsDeviceManagerService(), null);
/* Initialize all API configurations with corresponding API Providers */ /* Initialize all API configurations with corresponding API Providers */

@ -23,14 +23,10 @@ import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration; import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext; import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.apimgt.api.APIManagementException;
import org.wso2.carbon.apimgt.api.APIProvider;
import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService; import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService;
import org.wso2.carbon.apimgt.impl.APIManagerFactory;
import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil;
import org.wso2.carbon.core.ServerStartupObserver; import org.wso2.carbon.core.ServerStartupObserver;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import org.wso2.carbon.device.mgt.mobile.MobileDeviceManagementStartupObserver; import org.wso2.carbon.device.mgt.mobile.MobileDeviceManagementStartupObserver;
import org.wso2.carbon.device.mgt.mobile.config.APIConfig; import org.wso2.carbon.device.mgt.mobile.config.APIConfig;
import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager; import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager;
@ -100,13 +96,13 @@ public class MobileDeviceManagementServiceComponent {
} }
androidServiceRegRef = androidServiceRegRef =
bundleContext.registerService(DeviceManagerService.class.getName(), bundleContext.registerService(DeviceManager.class.getName(),
new AndroidDeviceManagerService(), null); new AndroidDeviceManagerService(), null);
iOSServiceRegRef = iOSServiceRegRef =
bundleContext.registerService(DeviceManagerService.class.getName(), bundleContext.registerService(DeviceManager.class.getName(),
new IOSDeviceManagerService(), null); new IOSDeviceManagerService(), null);
windowsServiceRegRef = windowsServiceRegRef =
bundleContext.registerService(DeviceManagerService.class.getName(), bundleContext.registerService(DeviceManager.class.getName(),
new WindowsDeviceManagerService(), null); new WindowsDeviceManagerService(), null);
serverStartupObserverRef = bundleContext.registerService(ServerStartupObserver.class, serverStartupObserverRef = bundleContext.registerService(ServerStartupObserver.class,

@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice; import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice;
import org.wso2.carbon.device.mgt.mobile.dto.MobileDeviceOperationMapping; import org.wso2.carbon.device.mgt.mobile.dto.MobileDeviceOperationMapping;
import org.wso2.carbon.device.mgt.mobile.dto.MobileOperation; import org.wso2.carbon.device.mgt.mobile.dto.MobileOperation;
@ -117,7 +117,7 @@ public class MobileDeviceManagementUtil {
return device; return device;
} }
public static MobileOperation convertToMobileOperation(org.wso2.carbon.device.mgt.common.Operation operation) { public static MobileOperation convertToMobileOperation(Operation operation) {
MobileOperation mobileOperation = new MobileOperation(); MobileOperation mobileOperation = new MobileOperation();
MobileOperationProperty operationProperty = null; MobileOperationProperty operationProperty = null;
List<MobileOperationProperty> properties = new LinkedList<MobileOperationProperty>(); List<MobileOperationProperty> properties = new LinkedList<MobileOperationProperty>();

@ -17,7 +17,8 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
@ -35,7 +36,7 @@
<url>http://wso2.org</url> <url>http://wso2.org</url>
<modules> <modules>
<module>org.wso2.carbon.device.mgt.mobile.feature</module> <module>org.wso2.carbon.device.mgt.mobile.feature</module>
</modules> </modules>
</project> </project>

@ -201,22 +201,22 @@
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.core</artifactId> <artifactId>org.wso2.carbon.device.mgt.core</artifactId>
<version>${cdm.core.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.common</artifactId> <artifactId>org.wso2.carbon.device.mgt.common</artifactId>
<version>${cdm.core.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId> <artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
<version>${cdm.core.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId> <artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
<version>${cdm.core.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<!--MDM dependencies--> <!--MDM dependencies-->
@ -422,10 +422,6 @@
<carbon.kernel.version>4.3.0</carbon.kernel.version> <carbon.kernel.version>4.3.0</carbon.kernel.version>
<carbon.kernel.version.range>[4.3.0, 4.4.0)</carbon.kernel.version.range> <carbon.kernel.version.range>[4.3.0, 4.4.0)</carbon.kernel.version.range>
<!--CDM versions-->
<cdm.core.version>0.9.0</cdm.core.version>
<cdm.core.version.range>[0.8.0, 2.0.0)</cdm.core.version.range>
<carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version> <carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version>
<!--Maven build number plugin--> <!--Maven build number plugin-->
@ -445,7 +441,6 @@
<orbit.tomcat.version>7.0.52.wso2v5</orbit.tomcat.version> <orbit.tomcat.version>7.0.52.wso2v5</orbit.tomcat.version>
<orbit.tomcat.jdbc.pooling.version>7.0.34.wso2v2</orbit.tomcat.jdbc.pooling.version> <orbit.tomcat.jdbc.pooling.version>7.0.34.wso2v2</orbit.tomcat.jdbc.pooling.version>
<!--CXF properties--> <!--CXF properties-->
<cxf.version>2.6.1</cxf.version> <cxf.version>2.6.1</cxf.version>
<jackson.version>1.9.0</jackson.version> <jackson.version>1.9.0</jackson.version>
@ -470,7 +465,8 @@
<carbon.governance.version>4.3.0</carbon.governance.version> <carbon.governance.version>4.3.0</carbon.governance.version>
<!-- Device Management --> <!-- Device Management -->
<carbon.device.mgt.version>0.9.0</carbon.device.mgt.version> <carbon.device.mgt.version>0.9.2-SNAPSHOT</carbon.device.mgt.version>
<carbon.device.mgt.version.range>0.9.2-SNAPSHOT</carbon.device.mgt.version.range>
<!-- Mobile Device Management --> <!-- Mobile Device Management -->
<carbon.mobile.device.mgt.version>1.9.1-SNAPSHOT</carbon.mobile.device.mgt.version> <carbon.mobile.device.mgt.version>1.9.1-SNAPSHOT</carbon.mobile.device.mgt.version>

Loading…
Cancel
Save