portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r929747 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/ components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/ jetspeed-api/src/main/java/org/apac...
Date Wed, 31 Mar 2010 23:35:28 GMT
Author: taylor
Date: Wed Mar 31 23:35:28 2010
New Revision: 929747

URL: http://svn.apache.org/viewvc?rev=929747&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1059

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/JetspeedActions.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java?rev=929747&r1=929746&r2=929747&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
Wed Mar 31 23:35:28 2010
@@ -19,6 +19,7 @@ package org.apache.jetspeed.components.t
 import java.io.IOException;
 import java.util.Properties;
 
+import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.components.JetspeedBeanDefinitionFilter;
 import org.apache.jetspeed.components.SpringComponentManager;
 import org.apache.jetspeed.test.JetspeedTestCase;
@@ -39,6 +40,9 @@ public abstract class AbstractSpringTest
 {
     protected SpringComponentManager scm;
 
+    protected final static String[] SUPPORTED_PORTLET_MODES = { "normal", "maximized", "minimized",
"solo", "detach", "close" };
+    protected final static String[] SUPPORTED_WINDOW_STATES = { "view", "edit", "help", "about",
"config", "edit_defaults", "preview", "print", "secure" };
+    
     /**
      * setup Spring context as part of test setup
      */
@@ -47,6 +51,7 @@ public abstract class AbstractSpringTest
         super.setUp();
         scm = new SpringComponentManager(getBeanDefinitionFilter(), getBootConfigurations(),
getConfigurations(), getBaseDir()+"target/test-classes/webapp", getInitProperties(), false);
         scm.start();
+	    new JetspeedActions(SUPPORTED_PORTLET_MODES, SUPPORTED_WINDOW_STATES);
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java?rev=929747&r1=929746&r2=929747&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java
Wed Mar 31 23:35:28 2010
@@ -23,8 +23,9 @@ import java.util.HashMap;
 import java.util.Properties;
 import java.util.StringTokenizer;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.commons.configuration.Configuration;
+import org.apache.jetspeed.JetspeedActions;
+import org.apache.jetspeed.administration.PortalConfigurationConstants;
 import org.apache.jetspeed.components.JetspeedBeanDefinitionFilter;
 import org.apache.jetspeed.components.SpringComponentManager;
 import org.apache.jetspeed.components.util.Slf4JLoggerToolsLogger;
@@ -32,6 +33,8 @@ import org.apache.jetspeed.serializer.Je
 import org.apache.jetspeed.serializer.JetspeedSerializerApplication;
 import org.apache.jetspeed.serializer.SerializerException;
 import org.apache.jetspeed.tools.ToolsLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Jetspeed Serializer Application
@@ -179,6 +182,11 @@ public class JetspeedSerializerApplicati
             
             scm = new SpringComponentManager(filter, bootConfig, appConfig, applicationRootPath,
initProperties, true);
             scm.start();
+            Configuration config = (Configuration)scm.getComponent("portal_configuration");
+            if (config != null)
+            {
+            	new JetspeedActions(config.getStringArray(PortalConfigurationConstants.SUPPORTED_PORTLET_MODES),
config.getStringArray(PortalConfigurationConstants.SUPPORTED_WINDOW_STATES));
+            }
             JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent(JetspeedSerializer.class.getName());
             HashMap settings = new HashMap();
             settings.put(JetspeedSerializer.KEY_LOGGER, logger);
@@ -246,6 +254,11 @@ public class JetspeedSerializerApplicati
             
             scm = new SpringComponentManager(filter, bootConfig, appConfig, applicationRootPath,
true);
             scm.start();
+            Configuration config = (Configuration)scm.getComponent("portal_configuration");
+            if (config != null)
+            {
+            	new JetspeedActions(config.getStringArray(PortalConfigurationConstants.SUPPORTED_PORTLET_MODES),
config.getStringArray(PortalConfigurationConstants.SUPPORTED_WINDOW_STATES));
+            }            
             JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent(JetspeedSerializer.class.getName());
             HashMap settings = new HashMap();
             settings.put(JetspeedSerializer.KEY_LOGGER, logger);

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/JetspeedActions.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/JetspeedActions.java?rev=929747&r1=929746&r2=929747&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/JetspeedActions.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/JetspeedActions.java
Wed Mar 31 23:35:28 2010
@@ -133,10 +133,6 @@ public class JetspeedActions
                 actionsList.add(state);
                 list.add(state);
             }
-            else if (!standardWindowStates.contains(state))
-            {
-                throw new IllegalArgumentException("WindowState "+state+" already defined
as extended PortletMode or WindowState");
-            }
         }
         extendedWindowStates = Collections.unmodifiableList(list);
         
@@ -151,10 +147,6 @@ public class JetspeedActions
                 actionsList.add(mode);
                 list2.add(mode);
             }
-            else if (!standardPortletModes.contains(mode))
-            {
-                throw new IllegalArgumentException("PortletMode "+mode+" already defined
as extended PortletMode or WindowState");
-            }
         }
         extendedPortletModes = Collections.unmodifiableList(list2);
         

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java?rev=929747&r1=929746&r2=929747&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java
Wed Mar 31 23:35:28 2010
@@ -92,5 +92,9 @@ public interface PortalConfigurationCons
     static final String JETUI_DRAG_YAHOO = "yahoo";
     static final String JETUI_STYLE_PORTLET = "jetui.style.portlet";
     static final String JETUI_STYLE_LAYOUT = "jetui.style.layout";
-    static final String JETUI_STYLE_DRAG_HANDLE = "jetui.style.drag.handle";    
+    static final String JETUI_STYLE_DRAG_HANDLE = "jetui.style.drag.handle";  
+    
+    /** Portlet Modes, Window States: return string arrays **/
+    static final String SUPPORTED_WINDOW_STATES = "supported.windowstate";
+    static final String SUPPORTED_PORTLET_MODES = "supported.portletmode";
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml?rev=929747&r1=929746&r2=929747&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml
Wed Mar 31 23:35:28 2010
@@ -601,7 +601,7 @@
 			<groups></groups>
 			<users></users>
 		</Permission>
-		<Permission type="portal" resource="rss::*" actions="view, edit">
+		<Permission type="portal" resource="rss::*" actions="view, edit, edit_defaults">
 			<roles>user</roles>
 			<groups></groups>
 			<users></users>



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