|
|
@ -24,7 +24,6 @@ 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.device.mgt.common.DeviceManagementConstants;
|
|
|
|
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
|
|
|
|
import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService;
|
|
|
|
import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.common.MobileDeviceMgtPluginException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.common.MobileDeviceMgtPluginException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager;
|
|
|
@ -76,10 +75,9 @@ public class MobileDeviceManagementServiceComponent {
|
|
|
|
Map<String, MobileDataSourceConfig> dsConfigMap =
|
|
|
|
Map<String, MobileDataSourceConfig> dsConfigMap =
|
|
|
|
config.getMobileDeviceMgtRepository().getMobileDataSourceConfigMap();
|
|
|
|
config.getMobileDeviceMgtRepository().getMobileDataSourceConfigMap();
|
|
|
|
MobileDeviceManagementDAOFactory.setMobileDataSourceConfigMap(dsConfigMap);
|
|
|
|
MobileDeviceManagementDAOFactory.setMobileDataSourceConfigMap(dsConfigMap);
|
|
|
|
|
|
|
|
MobileDeviceManagementDAOFactory.init();
|
|
|
|
|
|
|
|
|
|
|
|
AndroidDAOFactory
|
|
|
|
AndroidDAOFactory.init();
|
|
|
|
.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes.
|
|
|
|
|
|
|
|
MOBILE_DEVICE_TYPE_ANDROID));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String setupOption = System.getProperty("setup");
|
|
|
|
String setupOption = System.getProperty("setup");
|
|
|
|
if (setupOption != null) {
|
|
|
|
if (setupOption != null) {
|
|
|
@ -89,8 +87,7 @@ public class MobileDeviceManagementServiceComponent {
|
|
|
|
"to begin");
|
|
|
|
"to begin");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Map<String, DataSource> dataSourceMap = MobileDeviceManagementDAOFactory.
|
|
|
|
Map<String, DataSource> dataSourceMap = MobileDeviceManagementDAOFactory.getDataSourceMap();
|
|
|
|
getDataSourceMap();
|
|
|
|
|
|
|
|
for (DataSource dataSource : dataSourceMap.values()) {
|
|
|
|
for (DataSource dataSource : dataSourceMap.values()) {
|
|
|
|
MobileDeviceManagementDAOUtil
|
|
|
|
MobileDeviceManagementDAOUtil
|
|
|
|
.setupMobileDeviceManagementSchema(dataSource);
|
|
|
|
.setupMobileDeviceManagementSchema(dataSource);
|
|
|
|