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 cbc22f06c9..fd1790f61b 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
@@ -63,7 +63,8 @@
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.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..bdb0b4258f 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,9 +18,11 @@
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.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
+import java.sql.SQLException;
import java.util.List;
import java.util.Map;
@@ -30,61 +32,62 @@ import java.util.Map;
public interface GadgetDataService {
@SuppressWarnings("unused")
- int getTotalDeviceCount() throws GadgetDataServiceException;
+ int getTotalDeviceCount() throws SQLException;
@SuppressWarnings("unused")
- int getActiveDeviceCount() throws GadgetDataServiceException;
+ int getActiveDeviceCount() throws SQLException;
@SuppressWarnings("unused")
- int getInactiveDeviceCount() throws GadgetDataServiceException;
+ int getInactiveDeviceCount() throws SQLException;
@SuppressWarnings("unused")
- int getRemovedDeviceCount() throws GadgetDataServiceException;
+ int getRemovedDeviceCount() throws SQLException;
@SuppressWarnings("unused")
- int getNonCompliantDeviceCount() throws GadgetDataServiceException;
+ int getNonCompliantDeviceCount() throws SQLException;
@SuppressWarnings("unused")
- int getUnmonitoredDeviceCount() throws GadgetDataServiceException;
+ int getUnmonitoredDeviceCount() throws SQLException;
@SuppressWarnings("unused")
PaginationResult getNonCompliantDeviceCountsByFeatures(PaginationRequest paginationRequest)
- throws GadgetDataServiceException;
+ throws SQLException, InvalidParameterException;
@SuppressWarnings("unused")
- int getDeviceCount(Map filters) throws GadgetDataServiceException;
+ int getDeviceCount(Map filters) throws SQLException;
@SuppressWarnings("unused")
int getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode,
- Map filters) throws GadgetDataServiceException;
+ Map filters) throws SQLException, InvalidParameterException;
@SuppressWarnings("unused")
- Map getDeviceCountsByPlatforms(Map filters) throws GadgetDataServiceException;
+ Map getDeviceCountsByPlatforms(Map filters) throws SQLException;
@SuppressWarnings("unused")
Map getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode,
- Map filters) throws GadgetDataServiceException;
+ Map filters) throws SQLException, InvalidParameterException;
@SuppressWarnings("unused")
- Map getDeviceCountsByOwnershipTypes(Map filters) throws GadgetDataServiceException;
+ Map getDeviceCountsByOwnershipTypes(Map filters) throws SQLException;
@SuppressWarnings("unused")
Map getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode,
- Map filters) throws GadgetDataServiceException;
+ Map filters) throws SQLException, InvalidParameterException;
@SuppressWarnings("unused")
PaginationResult getDevicesWithDetails(Map filters,
- PaginationRequest paginationRequest) throws GadgetDataServiceException;
+ PaginationRequest paginationRequest) throws SQLException, InvalidParameterException;
@SuppressWarnings("unused")
PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode,
- Map filters, PaginationRequest paginationRequest) throws GadgetDataServiceException;
+ Map filters, PaginationRequest paginationRequest)
+ throws SQLException, InvalidParameterException;
@SuppressWarnings("unused")
- List