blob: 18babd5959b0c5bc4ba56064fea571185a2b370b [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;
21
22import java.io.InputStream;
23import java.util.Set;
24
25/**
26 * Service for managing network control applications.
27 */
28public interface ApplicationAdminService extends ApplicationService {
29
30 /**
31 * Installs the application contained in the specified application archive
32 * input stream.
33 *
34 * @param appDescStream application descriptor input stream
35 * @return installed application descriptor
36 * @throws org.onosproject.app.ApplicationException if unable to read the app archive stream
37 */
38 Application install(InputStream appDescStream);
39
40 /**
41 * Uninstalls the specified application.
42 *
43 * @param appId application identifier
44 */
45 void uninstall(ApplicationId appId);
46
47 /**
48 * Activates the specified application.
49 *
50 * @param appId application identifier
51 */
52 void activate(ApplicationId appId);
53
54 /**
55 * Deactivates the specified application.
56 *
57 * @param appId application identifier
58 */
59 void deactivate(ApplicationId appId);
60
61 /**
62 * Updates the permissions granted to the applications.
63 *
64 * @param appId application identifier
65 * @param permissions set of granted permissions
66 */
67 void setPermissions(ApplicationId appId, Set<Permission> permissions);
68}