APP Manager integration and move IOS related functionality to IOS plugin

revert-dabc3590
manoj 10 years ago
parent 028241f518
commit 18d3b0d20d

@ -70,6 +70,7 @@
</Import-Package>
<Export-Package>
!org.wso2.carbon.device.mgt.mobile.internal,
!org.wso2.carbon.device.mgt.mobile.impl,
org.wso2.carbon.device.mgt.mobile.*,
</Export-Package>
</instructions>

@ -25,8 +25,6 @@ import org.wso2.carbon.device.mgt.mobile.common.MobileDeviceMgtPluginException;
import org.wso2.carbon.device.mgt.mobile.config.datasource.JNDILookupDefinition;
import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig;
import org.wso2.carbon.device.mgt.mobile.dao.util.MobileDeviceManagementDAOUtil;
import org.wso2.carbon.device.mgt.mobile.impl.ios.dao.FeatureManagementDAOException;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

@ -21,7 +21,10 @@ package org.wso2.carbon.device.mgt.mobile.impl.android;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService;
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.dto.MobileDevice;
@ -34,7 +37,7 @@ import java.util.List;
/**
* This represents the Android implementation of DeviceManagerService.
*/
public class AndroidDeviceManager implements DeviceManager {
public class AndroidDeviceManager implements DeviceMgtService {
private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory;
private static final Log log = LogFactory.getLog(AndroidDeviceManager.class);
@ -209,4 +212,9 @@ public class AndroidDeviceManager implements DeviceManager {
return devices;
}
@Override
public void installApplication(Operation operation, List<DeviceIdentifier> deviceIdentifiers)
throws AppManagerConnectorException {
}
}

@ -46,8 +46,7 @@ public class AndroidFeatureDAOImpl implements MobileFeatureDAO {
}
@Override
public boolean addFeature(MobileFeature mobileFeature) throws
MobileDeviceManagementDAOException {
public boolean addFeature(MobileFeature mobileFeature) throws MobileDeviceManagementDAOException {
PreparedStatement stmt = null;
boolean status = false;
Connection conn = null;
@ -73,8 +72,7 @@ public class AndroidFeatureDAOImpl implements MobileFeatureDAO {
}
@Override
public boolean updateFeature(MobileFeature mobileFeature) throws
MobileDeviceManagementDAOException {
public boolean updateFeature(MobileFeature mobileFeature) throws MobileDeviceManagementDAOException {
boolean status = false;
Connection conn = null;
PreparedStatement stmt = null;

@ -21,7 +21,10 @@ package org.wso2.carbon.device.mgt.mobile.impl.windows;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.spi.DeviceManager;
import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService;
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.dto.MobileDevice;
@ -33,7 +36,7 @@ import java.util.List;
/**
* This represents the Windows implementation of DeviceManagerService.
*/
public class WindowsDeviceManager implements DeviceManager {
public class WindowsDeviceManager implements DeviceMgtService {
private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory;
@ -114,4 +117,9 @@ public class WindowsDeviceManager implements DeviceManager {
return status;
}
@Override
public void installApplication(Operation operation, List<DeviceIdentifier> deviceIdentifiers)
throws AppManagerConnectorException {
}
}

@ -28,7 +28,6 @@ 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.dao.MobileDeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManager;
import org.wso2.carbon.device.mgt.mobile.impl.ios.IOSDeviceManager;
import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManager;
import java.util.ArrayList;
@ -41,7 +40,6 @@ import java.util.Map;
public class MobileDeviceManagementBundleActivator implements BundleActivator, BundleListener {
private ServiceRegistration androidServiceRegRef;
private ServiceRegistration iOSServiceRegRef;
private ServiceRegistration windowsServiceRegRef;
private static List<DataSourceListener> dataSourceListeners =
@ -70,9 +68,6 @@ public class MobileDeviceManagementBundleActivator implements BundleActivator, B
androidServiceRegRef =
bundleContext.registerService(DeviceManager.class.getName(),
new AndroidDeviceManager(), null);
iOSServiceRegRef =
bundleContext.registerService(DeviceManager.class.getName(),
new IOSDeviceManager(), null);
windowsServiceRegRef =
bundleContext.registerService(DeviceManager.class.getName(),
new WindowsDeviceManager(), null);
@ -92,7 +87,6 @@ public class MobileDeviceManagementBundleActivator implements BundleActivator, B
}
try {
androidServiceRegRef.unregister();
iOSServiceRegRef.unregister();
windowsServiceRegRef.unregister();
bundleContext.removeBundleListener(this);

@ -33,8 +33,6 @@ import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.mobile.dao.util.MobileDeviceManagementDAOUtil;
import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManager;
import org.wso2.carbon.device.mgt.mobile.impl.android.dao.AndroidDAOFactory;
import org.wso2.carbon.device.mgt.mobile.impl.ios.IOSDeviceManager;
import org.wso2.carbon.device.mgt.mobile.impl.ios.dao.IOSDAOFactory;
import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManager;
import org.wso2.carbon.ndatasource.core.DataSourceService;
@ -59,7 +57,6 @@ public class MobileDeviceManagementServiceComponent {
private ServiceRegistration serverStartupObserverRef;
private ServiceRegistration androidServiceRegRef;
private ServiceRegistration iOSServiceRegRef;
private ServiceRegistration windowsServiceRegRef;
private static final Log log = LogFactory.getLog(MobileDeviceManagementServiceComponent.class);
@ -78,8 +75,7 @@ public class MobileDeviceManagementServiceComponent {
Map<String, MobileDataSourceConfig> dsConfigMap =
config.getMobileDeviceMgtRepository().getMobileDataSourceConfigMap();
MobileDeviceManagementDAOFactory.setMobileDataSourceConfigMap(dsConfigMap);
IOSDAOFactory.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes.
MOBILE_DEVICE_TYPE_IOS));
AndroidDAOFactory
.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes.
MOBILE_DEVICE_TYPE_ANDROID));
@ -105,8 +101,6 @@ public class MobileDeviceManagementServiceComponent {
androidServiceRegRef =
bundleContext.registerService(DeviceManager.class.getName(), new AndroidDeviceManager(), null);
iOSServiceRegRef =
bundleContext.registerService(DeviceManager.class.getName(), new IOSDeviceManager(), null);
windowsServiceRegRef =
bundleContext.registerService(DeviceManager.class.getName(), new WindowsDeviceManager(), null);
@ -126,9 +120,6 @@ public class MobileDeviceManagementServiceComponent {
if (androidServiceRegRef != null) {
androidServiceRegRef.unregister();
}
if (iOSServiceRegRef != null) {
iOSServiceRegRef.unregister();
}
if (windowsServiceRegRef != null) {
windowsServiceRegRef.unregister();
}

Loading…
Cancel
Save