Ray Milkey | a412236 | 2015-08-18 15:19:08 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Ray Milkey | a412236 | 2015-08-18 15:19:08 -0700 | [diff] [blame] | 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 | */ |
Ray Milkey | a412236 | 2015-08-18 15:19:08 -0700 | [diff] [blame] | 16 | package org.onosproject.net.config; |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 17 | |
Thomas Vachuska | 0a400ea | 2015-09-04 11:25:03 -0700 | [diff] [blame] | 18 | import com.fasterxml.jackson.databind.JsonNode; |
Ray Milkey | cd6ab18 | 2016-02-03 11:13:09 -0800 | [diff] [blame] | 19 | import com.google.common.collect.ImmutableSet; |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 20 | |
| 21 | import java.util.Set; |
| 22 | |
| 23 | /** |
| 24 | * Test adapter for network configuration service. |
| 25 | */ |
| 26 | public class NetworkConfigServiceAdapter implements NetworkConfigService { |
| 27 | @Override |
| 28 | public Set<Class> getSubjectClasses() { |
Ray Milkey | cd6ab18 | 2016-02-03 11:13:09 -0800 | [diff] [blame] | 29 | return ImmutableSet.of(); |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | @Override |
Thomas Vachuska | ea5adc6 | 2015-10-07 11:52:30 -0700 | [diff] [blame] | 33 | public SubjectFactory getSubjectFactory(String subjectClassKey) { |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 34 | return null; |
| 35 | } |
| 36 | |
| 37 | @Override |
| 38 | public SubjectFactory getSubjectFactory(Class subjectClass) { |
| 39 | return null; |
| 40 | } |
| 41 | |
| 42 | @Override |
Thomas Vachuska | ea5adc6 | 2015-10-07 11:52:30 -0700 | [diff] [blame] | 43 | public Class<? extends Config> getConfigClass(String subjectClassKey, String configKey) { |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 44 | return null; |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public <S> Set<S> getSubjects(Class<S> subjectClass) { |
Ray Milkey | cd6ab18 | 2016-02-03 11:13:09 -0800 | [diff] [blame] | 49 | return ImmutableSet.of(); |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | @Override |
| 53 | public <S, C extends Config<S>> Set<S> getSubjects(Class<S> subjectClass, Class<C> configClass) { |
Ray Milkey | cd6ab18 | 2016-02-03 11:13:09 -0800 | [diff] [blame] | 54 | return ImmutableSet.of(); |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | @Override |
| 58 | public <S> Set<? extends Config<S>> getConfigs(S subject) { |
Ray Milkey | cd6ab18 | 2016-02-03 11:13:09 -0800 | [diff] [blame] | 59 | return ImmutableSet.of(); |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | @Override |
| 63 | public <S, C extends Config<S>> C getConfig(S subject, Class<C> configClass) { |
| 64 | return null; |
| 65 | } |
| 66 | |
| 67 | @Override |
| 68 | public <S, C extends Config<S>> C addConfig(S subject, Class<C> configClass) { |
| 69 | return null; |
| 70 | } |
| 71 | |
| 72 | @Override |
Thomas Vachuska | 0a400ea | 2015-09-04 11:25:03 -0700 | [diff] [blame] | 73 | public <S, C extends Config<S>> C applyConfig(S subject, Class<C> configClass, JsonNode json) { |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 74 | return null; |
| 75 | } |
| 76 | |
| 77 | @Override |
Thomas Vachuska | 6f350ed | 2016-01-08 09:53:03 -0800 | [diff] [blame] | 78 | public <S, C extends Config<S>> C applyConfig(String subjectClassKey, S subject, String configKey, JsonNode json) { |
| 79 | return null; |
| 80 | } |
| 81 | |
| 82 | @Override |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 83 | public <S, C extends Config<S>> void removeConfig(S subject, Class<C> configClass) { |
| 84 | |
| 85 | } |
| 86 | |
| 87 | @Override |
Thomas Vachuska | 6f350ed | 2016-01-08 09:53:03 -0800 | [diff] [blame] | 88 | public <S> void removeConfig(String subjectClassKey, S subject, String configKey) { |
| 89 | } |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 90 | |
Thomas Vachuska | 6f350ed | 2016-01-08 09:53:03 -0800 | [diff] [blame] | 91 | @Override |
| 92 | public void addListener(NetworkConfigListener listener) { |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | @Override |
| 96 | public void removeListener(NetworkConfigListener listener) { |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 97 | } |
Deepa Vaddireddy | 0c49b60 | 2016-06-02 12:19:07 +0530 | [diff] [blame] | 98 | |
| 99 | @Override |
| 100 | public <S> void removeConfig(S subject) { |
| 101 | } |
| 102 | |
| 103 | @Override |
| 104 | public <S> void removeConfig() { |
| 105 | } |
Sahil Lele | 3a0cdd5 | 2015-07-21 14:16:31 -0700 | [diff] [blame] | 106 | } |