• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 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  * Module ModuleJson info.
23  *
24  */
25 class ModuleInfo {
26     private final Integer INSTALL_FREE_UNDEFINED = 2;
27     private final String DEFAULT = "default";
28     private final String HML = "hml";
29     /**
30      * Indicates the hap name of ModuleInfo.
31      */
32     public String hapName = "";
33     /**
34      * Indicates the name of ModuleInfo.
35      */
36     public String name = "";
37     /**
38      * Indicates the type of ModuleInfo.
39      */
40     public String type = "";
41     /**
42      * Indicates the srcEntrance of ModuleInfo.
43      */
44     public String srcEntrance = "";
45     /**
46      * Indicates the description of ModuleInfo.
47      */
48     public String description = "";
49     /**
50      * Indicates the process of ModuleInfo.
51      */
52     public String process = "";
53     /**
54      * Indicates the mainElement of ModuleInfo.
55      */
56     public String mainElement = "";
57     /**
58      * Indicates the devicesTypes of ModuleInfo.
59      */
60     public List<String> deviceTypes = new ArrayList<String>();
61     /**
62      * Indicates the deliveryWithInstall of ModuleInfo.
63      */
64     public boolean deliveryWithInstall = true;
65     /**
66      * Indicates the installationFree of ModuleInfo.
67      */
68     public int installationFree = INSTALL_FREE_UNDEFINED;
69     /**
70      * Indicates the virtualMachine of ModuleInfo.
71      */
72     public String virtualMachine = DEFAULT;
73     /**
74      * Indicates the uiSyntax of ModuleInfo.
75      */
76     public String uiSyntax = HML;
77     /**
78      * Indicates the pages of ModuleInfo.
79      */
80     public List<String> pages = new ArrayList<String>();
81     /**
82      * Indicates the metadata of ModuleInfo.
83      */
84     public List<ModuleMetadataInfo> moduleMetadataInfos = new ArrayList<ModuleMetadataInfo>();
85     /**
86      * Indicates the abilities of ModuleInfo.
87      */
88     public List<ModuleAbilityInfo> abilities = new ArrayList<ModuleAbilityInfo>();
89     /**
90      * Indicates the extensionAbilities of ModuleInfo.
91      */
92     public List<ExtensionAbilityInfo> extensionAbilityInfos = new ArrayList<ExtensionAbilityInfo>();
93     /**
94      * Indicates the requestPermissions of ModuleInfo.
95      */
96     public List<ReqPermission> requestPermissions = new ArrayList<ReqPermission>();
97     /**
98      * Indicates the shortcuts of ModuleInfo.
99      */
100     public List<ModuleShortcut> moduleShortcuts = new ArrayList<>();
101     /**
102      * Indicates the distrofilter of ModuleInfo.
103      */
104     public DistroFilter distroFilter = new DistroFilter();
105     /**
106      * Indicates the common events of ModuleInfo.
107      */
108     public List<CommonEvent> commonEvents = new ArrayList<CommonEvent>();
109     /**
110      * Indicates the module atomic service of ModuleInfo.
111      */
112     public ModuleAtomicService moduleAtomicService = new ModuleAtomicService();
113     /**
114      * Indicates the common events of ModuleInfo.
115      */
116     List<AbilityFormInfo> abilityFormInfos = new ArrayList<>();
117     /**
118      * Indicates the define permissions of ModuleInfo.
119      */
120     List<DefinePermission> definePermissions = new ArrayList<>();
121     /**
122      * Indicates hap is stage or FA.
123      */
124     private AppModel appModel = AppModel.FA;
125 
126     /**
127      * Indicates dependencies config.
128      */
129     private List<DependencyItem> dependenies = new ArrayList<>();
130 
getAppModel()131     public AppModel getAppModel() {
132         return appModel;
133     }
134 
setAppModel(AppModel appModel)135     public void setAppModel(AppModel appModel) {
136         this.appModel = appModel;
137     }
138 
getDependenies()139     public List<DependencyItem> getDependenies() {
140         return dependenies;
141     }
142 
setDependenies(List<DependencyItem> dependenies)143     public void setDependenies(List<DependencyItem> dependenies) {
144         this.dependenies = dependenies;
145     }
146 }
147