From 3ae5339effd6a5a6922394ce5d81ce304dad244d Mon Sep 17 00:00:00 2001 From: Pahansith Date: Thu, 29 Aug 2019 10:51:49 +0530 Subject: [PATCH] Add device identifier for configuration retrieval endpoint --- .../mgt/common/configuration/mgt/DeviceConfiguration.java | 6 +++--- .../core/service/DeviceManagementProviderServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceConfiguration.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceConfiguration.java index da39516f41..c3020098e7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceConfiguration.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/DeviceConfiguration.java @@ -32,7 +32,7 @@ import java.util.List; "the server") public class DeviceConfiguration { @ApiModelProperty(name = "deviceId", value = "ID of the device", required = true) - private int deviceId; + private String deviceId; @ApiModelProperty(name = "deviceType", value = "Type of the device", required = true) private String deviceType; @@ -52,11 +52,11 @@ public class DeviceConfiguration { @ApiModelProperty(name = "deviceOwner", value = "Owner of the selected device", required = true) private String deviceOwner; - public int getDeviceId() { + public String getDeviceId() { return deviceId; } - public void setDeviceId(int deviceId) { + public void setDeviceId(String deviceId) { this.deviceId = deviceId; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 8aa8d5e2d8..b590d18564 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -3352,7 +3352,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv List configurationEntries, String deviceOwner) { DeviceConfiguration deviceConfiguration = new DeviceConfiguration(); - deviceConfiguration.setDeviceId(device.getId()); + deviceConfiguration.setDeviceId(device.getDeviceIdentifier()); deviceConfiguration.setDeviceType(device.getType()); deviceConfiguration.setTenantDomain(tenantDomain); deviceConfiguration.setConfigurationEntries(configurationEntries);