Class DataTreeCandidateNodes
java.lang.Object
org.opendaylight.yangtools.yang.data.tree.spi.DataTreeCandidateNodes
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyRootedNodeToCursor(DataTreeModificationCursor cursor, YangInstanceIdentifier rootPath, DataTreeCandidateNode node) Applies thenodethat is rooted(doesn't have an identifier) in tree A to tree B'scursorat location specified byrootPath.static voidapplyRootToCursor(DataTreeModificationCursor cursor, DataTreeCandidateNode node) static voidapplyToCursor(DataTreeModificationCursor cursor, DataTreeCandidateNode node) Applies thenodeto thecursor, note that if the top node of (@code node} is RootNode you need to useapplyRootedNodeToCursormethod that works with rooted node candidates.static @NonNull Collection<DataTreeCandidateNode>containerDelta(@Nullable DistinctNodeContainer<?, ?> oldData, @Nullable DistinctNodeContainer<?, ?> newData) Return a collection ofDataTreeCandidateNodes summarizing the changes between the contents of twoNormalizedNodeContainers.static @Nullable DataTreeCandidateNodecontainerDelta(@Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> oldData, @Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> newData, @NonNull YangInstanceIdentifier.PathArgument child) Return a collection ofDataTreeCandidateNodes summarizing the change in a child, identified by aYangInstanceIdentifier.PathArgument, between twoNormalizedNodeContainers.static @NonNull DataTreeCandidateNodeempty(YangInstanceIdentifier.PathArgument identifier) Return an emptyDataTreeCandidateNodeidentified by specifiedYangInstanceIdentifier.PathArgument.static @NonNull DataTreeCandidateNodeunmodified(NormalizedNode node) Return an unmodifiedDataTreeCandidateNodeidentified by specifiedNormalizedNode.static @NonNull DataTreeCandidateNodewritten(NormalizedNode node) Return aDataTreeCandidateNodepretending specified node was written without the data exsting beforehand.
-
Method Details
-
empty
Return an emptyDataTreeCandidateNodeidentified by specifiedYangInstanceIdentifier.PathArgument.- Parameters:
identifier- Node identifier- Returns:
- An empty DataTreeCandidateNode
-
unmodified
Return an unmodifiedDataTreeCandidateNodeidentified by specifiedNormalizedNode.- Parameters:
node- Unchanged normalized node- Returns:
- An empty DataTreeCandidateNode
-
written
Return aDataTreeCandidateNodepretending specified node was written without the data exsting beforehand.- Parameters:
node- Unchanged normalized node- Returns:
- An empty DataTreeCandidateNode
- Throws:
NullPointerException- ifnodeis null
-
containerDelta
public static @NonNull Collection<DataTreeCandidateNode> containerDelta(@Nullable DistinctNodeContainer<?, ?> oldData, @Nullable DistinctNodeContainer<?, ?> newData) Return a collection ofDataTreeCandidateNodes summarizing the changes between the contents of twoNormalizedNodeContainers.- Parameters:
oldData- Old data container, may be nullnewData- New data container, may be null- Returns:
- Collection of changes
-
containerDelta
public static @Nullable DataTreeCandidateNode containerDelta(@Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> oldData, @Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> newData, @NonNull YangInstanceIdentifier.PathArgument child) Return a collection ofDataTreeCandidateNodes summarizing the change in a child, identified by aYangInstanceIdentifier.PathArgument, between twoNormalizedNodeContainers.- Parameters:
oldData- Old data container, may be nullnewData- New data container, may be null- Returns:
- A
DataTreeCandidateNodedescribing the change, or empty if the node is not present
-
applyToCursor
Applies thenodeto thecursor, note that if the top node of (@code node} is RootNode you need to useapplyRootedNodeToCursormethod that works with rooted node candidates.- Parameters:
cursor- cursor from the modification we want to apply thenodetonode- candidate tree to apply
-
applyRootedNodeToCursor
public static void applyRootedNodeToCursor(DataTreeModificationCursor cursor, YangInstanceIdentifier rootPath, DataTreeCandidateNode node) Applies thenodethat is rooted(doesn't have an identifier) in tree A to tree B'scursorat location specified byrootPath.- Parameters:
cursor- cursor from the modification we want to apply thenodetorootPath- path in thecursor's tree we want to apply to candidate tonode- candidate tree to apply
-
applyRootToCursor
-