portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r598498 - in /portals/jetspeed-2/trunk/components: jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/ jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/ jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/
Date Tue, 27 Nov 2007 02:54:58 GMT
Author: ate
Date: Mon Nov 26 18:54:57 2007
New Revision: 598498

URL: http://svn.apache.org/viewvc?rev=598498&view=rev
Log:
Fixing some registry related testcases: the registry.xml assembly now requires a PropertyPlaceholderConfigurer
to provide values for the supported.portletmode.autoswitch.* feature properties.
As the AbstractSpringTestCase already dynamically provides a PropertyPlaceHolderConfigurer,
adding one through a (test only) assembly configuration doesn't work, that one needs to setup
these properties.
The AbstractSpringTestCase now has a protected getPostProcessProperties() method which can
be used to add additional required property values for this purpose. 

Modified:
    portals/jetspeed-2/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
    portals/jetspeed-2/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
    portals/jetspeed-2/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java

Modified: portals/jetspeed-2/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java?rev=598498&r1=598497&r2=598498&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
Mon Nov 26 18:54:57 2007
@@ -64,7 +64,7 @@
                 ctx = new ClassPathXmlApplicationContext(getConfigurations(), false);
             }
             PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
-            Properties p = new Properties();
+            Properties p = getPostProcessProperties();
             p.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, System.getProperty("user.dir")+"/target/test-classes/webapp");
             ppc.setProperties(p);
             ctx.addBeanFactoryPostProcessor(ppc);
@@ -95,5 +95,10 @@
     protected String[] getBootConfigurations()
     {
         return null;
+    }
+
+    protected Properties getPostProcessProperties()
+    {
+        return new Properties();
     }
 }

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java?rev=598498&r1=598497&r2=598498&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
Mon Nov 26 18:54:57 2007
@@ -21,6 +21,7 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.prefs.Preferences;
 
 import javax.portlet.PortletRequest;
@@ -248,5 +249,14 @@
         confList.add("prefs.xml");
         confList.add("cache.xml");
         return (String[]) confList.toArray(new String[1]);
+    }
+
+    protected Properties getPostProcessProperties()
+    {
+        Properties p = super.getPostProcessProperties();
+        p.setProperty("supported.portletmode.autoswitch.config", "false");
+        p.setProperty("supported.portletmode.autoswitch.edit_defaults", "false");
+        p.setProperty("supported.portletmode.autoswitch.config.surrogate.portlet", "j2-admin::CustomConfigModePortlet");
+        return p;
     }
 }

Modified: portals/jetspeed-2/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java?rev=598498&r1=598497&r2=598498&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java
Mon Nov 26 18:54:57 2007
@@ -25,6 +25,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Properties;
 
 import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
@@ -59,5 +60,14 @@
         confList.add("page-manager.xml");
         confList.add("registry.xml");
         return (String[]) confList.toArray(new String[1]);
+    }
+
+    protected Properties getPostProcessProperties()
+    {
+        Properties p = super.getPostProcessProperties();
+        p.setProperty("supported.portletmode.autoswitch.config", "false");
+        p.setProperty("supported.portletmode.autoswitch.edit_defaults", "false");
+        p.setProperty("supported.portletmode.autoswitch.config.surrogate.portlet", "j2-admin::CustomConfigModePortlet");
+        return p;
     }
 }



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