From 8dc7e2786d65ffe00a62181cd1e0ff94e1bf9422 Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 8 Aug 2017 09:45:50 +0530 Subject: [PATCH] Adding javadoc comments --- .../mgt/common/services/PlatformManager.java | 101 ++++++++++++++++-- 1 file changed, 90 insertions(+), 11 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/PlatformManager.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/PlatformManager.java index 58c12e558b2..b9c07f9130c 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/PlatformManager.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/PlatformManager.java @@ -29,29 +29,108 @@ import java.util.List; */ public interface PlatformManager { - void initialize(int tenantId) throws PlatformManagementException; + /** + * To initialize the shared platforms for the tenant during the tenant initialization time. + * + * @param tenantId ID of the tenant + * @throws PlatformManagementException Platform Management Exception + */ + public void initialize(int tenantId) throws PlatformManagementException; - List getPlatforms(int tenantId) throws PlatformManagementException; + /** + * To get platforms of the specific tenant. + * + * @param tenantId ID of the tenant + * @return List of platforms + * @throws PlatformManagementException Platform Management Exception + */ + public List getPlatforms(int tenantId) throws PlatformManagementException; - Platform getPlatform(int tenantId, String platformIdentifier) throws PlatformManagementException; + /** + * To get platform with the given platform identifier and tenant ID. + * + * @param tenantId ID of the tenant + * @param platformIdentifier Unique identifier of the platform. + * @return the Specific platform with the platform identifier and tenant + * @throws PlatformManagementException Platform Management Exception + */ + public Platform getPlatform(int tenantId, String platformIdentifier) throws PlatformManagementException; - void register(int tenantId, Platform platform) throws PlatformManagementException; + /** + * To register a platform under particular tenant. + * + * @param tenantId ID of the tenant. + * @param platform Platform to be registered + * @throws PlatformManagementException Platform Management Exception + */ + public void register(int tenantId, Platform platform) throws PlatformManagementException; - void update(int tenantId, String oldPlatformIdentifier, Platform platform) + /** + * To update a platform. + * + * @param tenantId ID of the tenant + * @param oldPlatformIdentifier Old platform Identifier + * @param platform Platform to be updated + * @throws PlatformManagementException Platform Management Exception + */ + public void update(int tenantId, String oldPlatformIdentifier, Platform platform) throws PlatformManagementException; - void unregister(int tenantId, String platformIdentifier, boolean isFileBased) + /** + * To un-register the platform. + * + * @param tenantId ID of the tenant. + * @param platformIdentifier ID of the platform + * @param isFileBased To indicate whether a file based or not. + * @throws PlatformManagementException Platform Management Exception. + */ + public void unregister(int tenantId, String platformIdentifier, boolean isFileBased) throws PlatformManagementException; - void addMapping(int tenantId, List platformIdentifiers) throws PlatformManagementException; + /** + * To add mapping to platform identifiers with the tenant ID. + * + * @param tenantId ID of the tenant + * @param platformIdentifiers Platform Identifiers + * @throws PlatformManagementException Platform Management Exception + */ + public void addMapping(int tenantId, List platformIdentifiers) throws PlatformManagementException; - void addMapping(int tenantId, String platformIdentifier) throws PlatformManagementException; + /** + * To add mapping to a platform for a tenant. + * + * @param tenantId ID of the tenant. + * @param platformIdentifier ID of the platform, the mapping should be added. + * @throws PlatformManagementException Platform Management Exception. + */ + public void addMapping(int tenantId, String platformIdentifier) throws PlatformManagementException; - void removeMapping(int tenantId, String platformIdentifier) throws PlatformManagementException; + /** + * To remove a mapping of a platform to a tenant. + * + * @param tenantId ID of the tenant. + * @param platformIdentifier ID of the platform. + * @throws PlatformManagementException Platform Management Exception. + */ + public void removeMapping(int tenantId, String platformIdentifier) throws PlatformManagementException; - void updatePlatformStatus(int tenantId, String platformIdentifier, String status) + /** + * To update the platform status(ENABLED / DISABLED). + * + * @param tenantId Id of the tenant + * @param platformIdentifier ID of the platform + * @param status Status to be updated. + * @throws PlatformManagementException Platform Management Exception. + */ + public void updatePlatformStatus(int tenantId, String platformIdentifier, String status) throws PlatformManagementException; - void removePlatforms(int tenantId) throws PlatformManagementException; + /** + * To remove platforms that belongs to particular tenant. + * + * @param tenantId ID of the tenant. + * @throws PlatformManagementException Platform Management Exception. + */ + public void removePlatforms(int tenantId) throws PlatformManagementException; }