blob: 165d4e4c2524512a235cde0a52ce5b75b175d7ac [file] [log] [blame]
Thomas Vachuska02aeb032015-01-06 22:36:30 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Thomas Vachuska02aeb032015-01-06 22:36:30 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.app.impl;
17
Ray Milkey86ad7bb2018-09-27 12:32:28 -070018import org.apache.karaf.features.DeploymentListener;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080019import org.apache.karaf.features.Feature;
Ray Milkey86ad7bb2018-09-27 12:32:28 -070020import org.apache.karaf.features.FeatureState;
Jian Li11599162016-01-15 15:46:16 -080021import org.apache.karaf.features.FeaturesListener;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080022import org.apache.karaf.features.Repository;
23
24import java.net.URI;
25import java.util.EnumSet;
Ray Milkey86ad7bb2018-09-27 12:32:28 -070026import java.util.Map;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080027import java.util.Set;
28
29/**
30 * Adapter for testing against Apache Karaf feature service.
31 */
32public class FeaturesServiceAdapter implements org.apache.karaf.features.FeaturesService {
33 @Override
Ray Milkey86ad7bb2018-09-27 12:32:28 -070034 public boolean isRepositoryUriBlacklisted(URI uri) {
35 return false;
36 }
37
38 @Override
39 public Repository[] listRequiredRepositories() throws Exception {
40 return new Repository[0];
41 }
42
43 @Override
44 public void setResolutionOutputFile(String s) {
45
46 }
47
48 @Override
49 public void installFeatures(Set<String> set, String s, EnumSet<Option> enumSet) throws Exception {
50
51 }
52
53 @Override
54 public void addRequirements(Map<String, Set<String>> map, EnumSet<Option> enumSet) throws Exception {
55
56 }
57
58 @Override
59 public void uninstallFeatures(Set<String> set, EnumSet<Option> enumSet) throws Exception {
60
61 }
62
63 @Override
64 public void uninstallFeatures(Set<String> set, String s, EnumSet<Option> enumSet) throws Exception {
65
66 }
67
68 @Override
69 public void removeRequirements(Map<String, Set<String>> map, EnumSet<Option> enumSet) throws Exception {
70
71 }
72
73 @Override
74 public void updateFeaturesState(Map<String, Map<String, FeatureState>> map,
75 EnumSet<Option> enumSet) throws Exception {
76
77 }
78
79 @Override
80 public void updateReposAndRequirements(Set<URI> set,
81 Map<String, Set<String>> map, EnumSet<Option> enumSet) throws Exception {
82
83 }
84
85 @Override
86 public Repository createRepository(URI uri) throws Exception {
87 return null;
88 }
89
90 @Override
91 public Feature[] listRequiredFeatures() throws Exception {
92 return new Feature[0];
93 }
94
95 @Override
96 public Map<String, Set<String>> listRequirements() {
97 return null;
98 }
99
100 @Override
101 public boolean isRequired(Feature feature) {
102 return false;
103 }
104
105 @Override
106 public void refreshRepositories(Set<URI> set) throws Exception {
107
108 }
109
110 @Override
111 public URI getRepositoryUriFor(String s, String s1) {
112 return null;
113 }
114
115 @Override
116 public String[] getRepositoryNames() {
117 return new String[0];
118 }
119
120 @Override
121 public void registerListener(DeploymentListener deploymentListener) {
122
123 }
124
125 @Override
126 public void unregisterListener(DeploymentListener deploymentListener) {
127
128 }
129
130 @Override
131 public FeatureState getState(String s) {
132 return null;
133 }
134
135 @Override
136 public String getFeatureXml(Feature feature) {
137 return null;
138 }
139
140 @Override
141 public void refreshFeatures(EnumSet<Option> enumSet) throws Exception {
142
143 }
144
145 @Override
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800146 public void validateRepository(URI uri) throws Exception {
147
148 }
149
150 @Override
151 public void addRepository(URI uri) throws Exception {
152
153 }
154
155 @Override
156 public void addRepository(URI uri, boolean install) throws Exception {
157
158 }
159
160 @Override
161 public void removeRepository(URI uri) throws Exception {
162
163 }
164
165 @Override
166 public void removeRepository(URI uri, boolean uninstall) throws Exception {
167
168 }
169
170 @Override
171 public void restoreRepository(URI uri) throws Exception {
172
173 }
174
175 @Override
176 public Repository[] listRepositories() {
177 return new Repository[0];
178 }
179
180 @Override
181 public Repository getRepository(String repoName) {
182 return null;
183 }
184
185 @Override
Thomas Vachuska5630c612015-03-24 12:24:12 -0700186 public Repository getRepository(URI uri) {
187 return null;
188 }
189
190 @Override
191 public String getRepositoryName(URI uri) {
192 return null;
193 }
194
195 @Override
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800196 public void installFeature(String name) throws Exception {
197
198 }
199
200 @Override
201 public void installFeature(String name, EnumSet<Option> options) throws Exception {
202
203 }
204
205 @Override
206 public void installFeature(String name, String version) throws Exception {
207
208 }
209
210 @Override
211 public void installFeature(String name, String version, EnumSet<Option> options) throws Exception {
212
213 }
214
215 @Override
216 public void installFeature(Feature f, EnumSet<Option> options) throws Exception {
217
218 }
219
220 @Override
Ray Milkey86ad7bb2018-09-27 12:32:28 -0700221 public void installFeatures(Set<String> features, EnumSet<Option> options) throws Exception {
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800222
223 }
224
225 @Override
226 public void uninstallFeature(String name, EnumSet<Option> options) throws Exception {
227
228 }
229
230 @Override
231 public void uninstallFeature(String name) throws Exception {
232
233 }
234
235 @Override
236 public void uninstallFeature(String name, String version, EnumSet<Option> options) throws Exception {
237
238 }
239
240 @Override
241 public void uninstallFeature(String name, String version) throws Exception {
242
243 }
244
245 @Override
246 public Feature[] listFeatures() throws Exception {
247 return new Feature[0];
248 }
249
250 @Override
251 public Feature[] listInstalledFeatures() {
252 return new Feature[0];
253 }
254
255 @Override
256 public boolean isInstalled(Feature f) {
257 return false;
258 }
259
260 @Override
Thomas Vachuska5630c612015-03-24 12:24:12 -0700261 public Feature[] getFeatures(String name, String version) throws Exception {
262 return new Feature[0];
263 }
264
265 @Override
266 public Feature[] getFeatures(String name) throws Exception {
267 return new Feature[0];
268 }
269
270 @Override
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800271 public Feature getFeature(String name, String version) throws Exception {
272 return null;
273 }
274
275 @Override
276 public Feature getFeature(String name) throws Exception {
277 return null;
278 }
279
280 @Override
281 public void refreshRepository(URI uri) throws Exception {
Jian Li11599162016-01-15 15:46:16 -0800282 }
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800283
Jian Li11599162016-01-15 15:46:16 -0800284 @Override
285 public void registerListener(FeaturesListener featuresListener) {
286 }
287
288 @Override
289 public void unregisterListener(FeaturesListener featuresListener) {
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800290 }
291}