Package org.apache.jetspeed.page.document

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


                        // to new filteredNodes node set with same comparator
                        filteredNodes = new NodeSetImpl(null, ((NodeSetImpl) nodes).getComparator());
                        Iterator copyIter = nodes.iterator();
                        while (copyIter.hasNext())
                        {
                            Node copyNode = (Node)copyIter.next();
                            if (copyNode != node)
                            {
                                filteredNodes.add(copyNode);
                            }
                            else
View Full Code Here


            // update folder documents
            NodeSet nodes = folderImpl.getAllNodes();
            Iterator nodesIter = nodes.iterator();
            while (nodesIter.hasNext())
            {
                Node node = (Node) nodesIter.next();
                if (node instanceof Page)
                {
                    updatePage((Page)node);
                }
                else if (node instanceof PageTemplate)
                {
                    updatePageTemplate((PageTemplate)node);
                }
                else if (node instanceof DynamicPage)
                {
                    updateDynamicPage((DynamicPage)node);
                }
                else if (node instanceof FragmentDefinition)
                {
                    updateFragmentDefinition((FragmentDefinition)node);
                }
                else if (node instanceof Link)
                {
                    updateLink((Link)node);
                }
                else if (node instanceof PageSecurity)
                {
                    updatePageSecurity((PageSecurity)node);
                }
            }

            // update folders last: breadth first recursion
            nodesIter = nodes.iterator();
            while (nodesIter.hasNext())
            {
                Node node = (Node) nodesIter.next();
                if (node instanceof Folder)
                {
                    updateFolder((Folder)node, true);
                }
            }
View Full Code Here

     */
    public void refresh( FileCacheEntry entry ) throws Exception
    {
        // file cache managed component refreshed:
        // notify page manager listeners
        Node refreshedNode = null;
        if (entry.getDocument() instanceof Node)
        {
            refreshedNode = (Node)entry.getDocument();
        }
        if (entry.getFile().exists())
View Full Code Here

    {
        // search nodes for matching name or path
        Iterator nodesIter = nodes.iterator();
        while (nodesIter.hasNext())
        {
            Node node = (Node) nodesIter.next();
            if (node.getName().equals(name) || node.getPath().equals(name))
            {
                return node;
            }
        }
        return null;
View Full Code Here

        // search for matching nodes
        List subsetNodes = null;
        Iterator nodesIter = nodes.iterator();
        while (nodesIter.hasNext())
        {
            Node node = (Node) nodesIter.next();
            if (node.getType().equals(type))
            {
                if (subsetNodes == null)
                {
                    subsetNodes = new ArrayList(nodes.size());
                }
View Full Code Here

        List subsetNodes = null;
        Pattern pattern = Pattern.compile(regex);
        Iterator nodesIter = nodes.iterator();
        while (nodesIter.hasNext())
        {
            Node node = (Node) nodesIter.next();
            if (pattern.matcher(node.getName()).matches() || pattern.matcher(node.getPath()).matches())
            {
                if (subsetNodes == null)
                {
                    subsetNodes = new ArrayList(nodes.size());
                }
View Full Code Here

        List subsetNodes = null;
        Pattern pattern = Pattern.compile(regex);
        Iterator nodesIter = nodes.iterator();
        while (nodesIter.hasNext())
        {
            Node node = (Node) nodesIter.next();
            if (!pattern.matcher(node.getName()).matches() && !pattern.matcher(node.getPath()).matches())
            {
                if (subsetNodes == null)
                {
                    subsetNodes = new ArrayList(nodes.size());
                }
View Full Code Here

           
            // remove folder nodes
            Iterator removeIter = removeNodes.iterator();
            while (removeIter.hasNext())
            {
                Node node = (Node)removeIter.next();
                if (node instanceof Folder)
                {
                    // recursively remove folder
                    removeFolder((Folder)node);
                }
                else if (node instanceof Document)
                {
                    // remove folder document
                    try
                    {
                        handlerFactory.getDocumentHandler(node.getType()).removeDocument((Document)node);
                    }
                    catch (Exception e)
                    {
                        File documentFile = new File(this.documentRootDir, node.getPath());
                        throw new FailedToDeleteFolderException(documentFile.getAbsolutePath()+" document cannot be deleted.");
                    }
                }
                ((NodeSetImpl)folderImpl.getAllNodes()).remove(node);
            }
View Full Code Here

        {
            // get single matched node
            Iterator findIter = ((FolderImpl)folder).getAllNodes().iterator();
            while (findIter.hasNext())
            {
                Node addNode = (Node) findIter.next();
                if (addNode.getPath().equals(nodePath))
                {
                    matched.add(addNode);
                    break;
                }
            }
View Full Code Here

            synchronized(all)
            {
                Iterator nodeIter = accessAll().iterator();
                while (nodeIter.hasNext())
                {
                    Node node = (Node)nodeIter.next();
                    if (node instanceof PageImpl)
                    {
                        pages.add(node);
                    }
                    else if (node instanceof FolderImpl)
View Full Code Here

TOP

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