blob: e15e9197e9d9a87ed7b98f7f9b5d8457674062ac [file] [log] [blame]
Thomas Vachuska02aeb032015-01-06 22:36:30 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Thomas Vachuska02aeb032015-01-06 22:36:30 -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.app;
17
Changhoon Yoonbdeb88a2015-05-12 20:35:31 +090018import org.onosproject.core.ApplicationRole;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080019import org.onosproject.core.Version;
Changhoon Yoonb856b812015-08-10 03:47:19 +090020import org.onosproject.security.Permission;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080021
22import java.net.URI;
Thomas Vachuskaebf5e542015-02-03 19:38:13 -080023import java.util.List;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080024import java.util.Optional;
25import java.util.Set;
26
27/**
28 * Description of a network control/management application.
29 */
30public interface ApplicationDescription {
31
32 /**
33 * Returns the application name id.
34 *
35 * @return application identifier
36 */
37 String name();
38
39 /**
40 * Returns the application version.
41 *
42 * @return application version
43 */
44 Version version();
45
46 /**
Jian Lic35415d2016-01-14 17:22:31 -080047 * Returns the name of the application origin, group or company.
48 *
49 * @return application origin
50 */
51 String origin();
52
53 /**
Simon Huntafae2f72016-03-04 21:18:23 -080054 * Returns title of the application.
55 *
56 * @return application title text
57 */
58 String title();
59
60 /**
Thomas Vachuska02aeb032015-01-06 22:36:30 -080061 * Returns description of the application.
62 *
63 * @return application description text
64 */
65 String description();
66
67 /**
Jian Lic35415d2016-01-14 17:22:31 -080068 * Returns category of the application.
Thomas Vachuska02aeb032015-01-06 22:36:30 -080069 *
Jian Lifd46e1d2016-03-08 09:18:53 -080070 * The application developer can choose one of the category from the
71 * following examples to easily discern the high-level purpose of the application.
72 * (Security, Traffic Steering, Monitoring, Drivers, Provider, Utility)
73 *
Jian Lic35415d2016-01-14 17:22:31 -080074 * @return application category text
Thomas Vachuska02aeb032015-01-06 22:36:30 -080075 */
Jian Lic35415d2016-01-14 17:22:31 -080076 String category();
77
78 /**
79 * Returns url of the application.
80 *
81 * @return application url
82 */
83 String url();
84
85 /**
86 * Returns readme of the application.
87 *
88 * @return application readme
89 */
90 String readme();
91
92 /**
93 * Returns icon of the application.
94 *
95 * @return application icon
96 */
97 byte[] icon();
Thomas Vachuska02aeb032015-01-06 22:36:30 -080098
99 /**
Changhoon Yoonbdeb88a2015-05-12 20:35:31 +0900100 * Returns the role of the application.
101 *
102 * @return application role
103 */
104 ApplicationRole role();
105
106 /**
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800107 * Returns the permissions requested by the application.
108 *
109 * @return requested permissions
110 */
111 Set<Permission> permissions();
112
113 /**
114 * Returns the feature repository URI. Null value signifies that the
115 * application did not provide its own features repository.
116 *
117 * @return optional feature repo URL
118 */
119 Optional<URI> featuresRepo();
120
121 /**
Thomas Vachuskaebf5e542015-02-03 19:38:13 -0800122 * Returns the list of features comprising the application. At least one
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800123 * feature must be given.
124 *
125 * @return application features
126 */
Thomas Vachuskaebf5e542015-02-03 19:38:13 -0800127 List<String> features();
Thomas Vachuska761f0042015-11-11 19:10:17 -0800128
129 /**
130 * Returns list of required application names.
131 *
132 * @return list of application names
133 */
134 List<String> requiredApps();
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800135}