From 45c7924e694dad8ab030dfc26e898af23720a220 Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Tue, 28 May 2019 18:01:26 +0530 Subject: [PATCH] Improve review response in APPM --- .../mgt/core/impl/ReviewManagerImpl.java | 1 + .../util/AndroidApplicationOperationUtil.java | 53 ------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/AndroidApplicationOperationUtil.java diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java index 8c0a41ac6f..f7eb2d2408 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java @@ -224,6 +224,7 @@ public class ReviewManagerImpl implements ReviewManager { review.setCreatedAt(reviewDTO.getCreatedAt()); review.setModifiedAt(reviewDTO.getModifiedAt()); review.setRating(reviewDTO.getRating()); + review.setUsername(reviewDTO.getUsername()); review.setReplies(new ArrayList<>()); return review; } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/AndroidApplicationOperationUtil.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/AndroidApplicationOperationUtil.java deleted file mode 100644 index bb1f5d955a..0000000000 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/AndroidApplicationOperationUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.wso2.carbon.device.application.mgt.core.util; - -import org.wso2.carbon.device.application.mgt.common.AppOperation; -import org.wso2.carbon.device.application.mgt.common.EnterpriseApplication; -import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; -import org.wso2.carbon.device.mgt.core.operation.mgt.ProfileOperation; - -public class AndroidApplicationOperationUtil { -// public static Operation installApp(AppOperation appOperation) { -// ProfileOperation operation = new ProfileOperation(); -// operation.setCode(MDMAppConstants.AndroidConstants.OPCODE_INSTALL_APPLICATION); -// operation.setType(Operation.Type.PROFILE); -// switch (appOperation.getApplication().getType()) { -// case "ENTERPRISE"://TODO: fix with ENUM -// EnterpriseApplication enterpriseApplication = new EnterpriseApplication(); -// enterpriseApplication.setType(appOperation.getApplication().toString()); -// enterpriseApplication.setUrl(application.getLocation()); -// enterpriseApplication.setSchedule(appOperation.getScheduledDateTime()); -// enterpriseApplication.setPackageName(appOperation.getApplication().get); -// operation.setPayLoad(enterpriseApplication.toJSON()); -// break; -// case "PUBLIC": -// setOperationForPublicApp(operation, application); -// break; -// case "WEBAPP": -// setOperationForWebApp(operation, application); -// break; -// default: -// String errorMessage = "Invalid application type."; -// throw new DeviceApplicationException(errorMessage); -// } -// return operation; -// } - -}