sonu gupta | 1bb37b8 | 2016-11-11 16:51:18 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present 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 | |
| 17 | package org.onosproject.yms.app.ydt; |
| 18 | |
| 19 | import org.onosproject.yangutils.datamodel.YangSchemaNode; |
| 20 | import org.onosproject.yms.ydt.YdtContext; |
| 21 | |
| 22 | import java.util.List; |
| 23 | |
| 24 | /** |
| 25 | * Maintains application data, which will be used by Application broker to |
| 26 | * interact with applications. |
| 27 | */ |
| 28 | public interface AppData { |
| 29 | |
| 30 | /** |
| 31 | * Returns the list of nodes with operation type delete. |
| 32 | * |
| 33 | * @return list of nodes with operation type delete |
| 34 | */ |
| 35 | List<YdtContext> getDeleteNodes(); |
| 36 | |
| 37 | /** |
| 38 | * Adds the ydt node with operation type delete in module delete node list. |
| 39 | * |
| 40 | * @param node ydt node with operation type delete/remove |
| 41 | */ |
| 42 | void addDeleteNodes(YdtContext node); |
| 43 | |
| 44 | /** |
| 45 | * Returns application's root ydtContext. |
| 46 | * |
| 47 | * @return YdtContext of application root node |
| 48 | */ |
| 49 | YdtContext getModuleContext(); |
| 50 | |
| 51 | /** |
| 52 | * Sets the application's ydtContext. |
| 53 | * |
| 54 | * @param moduleNode application's ydtContext |
| 55 | */ |
| 56 | void setModuleContext(YdtContext moduleNode); |
| 57 | |
| 58 | /** |
| 59 | * Returns the YangSchemaNode of augmenting application. |
| 60 | * |
| 61 | * @return YangSchemaNode of augmenting application |
| 62 | */ |
| 63 | YangSchemaNode getAugmentingSchemaNode(); |
| 64 | |
| 65 | /** |
| 66 | * Sets the YangSchemaNode of augmenting application root node. |
| 67 | * |
| 68 | * @param schemaNode YangSchemaNode of augmenting application module |
| 69 | */ |
| 70 | void setAugmentingSchemaNode(YangSchemaNode schemaNode); |
| 71 | |
| 72 | /** |
| 73 | * Returns the schema node current context. |
| 74 | * |
| 75 | * @return schema node |
| 76 | */ |
| 77 | YangSchemaNode getSchemaNode(); |
| 78 | |
| 79 | /** |
| 80 | * Returns the root/module schema node current application. |
| 81 | * |
| 82 | * @return schema node |
| 83 | */ |
| 84 | YangSchemaNode getRootSchemaNode(); |
| 85 | } |