|
|
@ -18,8 +18,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.wso2.carbon.device.mgt.mobile.impl.windows;
|
|
|
|
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.*;
|
|
|
|
import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService;
|
|
|
|
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.MobileDeviceManagementDAOFactory;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.util.MobileDeviceManagementUtil;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
@ -28,65 +34,78 @@ import java.util.List;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class WindowsDeviceManagerService implements DeviceManagerService {
|
|
|
|
public class WindowsDeviceManagerService implements DeviceManagerService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
private static final Log log = LogFactory.getLog(WindowsDeviceManagerService.class);
|
|
|
|
public String getProviderType() {
|
|
|
|
|
|
|
|
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public String getProviderType() {
|
|
|
|
|
|
|
|
return DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public boolean enrollDevice(Device device) throws DeviceManagementException {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public boolean enrollDevice(Device device) throws DeviceManagementException {
|
|
|
|
|
|
|
|
boolean status;
|
|
|
|
@Override
|
|
|
|
MobileDevice mobileDevice = MobileDeviceManagementUtil.convertToMobileDevice(device);
|
|
|
|
public boolean modifyEnrollment(Device device) throws DeviceManagementException {
|
|
|
|
try {
|
|
|
|
return true;
|
|
|
|
status = MobileDeviceManagementDAOFactory.getMobileDeviceDAO().addMobileDevice(
|
|
|
|
}
|
|
|
|
mobileDevice);
|
|
|
|
|
|
|
|
} catch (MobileDeviceManagementDAOException e) {
|
|
|
|
@Override
|
|
|
|
String msg = "Error while enrolling the Android device : " +
|
|
|
|
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
device.getDeviceIdentifier();
|
|
|
|
return true;
|
|
|
|
log.error(msg, e);
|
|
|
|
}
|
|
|
|
throw new DeviceManagementException(msg, e);
|
|
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
return status;
|
|
|
|
public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean modifyEnrollment(Device device) throws DeviceManagementException {
|
|
|
|
@Override
|
|
|
|
return true;
|
|
|
|
public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
@Override
|
|
|
|
return true;
|
|
|
|
public boolean setActive(DeviceIdentifier deviceId, boolean status)
|
|
|
|
}
|
|
|
|
throws DeviceManagementException {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
public List<Device> getAllDevices() throws DeviceManagementException {
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
@Override
|
|
|
|
return true;
|
|
|
|
public Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean setActive(DeviceIdentifier deviceId, boolean status)
|
|
|
|
@Override
|
|
|
|
throws DeviceManagementException {
|
|
|
|
public boolean setOwnership(DeviceIdentifier deviceId, String ownershipType)
|
|
|
|
return true;
|
|
|
|
throws DeviceManagementException {
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
public List<Device> getAllDevices() throws DeviceManagementException {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public OperationManager getOperationManager() throws DeviceManagementException {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public boolean updateDeviceInfo(Device device) throws DeviceManagementException {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
@Override
|
|
|
|
}
|
|
|
|
public boolean setOwnership(DeviceIdentifier deviceId, String ownershipType)
|
|
|
|
|
|
|
|
throws DeviceManagementException {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public OperationManager getOperationManager() throws DeviceManagementException {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean updateDeviceInfo(Device device) throws DeviceManagementException {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|