1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16package ohos; 17 18import java.util.List; 19import java.util.ArrayList; 20 21/** 22 * Module result. 23 * 24 */ 25class ModuleResult { 26 /** 27 * Indicates the packages in pack.info. 28 */ 29 public List<PackInfo> packInfos = new ArrayList<PackInfo>(); 30 /** 31 * Indicates the ModuleProfileInfo of ModuleJson. 32 */ 33 public List<ModuleProfileInfo> moduleProfileInfos = new ArrayList<ModuleProfileInfo>(); 34 /** 35 * Indicates the ModuleProfileInfo of ModuleJson. 36 */ 37 public List<String> moduleProfileStr = new ArrayList<String>(); 38 /** 39 * Indicates the icon of Module. 40 */ 41 private String icon = ""; 42 /** 43 * Indicates the label of Module. 44 */ 45 private String label = ""; 46 /** 47 * Indicates the result of ModuleJson. 48 */ 49 private boolean result = true; 50 /** 51 * Indicates the message of ModuleJson. 52 */ 53 private String message = "Success"; 54 55 public boolean getResult() { 56 return result; 57 } 58 59 public void setResult(boolean result) { 60 this.result = result; 61 } 62 63 public String getMessage() { 64 return message; 65 } 66 67 public void setMessage(String message) { 68 this.message = message; 69 } 70 71 public String getIcon() { 72 return icon; 73 } 74 75 public void setIcon(String iconPath) { 76 icon = iconPath; 77 } 78 79 public String getLabel() { 80 return label; 81 } 82 83 public void setLabel(String labelRes) { 84 label = labelRes; 85 } 86 87 /** 88 * Add the ModuleProfileInfo to the profileInfoStr list. 89 * 90 * @param moduleProfileInfo the moduleProfileInfo to be added. 91 */ 92 public void addModuleProfileInfo(ModuleProfileInfo moduleProfileInfo) { 93 if (moduleProfileInfos != null && moduleProfileInfo != null) { 94 this.moduleProfileInfos.add(moduleProfileInfo); 95 } 96 } 97} 98