Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 3 | * |
| 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 | */ |
| 16 | package org.onosproject.app.impl; |
| 17 | |
| 18 | import org.apache.karaf.features.Feature; |
| 19 | import org.apache.karaf.features.Repository; |
| 20 | |
| 21 | import java.net.URI; |
| 22 | import java.util.EnumSet; |
| 23 | import java.util.Set; |
| 24 | |
| 25 | /** |
| 26 | * Adapter for testing against Apache Karaf feature service. |
| 27 | */ |
| 28 | public class FeaturesServiceAdapter implements org.apache.karaf.features.FeaturesService { |
| 29 | @Override |
| 30 | public void validateRepository(URI uri) throws Exception { |
| 31 | |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public void addRepository(URI uri) throws Exception { |
| 36 | |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public void addRepository(URI uri, boolean install) throws Exception { |
| 41 | |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public void removeRepository(URI uri) throws Exception { |
| 46 | |
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | public void removeRepository(URI uri, boolean uninstall) throws Exception { |
| 51 | |
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public void restoreRepository(URI uri) throws Exception { |
| 56 | |
| 57 | } |
| 58 | |
| 59 | @Override |
| 60 | public Repository[] listRepositories() { |
| 61 | return new Repository[0]; |
| 62 | } |
| 63 | |
| 64 | @Override |
| 65 | public Repository getRepository(String repoName) { |
| 66 | return null; |
| 67 | } |
| 68 | |
| 69 | @Override |
Thomas Vachuska | 5630c61 | 2015-03-24 12:24:12 -0700 | [diff] [blame] | 70 | public Repository getRepository(URI uri) { |
| 71 | return null; |
| 72 | } |
| 73 | |
| 74 | @Override |
| 75 | public String getRepositoryName(URI uri) { |
| 76 | return null; |
| 77 | } |
| 78 | |
| 79 | @Override |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 80 | public void installFeature(String name) throws Exception { |
| 81 | |
| 82 | } |
| 83 | |
| 84 | @Override |
| 85 | public void installFeature(String name, EnumSet<Option> options) throws Exception { |
| 86 | |
| 87 | } |
| 88 | |
| 89 | @Override |
| 90 | public void installFeature(String name, String version) throws Exception { |
| 91 | |
| 92 | } |
| 93 | |
| 94 | @Override |
| 95 | public void installFeature(String name, String version, EnumSet<Option> options) throws Exception { |
| 96 | |
| 97 | } |
| 98 | |
| 99 | @Override |
| 100 | public void installFeature(Feature f, EnumSet<Option> options) throws Exception { |
| 101 | |
| 102 | } |
| 103 | |
| 104 | @Override |
| 105 | public void installFeatures(Set<Feature> features, EnumSet<Option> options) throws Exception { |
| 106 | |
| 107 | } |
| 108 | |
| 109 | @Override |
| 110 | public void uninstallFeature(String name, EnumSet<Option> options) throws Exception { |
| 111 | |
| 112 | } |
| 113 | |
| 114 | @Override |
| 115 | public void uninstallFeature(String name) throws Exception { |
| 116 | |
| 117 | } |
| 118 | |
| 119 | @Override |
| 120 | public void uninstallFeature(String name, String version, EnumSet<Option> options) throws Exception { |
| 121 | |
| 122 | } |
| 123 | |
| 124 | @Override |
| 125 | public void uninstallFeature(String name, String version) throws Exception { |
| 126 | |
| 127 | } |
| 128 | |
| 129 | @Override |
| 130 | public Feature[] listFeatures() throws Exception { |
| 131 | return new Feature[0]; |
| 132 | } |
| 133 | |
| 134 | @Override |
| 135 | public Feature[] listInstalledFeatures() { |
| 136 | return new Feature[0]; |
| 137 | } |
| 138 | |
| 139 | @Override |
| 140 | public boolean isInstalled(Feature f) { |
| 141 | return false; |
| 142 | } |
| 143 | |
| 144 | @Override |
Thomas Vachuska | 5630c61 | 2015-03-24 12:24:12 -0700 | [diff] [blame] | 145 | public Feature[] getFeatures(String name, String version) throws Exception { |
| 146 | return new Feature[0]; |
| 147 | } |
| 148 | |
| 149 | @Override |
| 150 | public Feature[] getFeatures(String name) throws Exception { |
| 151 | return new Feature[0]; |
| 152 | } |
| 153 | |
| 154 | @Override |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 155 | public Feature getFeature(String name, String version) throws Exception { |
| 156 | return null; |
| 157 | } |
| 158 | |
| 159 | @Override |
| 160 | public Feature getFeature(String name) throws Exception { |
| 161 | return null; |
| 162 | } |
| 163 | |
| 164 | @Override |
| 165 | public void refreshRepository(URI uri) throws Exception { |
| 166 | |
| 167 | } |
| 168 | } |