blob: a21ed34baf504dfb29d53ed5e17b6699f20767a8 [file] [log] [blame]
Bharat saraswald9822e92016-04-05 15:13:44 +05301/*
Vidyashree Rama74453712016-04-18 12:29:39 +05302 * Copyright 2016-present Open Networking Laboratory
Bharat saraswald9822e92016-04-05 15:13:44 +05303 *
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 */
Vinod Kumar S19f39c72016-02-09 20:12:31 +053016
Vinod Kumar S19f39c72016-02-09 20:12:31 +053017package org.onosproject.yangutils.datamodel;
18
19import java.util.List;
20
21/**
22 * Abstraction of atomic configurable/status entity. It is used to abstract the
23 * data holders of leaf or leaf list. Used in leaves parsing or attribute code
24 * generation.
25 */
26public interface YangLeavesHolder {
27
28 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053029 * Returns the list of leaves from data holder like container / list.
Vinod Kumar S19f39c72016-02-09 20:12:31 +053030 *
Vidyashree Rama74453712016-04-18 12:29:39 +053031 * @return the list of leaves
Vinod Kumar S19f39c72016-02-09 20:12:31 +053032 */
Vidyashree Rama74453712016-04-18 12:29:39 +053033 List<YangLeaf> getListOfLeaf();
Vinod Kumar S19f39c72016-02-09 20:12:31 +053034
35 /**
VinodKumarS-Huawei2ee9e7e2016-06-01 14:30:22 +053036 * Sets the list of leaves.
37 *
38 * @param leafsList the list of leaf to set
39 */
40 void setListOfLeaf(List<YangLeaf> leafsList);
41
42 /**
Vidyashree Rama74453712016-04-18 12:29:39 +053043 * Adds leaf in data holder like container / list.
Vinod Kumar S19f39c72016-02-09 20:12:31 +053044 *
Vidyashree Rama74453712016-04-18 12:29:39 +053045 * @param leaf the leaf to be added
Vinod Kumar S19f39c72016-02-09 20:12:31 +053046 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053047 void addLeaf(YangLeaf leaf);
Vinod Kumar S19f39c72016-02-09 20:12:31 +053048
49 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053050 * Returns the list of leaf-list from data holder like container / list.
Vinod Kumar S19f39c72016-02-09 20:12:31 +053051 *
Vidyashree Rama74453712016-04-18 12:29:39 +053052 * @return the list of leaf-list
Vinod Kumar S19f39c72016-02-09 20:12:31 +053053 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053054 List<YangLeafList> getListOfLeafList();
Vinod Kumar S19f39c72016-02-09 20:12:31 +053055
56 /**
VinodKumarS-Huawei2ee9e7e2016-06-01 14:30:22 +053057 * Sets the list of leaf-list.
58 *
59 * @param listOfLeafList the list of leaf-list to set
60 */
61 void setListOfLeafList(List<YangLeafList> listOfLeafList);
62
63 /**
Vidyashree Rama74453712016-04-18 12:29:39 +053064 * Adds leaf-list in data holder like container / list.
Vinod Kumar S19f39c72016-02-09 20:12:31 +053065 *
Vidyashree Rama74453712016-04-18 12:29:39 +053066 * @param leafList the leaf-list to be added
Vinod Kumar S19f39c72016-02-09 20:12:31 +053067 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053068 void addLeafList(YangLeafList leafList);
Vinod Kumar S19f39c72016-02-09 20:12:31 +053069}