portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r771256 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/ components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/ components/jetspeed-page-ma...
Date Mon, 04 May 2009 09:43:04 GMT
Author: vkumar
Date: Mon May  4 09:43:03 2009
New Revision: 771256

URL: http://svn.apache.org/viewvc?rev=771256&view=rev
Log:
Reverting back changes done for JS2-900
changes were causing some error.

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/DelegatingPageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteView.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/Folder.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderImpl.java
Mon May  4 09:43:03 2009
@@ -831,26 +831,16 @@
      */
     public NodeSet getAll() throws DocumentException
     {
-        return getAll(true);
-    }
-    
-    public NodeSet getAll(boolean secured) throws DocumentException
-    {
         // get all nodes collection
         if (!allCached)
         {
             // use PageManager to get and cache all nodes
             // collection for this folder
-            getPageManager().initFolder(this);
+            return getPageManager().getAll(this);
         }
 
-        NodeSet nodes = getAllNodeSet();
-        if (!secured)
-        {
-            return nodes;
-        }
         // return nodes with view access
-        return filterNodeSetByAccess(nodes);
+        return filterNodeSetByAccess(getAllNodeSet());
     }
     
     /* (non-Javadoc)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/FolderImpl.java
Mon May  4 09:43:03 2009
@@ -451,17 +451,16 @@
         return getPageSecurity(false);
     }
 
-    public NodeSet getAll(boolean secured) throws DocumentException
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.om.folder.Folder#getAll()
+     */
+    public NodeSet getAll() throws DocumentException
     {
-              
         // return secure set of all nodes: enforce access checks
-        // on folders and documents while creating filtered nodes        
+        // on folders and documents while creating filtered nodes
         NodeSet nodes = getAllNodes();
-        if (!secured)
-        {
-            return nodes;
-        }
-        
         NodeSet filteredNodes = null;
         Iterator checkAccessIter = nodes.iterator();
         while (checkAccessIter.hasNext())
@@ -502,16 +501,6 @@
         }
         return nodes;
     }
-    
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.om.folder.Folder#getAll()
-     */
-    public NodeSet getAll() throws DocumentException
-    {
-        return getAll(true);
-    }
 
     /**
      * <p>
@@ -974,5 +963,6 @@
                     reservedType = RESERVED_FOLDER_OTHER;            
             }
         }
-    }     
+    }
+    
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/DelegatingPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/DelegatingPageManager.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/DelegatingPageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/DelegatingPageManager.java
Mon May  4 09:43:03 2009
@@ -169,6 +169,15 @@
     }
 
     /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.PageManager#getAll(org.apache.jetspeed.om.folder.Folder)
+     */
+    public NodeSet getAll(Folder folder) throws DocumentException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
      * @see org.apache.jetspeed.page.PageManager#updatePage(org.apache.jetspeed.om.page.Page)
      */
     public void updatePage(Page page) throws NodeException,
@@ -263,9 +272,4 @@
     {
         throw new NodeException("not impl");
     }
-
-    public void initFolder(Folder folder) throws DocumentException
-    {
-        
-    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
Mon May  4 09:43:03 2009
@@ -866,7 +866,7 @@
     /* (non-Javadoc)
      * @see org.apache.jetspeed.page.PageManager#getAll(org.apache.jetspeed.om.folder.Folder)
      */
-    public void initFolder(Folder folder) throws DocumentException
+    public NodeSet getAll(Folder folder) throws DocumentException
     {
         FolderImpl folderImpl = (FolderImpl)folder;
 
@@ -916,6 +916,7 @@
 
         // folder all nodes cache populated, get all from folder
         // to provide packaging as filtered node set
+        return folder.getAll();
     }
 
     /* (non-Javadoc)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/psml/CastorXmlPageManager.java
Mon May  4 09:43:03 2009
@@ -690,9 +690,10 @@
     /* (non-Javadoc)
      * @see org.apache.jetspeed.page.PageManager#getAll(org.apache.jetspeed.om.folder.Folder)
      */
-    public void initFolder(Folder folder) throws DocumentException
+    public NodeSet getAll(Folder folder) throws DocumentException
     {
-        
+        // delegate back to folder instance
+        return folder.getAll();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
Mon May  4 09:43:03 2009
@@ -534,7 +534,7 @@
         
         // Check link order
         assertEquals(6, folder3.getAll().size());
-        assertEquals(6, folder3.getAll(false).size());
+        assertEquals(6, pageManager.getAll(folder3).size());
         Iterator linkItr = folder3.getAll().iterator();
         assertEquals("Jetspeed2Wiki.link", ((Link)linkItr.next()).getName());
         assertEquals("Jetspeed2.link", ((Link)linkItr.next()).getName());        

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
Mon May  4 09:43:03 2009
@@ -485,8 +485,8 @@
         assertEquals(1, pageManager.getFolders(folder).size());
         assertNotNull(folder.getAll());
         assertEquals(6, folder.getAll().size());
-        assertNotNull(folder.getAll(false));
-        assertEquals(6, folder.getAll(false).size());
+        assertNotNull(pageManager.getAll(folder));
+        assertEquals(6, pageManager.getAll(folder).size());
         Iterator all = folder.getAll().iterator();
         assertEquals("some-other-page.psml", ((Node)all.next()).getName());
         assertEquals("default-page.psml", ((Node)all.next()).getName());

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteView.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteView.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteView.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteView.java
Mon May  4 09:43:03 2009
@@ -23,7 +23,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.folder.proxy.FolderProxy;
@@ -752,14 +751,13 @@
                 // and visibility is required
                 try
                 {
-                    NodeSet children = currentFolder.getAll(false);
+                    NodeSet children = currentFolder.getAll();
                     if (children != null)
                     {
                         Node node = children.get(currentPath);
                         if ((node != null) && (!onlyVisible || !node.isHidden() ||
(node == currentPage)) &&
                             (!onlyViewable || isProxyViewable(node, onlyVisible)))
                         {
-                            node.checkAccess(JetspeedActions.VIEW);
                             return node;
                         }
                     }
@@ -779,7 +777,6 @@
         if ((!onlyVisible || !currentFolder.isHidden()) &&
             (!onlyViewable || isProxyViewable(currentFolder, onlyVisible)))
         {
-            currentFolder.checkAccess(JetspeedActions.VIEW);
             return currentFolder;
         }
         throw new NodeNotFoundException("Specified path " + path + " not found or viewable/visible.");
@@ -1237,5 +1234,5 @@
             return pageProxy.getPage();
         }
         return null;
-    }    
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/profiler/impl/ProfilerValveImpl.java
Mon May  4 09:43:03 2009
@@ -257,7 +257,7 @@
             // security system has been replaced/overridden
             if (request.getRequest().getUserPrincipal() == null &&
                 request.getPath() != null &&
-                !request.getPath().equals("/") && requestFallback)
+                !request.getPath().equals("/"))
             {
                 try 
                 {

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/Folder.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/Folder.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/Folder.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/Folder.java
Mon May  4 09:43:03 2009
@@ -246,21 +246,6 @@
      * @throws DocumentException
      */
     NodeSet getAll() throws DocumentException;
-    
-    /**
-     * 
-     * <p>
-     * getAll
-     * 
-     * if filtered param is true, it will return accessed pages
-     * if filtered param is false it will return all pages
-     * </p>
-     *
-     * @return A <code>NodeSet</code> containing all (including nodes, on which
you don't have access) sub-folders and documents directly under
-     * this folder.
-     * @throws DocumentException
-     */
-    NodeSet getAll(boolean secured) throws DocumentException;
 
     /**
      * getMenuDefinitions - get list of menu definitions

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java?rev=771256&r1=771255&r2=771256&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
Mon May  4 09:43:03 2009
@@ -457,7 +457,7 @@
      *         and documents directly under this folder.
      * @throws DocumentException
      */
-    public void initFolder(Folder folder) throws DocumentException;
+    public NodeSet getAll(Folder folder) throws DocumentException;
 
     /** Update a page in persistent storage
      *



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message