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 | |
Laszlo Papp | 759f0d3 | 2018-03-05 13:24:30 +0000 | [diff] [blame] | 20 | import java.util.ArrayList; |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 21 | import java.util.List; |
| 22 | |
| 23 | /** |
| 24 | * Service for registering user interface extensions. |
| 25 | */ |
| 26 | public interface UiExtensionService { |
| 27 | |
| 28 | /** |
| 29 | * Registers the specified user interface extension. |
| 30 | * |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 31 | * @param extension UI extension to register |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 32 | */ |
| 33 | void register(UiExtension extension); |
| 34 | |
| 35 | /** |
| 36 | * Unregisters the specified user interface extension. |
| 37 | * |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 38 | * @param extension UI extension to unregister |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 39 | */ |
| 40 | void unregister(UiExtension extension); |
| 41 | |
| 42 | /** |
Laszlo Papp | 759f0d3 | 2018-03-05 13:24:30 +0000 | [diff] [blame] | 43 | * Registers the specified user interface glyph factory. |
| 44 | * |
| 45 | * @param factory UI glyph factory to register |
| 46 | */ |
| 47 | default void register(UiGlyphFactory factory) { |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Unregisters the specified user interface glyph factory. |
| 52 | * |
| 53 | * @param factory UI glyph factory to unregister |
| 54 | */ |
| 55 | default void unregister(UiGlyphFactory factory) { |
| 56 | } |
| 57 | |
| 58 | /** |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 59 | * Returns the list of registered user interface extensions. |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 60 | * |
| 61 | * @return list of extensions |
| 62 | */ |
| 63 | List<UiExtension> getExtensions(); |
| 64 | |
| 65 | /** |
| 66 | * Returns the user interface extension that contributed the specified view. |
| 67 | * |
| 68 | * @param viewId view identifier |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 69 | * @return contributing user interface extension |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 70 | */ |
| 71 | UiExtension getViewExtension(String viewId); |
Simon Hunt | 23f9c7b | 2017-07-10 20:00:30 -0700 | [diff] [blame] | 72 | |
| 73 | /** |
Laszlo Papp | 759f0d3 | 2018-03-05 13:24:30 +0000 | [diff] [blame] | 74 | * Returns the list of registered user interface glyphs. |
| 75 | * |
| 76 | * @return list of glyphs |
| 77 | */ |
| 78 | default List<UiGlyph> getGlyphs() { |
| 79 | return new ArrayList<UiGlyph>(); |
| 80 | } |
| 81 | |
| 82 | /** |
Simon Hunt | 23f9c7b | 2017-07-10 20:00:30 -0700 | [diff] [blame] | 83 | * Returns the navigation pane localization bundle. |
| 84 | * |
| 85 | * @return the navigation localization bundle |
| 86 | */ |
| 87 | LionBundle getNavLionBundle(); |
Thomas Vachuska | 1b1355d | 2018-02-06 16:53:58 -0800 | [diff] [blame] | 88 | |
| 89 | /** |
| 90 | * Refreshes the backing model. |
| 91 | */ |
| 92 | void refreshModel(); |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 93 | } |