blob: 84279dc90b7b3f3506cdfa477a982cc46c773de8 [file] [log] [blame]
Thomas Vachuska02aeb032015-01-06 22:36:30 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
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.core;
17
Changhoon Yoonb856b812015-08-10 03:47:19 +090018import org.onosproject.security.Permission;
19
Thomas Vachuska02aeb032015-01-06 22:36:30 -080020import java.net.URI;
Thomas Vachuskaebf5e542015-02-03 19:38:13 -080021import java.util.List;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080022import java.util.Optional;
23import java.util.Set;
Arnav Jain35ef3d32019-07-01 14:33:52 -070024import java.net.URL;
Thomas Vachuska02aeb032015-01-06 22:36:30 -080025
26/**
27 * Abstraction of a network control/management application.
28 */
29public interface Application {
30
31 /**
32 * Returns the application name id.
33 *
34 * @return application identifier
35 */
36 ApplicationId id();
37
38 /**
39 * Returns the application version.
40 *
41 * @return application version
42 */
43 Version version();
44
45 /**
Simon Huntafae2f72016-03-04 21:18:23 -080046 * Returns the title of the application.
47 * This should be a short, human-readable string, as opposed
48 * to the unique identifier returned by {@link #id()}.
49 *
50 * @return application title text
51 */
52 String title();
53
54 /**
Thomas Vachuska02aeb032015-01-06 22:36:30 -080055 * Returns description of the application.
56 *
57 * @return application description text
58 */
59 String description();
60
61 /**
Jian Lic35415d2016-01-14 17:22:31 -080062 * Returns category of the application.
63 *
Jian Lifd46e1d2016-03-08 09:18:53 -080064 * The application developer can choose one of the category from the
65 * following examples to easily discern the high-level purpose of the application.
66 * (Security, Traffic Steering, Monitoring, Drivers, Provider, Utility)
67 *
Jian Lic35415d2016-01-14 17:22:31 -080068 * @return application category text
69 */
70 String category();
71
72 /**
73 * Returns url of the application.
74 *
75 * @return application url
76 */
77 String url();
78
79 /**
80 * Returns readme of the application.
81 *
82 * @return application readme
83 */
84 String readme();
85
86 /**
87 * Returns icon of the application.
88 *
89 * @return application icon
90 */
91 byte[] icon();
92
93 /**
Thomas Vachuska02aeb032015-01-06 22:36:30 -080094 * Returns the name of the application origin, group or company.
95 *
96 * @return application origin
97 */
98 String origin();
99
100 /**
Changhoon Yoonbdeb88a2015-05-12 20:35:31 +0900101 * Returns the role of the application.
102 *
103 * @return application role
104 */
105 ApplicationRole role();
106
107 /**
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800108 * Returns the permissions requested by the application.
109 *
110 * @return requested permissions
111 */
112 Set<Permission> permissions();
113
114 /**
115 * Returns the feature repository URI. Null value signifies that the
116 * application did not provide its own features repository.
117 *
118 * @return optional feature repo URL
119 */
120 Optional<URI> featuresRepo();
121
122 /**
Thomas Vachuskaebf5e542015-02-03 19:38:13 -0800123 * Returns the list of features comprising the application. At least one
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800124 * feature must be given.
125 *
126 * @return application features
127 */
Thomas Vachuskaebf5e542015-02-03 19:38:13 -0800128 List<String> features();
Thomas Vachuska761f0042015-11-11 19:10:17 -0800129
130 /**
131 * Returns list of required application names.
132 *
133 * @return list of application names
134 */
135 List<String> requiredApps();
Arnav Jain35ef3d32019-07-01 14:33:52 -0700136
137 /**
138 * Returns binary image URL.
139 *
140 * @return URL of binary image
141 */
142 URL imageUrl();
143}