mirror of
https://repository.entgra.net/community/product-iots.git
synced 2025-09-16 23:32:19 +00:00
fixing getowner() according to cdmf device object refactoring
This commit is contained in:
parent
e055e79ea4
commit
201ff62664
@ -36,7 +36,7 @@ deviceModule = function () {
|
||||
var deviceManagementDAOFactory = Packages.org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
|
||||
|
||||
var deviceManagementService = utility.getDeviceManagementService();
|
||||
|
||||
|
||||
var publicMethods = {};
|
||||
var privateMethods = {};
|
||||
|
||||
@ -179,7 +179,7 @@ deviceModule = function () {
|
||||
var data = {};
|
||||
//XMLHTTPRequest's POST
|
||||
//log.info(updateDeviceEndpoint+ "?name="+device.name);
|
||||
return post(updateDeviceEndpoint+ "?name="+encodeURIComponent(device.name), data, "text");
|
||||
return post(updateDeviceEndpoint + "?name=" + encodeURIComponent(device.name), data, "text");
|
||||
};
|
||||
|
||||
/*
|
||||
@ -257,8 +257,8 @@ deviceModule = function () {
|
||||
var deviceObject = {};
|
||||
deviceObject[constants.DEVICE_IDENTIFIER] = device.getDeviceIdentifier();
|
||||
deviceObject[constants.DEVICE_NAME] = privateMethods.validateAndReturn(device.getName());
|
||||
deviceObject[constants.DEVICE_OWNERSHIP] = privateMethods.validateAndReturn(device.getOwnership());
|
||||
deviceObject[constants.DEVICE_OWNER] = device.getOwner();
|
||||
deviceObject[constants.DEVICE_OWNERSHIP] = privateMethods.validateAndReturn(device.getEnrolmentInfo().getOwnership());
|
||||
deviceObject[constants.DEVICE_OWNER] = device.getEnrolmentInfo().getOwner();
|
||||
deviceObject[constants.DEVICE_TYPE] = device.getType();
|
||||
if (device.getType() == constants.PLATFORM_IOS) {
|
||||
properties[constants.DEVICE_MODEL] = properties[constants.DEVICE_PRODUCT];
|
||||
@ -266,7 +266,7 @@ deviceModule = function () {
|
||||
properties[constants.DEVICE_VENDOR] = constants.VENDOR_APPLE;
|
||||
}
|
||||
deviceObject[constants.DEVICE_PROPERTIES] = properties;
|
||||
deviceObject[constants.DEVICE_ENROLLMENT] = device.getDateOfEnrolment();
|
||||
deviceObject[constants.DEVICE_ENROLLMENT] = device.getEnrolmentInfo().getDateOfEnrolment();
|
||||
return deviceObject;
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user