From 7323ea0271ecd81514adb4a98c399de7a2ff8b79 Mon Sep 17 00:00:00 2001 From: nipun Date: Tue, 1 Oct 2019 12:47:49 +0530 Subject: [PATCH] Modify the subscribed devices and category APIs --- .../common/services/SubscriptionManager.java | 34 +++++++++---------- .../mgt/core/dao/SubscriptionDAO.java | 26 +++++++------- .../carbon/device/mgt/core/dao/DeviceDAO.java | 11 +++--- .../DeviceManagementProviderService.java | 12 +++---- 4 files changed, 40 insertions(+), 43 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java index 2adf3992c0..d6d1a1add4 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java @@ -32,30 +32,28 @@ public interface SubscriptionManager { String action) throws ApplicationManagementException; /*** - * This method used to get the app id ,device ids and pass them to DM service method - * @param appUUID UUID of the application release - * @param offsetValue offset value for get paginated result - * @param limitValue limit value for get paginated result - * @param status status of the devices + * This method used to get the app id ,device ids and pass them to DM service method. + * + * @param appUUID UUID of the application release. + * @param offsetValue offset value for get paginated request. + * @param limitValue limit value for get paginated request. + * @param status status of the devices. * @return deviceDetails - device details for given application release. - * @throws ApplicationManagementException throws {@link ApplicationManagementException} Exception - * of the application management + * @throws {@link ApplicationManagementException} Exception of the application management */ PaginationResult getAppInstalledDevices(int offsetValue, int limitValue, String appUUID, - String status) - throws ApplicationManagementException; + String status) throws ApplicationManagementException; /*** - * This method used to get category details - * @param appUUID UUID of the application release - * @param subType subscription type of the application - * @param offsetValue offset value for get paginated result - * @param limitValue limit value for get paginated result + * This method used to get category details. + * + * @param appUUID UUID of the application release. + * @param subType subscription type of the application. + * @param offsetValue offset value for get paginated request. + * @param limitValue limit value for get paginated request. * @return {@link PaginationResult} pagination result of the category details. - * @throws ApplicationManagementException throws {@link ApplicationManagementException} Exception - * of the application management + * @throws {@link ApplicationManagementException} Exception of the application management */ PaginationResult getAppInstalledCategories(int offsetValue, int limitValue, String appUUID, - String subType) - throws ApplicationManagementException; + String subType) throws ApplicationManagementException; } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/SubscriptionDAO.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/SubscriptionDAO.java index 2310f7b1b0..a0eef82fc8 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/SubscriptionDAO.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/SubscriptionDAO.java @@ -86,42 +86,42 @@ public interface SubscriptionDAO { throws ApplicationManagementDAOException; /** - * this method is used to get the details of users + * This method is used to get the details of users + * * @param tenantId id of the current tenant * @param offsetValue offset value for get paginated result * @param limitValue limit value for get paginated result * @param appReleaseId id of the application release. * @return subscribedUsers - list of app subscribed users. - * @throws ApplicationManagementDAOException throws {@link ApplicationManagementDAOException} if - * connections establishment fails. + * @throws {@link ApplicationManagementDAOException} if connections establishment fails. */ List getAppSubscribedUsers(int offsetValue, int limitValue, int appReleaseId, int tenantId) throws ApplicationManagementDAOException; /** - * this method is used to get the details of roles + * This method is used to get the details of roles + * * @param tenantId id of the current tenant - * @param offsetValue offset value for get paginated result - * @param limitValue limit value for get paginated result + * @param offsetValue offset value for get paginated request. + * @param limitValue limit value for get paginated request. * @param appReleaseId id of the application release. * @return subscribedRoles - list of app subscribed roles. - * @throws ApplicationManagementDAOException throws {@link ApplicationManagementDAOException} if - * connections establishment fails. + * @throws {@link ApplicationManagementDAOException} if connections establishment fails. */ List getAppSubscribedRoles(int offsetValue, int limitValue, int appReleaseId, int tenantId) throws ApplicationManagementDAOException; /** - * this method is used to get the details of subscribed groups + * This method is used to get the details of subscribed groups + * * @param tenantId id of the current tenant - * @param offsetValue offset value for get paginated result - * @param limitValue limit value for get paginated result + * @param offsetValue offset value for get paginated request. + * @param limitValue limit value for get paginated request. * @param appReleaseId id of the application release. * @return subscribedGroups - list of app subscribed groups. - * @throws ApplicationManagementDAOException throws {@link ApplicationManagementDAOException} if - * connections establishment fails. + * @throws {@link ApplicationManagementDAOException} if connections establishment fails. */ List getAppSubscribedGroups(int offsetValue, int limitValue, int appReleaseId, int tenantId) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceDAO.java index fb9ab2859b..823278a7a0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceDAO.java @@ -552,18 +552,17 @@ public interface DeviceDAO { String toDate) throws DeviceManagementDAOException; /** - * this method is used to get the details of subscribed devices. + * This method is used to get the details of subscribed devices. + * * @param deviceIds device ids of the subscribed devices. * @param tenantId Id of the current tenant. - * @param offsetValue offset value for get paginated result. - * @param limitValue limit value for get paginated result. + * @param offsetValue offset value for get paginated request. + * @param limitValue limit value for get paginated request. * @param status status of the devices. * @return devices - subscribed device details list - * @throws DeviceManagementDAOException throws {@link DeviceManagementDAOException} if connections - * establishment fails. + * @throws {@link DeviceManagementDAOException} if connections establishment fails. */ List getSubscribedDevices(int offsetValue, int limitValue, List deviceIds, int tenantId, String status) throws DeviceManagementDAOException; - } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index 6abecd237d..ea6ed15a57 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -771,13 +771,13 @@ public interface DeviceManagementProviderService { /** * This method retrieves a list of subscribed devices. - * @param devicesIds devices ids of the subscribed devices - * @param offsetValue offset value for get paginated result - * @param limitValue limit value for get paginated result - * @param status status of the devices + * + * @param devicesIds devices ids of the subscribed devices. + * @param offsetValue offset value for get paginated request. + * @param limitValue limit value for get paginated request. + * @param status status of the devices. * @return {@link PaginationResult} - * @throws DeviceManagementException throws {@link DeviceManagementException} if any service - * level or DAO level error occurs + * @throws {@link DeviceManagementException} if any service level or DAO level error occurs. */ PaginationResult getAppSubscribedDevices(int offsetValue, int limitValue, List devicesIds, String status)