From 14455efd97ff0e78ecdefdfa9959e5240604027e Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 4 Nov 2016 19:41:33 +0530 Subject: [PATCH] merging changes with upstream partial --- pom.xml | 2 +- .../mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 83eefe902e..0d8e5b5bfc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 2.2.5-SNAPSHOT + 2.2.6-SNAPSHOT ../pom.xml diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java index 0509eb80ba..d302e72811 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java @@ -3,11 +3,10 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.analytics.api.AnalyticsDataAPI; +import org.wso2.carbon.analytics.api.AnalyticsDataAPIUtil; import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse; -import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest; import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry; import org.wso2.carbon.analytics.dataservice.commons.SortByField; -import org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceUtils; import org.wso2.carbon.analytics.datasource.commons.Record; import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; @@ -21,7 +20,6 @@ import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterService; import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -79,7 +77,7 @@ public class APIUtil { sortByFields); List recordIds = getRecordIds(resultEntries); AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds); - Map sensorDatas = createSensorData(AnalyticsDataServiceUtils.listRecords( + Map sensorDatas = createSensorData(AnalyticsDataAPIUtil.listRecords( analyticsDataAPI, response)); List sortedSensorData = getSortedSensorData(sensorDatas, resultEntries); return sortedSensorData;