|
|
@ -39,34 +39,34 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean enrollDevice(Device device) throws DeviceManagementException {
|
|
|
|
public boolean enrollDevice(Device device) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().enrollDevice(device);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().enrollDevice(device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean modifyEnrollment(Device device) throws DeviceManagementException {
|
|
|
|
public boolean modifyEnrollment(Device device) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().modifyEnrollment(device);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().modifyEnrollment(device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().disenrollDevice(deviceId);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().disenrollDevice(deviceId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isEnrolled(deviceId);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isEnrolled(deviceId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isActive(deviceId);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isActive(deviceId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean setActive(DeviceIdentifier deviceId, boolean status) throws DeviceManagementException {
|
|
|
|
public boolean setActive(DeviceIdentifier deviceId, boolean status) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setActive(deviceId, status);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setActive(deviceId, status);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<Device> getAllDevices() throws DeviceManagementException {
|
|
|
|
public List<Device> getAllDevices() throws DeviceManagementException {
|
|
|
@ -74,31 +74,31 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<Device> getAllDevices(String type) throws DeviceManagementException {
|
|
|
|
public List<Device> getAllDevices(String type) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getAllDevices(type);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getAllDevices(type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<Device> getDeviceListOfUser(String username) throws DeviceManagementException{
|
|
|
|
public List<Device> getDeviceListOfUser(String username) throws DeviceManagementException {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public org.wso2.carbon.device.mgt.common.Device getDevice(DeviceIdentifier deviceId)
|
|
|
|
public org.wso2.carbon.device.mgt.common.Device getDevice(DeviceIdentifier deviceId)
|
|
|
|
throws DeviceManagementException {
|
|
|
|
throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getDevice(deviceId);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getDevice(deviceId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean updateDeviceInfo(Device device) throws DeviceManagementException {
|
|
|
|
public boolean updateDeviceInfo(Device device) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().updateDeviceInfo(device);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().updateDeviceInfo(device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean setOwnership(DeviceIdentifier deviceId, String ownershipType) throws DeviceManagementException {
|
|
|
|
public boolean setOwnership(DeviceIdentifier deviceId, String ownershipType) throws DeviceManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setOwnership(deviceId,
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setOwnership(deviceId,
|
|
|
|
ownershipType);
|
|
|
|
ownershipType);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public License getLicense(String deviceType, String languageCode) throws LicenseManagementException {
|
|
|
|
public License getLicense(String deviceType, String languageCode) throws LicenseManagementException {
|
|
|
@ -113,7 +113,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean addOperation(Operation operation,
|
|
|
|
public boolean addOperation(Operation operation,
|
|
|
|
List<DeviceIdentifier> devices) throws OperationManagementException {
|
|
|
|
List<DeviceIdentifier> devices) throws OperationManagementException {
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().addOperation(operation, devices);
|
|
|
|
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().addOperation(operation, devices);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|