blob: 8700cadde87f8f2929f9ddeb369304e00d0b55ff [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.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;
24
25/**
26 * Abstraction of a network control/management application.
27 */
28public interface Application {
29
30 /**
31 * Returns the application name id.
32 *
33 * @return application identifier
34 */
35 ApplicationId id();
36
37 /**
38 * Returns the application version.
39 *
40 * @return application version
41 */
42 Version version();
43
44 /**
45 * Returns description of the application.
46 *
47 * @return application description text
48 */
49 String description();
50
51 /**
Jian Lic35415d2016-01-14 17:22:31 -080052 * Returns category of the application.
53 *
54 * @return application category text
55 */
56 String category();
57
58 /**
59 * Returns url of the application.
60 *
61 * @return application url
62 */
63 String url();
64
65 /**
66 * Returns readme of the application.
67 *
68 * @return application readme
69 */
70 String readme();
71
72 /**
73 * Returns icon of the application.
74 *
75 * @return application icon
76 */
77 byte[] icon();
78
79 /**
Thomas Vachuska02aeb032015-01-06 22:36:30 -080080 * Returns the name of the application origin, group or company.
81 *
82 * @return application origin
83 */
84 String origin();
85
86 /**
Changhoon Yoonbdeb88a2015-05-12 20:35:31 +090087 * Returns the role of the application.
88 *
89 * @return application role
90 */
91 ApplicationRole role();
92
93 /**
Thomas Vachuska02aeb032015-01-06 22:36:30 -080094 * Returns the permissions requested by the application.
95 *
96 * @return requested permissions
97 */
98 Set<Permission> permissions();
99
100 /**
101 * Returns the feature repository URI. Null value signifies that the
102 * application did not provide its own features repository.
103 *
104 * @return optional feature repo URL
105 */
106 Optional<URI> featuresRepo();
107
108 /**
Thomas Vachuskaebf5e542015-02-03 19:38:13 -0800109 * Returns the list of features comprising the application. At least one
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800110 * feature must be given.
111 *
112 * @return application features
113 */
Thomas Vachuskaebf5e542015-02-03 19:38:13 -0800114 List<String> features();
Thomas Vachuska761f0042015-11-11 19:10:17 -0800115
116 /**
117 * Returns list of required application names.
118 *
119 * @return list of application names
120 */
121 List<String> requiredApps();
Thomas Vachuska02aeb032015-01-06 22:36:30 -0800122}