Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 1 | /*Copyright 2016.year Open Networking Laboratory |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License.*/ |
| 14 | package org.onosproject.yangutils.datamodel; |
| 15 | |
| 16 | import java.util.List; |
| 17 | |
| 18 | /** |
| 19 | * Abstraction of atomic configurable/status entity. It is used to abstract the |
| 20 | * data holders of leaf or leaf list. Used in leaves parsing or attribute code |
| 21 | * generation. |
| 22 | */ |
| 23 | public interface YangLeavesHolder { |
| 24 | |
| 25 | /** |
| 26 | * Get the list of leaves from data holder like container / list. |
| 27 | * |
| 28 | * @return the list of leaves. |
| 29 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame^] | 30 | public List<YangLeaf> getListOfLeaf(); |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 31 | |
| 32 | /** |
| 33 | * Add a leaf in data holder like container / list. |
| 34 | * |
| 35 | * @param leaf the leaf to be added. |
| 36 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame^] | 37 | void addLeaf(YangLeaf leaf); |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 38 | |
| 39 | /** |
| 40 | * Get the list of leaf-list from data holder like container / list. |
| 41 | * |
| 42 | * @return the list of leaf-list. |
| 43 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame^] | 44 | List<YangLeafList> getListOfLeafList(); |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 45 | |
| 46 | /** |
| 47 | * Add a leaf-list in data holder like container / list. |
| 48 | * |
| 49 | * @param leafList the leaf-list to be added. |
| 50 | */ |
Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame^] | 51 | void addLeafList(YangLeafList leafList); |
Vinod Kumar S | 6a33667 | 2016-02-09 20:12:31 +0530 | [diff] [blame] | 52 | } |