Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
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 | |
Simon Hunt | 23f9c7b | 2017-07-10 20:00:30 -0700 | [diff] [blame] | 18 | import org.onosproject.ui.lion.LionBundle; |
| 19 | |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 20 | import java.util.List; |
| 21 | |
| 22 | /** |
| 23 | * Service for registering user interface extensions. |
| 24 | */ |
| 25 | public interface UiExtensionService { |
| 26 | |
| 27 | /** |
| 28 | * Registers the specified user interface extension. |
| 29 | * |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 30 | * @param extension UI extension to register |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 31 | */ |
| 32 | void register(UiExtension extension); |
| 33 | |
| 34 | /** |
| 35 | * Unregisters the specified user interface extension. |
| 36 | * |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 37 | * @param extension UI extension to unregister |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 38 | */ |
| 39 | void unregister(UiExtension extension); |
| 40 | |
| 41 | /** |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 42 | * Returns the list of registered user interface extensions. |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 43 | * |
| 44 | * @return list of extensions |
| 45 | */ |
| 46 | List<UiExtension> getExtensions(); |
| 47 | |
| 48 | /** |
| 49 | * Returns the user interface extension that contributed the specified view. |
| 50 | * |
| 51 | * @param viewId view identifier |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 52 | * @return contributing user interface extension |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 53 | */ |
| 54 | UiExtension getViewExtension(String viewId); |
Simon Hunt | 23f9c7b | 2017-07-10 20:00:30 -0700 | [diff] [blame] | 55 | |
| 56 | /** |
| 57 | * Returns the navigation pane localization bundle. |
| 58 | * |
| 59 | * @return the navigation localization bundle |
| 60 | */ |
| 61 | LionBundle getNavLionBundle(); |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 62 | } |