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 | /** |
Thomas Vachuska | 95f2d3e | 2021-03-30 16:31:34 -0700 | [diff] [blame] | 59 | * Registers the specified topo hilighter factory. |
| 60 | * |
| 61 | * @param factory UI topo higlighter factory to register |
| 62 | */ |
| 63 | default void register(UiTopoHighlighterFactory factory) { |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Unregisters the specified user interface extension. |
| 68 | * |
| 69 | * @param factory UI topo higlighter factory to unregister |
| 70 | */ |
| 71 | default void unregister(UiTopoHighlighterFactory factory) { |
| 72 | } |
| 73 | |
| 74 | /** |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 75 | * Returns the list of registered user interface extensions. |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 76 | * |
| 77 | * @return list of extensions |
| 78 | */ |
| 79 | List<UiExtension> getExtensions(); |
| 80 | |
| 81 | /** |
| 82 | * Returns the user interface extension that contributed the specified view. |
| 83 | * |
| 84 | * @param viewId view identifier |
Simon Hunt | 8add9ee | 2016-09-20 17:05:07 -0700 | [diff] [blame] | 85 | * @return contributing user interface extension |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 86 | */ |
| 87 | UiExtension getViewExtension(String viewId); |
Simon Hunt | 23f9c7b | 2017-07-10 20:00:30 -0700 | [diff] [blame] | 88 | |
| 89 | /** |
Laszlo Papp | 759f0d3 | 2018-03-05 13:24:30 +0000 | [diff] [blame] | 90 | * Returns the list of registered user interface glyphs. |
| 91 | * |
| 92 | * @return list of glyphs |
| 93 | */ |
| 94 | default List<UiGlyph> getGlyphs() { |
| 95 | return new ArrayList<UiGlyph>(); |
| 96 | } |
| 97 | |
| 98 | /** |
Thomas Vachuska | 95f2d3e | 2021-03-30 16:31:34 -0700 | [diff] [blame] | 99 | * Returns the list of registered topo highlighter factories. |
| 100 | * |
| 101 | * @return list of highlighter factories |
| 102 | */ |
| 103 | default List<UiTopoHighlighterFactory> getTopoHighlighterFactories() { |
| 104 | return new ArrayList<UiTopoHighlighterFactory>(); |
| 105 | } |
| 106 | |
| 107 | /** |
Simon Hunt | 23f9c7b | 2017-07-10 20:00:30 -0700 | [diff] [blame] | 108 | * Returns the navigation pane localization bundle. |
| 109 | * |
| 110 | * @return the navigation localization bundle |
| 111 | */ |
| 112 | LionBundle getNavLionBundle(); |
Thomas Vachuska | 1b1355d | 2018-02-06 16:53:58 -0800 | [diff] [blame] | 113 | |
| 114 | /** |
| 115 | * Refreshes the backing model. |
| 116 | */ |
| 117 | void refreshModel(); |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 118 | } |