From ef059800e2f479f8522e2ea19d95cb806755aff6 Mon Sep 17 00:00:00 2001 From: nishadi Date: Sat, 24 Feb 2018 18:29:31 +0530 Subject: [PATCH] CommentManagementAPIImpl CommentManagementAPIImpl class moved to store/api/services/impl directory. --- .../api/services/impl/CommentManagementAPIImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename components/application-mgt/{org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt => org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store}/api/services/impl/CommentManagementAPIImpl.java (95%) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/CommentManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/CommentManagementAPIImpl.java similarity index 95% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/CommentManagementAPIImpl.java rename to components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/CommentManagementAPIImpl.java index be1a7cfe85..73f1d5b177 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/CommentManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/CommentManagementAPIImpl.java @@ -16,14 +16,15 @@ * under the License. * */ -package org.wso2.carbon.device.application.mgt.api.services.impl; +package org.wso2.carbon.device.application.mgt.store.api.services.impl; import io.swagger.annotations.ApiParam; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.application.mgt.api.APIUtil; -import org.wso2.carbon.device.application.mgt.api.services.CommentManagementAPI; +import org.wso2.carbon.device.application.mgt.store.api.APIUtil; +import org.wso2.carbon.device.application.mgt.store.api.services.CommentManagementAPI; import org.wso2.carbon.device.application.mgt.common.Comment; import org.wso2.carbon.device.application.mgt.common.PaginationRequest; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; @@ -77,7 +78,7 @@ public class CommentManagementAPIImpl implements CommentManagementAPI { return Response.status(Response.Status.INTERNAL_SERVER_ERROR) .entity(" Internal server error occurs").build(); } - return Response.status(Response.Status.OK).entity(comments).build(); + return null; } @Override @@ -89,9 +90,8 @@ public class CommentManagementAPIImpl implements CommentManagementAPI { @PathParam("uuid") String uuid) { CommentsManager commentsManager = APIUtil.getCommentsManager(); - int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); try { - Comment newComment = commentsManager.addComment(comment, uuid, tenantId); + Comment newComment = commentsManager.addComment(comment, uuid); if (comment != null) { return Response.status(Response.Status.CREATED).entity(newComment).build(); } else {