blob: 79114e0d31e2b4a810feca8cf6630084ffec4a0d [file] [log] [blame]
Thomas Vachuskafe8c98a2015-02-04 01:24:32 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Thomas Vachuskafe8c98a2015-02-04 01:24:32 -08003 *
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 */
16package org.onosproject.ui;
17
18import java.util.List;
19
20/**
21 * Service for registering user interface extensions.
22 */
23public interface UiExtensionService {
24
25 /**
26 * Registers the specified user interface extension.
27 *
Simon Hunt8add9ee2016-09-20 17:05:07 -070028 * @param extension UI extension to register
Thomas Vachuskafe8c98a2015-02-04 01:24:32 -080029 */
30 void register(UiExtension extension);
31
32 /**
33 * Unregisters the specified user interface extension.
34 *
Simon Hunt8add9ee2016-09-20 17:05:07 -070035 * @param extension UI extension to unregister
Thomas Vachuskafe8c98a2015-02-04 01:24:32 -080036 */
37 void unregister(UiExtension extension);
38
39 /**
Simon Hunt8add9ee2016-09-20 17:05:07 -070040 * Returns the list of registered user interface extensions.
Thomas Vachuskafe8c98a2015-02-04 01:24:32 -080041 *
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
Simon Hunt8add9ee2016-09-20 17:05:07 -070050 * @return contributing user interface extension
Thomas Vachuskafe8c98a2015-02-04 01:24:32 -080051 */
52 UiExtension getViewExtension(String viewId);
53}