portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r919184 - in /portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src: main/java/org/apache/jetspeed/portalsite/impl/ main/java/org/apache/jetspeed/portalsite/view/ test/java/org/apache/jetspeed/portalsite/
Date Thu, 04 Mar 2010 21:09:11 GMT
Author: rwatler
Date: Thu Mar  4 21:09:10 2010
New Revision: 919184

URL: http://svn.apache.org/viewvc?rev=919184&view=rev
Log:
correct operation of configure pipeline in portal site to allow addressing of control folder
resident pages

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.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-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java?rev=919184&r1=919183&r2=919184&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
Thu Mar  4 21:09:10 2010
@@ -1032,6 +1032,7 @@
                     // and stale flag
                     clearSessionProfileLocators();
                     profileLocators = requestProfileLocators;
+                    forceReservedVisible = requestForceReservedVisible;
                     userPrincipal = currentUserPrincipal;
                     updated = true;
                 }

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=919184&r1=919183&r2=919184&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
Thu Mar  4 21:09:10 2010
@@ -385,7 +385,7 @@
             boolean navigatedPathRoot = false;
 
             // reset advance of the profile locator offset by one
-            // to accomodate automatic iteration within locator loop
+            // to accommodate automatic iteration within locator loop
             int skipProfileLocatorIterations = -1;
 
             // form locator properties into a complete path
@@ -1147,7 +1147,7 @@
 
     /**
      * pathRegexpPattern - tests for and converts simple path wildcard
-     *                     and character class regular exressions to
+     *                     and character class regular expressions to
      *                     perl5/standard java pattern syntax
      *
      * @param regexp - candidate path regular expression

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java?rev=919184&r1=919183&r2=919184&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
Thu Mar  4 21:09:10 2010
@@ -655,6 +655,7 @@
         locator = new JetspeedProfileLocator();
         locator.init(null, "/");
         locator.add("page", false, false, "/folder3/default-folder0/");
+        locators = new HashMap();
         locators.put(ProfileLocator.PAGE_LOCATOR, locator);
         requestContext = sessionContext.newRequestContext(locators);
         assertNotNull(requestContext);
@@ -663,6 +664,21 @@
         assertTrue(requestPageProxy instanceof Page);
         assertEquals("page1.psml", requestPageProxy.getName());
         assertEquals("/folder3/default-folder1/page1.psml", extractFileSystemPathFromId(requestPageProxy.getId()));
+
+        sessionContext = portalSite.newSessionContext();
+        assertNotNull(sessionContext);
+        locator = new JetspeedProfileLocator();
+        locator.init(null, "/_user/user/page2.psml");
+        locator.add("user", true, false, "admin");
+        locators = new HashMap();
+        locators.put(ProfileLocator.PAGE_LOCATOR, locator);
+        requestContext = sessionContext.newRequestContext(locators, true, true, true);
+        assertNotNull(requestContext);
+        requestPageProxy = requestContext.getPage();
+        assertNotNull(requestPageProxy);
+        assertTrue(requestPageProxy instanceof Page);
+        assertEquals("page2.psml", requestPageProxy.getName());
+        assertEquals("/_user/user/page2.psml", extractFileSystemPathFromId(requestPageProxy.getId()));
     }
 
     /**
@@ -1508,21 +1524,6 @@
         assertEquals("/document", requestContext.getPageContentPath());
 
         locator = new JetspeedProfileLocator();
-        locator.init(null, "/document.psml");
-        locator.add("user", true, false, "user");
-        locators = new HashMap();
-        locators.put(ProfileLocator.PAGE_LOCATOR, locator);
-        requestContext = sessionContext.newRequestContext(locators);
-        assertNotNull(requestContext);
-        requestPageProxy = requestContext.getPage();
-        assertNotNull(requestPageProxy);
-        assertTrue(requestPageProxy instanceof DynamicPage);
-        assertEquals("contentpage.dpsml", requestPageProxy.getName());
-        assertEquals("/contentpage.dpsml", extractFileSystemPathFromId(requestPageProxy.getId()));
-        assertNotNull(requestContext.getPageContentPath());
-        assertEquals("/document", requestContext.getPageContentPath());
-
-        locator = new JetspeedProfileLocator();
         locator.init(null, "/preview/folder0/page0.doc");
         locator.add("user", true, false, "user");
         locators = new HashMap();



---------------------------------------------------------------------
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