diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java index 060865c726c..31b1aea61e9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManager.java @@ -37,8 +37,9 @@ public interface DeviceManager { /** * Method to save platform specific Configuration. - * + * @param configuration - A Platform configuration object which needs to save * @return Returns the status of the operation + * @throws DeviceManagementException If something goes wrong while saving the configuration. */ boolean saveConfiguration(PlatformConfiguration configuration) throws DeviceManagementException; @@ -46,6 +47,7 @@ public interface DeviceManager { * Method to get platform specific Configuration. * * @return Returns the platform specific tenant configurations + * @throws DeviceManagementException If something goes wrong while fetching the configuration. */ PlatformConfiguration getConfiguration() throws DeviceManagementException; @@ -53,6 +55,7 @@ public interface DeviceManager { * Method to enrolling a particular device of type mobile, IoT, etc within CDM. * * @param device Metadata corresponding to the device being enrolled + * @return A boolean indicating the status of the operation. * @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device */ boolean enrollDevice(Device device) throws DeviceManagementException; @@ -61,6 +64,7 @@ public interface DeviceManager { * Method to modify the metadata corresponding to device enrollment. * * @param device Modified device enrollment related metadata + * @return A boolean indicating the status of the operation. * @throws DeviceManagementException If some unusual behaviour is observed while modify the enrollment of a * device */ @@ -70,6 +74,7 @@ public interface DeviceManager { * Method to disenroll a particular device from CDM. * * @param deviceId Fully qualified device identifier + * @return A boolean indicating the status of the operation. * @throws DeviceManagementException If some unusual behaviour is observed while disenrolling a device */ boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException; @@ -100,6 +105,7 @@ public interface DeviceManager { * * @param deviceId Fully qualified device identifier * @param status Indicates whether the device is active + * @return A boolean indicating the status of the operation. * @throws DeviceManagementException If some unusual behaviour is observed while updating the active status * of the device */ @@ -127,6 +133,7 @@ public interface DeviceManager { * * @param deviceIdentifier identifier to identify the device * @param device Updated device information related data + * @return A boolean indicating the status of the operation. * @throws DeviceManagementException If some unusual behaviour is observed while updating the device info */ boolean updateDeviceInfo(DeviceIdentifier deviceIdentifier, Device device) throws DeviceManagementException; @@ -136,6 +143,7 @@ public interface DeviceManager { * * @param deviceId Fully qualified device identifier * @param ownershipType Type of ownership + * @return A boolean indicating the status of the operation. * @throws DeviceManagementException If some unusual behaviour is observed while setting the ownership * of the device */ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java index e9da177cdda..36224b08d48 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java @@ -39,7 +39,7 @@ public interface ApplicationManager { * @param pageNumber Page number of the list. * @param size Number of items in one page. * @return The list of applications belongs to a domain. - * @throws ApplicationManagementException + * @throws ApplicationManagementException If something goes wrong */ Application[] getApplications(String domain, int pageNumber, int size) @@ -52,6 +52,7 @@ public interface ApplicationManager { * @param deviceId Device id of the device that the status belongs to. * @param application Application details of the app being updated. * @param status Installed/Uninstalled + * @throws ApplicationManagementException If something goes wrong */ void updateApplicationStatus(DeviceIdentifier deviceId, Application application, String status) throws ApplicationManagementException; @@ -62,6 +63,7 @@ public interface ApplicationManager { * @param deviceId Device id of the device that the status belongs to. * @param application Application details of the app being searched. * @return Status of the application on the device. + * @throws ApplicationManagementException If something goes wrong */ String getApplicationStatus(DeviceIdentifier deviceId, Application application) throws ApplicationManagementException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/authorization/DeviceAccessAuthorizationService.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/authorization/DeviceAccessAuthorizationService.java index 16234b83893..9ff3eb119ba 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/authorization/DeviceAccessAuthorizationService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/authorization/DeviceAccessAuthorizationService.java @@ -55,7 +55,8 @@ public interface DeviceAccessAuthorizationService { * DeviceIdentifier list. * * @param deviceIdentifiers - List of DeviceIdentifiers to be checked for authorization. - * @return DeviceAuthorizationResult - Authorization result including the list of authorized devices & unauthorized devices. + * @return DeviceAuthorizationResult - Authorization result object including the list of authorized devices and + * unauthorized devices. * @throws DeviceAccessAuthorizationException if something goes wrong when checking the authorization. */ DeviceAuthorizationResult isUserAuthorized(List deviceIdentifiers) throws @@ -67,7 +68,8 @@ public interface DeviceAccessAuthorizationService { * * @param deviceIdentifiers - List of DeviceIdentifiers to be checked for authorization. * @param groupPermissions - Group Permissions - * @return DeviceAuthorizationResult - Authorization result including the list of authorized devices & unauthorized devices. + * @return DeviceAuthorizationResult - Authorization result object including the list of authorized devices and + * unauthorized devices. * @throws DeviceAccessAuthorizationException if something goes wrong when checking the authorization. */ DeviceAuthorizationResult isUserAuthorized(List deviceIdentifiers, String[] groupPermissions) @@ -93,7 +95,8 @@ public interface DeviceAccessAuthorizationService { * @param deviceIdentifiers - List of DeviceIdentifiers to be checked for authorization. * @param username - User name * @param groupPermissions - Group Permissions - * @return DeviceAuthorizationResult - Authorization result including the list of authorized devices & unauthorized devices. + * @return DeviceAuthorizationResult - Authorization result object including the list of authorized devices and + * unauthorized devices. * @throws DeviceAccessAuthorizationException if something goes wrong when checking the authorization. */ DeviceAuthorizationResult isUserAuthorized(List deviceIdentifiers, String username, @@ -126,7 +129,8 @@ public interface DeviceAccessAuthorizationService { * * @param deviceIdentifiers - List of DeviceIdentifiers to be checked for authorization. * @param username - Username of the user to be checked for authorization. - * @return DeviceAuthorizationResult - Authorization result including the list of authorized devices & unauthorized devices. + * @return DeviceAuthorizationResult - Authorization result object including the list of authorized devices and + * unauthorized devices. * @throws DeviceAccessAuthorizationException if something goes wrong when checking the authorization. */ DeviceAuthorizationResult isUserAuthorized(List deviceIdentifiers, String username) throws diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfigurationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfigurationManagementService.java index 39484a378f6..758c1fc4956 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfigurationManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/configuration/mgt/PlatformConfigurationManagementService.java @@ -28,6 +28,7 @@ public interface PlatformConfigurationManagementService { * * @param platformConfiguration Operation to be added. * @param resourcePath Registry resource path. + * @return A boolean indicating the status of the operation. * @throws org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException If some unusual behaviour is observed while adding the * configuration. */ @@ -38,6 +39,7 @@ public interface PlatformConfigurationManagementService { * Method to retrieve the list of general tenant configurations. * * @param resourcePath Registry resource path. + * @return Platform Configuration object. * @throws org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException If some unusual behaviour is observed while fetching the * operation list. */ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/NotificationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/NotificationManagementService.java index cbf26cc4cff..d2a0cfcf6d2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/NotificationManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/NotificationManagementService.java @@ -32,6 +32,7 @@ public interface NotificationManagementService { /** * Method to add a notification to the database. * + * @param deviceId - DeviceIdentifier of the device * @param notification - Notification to be added to database. * @return boolean status of the operation. * @throws NotificationManagementException @@ -66,7 +67,7 @@ public interface NotificationManagementService { * Method to fetch all the notifications in the database. * * @return List of all Notifications in the database. - * @throws NotificationManagementException + * @throws NotificationManagementException if something goes wrong while fetching the Notifications. * */ List getAllNotifications() throws NotificationManagementException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java index 1fed075708d..45db0d3eff9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java @@ -39,7 +39,7 @@ public interface OperationManager { * @param devices List of DeviceIdentifiers to execute the operation * @return Activity object corresponds to the added operation. * @throws OperationManagementException If some unusual behaviour is observed while adding the operation - * InvalidDeviceException If addOperation request contains Invalid DeviceIdentifiers. + * @throws InvalidDeviceException If addOperation request contains Invalid DeviceIdentifiers. */ Activity addOperation(Operation operation, List devices) throws OperationManagementException, InvalidDeviceException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/push/notification/NotificationStrategy.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/push/notification/NotificationStrategy.java index c1f7e37da7e..f18a5f5e7c0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/push/notification/NotificationStrategy.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/push/notification/NotificationStrategy.java @@ -32,8 +32,8 @@ public interface NotificationStrategy { void undeploy(); /** - * Provides push notification configuration - * + * Provides push notification configuration. + * @return PushNotificationConfig for this NotificationStrategy */ PushNotificationConfig getConfig(); diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java b/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java index 8747ca6e19f..b45798a0c13 100644 --- a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java +++ b/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java @@ -28,7 +28,8 @@ import org.wso2.carbon.utils.Axis2ConfigurationContextObserver; import org.wso2.carbon.utils.ConfigurationContextService; /** - * @scr.component name="org.wso2.carbon.email.sender.EmailSenderServiceComponent" immediate="true" + * @scr.component name="org.wso2.carbon.email.sender.emailsendereervicecomponent" + * immediate="true" * @scr.reference name="registry.service" * interface="org.wso2.carbon.registry.core.service.RegistryService" * cardinality="1..1"