Search in sources :

Example 1 with RegistrationTreeNode

use of org.opendaylight.mdsal.dom.spi.RegistrationTreeNode in project controller by opendaylight.

the class ResolveDataChangeState method getListenerChildrenWildcarded.

private static Collection<RegistrationTreeNode<DataChangeListenerRegistration<?>>> getListenerChildrenWildcarded(final Collection<RegistrationTreeNode<DataChangeListenerRegistration<?>>> parentNodes, final PathArgument child) {
    if (parentNodes.isEmpty()) {
        return Collections.emptyList();
    }
    final List<RegistrationTreeNode<DataChangeListenerRegistration<?>>> result = new ArrayList<>();
    if (child instanceof NodeWithValue || child instanceof NodeIdentifierWithPredicates) {
        NodeIdentifier wildcardedIdentifier = new NodeIdentifier(child.getNodeType());
        addChildNodes(result, parentNodes, wildcardedIdentifier);
    }
    addChildNodes(result, parentNodes, child);
    return result;
}
Also used : RegistrationTreeNode(org.opendaylight.mdsal.dom.spi.RegistrationTreeNode) NodeIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier) ArrayList(java.util.ArrayList) NodeWithValue(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue) NodeIdentifierWithPredicates(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates)

Aggregations

ArrayList (java.util.ArrayList)1 RegistrationTreeNode (org.opendaylight.mdsal.dom.spi.RegistrationTreeNode)1 NodeIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier)1 NodeIdentifierWithPredicates (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates)1 NodeWithValue (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue)1