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 3272165588..35aa312a0f 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
@@ -58,10 +58,14 @@
Device Management Dashboard Analytics Bundle
org.wso2.carbon.device.mgt.analytics.dashboard.dao,
+ org.wso2.carbon.device.mgt.analytics.dashboard.dao.impl,
+ org.wso2.carbon.device.mgt.analytics.dashboard.impl,
org.wso2.carbon.device.mgt.analytics.dashboard.internal
- org.wso2.carbon.device.mgt.analytics.dashboard
+ org.wso2.carbon.device.mgt.analytics.dashboard,
+ 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 7c5b2038e6..c17dcfb263 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,11 +18,12 @@
package org.wso2.carbon.device.mgt.analytics.dashboard;
-import org.wso2.carbon.device.mgt.common.PaginationRequest;
+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...
@@ -30,61 +31,56 @@ import java.util.Map;
public interface GadgetDataService {
@SuppressWarnings("unused")
- int getTotalDeviceCount() throws GadgetDataServiceException;
+ DeviceCountByGroupEntry getDeviceCount(FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- int getActiveDeviceCount() throws GadgetDataServiceException;
+ DeviceCountByGroupEntry getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode,
+ FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- int getInactiveDeviceCount() throws GadgetDataServiceException;
+ DeviceCountByGroupEntry getTotalDeviceCount() throws SQLException;
@SuppressWarnings("unused")
- int getRemovedDeviceCount() throws GadgetDataServiceException;
+ List getDeviceCountsByConnectivityStatuses() throws SQLException;
@SuppressWarnings("unused")
- int getNonCompliantDeviceCount() throws GadgetDataServiceException;
+ List getDeviceCountsByPotentialVulnerabilities() throws SQLException;
@SuppressWarnings("unused")
- int getUnmonitoredDeviceCount() throws GadgetDataServiceException;
+ PaginationResult getNonCompliantDeviceCountsByFeatures(int startIndex, int resultCount)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- PaginationResult getNonCompliantDeviceCountsByFeatures(PaginationRequest paginationRequest)
- throws GadgetDataServiceException;
+ List getDeviceCountsByPlatforms(FilterSet filterSet)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- int getDeviceCount(Map filters) throws GadgetDataServiceException;
+ List getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode,
+ FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- int getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode,
- Map filters) throws GadgetDataServiceException;
+ List getDeviceCountsByOwnershipTypes(FilterSet filterSet)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- Map getDeviceCountsByPlatforms(Map filters) throws GadgetDataServiceException;
+ List getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode,
+ FilterSet filterSet) throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- Map getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode,
- Map filters) throws GadgetDataServiceException;
-
- @SuppressWarnings("unused")
- Map getDeviceCountsByOwnershipTypes(Map filters) throws GadgetDataServiceException;
-
- @SuppressWarnings("unused")
- Map getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode,
- Map filters) throws GadgetDataServiceException;
-
- @SuppressWarnings("unused")
- PaginationResult getDevicesWithDetails(Map filters,
- PaginationRequest paginationRequest) throws GadgetDataServiceException;
+ PaginationResult getDevicesWithDetails(FilterSet filterSet, int startIndex, int resultCount)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode,
- Map filters, PaginationRequest paginationRequest) throws GadgetDataServiceException;
+ FilterSet filterSet, int startIndex, int resultCount)
+ throws InvalidParameterValueException, SQLException;
@SuppressWarnings("unused")
- List