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