Package org.gatein.api.navigation

Examples of org.gatein.api.navigation.Node


            String siteId = request.getParameter("siteId");
            Navigation navigation = PortalRequest.getInstance().getPortal().getNavigation(SiteId.fromString(siteId));

            String chosenNodeURI = request.getParameter("uri");

            Node chosenNode = navigation.getNode(NodePath.fromString(chosenNodeURI), Nodes.visitNodes(getNodeLevel(request)));

            boolean showEmptyCategory = getShowEmptyCategory(request);

            NodeBean chosenNodeBean = generateNodeBean(chosenNode, SiteId.fromString(siteId), showEmptyCategory);
View Full Code Here


        } else {
            Navigation navigation = PortalRequest.getInstance().getNavigation();
            Iterator<Node> iterator = n.iterator();

            while (iterator.hasNext()) {
                Node child = navigation.getNode(iterator.next().getNodePath(), Nodes.visitNodes(1));

                if (child != null && !isEmptyCategory(child)) {
                    return false;
                }
            }
View Full Code Here

        boolean firstActiveSet = false;

        Iterator<Node> nodeIterator = node.iterator();

        while (nodeIterator.hasNext()) {
            Node childNode = nodeIterator.next();
            NodeBean childNodeBean = new NodeBean(childNode, siteId);

            if (firstActive && !firstActiveSet) {
                childNodeBean.setActive(true);
                firstActiveSet = true;
View Full Code Here

        } else {
            Navigation navigation = PortalRequest.getInstance().getNavigation();
            Iterator<Node> iterator = n.iterator();

            while (iterator.hasNext()) {
                Node child = navigation.getNode(iterator.next().getNodePath(), Nodes.visitNodes(1));

                if (child != null && !isEmptyCategory(child)) {
                    return false;
                }
            }
View Full Code Here

        boolean firstActiveSet = false;

        Iterator<Node> nodeIterator = node.iterator();

        while (nodeIterator.hasNext()) {
            Node childNode = nodeIterator.next();
            NodeBean childNodeBean = new NodeBean(childNode, siteId);

            if (firstActive && !firstActiveSet) {
                childNodeBean.setActive(true);
                firstActiveSet = true;
View Full Code Here

        return portalRequest.getURIResolver().resolveURI(new SiteId(portalRequest.getUser()));
    }

    public String generateGroupPagesLink() {
        Navigation navigation = PortalRequest.getInstance().getNavigation();
        Node navigationNode = navigation.getNode(GROUP_NAVIGATION_NODE);

        if (navigationNode != null) {
            return navigationNode.getURI().toString();
        } else {
            return null;
        }
    }
View Full Code Here

        for (Site site : groupSites) {
            // check permissions and handle the special 'guest' site
            if (portalRequest.getPortal().hasPermission(portalRequest.getUser(), site.getAccessPermission())
                    && !site.getName().equals("/platform/guests")) {
                Navigation siteNavigation = portalRequest.getPortal().getNavigation(site.getId());
                Node node = siteNavigation.getRootNode(Nodes.visitNodes(this.nodeLevel));
                if (node.isVisible()) {
                    String groupLabel = OrganizationUtils.getGroupLabel(siteNavigation.getSiteId().getName().toString());
                    NodeBean nodeBean = new NodeBean(node, site.getId(), true);
                    navNodes.put(groupLabel, nodeBean);
                }
            }
View Full Code Here

        PortalRequest portalRequest = PortalRequest.getInstance();

        Navigation navigation = PortalRequest.getInstance().getNavigation();

        // Diving two levels so the information about children count of children nodes is available
        Node rootNode = navigation.getRootNode(Nodes.visitNodes(2)).filter().showDefault();

        // The root navigation bean contains the top-menu elements (Home and Sitemap by default) as its direct children nodes.
        NavigationNodeBean  navigationRootNodeBean = new NavigationNodeBean(rootNode);

        boolean showEmptyCategory = getShowEmptyCategory(request);
View Full Code Here

        Navigation navigation = PortalRequest.getInstance().getNavigation();

        String chosenNodeURI = request.getParameter("uri");

        Node chosenNode = navigation.getNode(NodePath.fromString(chosenNodeURI), Nodes.visitNodes(2)).filter().showDefault();

        NavigationNodeBean chosenNodeBean = new NavigationNodeBean(chosenNode);

        boolean showEmptyCategory = getShowEmptyCategory(request);
View Full Code Here

        } else {
            Navigation navigation = PortalRequest.getInstance().getNavigation();
            Iterator<Node> iterator = n.iterator();

            while (iterator.hasNext()){
                Node child = navigation.getNode(iterator.next().getNodePath(), Nodes.visitNodes(1)).filter().showDefault();

                if (!isEmptyCategory(child)){
                    return false;
                }
            }
View Full Code Here

TOP

Related Classes of org.gatein.api.navigation.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.