Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -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 | */ |
| 16 | package org.onosproject.rest; |
| 17 | |
| 18 | import com.google.common.annotations.Beta; |
| 19 | |
| 20 | import java.util.Set; |
| 21 | |
| 22 | /** |
| 23 | * Service for registering REST API documentation resources. |
| 24 | */ |
| 25 | @Beta |
| 26 | public interface ApiDocService { |
| 27 | |
| 28 | /** |
| 29 | * Registers the specified REST API documentation provider. |
| 30 | * |
| 31 | * @param provider REST API documentation provider |
| 32 | */ |
| 33 | void register(ApiDocProvider provider); |
| 34 | |
| 35 | /** |
| 36 | * Unregisters the specified REST API documentation provider. |
| 37 | * |
| 38 | * @param provider REST API documentation provider |
| 39 | */ |
| 40 | void unregister(ApiDocProvider provider); |
| 41 | |
| 42 | /** |
| 43 | * Returns the set of all registered REST API documentation providers. |
| 44 | * |
| 45 | * @return set of registered documentation providers |
| 46 | */ |
| 47 | Set<ApiDocProvider> getDocProviders(); |
| 48 | |
| 49 | /** |
| 50 | * Returns the specified REST API documentation provider with the specified |
| 51 | * key. |
| 52 | * |
| 53 | * @param key REST API key |
| 54 | * @return documentation provider |
| 55 | */ |
| 56 | ApiDocProvider getDocProvider(String key); |
| 57 | |
| 58 | } |