public interface YdtBuilder extends Ydt
NBI protocols need to translate the protocol operation request, into a protocol independent abstract tree called the YANG data tree (YDT). In order to enable the protocol in building these abstract data tree, YANG management system provides a utility called the YANG data tree builder.
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(String name,
String namespace)
Adds a last child to YANG data tree; this method is to be used by
protocols which are unaware of the nature (single/multiple) of node and
also unaware of the operation type at every node (Example: RESTCONF).
|
void |
addChild(String name,
String namespace,
YdtContextOperationType opType)
Adds a last child to YANG data tree; this method is to be used by
protocols which are unaware of the nature (single/multiple) of node.
|
void |
addChild(String name,
String namespace,
YdtType ydtType)
Adds a last child to YANG data tree, this method is to be used by
protocols which are aware of the nature (single/multiple) of node.
|
void |
addChild(String name,
String namespace,
YdtType ydtType,
YdtContextOperationType opType)
Adds a last child to YANG data tree; this method is to be used by
protocols which are aware of the nature (single/multiple) of node.
|
void |
addLeaf(String name,
String namespace,
Set<String> valueSet)
Adds a last leaf with list of values to YANG data tree.
|
void |
addLeaf(String name,
String namespace,
String value)
Adds a last leaf with value to YANG data tree.
|
void |
addMultiInstanceChild(String name,
String namespace,
List<String> valueList,
YdtContextOperationType opType)
Adds an instance of a child list node, or adds a child leaf list with
multiple instance.
|
YdtContext |
getCurNode()
Returns the current context information available in YDT node.
|
Map<String,String> |
getRootTagAttributeMap()
Returns map of tag attribute list associated with root resource.
|
void |
setDefaultEditOperationType(YdtContextOperationType ydtContextOperationType)
Sets default operation type.
|
void |
setRootTagAttributeMap(Map<String,String> attributeTag)
Sets root node tag attributes.
|
void |
traverseToParent()
Traverses up in YANG data tree to the parent node, it is to be used when
protocol is using context type "current" and wanted to traverse up the
tree.
|
getRootNode, getYmsOperationTypevoid setRootTagAttributeMap(Map<String,String> attributeTag)
attributeTag - map of root tags attribute values indexed by root
tag nameMap<String,String> getRootTagAttributeMap()
void addChild(String name, String namespace) throws IllegalArgumentException
Add child is used to add module/sub-module nodes also. Request may contain revision number corresponding to Module/sub-module in that case YMS expect revision number to be appended to module/sub-module name in the below mentioned format.
module-or-submodule-name ['@' date-arg] date-arg = 4DIGIT "-" 2DIGIT "-" 2DIGIT Example: testModule@2016-10-27.
If the revision date is not specified YMS first search for registered module/sub-module without revision date, if still can't obtain then uses registered module/sub-module with latest revision date.
name - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childIllegalArgumentException - when method has been passed an illegal
or inappropriate argument.void addChild(String name, String namespace, YdtType ydtType) throws IllegalArgumentException
Add child is used to add module/sub-module nodes also. Request may contain revision number corresponding to Module/sub-module in that case YMS expect revision number to be appended to module/sub-module name in the below mentioned format.
module-or-submodule-name ['@' date-arg] date-arg = 4DIGIT "-" 2DIGIT "-" 2DIGIT Example: testModule@2016-10-27.
If the revision date is not specified YMS first search for registered module/sub-module without revision date, if still can't obtain then uses registered module/sub-module with latest revision date.
name - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childydtType - type of YDT node to be addedIllegalArgumentException - when method has been passed an illegal
or inappropriate argument.void addChild(String name, String namespace, YdtContextOperationType opType) throws IllegalArgumentException
Add child is used to add module/sub-module nodes also. Request may contain revision number corresponding to Module/sub-module in that case YMS expect revision number to be appended to module/sub-module name in the below mentioned format.
module-or-submodule-name ['@' date-arg] date-arg = 4DIGIT "-" 2DIGIT "-" 2DIGIT Example: testModule@2016-10-27.
If the revision date is not specified YMS first search for registered module/sub-module without revision date, if still can't obtain then uses registered module/sub-module with latest revision date.
name - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childopType - type of requested operation over a nodeIllegalArgumentException - when method has been passed an illegal
or inappropriate argument.void addChild(String name, String namespace, YdtType ydtType, YdtContextOperationType opType) throws IllegalArgumentException
Add child is used to add module/sub-module nodes also. Request may contain revision number corresponding to Module/sub-module in that case YMS expect revision number to be appended to module/sub-module name in the below mentioned format.
module-or-submodule-name ['@' date-arg] date-arg = 4DIGIT "-" 2DIGIT "-" 2DIGIT Example: testModule@2016-10-27.
If the revision date is not specified YMS first search for registered module/sub-module without revision date, if still can't obtain then uses registered module/sub-module with latest revision date.
name - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childydtType - type of YDT node to be addedopType - type of requested operation over a nodeIllegalArgumentException - when method has been passed an illegal
or inappropriate argument.void addLeaf(String name, String namespace, String value) throws IllegalArgumentException
name - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childvalue - value of the childIllegalArgumentException - when method has been passed an illegal
or inappropriate argument.void addLeaf(String name, String namespace, Set<String> valueSet) throws IllegalArgumentException
name - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childvalueSet - list of value of the childIllegalArgumentException - when method has been passed an illegal
or inappropriate argument.void addMultiInstanceChild(String name, String namespace, List<String> valueList, YdtContextOperationType opType) throws IllegalArgumentException
name - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childvalueList - values of the keys in URI in the same order
as defined in YANG fileopType - type of requested operation over a nodeIllegalArgumentException - when method has been passed an illegal
or inappropriate argument.void traverseToParent()
throws IllegalStateException
IllegalStateException - when application is not in an appropriate
state for the requested operation.YdtContext getCurNode()
void setDefaultEditOperationType(YdtContextOperationType ydtContextOperationType)
ydtContextOperationType - default edit operation type