Code cleanup

revert-dabc3590
prabathabey 10 years ago
parent f9f0e2a6a4
commit f7dbfa7985

@ -21,10 +21,10 @@ 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.app.mgt.AppManagerConnectorException; import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; 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.DeviceManagementService;
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.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;
@ -37,12 +37,12 @@ import java.util.List;
/** /**
* This represents the Android implementation of DeviceManagerService. * This represents the Android implementation of DeviceManagerService.
*/ */
public class AndroidDeviceManager implements DeviceMgtService { public class AndroidDeviceManagementService implements DeviceManagementService {
private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory; private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory;
private static final Log log = LogFactory.getLog(AndroidDeviceManager.class); private static final Log log = LogFactory.getLog(AndroidDeviceManagementService.class);
public AndroidDeviceManager() { public AndroidDeviceManagementService() {
mobileDeviceManagementDAOFactory = new AndroidDAOFactory(); mobileDeviceManagementDAOFactory = new AndroidDAOFactory();
} }
@ -259,9 +259,27 @@ public class AndroidDeviceManager implements DeviceMgtService {
return devices; return devices;
} }
@Override
public Application[] getApplications(String s, int i, int i2) throws ApplicationManagementException {
return new Application[0];
}
@Override
public void updateApplicationStatus(DeviceIdentifier deviceIdentifier, Application application,
String s) throws ApplicationManagementException {
}
@Override
public String getApplicationStatus(DeviceIdentifier deviceIdentifier,
Application application) throws ApplicationManagementException {
return null;
}
@Override @Override
public void installApplication(Operation operation, List<DeviceIdentifier> deviceIdentifiers) public void installApplication(Operation operation, List<DeviceIdentifier> deviceIdentifiers)
throws AppManagerConnectorException { throws ApplicationManagementException {
} }
} }

@ -21,10 +21,10 @@ package org.wso2.carbon.device.mgt.mobile.impl.windows;
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.app.mgt.AppManagerConnectorException; import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; 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.DeviceManagementService;
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.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;
@ -36,14 +36,14 @@ import java.util.List;
/** /**
* This represents the Windows implementation of DeviceManagerService. * This represents the Windows implementation of DeviceManagerService.
*/ */
public class WindowsDeviceManager implements DeviceMgtService { public class WindowsDeviceManagementService implements DeviceManagementService {
private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory; private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory;
public WindowsDeviceManager() { public WindowsDeviceManagementService() {
mobileDeviceManagementDAOFactory = new WindowsDAOFactory(); mobileDeviceManagementDAOFactory = new WindowsDAOFactory();
} }
private static final Log log = LogFactory.getLog(WindowsDeviceManager.class); private static final Log log = LogFactory.getLog(WindowsDeviceManagementService.class);
@Override @Override
public String getProviderType() { public String getProviderType() {
@ -123,8 +123,26 @@ public class WindowsDeviceManager implements DeviceMgtService {
} }
@Override @Override
public void installApplication(Operation operation, List<DeviceIdentifier> deviceIdentifiers) public Application[] getApplications(String s, int i, int i2) throws ApplicationManagementException {
throws AppManagerConnectorException { return new Application[0];
}
@Override
public void updateApplicationStatus(DeviceIdentifier deviceIdentifier,
Application application, String s) throws ApplicationManagementException {
}
@Override
public String getApplicationStatus(DeviceIdentifier deviceIdentifier,
Application application) throws ApplicationManagementException {
return null;
}
@Override
public void installApplication(Operation operation,
List<DeviceIdentifier> deviceIdentifiers) throws ApplicationManagementException {
} }
} }

@ -23,22 +23,17 @@ 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.device.mgt.common.DeviceManagementConstants; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
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.common.MobilePluginConstants;
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.dao.util.MobileDeviceManagementDAOUtil; 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.AndroidDeviceManagementService;
import org.wso2.carbon.device.mgt.mobile.impl.android.dao.AndroidDAOFactory; import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManagementService;
import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManager;
import org.wso2.carbon.device.mgt.mobile.impl.windows.dao.WindowsDAOFactory;
import org.wso2.carbon.ndatasource.core.DataSourceService; import org.wso2.carbon.ndatasource.core.DataSourceService;
import javax.sql.DataSource;
import java.util.Map; import java.util.Map;
/** /**
@ -99,9 +94,11 @@ public class MobileDeviceManagementServiceComponent {
} }
androidServiceRegRef = androidServiceRegRef =
bundleContext.registerService(DeviceMgtService.class.getName(), new AndroidDeviceManager(), null); bundleContext.registerService(DeviceManagementService.class.getName(),
new AndroidDeviceManagementService(), null);
windowsServiceRegRef = windowsServiceRegRef =
bundleContext.registerService(DeviceMgtService.class.getName(), new WindowsDeviceManager(), null); bundleContext.registerService(DeviceManagementService.class.getName(),
new WindowsDeviceManagementService(), null);
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Mobile Device Management Service Component has been successfully activated"); log.debug("Mobile Device Management Service Component has been successfully activated");

Loading…
Cancel
Save