You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by dd...@apache.org on 2004/10/19 15:57:51 UTC

svn commit: rev 55060 - in portals/pluto/trunk: container/src/conf/org/apache/pluto container/src/java/org/apache/pluto portal/src/java/org/apache/pluto/portalImpl/core portal/src/webapp/WEB-INF/aggregation portal/src/webapp/WEB-INF/config/services testsuite/src/java/org/apache/pluto/portalImpl/portlet/test testsuite/src/webapp/WEB-INF/classes

Author: ddewolf
Date: Tue Oct 19 06:57:50 2004
New Revision: 55060

Removed:
   portals/pluto/trunk/container/src/java/org/apache/pluto/environment.properties
Modified:
   portals/pluto/trunk/container/src/conf/org/apache/pluto/environment.properties
   portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/core/PortalContextProviderImpl.java
   portals/pluto/trunk/portal/src/webapp/WEB-INF/aggregation/Banner.jsp
   portals/pluto/trunk/portal/src/webapp/WEB-INF/config/services/ConfigService.properties
   portals/pluto/trunk/testsuite/src/java/org/apache/pluto/portalImpl/portlet/test/MiscTest.java
   portals/pluto/trunk/testsuite/src/webapp/WEB-INF/classes/expectedResults.properties
Log:
Applying ServerInfo/PortalInfo Patches submitted by Ken Wiener (kweiner AT unicon d0T net).
-- Update Testsuite to test for both server info and portal info
-- Update Testsuite expected results properties to the most recent versions
-- Update PortalContextProviderImpl to return the Portal Info instead of the Server Info
-- Update the Portal display to show the current Portal Info
-- Update the portlet container environment to indicate the proper version

Modified: portals/pluto/trunk/container/src/conf/org/apache/pluto/environment.properties
==============================================================================
--- portals/pluto/trunk/container/src/conf/org/apache/pluto/environment.properties	(original)
+++ portals/pluto/trunk/container/src/conf/org/apache/pluto/environment.properties	Tue Oct 19 06:57:50 2004
@@ -1,6 +1,22 @@
+# 
+#  Copyright 2003,2004 The Apache Software Foundation.
+#  
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#  
+#       http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# 
+
 pluto.container.name=Pluto
 pluto.container.version.major=1
-pluto.container.version.minor=0.1
+pluto.container.version.minor=0.1-rc1
 
 javax.portlet.version.major=1
 javax.portlet.version.minor=0

Modified: portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/core/PortalContextProviderImpl.java
==============================================================================
--- portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/core/PortalContextProviderImpl.java	(original)
+++ portals/pluto/trunk/portal/src/java/org/apache/pluto/portalImpl/core/PortalContextProviderImpl.java	Tue Oct 19 06:57:50 2004
@@ -61,7 +61,7 @@
         // these are the minimum states that the portal needs to support
         states = getDefaultStates(); 
         // set info
-        info = Environment.getServerInfo();   
+        info = Config.getParameters().getString("portaldriver.info");  
     }
 
     // PortalContextProvider implementation.

Modified: portals/pluto/trunk/portal/src/webapp/WEB-INF/aggregation/Banner.jsp
==============================================================================
Binary files. No diff available.

Modified: portals/pluto/trunk/portal/src/webapp/WEB-INF/config/services/ConfigService.properties
==============================================================================
--- portals/pluto/trunk/portal/src/webapp/WEB-INF/config/services/ConfigService.properties	(original)
+++ portals/pluto/trunk/portal/src/webapp/WEB-INF/config/services/ConfigService.properties	Tue Oct 19 06:57:50 2004
@@ -24,6 +24,8 @@
 host.port.http = 8080
 host.port.https = 
 
+portaldriver.info = pluto-driver/1.0.1-rc1
+
 supported.portletmode = view
 supported.portletmode = edit
 supported.portletmode = help

Modified: portals/pluto/trunk/testsuite/src/java/org/apache/pluto/portalImpl/portlet/test/MiscTest.java
==============================================================================
--- portals/pluto/trunk/testsuite/src/java/org/apache/pluto/portalImpl/portlet/test/MiscTest.java	(original)
+++ portals/pluto/trunk/testsuite/src/java/org/apache/pluto/portalImpl/portlet/test/MiscTest.java	Tue Oct 19 06:57:50 2004
@@ -69,17 +69,32 @@
 
 
 
-    protected TestResult checkContextServerInfo(PortletRequest req) {
+    protected TestResult checkContextServerInfo(PortletContext ctx) {
         TestResult res = new TestResult();
         res.setName("Server Info Test");
         res.setDesc("Make sure that the expected server info is returned.");
         Properties props = ExpectedResults.getExpectedProperties();
+        if(ctx.getServerInfo().equals(props.getProperty("expected.serverInfo"))) {
+            res.setReturnCode(TestResult.PASSED);
+        }
+        else {
+            res.setReturnCode(TestResult.FAILED);
+            res.setResults("Server info: "+ctx.getServerInfo()+". Expected: "+props.getProperty("expected.serverInfo"));
+        }
+        return res;
+    }
+
+    protected TestResult checkPortalInfo(PortletRequest req) {
+        TestResult res = new TestResult();
+        res.setName("Portal Info Test");
+        res.setDesc("Make sure that the expected portal info is returned.");
+        Properties props = ExpectedResults.getExpectedProperties();
         if(req.getPortalContext().getPortalInfo().equals(props.getProperty("expected.portalInfo"))) {
             res.setReturnCode(TestResult.PASSED);
         }
         else {
             res.setReturnCode(TestResult.FAILED);
-            res.setResults("Server info: "+req.getPortalContext().getPortalInfo()+". Expected: "+props.getProperty("expected.portalInfo"));
+            res.setResults("Portal info: "+req.getPortalContext().getPortalInfo()+". Expected: "+props.getProperty("expected.portalInfo"));
         }
         return res;
     }

Modified: portals/pluto/trunk/testsuite/src/webapp/WEB-INF/classes/expectedResults.properties
==============================================================================
--- portals/pluto/trunk/testsuite/src/webapp/WEB-INF/classes/expectedResults.properties	(original)
+++ portals/pluto/trunk/testsuite/src/webapp/WEB-INF/classes/expectedResults.properties	Tue Oct 19 06:57:50 2004
@@ -23,10 +23,12 @@
 # load this file.
 
 # The value we expect to return from renderRequest.getPortalContext().getPortalInfo();
-expected.portalInfo = Pluto/1.0.1-rc1
 
+expected.serverInfo = Pluto/1.0.1-rc1
 expected.version.major=1
 expected.version.minor=0
+
+expected.portalInfo = pluto-driver/1.0.1-rc1
 
 expected.security.role=tomcat
 expected.security.role.mapped=plutoTestRole