Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [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 | fe8c98a | 2015-02-04 01:24:32 -0800 | [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.ui; |
| 17 | |
| 18 | import java.util.List; |
| 19 | |
| 20 | /** |
| 21 | * Service for registering user interface extensions. |
| 22 | */ |
| 23 | public interface UiExtensionService { |
| 24 | |
| 25 | /** |
| 26 | * Registers the specified user interface extension. |
| 27 | * |
| 28 | * @param extension GUI extension to register |
| 29 | */ |
| 30 | void register(UiExtension extension); |
| 31 | |
| 32 | /** |
| 33 | * Unregisters the specified user interface extension. |
| 34 | * |
| 35 | * @param extension GUI extension to unregister |
| 36 | */ |
| 37 | void unregister(UiExtension extension); |
| 38 | |
| 39 | /** |
| 40 | * Returns the list of user interface extensions. |
| 41 | * |
| 42 | * @return list of extensions |
| 43 | */ |
| 44 | List<UiExtension> getExtensions(); |
| 45 | |
| 46 | /** |
| 47 | * Returns the user interface extension that contributed the specified view. |
| 48 | * |
| 49 | * @param viewId view identifier |
| 50 | * @return user interface extension |
| 51 | */ |
| 52 | UiExtension getViewExtension(String viewId); |
| 53 | } |