blob: bb55da93c4c6399a8e9f68dea6ef742fa93192e3 [file] [log] [blame]
Thomas Vachuska02aeb032015-01-06 22:36:30 -08001/*
2 * Copyright 2015 Open Networking Laboratory
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 */
16package org.onosproject.app;
17
18import org.onosproject.core.Application;
19import org.onosproject.core.ApplicationId;
20import org.onosproject.core.Permission;
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070021import org.onosproject.event.ListenerService;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080022
23import java.util.Set;
24
25/**
26 * Service for inspecting inventory of network control applications.
27 */
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070028public interface ApplicationService
29 extends ListenerService<ApplicationEvent, ApplicationListener> {
Thomas Vachuska02aeb032015-01-06 22:36:30 -080030
31 /**
32 * Returns the set of all installed applications.
33 *
34 * @return set of installed apps
35 */
36 Set<Application> getApplications();
37
38 /**
39 * Returns the registered id of the application with the given name.
40 *
41 * @param name application name
42 * @return registered application id
43 */
44 ApplicationId getId(String name);
45
46 /**
47 * Returns the application with the supplied application identifier.
48 *
49 * @param appId application identifier
50 * @return application descriptor
51 */
52 Application getApplication(ApplicationId appId);
53
54 /**
55 * Return the application state.
56 *
57 * @param appId application identifier
58 * @return application state
59 */
60 ApplicationState getState(ApplicationId appId);
61
62 /**
63 * Returns the permissions currently granted to the applications.
64 *
65 * @param appId application identifier
66 * @return set of granted permissions
67 */
68 Set<Permission> getPermissions(ApplicationId appId);
69
Thomas Vachuska02aeb032015-01-06 22:36:30 -080070}