[pal-cvs 3534] [1268] do not put a root folder in session.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 10月 31日 (金) 11:13:43 JST


Revision: 1268
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=1268
Author:   shinsuke
Date:     2008-10-31 11:13:43 +0900 (Fri, 31 Oct 2008)

Log Message:
-----------
do not put a root folder in session.

Modified Paths:
--------------
    pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java


-------------- next part --------------
Modified: pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
===================================================================
--- pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java	2008-10-31 01:36:52 UTC (rev 1267)
+++ pal-portal/branches/pal-portal-1.x/portal/jetspeed-2/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java	2008-10-31 02:13:43 UTC (rev 1268)
@@ -129,11 +129,6 @@
     private String searchPathsString;
 
     /**
-     * rootFolderProxy - root folder proxy instance
-     */
-    private Folder rootFolderProxy;
-
-    /**
      * SiteView - validating constructor
      * 
      * @param pageManager
@@ -704,39 +699,38 @@
     public Folder getRootFolderProxy() throws FolderNotFoundException
     {
         // latently construct and return root folder proxy
-        if (rootFolderProxy == null)
+        Folder rootFolderProxy = null;
+        try
         {
-            try
-            {
-                // the folder and profile locator name of the root
-                // folder proxy in the view is the locator name of the
-                // first search path since search paths are valid
-                SiteViewSearchPath searchPath = (SiteViewSearchPath) searchPaths
-                        .get(0);
-                String path = searchPath.toString();
-                String locatorName = searchPath.getLocatorName();
+            // the folder and profile locator name of the root
+            // folder proxy in the view is the locator name of the
+            // first search path since search paths are valid
+            SiteViewSearchPath searchPath = (SiteViewSearchPath) searchPaths
+                    .get(0);
+            String path = searchPath.toString();
+            String locatorName = searchPath.getLocatorName();
 
-                // get concrete root folder from page manager
-                // and construct proxy
-                Folder rootFolder = pageManager.getFolder(path);
-                rootFolderProxy = FolderProxy.newInstance(this, locatorName,
-                        null, rootFolder);
-            }
-            catch (NodeException ne)
-            {
-                FolderNotFoundException fnfe = new FolderNotFoundException(
-                        "Root folder not found");
-                fnfe.initCause(ne);
-                throw fnfe;
-            }
-            catch (NodeNotFoundException nnfe)
-            {
-                FolderNotFoundException fnfe = new FolderNotFoundException(
-                        "Root folder not found");
-                fnfe.initCause(nnfe);
-                throw fnfe;
-            }
+            // get concrete root folder from page manager
+            // and construct proxy
+            Folder rootFolder = pageManager.getFolder(path);
+            rootFolderProxy = FolderProxy.newInstance(this, locatorName, null,
+                    rootFolder);
         }
+        catch (NodeException ne)
+        {
+            FolderNotFoundException fnfe = new FolderNotFoundException(
+                    "Root folder not found");
+            fnfe.initCause(ne);
+            throw fnfe;
+        }
+        catch (NodeNotFoundException nnfe)
+        {
+            FolderNotFoundException fnfe = new FolderNotFoundException(
+                    "Root folder not found");
+            fnfe.initCause(nnfe);
+            throw fnfe;
+        }
+
         return rootFolderProxy;
     }
 


pal-cvs メーリングリストの案内
Back to archive index