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 | |
| 18 | import java.net.URI; |
Thomas Vachuska | ebf5e54 | 2015-02-03 19:38:13 -0800 | [diff] [blame] | 19 | import java.util.List; |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 20 | import java.util.Optional; |
| 21 | import java.util.Set; |
| 22 | |
| 23 | /** |
| 24 | * Abstraction of a network control/management application. |
| 25 | */ |
| 26 | public interface Application { |
| 27 | |
| 28 | /** |
| 29 | * Returns the application name id. |
| 30 | * |
| 31 | * @return application identifier |
| 32 | */ |
| 33 | ApplicationId id(); |
| 34 | |
| 35 | /** |
| 36 | * Returns the application version. |
| 37 | * |
| 38 | * @return application version |
| 39 | */ |
| 40 | Version version(); |
| 41 | |
| 42 | /** |
| 43 | * Returns description of the application. |
| 44 | * |
| 45 | * @return application description text |
| 46 | */ |
| 47 | String description(); |
| 48 | |
| 49 | /** |
| 50 | * Returns the name of the application origin, group or company. |
| 51 | * |
| 52 | * @return application origin |
| 53 | */ |
| 54 | String origin(); |
| 55 | |
| 56 | /** |
Changhoon Yoon | bdeb88a | 2015-05-12 20:35:31 +0900 | [diff] [blame] | 57 | * Returns the role of the application. |
| 58 | * |
| 59 | * @return application role |
| 60 | */ |
| 61 | ApplicationRole role(); |
| 62 | |
| 63 | /** |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 64 | * Returns the permissions requested by the application. |
| 65 | * |
| 66 | * @return requested permissions |
| 67 | */ |
| 68 | Set<Permission> permissions(); |
| 69 | |
| 70 | /** |
| 71 | * Returns the feature repository URI. Null value signifies that the |
| 72 | * application did not provide its own features repository. |
| 73 | * |
| 74 | * @return optional feature repo URL |
| 75 | */ |
| 76 | Optional<URI> featuresRepo(); |
| 77 | |
| 78 | /** |
Thomas Vachuska | ebf5e54 | 2015-02-03 19:38:13 -0800 | [diff] [blame] | 79 | * Returns the list of features comprising the application. At least one |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 80 | * feature must be given. |
| 81 | * |
| 82 | * @return application features |
| 83 | */ |
Thomas Vachuska | ebf5e54 | 2015-02-03 19:38:13 -0800 | [diff] [blame] | 84 | List<String> features(); |
Thomas Vachuska | 02aeb03 | 2015-01-06 22:36:30 -0800 | [diff] [blame] | 85 | } |