• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.HashMap;
20 import java.util.List;
21 import java.util.Map;
22 
23 /**
24  * App AppInfo info.
25  *
26  */
27 public class AppInfo {
28     /**
29      * Indicates the bundleName of app AppInfo.
30      */
31     public String bundleName = "";
32 
33     /**
34      * Indicates the vendor of app AppInfo.
35      */
36     public String vendor = "";
37 
38     /**
39      * Indicates the relatedBundleName of app AppInfo.
40      */
41     public String relatedBundleName = "";
42 
43     /**
44      * Indicates the versionName of app AppInfo.
45      */
46     public String versionName = "";
47 
48     /**
49      * Indicates the versionCode of app AppInfo.
50      */
51     public String versionCode = "";
52 
53     /**
54      * Indicates the target Api Version of app AppInfo.
55      */
56     public int targetApiVersion = 1;
57 
58     /**
59      * Indicates the compatible Api Version of app AppInfo.
60      */
61     public int compatibleApiVersion = 1;
62 
63     /**
64      * Indicates the appName of app AppInfo.
65      */
66     public String appName = "";
67 
68     /**
69      * Indicates the appNameEN of app AppInfo.
70      */
71     public String appNameEN = "";
72 
73     /**
74      * Indicates the releaseType of app AppInfo.
75      */
76     public String releaseType = "";
77 
78     private String shellVersionCode = "";
79     private String shellVersionName = "";
80     private boolean multiFrameworkBundle;
81 
82     // character for stage module
83     /**
84      * Indicates the debug of app AppJson.
85      */
86     public boolean debug = false;
87     /**
88      * Indicates the icon of app AppJson.
89      */
90     public String icon = "";
91     /**
92      * Indicates the label of app AppJson.
93      */
94     public String label = "";
95     /**
96      * Indicates the description of app AppJson.
97      */
98     public String description = "";
99     /**
100      * Indicates the minCompatibleVersionCode of app AppJson.
101      */
102     public int minCompatibleVersionCode = -1;
103     /**
104      * Indicates the distributedNotificationEnabled of app AppJson.
105      */
106     public boolean distributedNotificationEnabled = false;
107 
108     /**
109      * Indicates the type of bundle.
110      */
111     private String bundleType = "app";
112 
113     /**
114      * Get shell version code.
115      *
116      * @return shell version code
117      */
getShellVersionCode()118     public String getShellVersionCode() {
119         return shellVersionCode;
120     }
121 
122     /**
123      * Set shell version code.
124      *
125      * @param shellVersionCode Indicates the shell version name
126      */
setShellVersionCode(String shellVersionCode)127     public void setShellVersionCode(String shellVersionCode) {
128         this.shellVersionCode = shellVersionCode;
129     }
130 
131     /**
132      * Get shell version name.
133      *
134      * @return shell version name
135      */
getShellVersionName()136     public String getShellVersionName() {
137         return shellVersionName;
138     }
139 
140     /**
141      * Get bundle type.
142      *
143      * @return bundle type
144      */
getBundleType()145     public String getBundleType() {
146         return bundleType;
147     }
148 
149     /**
150      * Set shell version name.
151      *
152      * @param shellVersionName Indicates the shell version name
153      */
setShellVersionName(String shellVersionName)154     public void setShellVersionName(String shellVersionName) {
155         this.shellVersionName = shellVersionName;
156     }
157 
158     /**
159      * Whether the app is multi framework bundle.
160      *
161      * @return true if the app is a multi framework bundle.
162      */
isMultiFrameworkBundle()163     public boolean isMultiFrameworkBundle() {
164         return multiFrameworkBundle;
165     }
166 
167     /**
168      * Set multi framework bundle.
169      *
170      * @param multiFrameworkBundle Indicates the app type
171      */
setMultiFrameworkBundle(boolean multiFrameworkBundle)172     public void setMultiFrameworkBundle(boolean multiFrameworkBundle) {
173         this.multiFrameworkBundle = multiFrameworkBundle;
174     }
175 
176     /**
177      * Set default shell version
178      */
setDefaultShellVersion()179     public void setDefaultShellVersion() {
180         this.shellVersionCode = versionCode;
181         this.shellVersionName = versionName;
182     }
183 
184     /**
185      * Set bundle type
186      *
187      * @param type bundle type
188      */
setBundleType(String type)189     public void setBundleType(String type) {
190         bundleType = type;
191     }
192 }
193