1 /* 2 * Copyright (c) 2021 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 16 package ohos; 17 18 import java.util.ArrayList; 19 import java.util.List; 20 21 /** 22 * App AppInfo info. 23 * 24 */ 25 public class AppInfo { 26 /** 27 * Indicates the bundleName of app AppInfo. 28 */ 29 public String bundleName = ""; 30 31 /** 32 * Indicates the vendor of app AppInfo. 33 */ 34 public String vendor = ""; 35 36 /** 37 * Indicates the relatedBundleName of app AppInfo. 38 */ 39 public String relatedBundleName = ""; 40 41 /** 42 * Indicates the versionName of app AppInfo. 43 */ 44 public String versionName = ""; 45 46 /** 47 * Indicates the versionCode of app AppInfo. 48 */ 49 public String versionCode = ""; 50 51 /** 52 * Indicates the target Api Version of app AppInfo. 53 */ 54 public int targetApiVersion = 1; 55 56 /** 57 * Indicates the compatible Api Version of app AppInfo. 58 */ 59 public int compatibleApiVersion = 1; 60 61 /** 62 * Indicates the appName of app AppInfo. 63 */ 64 public String appName = ""; 65 66 /** 67 * Indicates the appNameEN of app AppInfo. 68 */ 69 public String appNameEN = ""; 70 71 /** 72 * Indicates the releaseType of app AppInfo. 73 */ 74 public String releaseType = ""; 75 76 77 private String shellVersionCode = ""; 78 private String shellVersionName = ""; 79 private boolean multiFrameworkBundle; 80 81 /** 82 * Get shell version code. 83 * 84 * @return shell version code 85 */ getShellVersionCode()86 public String getShellVersionCode() { 87 return shellVersionCode; 88 } 89 90 /** 91 * Set shell version code. 92 * 93 * @param shellVersionCode Indicates the shell version name 94 */ setShellVersionCode(String shellVersionCode)95 public void setShellVersionCode(String shellVersionCode) { 96 this.shellVersionCode = shellVersionCode; 97 } 98 99 /** 100 * Get shell version name. 101 * 102 * @return shell version name 103 */ getShellVersionName()104 public String getShellVersionName() { 105 return shellVersionName; 106 } 107 108 /** 109 * Set shell version name. 110 * 111 * @param shellVersionName Indicates the shell version name 112 */ setShellVersionName(String shellVersionName)113 public void setShellVersionName(String shellVersionName) { 114 this.shellVersionName = shellVersionName; 115 } 116 117 /** 118 * Whether the app is multi framework bundle. 119 * 120 * @return true if the app is a multi framework bundle. 121 */ isMultiFrameworkBundle()122 public boolean isMultiFrameworkBundle() { 123 return multiFrameworkBundle; 124 } 125 126 /** 127 * Set multi framework bundle. 128 * 129 * @param multiFrameworkBundle Indicates the app type 130 */ setMultiFrameworkBundle(boolean multiFrameworkBundle)131 public void setMultiFrameworkBundle(boolean multiFrameworkBundle) { 132 this.multiFrameworkBundle = multiFrameworkBundle; 133 } 134 135 /** 136 * Set default shell version 137 */ setDefaultShellVersion()138 public void setDefaultShellVersion() { 139 this.shellVersionCode = versionCode; 140 this.shellVersionName = versionName; 141 } 142 } 143