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 16 package ohos; 17 18 import java.util.ArrayList; 19 import java.util.HashMap; 20 import java.util.Map; 21 import java.util.List; 22 23 /** 24 * ModuleJson AppJson info. 25 * 26 */ 27 class ModuleAppInfo { 28 private final Integer DEFAULT_VERSION_CODE = -1; 29 private final String RELEASE = "Release"; 30 private final String UNSPECIFIED = "unspecified"; 31 /** 32 * Indicates the bundleName of app AppJson. 33 */ 34 public String bundleName = ""; 35 36 /** 37 * Indicates the debug of app AppJson. 38 */ 39 public boolean debug = false; 40 /** 41 * Indicates the icon of app AppJson. 42 */ 43 public String icon = ""; 44 /** 45 * Indicates the label of app AppJson. 46 */ 47 public String label = ""; 48 /** 49 * Indicates the description of app AppJson. 50 */ 51 public String description = ""; 52 /** 53 * Indicates the vendor of app AppJson. 54 */ 55 public String vendor = ""; 56 /** 57 * Indicates the versionCode of app AppJson. 58 */ 59 public int versionCode = DEFAULT_VERSION_CODE; 60 /** 61 * Indicates the versionName of app AppJson. 62 */ 63 public String versionName = ""; 64 /** 65 * Indicates the minCompatibleVersionCode of app AppJson. 66 */ 67 public int minCompatibleVersionCode = DEFAULT_VERSION_CODE; 68 /** 69 * Indicates the minAPIVersion of app AppJson. 70 */ 71 public int minAPIVersion = DEFAULT_VERSION_CODE; 72 /** 73 * Indicates the targetAPIVersion of app AppJson. 74 */ 75 public int targetAPIVersion = DEFAULT_VERSION_CODE; 76 /** 77 * Indicates the apiReleaseType of app AppJson. 78 */ 79 public String apiReleaseType = RELEASE; 80 /** 81 * Indicates the distributedNotificationEnabled of app AppJson. 82 */ 83 public boolean distributedNotificationEnabled = false; 84 /** 85 * Indicates the entityType of app AppJson. 86 */ 87 public String entityType = UNSPECIFIED; 88 /** 89 * Indicates the appName of app AppJson. 90 */ 91 public String appName = ""; 92 /** 93 * Indicates the appNameEn of app AppJson. 94 */ 95 public String appNameEN = ""; 96 97 /** 98 * Indicates the deviceType of app AppJson. 99 */ 100 public Map<String, ModuleDeviceType> deviceTypes = new HashMap<>(); 101 102 /** 103 * Indicates the type of bundle. 104 */ 105 private String bundleType = "app"; 106 107 /** 108 * Set bundle type 109 * 110 * @param type bundle type 111 */ setBundleType(String type)112 public void setBundleType(String type) { 113 bundleType = type; 114 } 115 116 /** 117 * Get bundle type. 118 * 119 * @return bundle type 120 */ getBundleType()121 public String getBundleType() { 122 return bundleType; 123 } 124 } 125