Package org.apache.jetspeed.page.document.impl

Examples of org.apache.jetspeed.page.document.impl.NodeSetImpl


    {
        if (foldersNodeSet == null)
        {
            if ((folders != null) && !folders.isEmpty())
            {
                foldersNodeSet = new NodeSetImpl(folders, createDocumentOrderComparator());
            }
            else
            {
                foldersNodeSet = NodeSetImpl.EMPTY_NODE_SET;
            }
View Full Code Here


    {
        if (pagesNodeSet == null)
        {
            if ((pages != null) && !pages.isEmpty())
            {
                pagesNodeSet = new NodeSetImpl(pages, createDocumentOrderComparator());
            }
            else
            {
                pagesNodeSet = NodeSetImpl.EMPTY_NODE_SET;
            }
View Full Code Here

    {
        if (pageTemplatesNodeSet == null)
        {
            if ((pageTemplates != null) && !pageTemplates.isEmpty())
            {
                pageTemplatesNodeSet = new NodeSetImpl(pageTemplates, createDocumentOrderComparator());
            }
            else
            {
                pageTemplatesNodeSet = NodeSetImpl.EMPTY_NODE_SET;
            }
View Full Code Here

    {
        if (dynamicPagesNodeSet == null)
        {
            if ((dynamicPages != null) && !dynamicPages.isEmpty())
            {
                dynamicPagesNodeSet = new NodeSetImpl(dynamicPages, createDocumentOrderComparator());
            }
            else
            {
                dynamicPagesNodeSet = NodeSetImpl.EMPTY_NODE_SET;
            }
View Full Code Here

    {
        if (fragmentDefinitionsNodeSet == null)
        {
            if ((fragmentDefinitions != null) && !fragmentDefinitions.isEmpty())
            {
                fragmentDefinitionsNodeSet = new NodeSetImpl(fragmentDefinitions, createDocumentOrderComparator());
            }
            else
            {
                fragmentDefinitionsNodeSet = NodeSetImpl.EMPTY_NODE_SET;
            }
View Full Code Here

    {
        if (linksNodeSet == null)
        {
            if ((links != null) && !links.isEmpty())
            {
                linksNodeSet = new NodeSetImpl(links, createDocumentOrderComparator());
            }
            else
            {
                linksNodeSet = NodeSetImpl.EMPTY_NODE_SET;
            }
View Full Code Here

                List allCopy = new java.util.ArrayList();
                synchronized(all)
                {
                    allCopy.addAll(all);
                }
                allNodeSet = new NodeSetImpl(allCopy, createDocumentOrderComparator());
            }
            else
            {
                allNodeSet = NodeSetImpl.EMPTY_NODE_SET;
            }
View Full Code Here

    static NodeSet filterNodeSetByAccess(NodeSet nodes)
    {
        if ((nodes != null) && !nodes.isEmpty())
        {
            // check permissions and constraints, filter nodes as required
            NodeSetImpl filteredNodes = null;
            Iterator checkAccessIter = nodes.iterator();
            while (checkAccessIter.hasNext())
            {
                Node node = (Node)checkAccessIter.next();
                try
                {
                    // check access
                    node.checkAccess(JetspeedActions.VIEW);

                    // add to filteredNodes nodes if copying
                    if (filteredNodes != null)
                    {
                        // permitted, add to filteredNodes nodes
                        filteredNodes.add(node);
                    }
                }
                catch (SecurityException se)
                {
                    // create filteredNodes nodes if not already copying
                    if (filteredNodes == null)
                    {
                        // not permitted, copy previously permitted nodes
                        // to new filteredNodes node set with same comparator
                        filteredNodes = new NodeSetImpl(nodes);
                        Iterator copyIter = nodes.iterator();
                        while (copyIter.hasNext())
                        {
                            Node copyNode = (Node)copyIter.next();
                            if (copyNode != node)
                            {
                                filteredNodes.add(copyNode);
                            }
                            else
                            {
                                break;
                            }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.page.document.impl.NodeSetImpl

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.