public class YangRequestWorkBench extends Object implements YdtExtendedBuilder
| Constructor and Description |
|---|
YangRequestWorkBench(String name,
String namespace,
YmsOperationType opType,
YangSchemaRegistry reg,
boolean isValidate)
Creates an instance of YANG request work bench which is use to initialize
logical rootNode and and schema registry.
|
| 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.
|
YdtExtendedContext |
addChild(YdtContextOperationType opType,
org.onosproject.yangutils.datamodel.YangSchemaNode schemaNode)
Adds a last child to YANG data tree; this method is to be used by
YANG object builder.
|
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.
|
YdtExtendedContext |
addLeaf(String value,
org.onosproject.yangutils.datamodel.YangSchemaNode schemaNode)
Adds a last leaf to YANG data tree; this method is to be used by
YANG object builder.
|
YdtExtendedContext |
addLeafList(Set<String> valueSet,
org.onosproject.yangutils.datamodel.YangSchemaNode schemaNode)
Adds a last leaf list to YANG data tree; this method is to be used by
YANG object builder.
|
void |
addMultiInstanceChild(String name,
String namespace,
List<String> keysValueList,
YdtContextOperationType opType)
Adds an instance of a child list node, or adds a child leaf list with
multiple instance.
|
YdtAppContext |
getAppRootNode()
Returns the ydt app context tree logical root node.
|
Set<String> |
getAugGenMethodSet()
Returns the method name's set for an augmented target node in an
application tree.
|
YdtExtendedContext |
getCurNode()
Returns the current context information available in YDT node.
|
YdtExtendedContext |
getRootNode()
Returns the root context information available in YDT node.
|
Map<String,String> |
getRootTagAttributeMap()
Returns map of tag attribute list associated with root resource.
|
YangSchemaRegistry |
getYangSchemaRegistry()
Returns the YANG schema registry of Ydt.
|
YmsOperationType |
getYmsOperationType()
Returns YANG management system operation type.
|
void |
setAugGenMethodSet(Set<String> augGenMethodSet)
Sets the method name's set for an augmented target node in an
application tree.
|
void |
setDefaultEditOperationType(YdtContextOperationType opType)
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.
|
void |
traverseToParentWithoutValidation()
Traverses up in YANG data tree to the parent node, it is to be used when
protocol is using extended context type and wanted to traverse
up the tree without doing any validation.
|
public YangRequestWorkBench(String name, String namespace, YmsOperationType opType, YangSchemaRegistry reg, boolean isValidate)
name - name of logical container of a protocol
which is a holder of the complete treenamespace - namespace of logical containeropType - type of operation done by using YANG
interfacereg - Yang schema registryisValidate - Flag to identify data validation need to be
done by YDT or notpublic YangSchemaRegistry getYangSchemaRegistry()
public YdtAppContext getAppRootNode()
public void setRootTagAttributeMap(Map<String,String> attributeTag)
YdtBuildersetRootTagAttributeMap in interface YdtBuilderattributeTag - map of root tags attribute values indexed by root
tag namepublic Map<String,String> getRootTagAttributeMap()
YdtBuildergetRootTagAttributeMap in interface YdtBuilderpublic void addChild(String name, String namespace) throws IllegalArgumentException
YdtBuilderAdd 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.
addChild in interface YdtBuildername - 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.public void addChild(String name, String namespace, YdtType ydtType) throws IllegalArgumentException
YdtBuilderAdd 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.
addChild in interface YdtBuildername - 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.public void addChild(String name, String namespace, YdtContextOperationType opType) throws IllegalArgumentException
YdtBuilderAdd 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.
addChild in interface YdtBuildername - 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.public void addChild(String name, String namespace, YdtType ydtType, YdtContextOperationType opType) throws IllegalArgumentException
YdtBuilderAdd 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.
addChild in interface YdtBuildername - 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.public void addLeaf(String name, String namespace, String value) throws IllegalArgumentException
YdtBuilderaddLeaf in interface YdtBuildername - 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.public void addLeaf(String name, String namespace, Set<String> valueSet) throws IllegalArgumentException
YdtBuilderaddLeaf in interface YdtBuildername - 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.public void traverseToParent()
throws IllegalStateException
YdtBuildertraverseToParent in interface YdtBuilderIllegalStateException - when application is not in an appropriate
state for the requested operation.public YdtExtendedContext getCurNode()
YdtBuildergetCurNode in interface YdtExtendedBuildergetCurNode in interface YdtBuilderpublic void setDefaultEditOperationType(YdtContextOperationType opType)
YdtBuildersetDefaultEditOperationType in interface YdtBuilderopType - default edit operation typepublic YdtExtendedContext getRootNode()
YdtgetRootNode in interface YdtExtendedBuildergetRootNode in interface Ydtpublic YmsOperationType getYmsOperationType()
YdtgetYmsOperationType in interface Ydtpublic void addMultiInstanceChild(String name, String namespace, List<String> keysValueList, YdtContextOperationType opType) throws IllegalArgumentException
YdtBuilderaddMultiInstanceChild in interface YdtBuildername - name of child to be addednamespace - namespace of child to be added, if it's null, parent's
namespace will be applied to childkeysValueList - 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.public YdtExtendedContext addChild(YdtContextOperationType opType, org.onosproject.yangutils.datamodel.YangSchemaNode schemaNode)
YdtExtendedBuilderaddChild in interface YdtExtendedBuilderopType - type of requested operation over a nodeschemaNode - schema node from YANG metadatapublic YdtExtendedContext addLeafList(Set<String> valueSet, org.onosproject.yangutils.datamodel.YangSchemaNode schemaNode)
YdtExtendedBuilderaddLeafList in interface YdtExtendedBuildervalueSet - list of value of the childschemaNode - schema node from YANG metadatapublic YdtExtendedContext addLeaf(String value, org.onosproject.yangutils.datamodel.YangSchemaNode schemaNode)
YdtExtendedBuilderaddLeaf in interface YdtExtendedBuildervalue - value of the childschemaNode - schema node from YANG metadatapublic void traverseToParentWithoutValidation()
throws IllegalStateException
YdtExtendedBuildertraverseToParentWithoutValidation in interface YdtExtendedBuilderIllegalStateException - when user request for traverse to logical
root node parentpublic Set<String> getAugGenMethodSet()