Search in sources :

Example 1 with TabListOfNodes

use of org.apereo.portal.rest.layout.TabListOfNodes in project uPortal by Jasig.

the class LayoutRESTController method getNodeList.

private NodeList getNodeList(String tab, Document document) {
    if (tab != null) {
        NodeList folders = document.getElementsByTagName("folder");
        for (int i = 0; i < folders.getLength(); i++) {
            Node node = folders.item(i);
            if (tab.equalsIgnoreCase(node.getAttributes().getNamedItem("name").getNodeValue())) {
                TabListOfNodes tabNodes = new TabListOfNodes();
                tabNodes.addAllChannels(node.getChildNodes());
                return tabNodes;
            }
        }
    }
    return document.getElementsByTagName("channel");
}
Also used : TabListOfNodes(org.apereo.portal.rest.layout.TabListOfNodes) NodeList(org.w3c.dom.NodeList) Node(org.w3c.dom.Node)

Aggregations

TabListOfNodes (org.apereo.portal.rest.layout.TabListOfNodes)1 Node (org.w3c.dom.Node)1 NodeList (org.w3c.dom.NodeList)1