Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.core; |
| 17 | |
Changhoon Yoon | b856b81 | 2015-08-10 03:47:19 +0900 | [diff] [blame] | 18 | import org.onosproject.security.Permission; |
| 19 | |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 20 | import java.net.URI; |
Thomas Vachuska | ebf5e54 | 2015-02-03 19:38:13 -0800 | [diff] [blame] | 21 | import java.util.List; |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 22 | import java.util.Optional; |
| 23 | import java.util.Set; |
| 24 | |
| 25 | /** |
| 26 | * Abstraction of a network control/management application. |
| 27 | */ |
| 28 | public 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 | /** |
| 52 | * Returns the name of the application origin, group or company. |
| 53 | * |
| 54 | * @return application origin |
| 55 | */ |
| 56 | String origin(); |
| 57 | |
| 58 | /** |
Changhoon Yoon | bdeb88a | 2015-05-12 20:35:31 +0900 | [diff] [blame] | 59 | * Returns the role of the application. |
| 60 | * |
| 61 | * @return application role |
| 62 | */ |
| 63 | ApplicationRole role(); |
| 64 | |
| 65 | /** |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 66 | * Returns the permissions requested by the application. |
| 67 | * |
| 68 | * @return requested permissions |
| 69 | */ |
| 70 | Set<Permission> permissions(); |
| 71 | |
| 72 | /** |
| 73 | * Returns the feature repository URI. Null value signifies that the |
| 74 | * application did not provide its own features repository. |
| 75 | * |
| 76 | * @return optional feature repo URL |
| 77 | */ |
| 78 | Optional<URI> featuresRepo(); |
| 79 | |
| 80 | /** |
Thomas Vachuska | ebf5e54 | 2015-02-03 19:38:13 -0800 | [diff] [blame] | 81 | * Returns the list of features comprising the application. At least one |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 82 | * feature must be given. |
| 83 | * |
| 84 | * @return application features |
| 85 | */ |
Thomas Vachuska | ebf5e54 | 2015-02-03 19:38:13 -0800 | [diff] [blame] | 86 | List<String> features(); |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 87 | } |