diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml
index fd1790f61bf..35aa312a0f7 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml
@@ -64,7 +64,8 @@
org.wso2.carbon.device.mgt.analytics.dashboard,
- org.wso2.carbon.device.mgt.analytics.dashboard.dao.exception
+ org.wso2.carbon.device.mgt.analytics.dashboard.dao.exception,
+ org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean
org.osgi.framework,
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java
index 3931e72fc2f..c17dcfb2636 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java
@@ -18,12 +18,12 @@
package org.wso2.carbon.device.mgt.analytics.dashboard;
-import org.wso2.carbon.device.mgt.analytics.dashboard.dao.exception.InvalidParameterException;
+import org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean.*;
+import org.wso2.carbon.device.mgt.analytics.dashboard.dao.exception.InvalidParameterValueException;
import org.wso2.carbon.device.mgt.common.PaginationResult;
import java.sql.SQLException;
import java.util.List;
-import java.util.Map;
/**
* To be updated...
@@ -31,62 +31,56 @@ import java.util.Map;
public interface GadgetDataService {
@SuppressWarnings("unused")
- int getTotalDeviceCount() throws SQLException;
+ DeviceCountByGroupEntry getDeviceCount(FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- int getActiveDeviceCount() throws SQLException;
+ DeviceCountByGroupEntry getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode,
+ FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- int getInactiveDeviceCount() throws SQLException;
+ DeviceCountByGroupEntry getTotalDeviceCount() throws SQLException;
@SuppressWarnings("unused")
- int getRemovedDeviceCount() throws SQLException;
+ List getDeviceCountsByConnectivityStatuses() throws SQLException;
@SuppressWarnings("unused")
- int getNonCompliantDeviceCount() throws SQLException;
-
- @SuppressWarnings("unused")
- int getUnmonitoredDeviceCount() throws SQLException;
+ List getDeviceCountsByPotentialVulnerabilities() throws SQLException;
@SuppressWarnings("unused")
PaginationResult getNonCompliantDeviceCountsByFeatures(int startIndex, int resultCount)
- throws InvalidParameterException, SQLException;
-
- @SuppressWarnings("unused")
- int getDeviceCount(Map filters) throws SQLException;
-
- @SuppressWarnings("unused")
- int getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode,
- Map filters) throws InvalidParameterException, SQLException;
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- Map getDeviceCountsByPlatforms(Map filters) throws SQLException;
+ List getDeviceCountsByPlatforms(FilterSet filterSet)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- Map getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode,
- Map filters) throws InvalidParameterException, SQLException;
+ List getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode,
+ FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- Map getDeviceCountsByOwnershipTypes(Map filters) throws SQLException;
+ List getDeviceCountsByOwnershipTypes(FilterSet filterSet)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- Map getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode,
- Map filters) throws InvalidParameterException, SQLException;
+ List getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode,
+ FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- PaginationResult getDevicesWithDetails(Map filters,
- int startIndex, int resultCount) throws InvalidParameterException, SQLException;
+ PaginationResult getDevicesWithDetails(FilterSet filterSet, int startIndex, int resultCount)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode,
- Map filters, int startIndex, int resultCount)
- throws InvalidParameterException, SQLException;
+ FilterSet filterSet, int startIndex, int resultCount)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- List