Package org.apache.jetspeed.page.document

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


        {
            return set;
        }

        // filter expanded document set for pages, folders, links, and document sets
        NodeSet filteredSet = new NodeSetImpl(null);       
        setIter = set.iterator();
        while (setIter.hasNext())
        {
            AbstractNode node = (AbstractNode) setIter.next();
            if ((node instanceof Page) || (node instanceof Folder) || (node instanceof Link) || (node instanceof DocumentSet))
            {
                filteredSet.add(node);
            }
        }
        return filteredSet;
    }
View Full Code Here


    {
        // check access constraints/permissions of nodes
        // to determine visibility; filter nodes accordingly
        if ((nodes != null) && !nodes.isEmpty())
        {
            NodeSetImpl filteredNodes = null;
            Iterator checkAccessIter = nodes.iterator();
            while (checkAccessIter.hasNext())
            {
                AbstractNode node = (AbstractNode)checkAccessIter.next();
                try
                {
                    // check visibility
                    checkVisibility(node, profiledFolders);

                    // add to filteredNodes nodes if copying
                    if (filteredNodes != null)
                    {
                        // permitted, add to filteredNodes nodes
                        filteredNodes.add(node);
                    }
                }
                catch (RuntimeException rte)
                {
                    // 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(null, ((NodeSetImpl)nodes).getComparator());
                        Iterator copyIter = nodes.iterator();
                        while (copyIter.hasNext())
                        {
                            AbstractNode copyNode = (AbstractNode)copyIter.next();
                            if (copyNode != node)
                            {
                                filteredNodes.add(copyNode);
                            }
                            else
                            {
                                break;
                            }
View Full Code Here

                    DocumentSet documentSet = (DocumentSet)mappedEntry.getKey();
                    if (!this.documentSets.contains(documentSet))
                    {
                        if (this.nestedDocumentSets == null)
                        {
                            this.nestedDocumentSets = new NodeSetImpl(null);
                        }
                        this.nestedDocumentSets.add(documentSet);
                    }
                }
            }
View Full Code Here

            }
            catch (SecurityException se)
            {
                if (filteredNodes == null)
                {
                    filteredNodes = new NodeSetImpl(getPath(), ((NodeSetImpl) nodes).getComparator());
                    Iterator copyIter = nodes.iterator();
                    while (copyIter.hasNext())
                    {
                        Node copyNode = (Node)copyIter.next();
                        if (copyNode != node)
View Full Code Here

        {           
            if(metadata.getDocumentOrder() != null)
            {
                if (getPath().endsWith(PATH_SEPARATOR))
                {
                    allNodes = new NodeSetImpl(getPath(), new NodeOrderCompartaor(metadata.getDocumentOrder(), getPath()));
                }
                else
                {
                    allNodes = new NodeSetImpl(getPath(), new NodeOrderCompartaor(metadata.getDocumentOrder(), getPath() + PATH_SEPARATOR));
                }
            }
            else
            {
                allNodes = new NodeSetImpl(getPath());
            }
           
            //DocumentHandler docHandler = getHandlerFactory().getDocumentHandler(documentType);

            String[] nodeNames = folderHandler.listAll(getPath());
View Full Code Here

                    DocumentSet documentSet = (DocumentSet)mappedEntry.getKey();
                    if (!this.documentSets.contains(documentSet))
                    {
                        if (this.nestedDocumentSets == null)
                        {
                            this.nestedDocumentSets = new NodeSetImpl(null);
                        }
                        this.nestedDocumentSets.add(documentSet);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.page.document.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.