blob: 37ecc8fae9df66e81a2596a49fdda85638cbc53e [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 /**
Vidyashree Rama74453712016-04-18 12:29:39 +053036 * Adds leaf in data holder like container / list.
Vinod Kumar S19f39c72016-02-09 20:12:31 +053037 *
Vidyashree Rama74453712016-04-18 12:29:39 +053038 * @param leaf the leaf to be added
Vinod Kumar S19f39c72016-02-09 20:12:31 +053039 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053040 void addLeaf(YangLeaf leaf);
Vinod Kumar S19f39c72016-02-09 20:12:31 +053041
42 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053043 * Returns the list of leaf-list from data holder like container / list.
Vinod Kumar S19f39c72016-02-09 20:12:31 +053044 *
Vidyashree Rama74453712016-04-18 12:29:39 +053045 * @return the list of leaf-list
Vinod Kumar S19f39c72016-02-09 20:12:31 +053046 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053047 List<YangLeafList> getListOfLeafList();
Vinod Kumar S19f39c72016-02-09 20:12:31 +053048
49 /**
Vidyashree Rama74453712016-04-18 12:29:39 +053050 * Adds leaf-list in data holder like container / list.
Vinod Kumar S19f39c72016-02-09 20:12:31 +053051 *
Vidyashree Rama74453712016-04-18 12:29:39 +053052 * @param leafList the leaf-list to be added
Vinod Kumar S19f39c72016-02-09 20:12:31 +053053 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053054 void addLeafList(YangLeafList leafList);
Vinod Kumar S19f39c72016-02-09 20:12:31 +053055}