portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r743646 [2/2] - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/ components/jetspeed-portal/src/ma...
Date Thu, 12 Feb 2009 08:02:19 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java?rev=743646&r1=743645&r2=743646&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
Thu Feb 12 08:02:18 2009
@@ -18,22 +18,30 @@
 
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Locale;
 
+import javax.xml.namespace.QName;
+
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.components.persistence.store.LockFailedException;
 import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
 import org.apache.jetspeed.engine.MockJetspeedEngine;
-import org.apache.jetspeed.om.portlet.InitParam;
-import org.apache.jetspeed.om.portlet.Language;
-import org.apache.jetspeed.om.portlet.Supports;
-import org.apache.jetspeed.om.portlet.UserAttribute;
-import org.apache.jetspeed.om.portlet.Preference;
-import org.apache.jetspeed.om.portlet.Preferences;
+import org.apache.jetspeed.om.portlet.ContainerRuntimeOption;
+import org.apache.jetspeed.om.portlet.Description;
 import org.apache.jetspeed.om.portlet.DublinCore;
+import org.apache.jetspeed.om.portlet.EventDefinition;
+import org.apache.jetspeed.om.portlet.EventDefinitionReference;
 import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.om.portlet.InitParam;
+import org.apache.jetspeed.om.portlet.Language;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.Preference;
+import org.apache.jetspeed.om.portlet.Preferences;
+import org.apache.jetspeed.om.portlet.PublicRenderParameter;
+import org.apache.jetspeed.om.portlet.Supports;
+import org.apache.jetspeed.om.portlet.UserAttribute;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
 import org.apache.jetspeed.om.portlet.impl.DublinCoreImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
@@ -202,9 +210,11 @@
         supports.addPortletMode(MODE_HELP);
         supports.addPortletMode(MODE_VIEW);
         
-        portletRegistry.updatePortletApplication(app);
+        build20TestData(app, portlet);
+        portletRegistry.updatePortletApplication(app);        
     }
-
+     
+    
     protected void verifyData(boolean afterUpdates) throws Exception
     {
         PortletApplication app;
@@ -277,9 +287,11 @@
         app = portletRegistry.getPortletApplication("App_1");
 
         assertNotNull("App did NOT persist its description", app.getDescription(Locale.FRENCH));
-
+        
+        verifyPortlet20Data(app, portlet);        
     }
-
+    
+  
     protected void validateDublinCore(GenericMetadata metadata)
     {
         DublinCore dc = new DublinCoreImpl(metadata);
@@ -309,4 +321,179 @@
         return new String[]
         { "transaction.xml", "registry-test.xml", "cache-test.xml", "static-bean-references.xml"
};
     }
+    
+    public static void build20TestData(PortletApplication app, PortletDefinition portlet)
+    throws RegistryException
+    {
+        // Portlet 2.0 Support        
+        app.setDefaultNamespace("http:apache.org/events");
+        portlet.setCacheScope("private");
+        portlet.setExpirationCache(-1);
+        EventDefinition event = app.addEventDefinition("plainOldEvent");
+        event.setValueType("java.lang.String");
+        Description en1 = event.addDescription("en");
+        en1.setDescription("The Plain Old Event");
+        Description fr1 = event.addDescription("fr");
+        fr1.setDescription("Le Vieux Ordinaire ŽvŽnement");        
+        
+        QName q2 = new QName("http:portals.apache.org/events", "qualifiedEvent");
+        EventDefinition event2 = app.addEventDefinition(q2);
+        event2.setValueType("java.lang.String");       
+
+        QName q3 = new QName("http:portals.apache.org/events", "prefixedEvent", "x");
+        EventDefinition event3 = app.addEventDefinition(q3);
+        event3.setValueType("java.lang.String");       
+        event3.addAlias(new QName("local-1"));
+        event3.addAlias(new QName("http:2portals.apache.org/events", "local-2"));
+        event3.addAlias(new QName("http:3portals.apache.org/events", "local-3", "p"));
+        // test dupes
+        event3.addAlias(new QName("local-1"));            
+        event3.addAlias(new QName("http:2portals.apache.org/events", "local-2"));       
    
+        event3.addAlias(new QName("http:3portals.apache.org/events", "local-3", "p"));  
         
+        assertEquals(event3.getAliases().size(), 3);
+
+        portlet.addSupportedProcessingEvent("plainOldEvent");
+        portlet.addSupportedProcessingEvent(q3);
+        portlet.addSupportedPublishingEvent("local-1");
+        portlet.addSupportedPublishingEvent(q2);
+        
+        portlet.addSupportedPublicRenderParameter("city");
+        portlet.addSupportedPublicRenderParameter("zipcode");
+        
+        ContainerRuntimeOption opt1 = portlet.addContainerRuntimeOption("PortletOption1");
+        opt1.addValue("p-value-1");
+        opt1.addValue("p-value-2");
+        opt1.addValue("p-value-3");
+        ContainerRuntimeOption opt2 = portlet.addContainerRuntimeOption("PortletOption2");
+        opt2.addValue("p-value-4");
+        opt2.addValue("p-value-5");
+
+        ContainerRuntimeOption opt3 = app.addContainerRuntimeOption("AppOption1");
+        opt3.addValue("a-value-1");
+        opt3.addValue("a-value-2");
+        opt3.addValue("a-value-3");
+        ContainerRuntimeOption opt4 = app.addContainerRuntimeOption("AppOption2");      
 
+        opt4.addValue("a-value-4");
+        
+        PublicRenderParameter prp1 = app.addPublicRenderParameter("prp1", "prp1-id");
+        Description d1 = prp1.addDescription("en");
+        d1.setDescription("dog");
+        Description d2 = prp1.addDescription("fr");
+        d2.setDescription("chien");
+        prp1.addAlias(new QName("alias-1"));        
+    }
+
+    public static void verifyPortlet20Data(PortletApplication app, PortletDefinition portlet)
+    throws Exception
+    {   
+        // Portlet 2.0 Support
+        assertEquals(app.getDefaultNamespace(), "http:apache.org/events");
+        assertEquals(portlet.getCacheScope(), "private");
+        assertEquals(portlet.getExpirationCache(), -1);
+        
+        List<EventDefinition> events = app.getEventDefinitions();
+        assertNotNull(events);
+        assertTrue(events.size() == 3);
+        EventDefinition event1 = events.get(0);
+        assertNotNull(event1);
+        assertEquals(event1.getName(), "plainOldEvent");
+        assertEquals(event1.getValueType(), "java.lang.String");
+        QName q = event1.getQName();
+        assertEquals(q.getNamespaceURI(), "");
+        assertEquals(q.getPrefix(), "");
+        Description en = event1.getDescription(new Locale("en"));
+        assertEquals(en.getDescription(), "The Plain Old Event");
+        Description fr = event1.getDescription(new Locale("fr"));
+        assertEquals(fr.getDescription(), "Le Vieux Ordinaire ŽvŽnement");        
+        
+        EventDefinition event2 = events.get(1);
+        assertNotNull(event2);
+        QName qname = event2.getQName();
+        assertEquals(qname.getNamespaceURI(), "http:portals.apache.org/events");
+        assertEquals(qname.getLocalPart(), "qualifiedEvent");
+        assertEquals(event2.getValueType(), "java.lang.String");        
+        assertEquals(qname.getPrefix(), "");
+
+        EventDefinition event3 = events.get(2);
+        assertNotNull(event3);
+        QName qname3 = event3.getQName();
+        assertEquals(qname3.getNamespaceURI(), "http:portals.apache.org/events");
+        assertEquals(qname3.getLocalPart(), "prefixedEvent");
+        assertEquals(qname3.getPrefix(), "x");
+        assertEquals(event3.getValueType(), "java.lang.String");        
+        
+        QName alias1 = event3.getAliases().get(0);
+        assertEquals(alias1.getLocalPart(), "local-1");
+        QName alias2 = event3.getAliases().get(1);
+        assertEquals(alias2.getLocalPart(), "local-2");
+        assertEquals(alias2.getNamespaceURI(), "http:2portals.apache.org/events");
+        QName alias3 = event3.getAliases().get(2);
+        assertEquals(alias3.getLocalPart(), "local-3");
+        assertEquals(alias3.getNamespaceURI(), "http:3portals.apache.org/events");
+        assertEquals(alias3.getPrefix(), "p");        
+
+        List<EventDefinitionReference> refs = portlet.getSupportedProcessingEvents();
+        assertEquals(refs.size(), 2);
+        EventDefinitionReference ref1 = refs.get(0);
+        assertEquals(ref1.getName(), "plainOldEvent");
+        EventDefinitionReference ref2 = refs.get(1);
+        QName ref2QName = ref2.getQName();
+        assertEquals(ref2QName, new QName("http:portals.apache.org/events", "prefixedEvent",
"x"));
+
+        List<EventDefinitionReference> pubRefs = portlet.getSupportedPublishingEvents();
+        assertEquals(pubRefs.size(), 2);
+        EventDefinitionReference pubRef1 = pubRefs.get(0);
+        assertEquals(pubRef1.getName(), "local-1");
+        EventDefinitionReference pubRef2 = pubRefs.get(1);
+        QName pubRef2QName = pubRef2.getQName();
+        assertEquals(pubRef2QName, new QName("http:portals.apache.org/events", "qualifiedEvent"));
+
+        List<String> supportedRenderParams = portlet.getSupportedPublicRenderParameters();
+        assertEquals(supportedRenderParams.size(), 2);
+        String p1 = supportedRenderParams.get(0);
+        assertEquals(p1, "city");
+        String p2 = supportedRenderParams.get(1);
+        assertEquals(p2, "zipcode");
+
+        List<ContainerRuntimeOption> portletOptions = portlet.getContainerRuntimeOptions();
+        assertEquals(portletOptions.size(), 2);
+        ContainerRuntimeOption opt1 = portlet.getContainerRuntimeOption("PortletOption1");
+        assertEquals(opt1.getName(), "PortletOption1");
+        assertEquals(opt1.getValues().size(), 3);
+        assertEquals(opt1.getValues().get(0), "p-value-1");
+        assertEquals(opt1.getValues().get(1), "p-value-2");
+        assertEquals(opt1.getValues().get(2), "p-value-3");
+        ContainerRuntimeOption opt2 = portlet.getContainerRuntimeOption("PortletOption2");
+        assertEquals(opt2.getName(), "PortletOption2");
+        assertEquals(opt2.getValues().size(), 2);
+        assertEquals(opt2.getValues().get(0), "p-value-4");
+        assertEquals(opt2.getValues().get(1), "p-value-5");
+        
+        List<ContainerRuntimeOption> appOptions = app.getContainerRuntimeOptions();
+        assertEquals(appOptions.size(), 2);
+        ContainerRuntimeOption opt3 = app.getContainerRuntimeOption("AppOption1");
+        assertEquals(opt3.getName(), "AppOption1");
+        assertEquals(opt3.getValues().size(), 3);
+        assertEquals(opt3.getValues().get(0), "a-value-1");
+        assertEquals(opt3.getValues().get(1), "a-value-2");
+        assertEquals(opt3.getValues().get(2), "a-value-3");
+        ContainerRuntimeOption opt4 = app.getContainerRuntimeOption("AppOption2");
+        assertEquals(opt4.getName(), "AppOption2");
+        assertEquals(opt4.getValues().size(), 1);
+        assertEquals(opt4.getValues().get(0), "a-value-4");
+        
+        PublicRenderParameter x = app.getPublicRenderParameter("prp1-id");
+        assertNotNull(x);
+        assertEquals(x.getName(), "prp1");
+        List<PublicRenderParameter> xs = app.getPublicRenderParameters();
+        assertEquals(xs.size(), 1);
+        Description d1 = x.getDescription(new Locale("en"));
+        assertEquals(d1.getDescription(), "dog");
+        Description d2 = x.getDescription(new Locale("fr"));
+        assertEquals(d2.getDescription(), "chien");
+        List<QName> aliases = x.getAliases();
+        assertEquals(aliases.size(), 1);
+        assertEquals(aliases.get(0).getLocalPart(), "alias-1");
+    }
+
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java?rev=743646&r1=743645&r2=743646&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
Thu Feb 12 08:02:18 2009
@@ -22,6 +22,7 @@
 import org.apache.jetspeed.components.persistence.store.LockFailedException;
 import org.apache.jetspeed.components.portletregistry.AbstractRegistryTest;
 import org.apache.jetspeed.components.portletregistry.RegistryException;
+import org.apache.jetspeed.components.portletregistry.TestPortletRegistryDAO;
 import org.apache.jetspeed.om.portlet.InitParam;
 import org.apache.jetspeed.om.portlet.Language;
 import org.apache.jetspeed.om.portlet.Preference;
@@ -122,6 +123,7 @@
         supports.addPortletMode(MODE_HELP);
         supports.addPortletMode(MODE_VIEW);
         
+        TestPortletRegistryDAO.build20TestData(app, portlet);        
         registry.registerPortletApplication(app);
     }
 

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java?rev=743646&r1=743645&r2=743646&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java
Thu Feb 12 08:02:18 2009
@@ -117,4 +117,13 @@
     void addRegistryListener(RegistryEventListener listener);
     
     void removeRegistryEventListener(RegistryEventListener listener);
+
+    /**
+     * Given a portlet definition, create a clone of it, with a new name
+     * @param source the portlet definition to be cloned
+     * @param newPortletName the unique name of the new portlet definition
+     * @throws FailedToStorePortletDefinitionException
+     */
+    void clonePortletDefinition(PortletDefinition source, String newPortletName) throws FailedToStorePortletDefinitionException;
+    
 }

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java?rev=743646&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java
(added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java
Thu Feb 12 08:02:18 2009
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2008 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.
+ */
+package org.apache.jetspeed.om.portlet;
+
+
+/**
+ * 
+ * @version $Id$
+ *
+ */
+public interface ContainerRuntimeOptionValue
+{
+    String getValue();
+}

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/ContainerRuntimeOptionValue.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/GenericMetadata.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/GenericMetadata.java?rev=743646&r1=743645&r2=743646&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/GenericMetadata.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/GenericMetadata.java
Thu Feb 12 08:02:18 2009
@@ -58,7 +58,7 @@
      * @param name
      * @return
      */
-    public Collection getFields( String name );
+    public Collection<LocalizedField> getFields( String name );
     
     /**
      * 
@@ -69,7 +69,7 @@
      * @param name
      * @param values
      */
-    public void setFields( String name, Collection values );
+    public void setFields( String name, Collection<LocalizedField> values );
     
     /**
      * 
@@ -79,7 +79,7 @@
      *
      * @return
      */
-    public Collection getFields();
+    public Collection<LocalizedField> getFields();
     
     /**
      * 
@@ -89,7 +89,7 @@
      *
      * @param fields
      */
-    public void setFields( Collection fields );
+    public void setFields( Collection<LocalizedField> fields );
     
     /**
      * 
@@ -109,5 +109,5 @@
      *
      * @param fields
      */
-    public void copyFields( Collection fields );
+    public void copyFields( Collection<LocalizedField> fields );
 }

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java?rev=743646&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java
(added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java
Thu Feb 12 08:02:18 2009
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2008 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.
+ */
+package org.apache.jetspeed.om.portlet;
+
+import javax.xml.namespace.QName;
+
+
+public interface PortletQName
+{
+    String getLocalPart();
+    String getPrefix();
+    String getNamespace();
+    QName getQName();
+}

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletQName.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java?rev=743646&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java
(added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java
Thu Feb 12 08:02:18 2009
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2008 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.
+ */
+package org.apache.jetspeed.om.portlet;
+
+
+public interface SupportedPublicRenderParameter
+{
+    String getName();
+}
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/SupportedPublicRenderParameter.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java?rev=743646&r1=743645&r2=743646&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
Thu Feb 12 08:02:18 2009
@@ -26,6 +26,9 @@
 
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
+import javax.portlet.EventPortlet;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
 import javax.portlet.PortletRequest;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
@@ -286,6 +289,25 @@
                 ((InternalPortletRequest)renderRequest).init(portlet.getConfig().getPortletContext(),
jetspeedServletWrapper);
                 portlet.render(renderRequest, renderResponse);
             }
+            else if (method == ContainerConstants.METHOD_EVENT)
+            {
+                EventRequest eventRequest = null;
+                EventResponse eventResponse =  null;
+
+                if (isParallelMode)
+                {
+                    eventRequest = (EventRequest) CurrentWorkerContext.getAttribute(ContainerConstants.PORTLET_REQUEST);
+                    eventResponse = (EventResponse) CurrentWorkerContext.getAttribute(ContainerConstants.PORTLET_RESPONSE);
+                }
+                else
+                {
+                    eventRequest = (EventRequest) request.getAttribute(ContainerConstants.PORTLET_REQUEST);
+                    eventResponse = (EventResponse) request.getAttribute(ContainerConstants.PORTLET_RESPONSE);
+
+                }
+                ((InternalPortletRequest)eventRequest).init(portlet.getConfig().getPortletContext(),
jetspeedServletWrapper);
+                ((EventPortlet)portlet.getRealPortlet()).processEvent(eventRequest, eventResponse);
+            }
             else if (method == ContainerConstants.METHOD_RESOURCE && portlet.getRealPortlet()
instanceof ResourceServingPortlet)
             {
                 ResourceRequest resourceRequest = null;

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml?rev=743646&r1=743645&r2=743646&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml
Thu Feb 12 08:02:18 2009
@@ -27,10 +27,11 @@
         <column name="NAME" size="80" type="VARCHAR"/>
         <column name="CLASS_NAME" size="255" type="VARCHAR"/>
         <column name="APPLICATION_ID" required="true" type="INTEGER"/>
-        <column name="EXPIRATION_CACHE" size="30" type="VARCHAR"/>
+        <column name="EXPIRATION_CACHE" type="INTEGER"/>
         <column name="RESOURCE_BUNDLE" size="255" type="VARCHAR"/>
         <column name="PREFERENCE_VALIDATOR" size="255" type="VARCHAR"/>
-        <column name="SECURITY_REF" size="40" type="VARCHAR"/>        
+        <column name="SECURITY_REF" size="40" type="VARCHAR"/>      
+        <column name="CACHE_SCOPE" size="30" type="VARCHAR"/>  
     </table>
 
     <!--
@@ -45,6 +46,7 @@
         <column name="APP_TYPE" type="INTEGER"/>
 		<column name="CHECKSUM" size="80" type="VARCHAR"/>
         <column name="SECURITY_REF" size="40" type="VARCHAR"/>
+        <column name="DEFAULT_NAMESPACE" size="120" type="VARCHAR"/>
         <unique name="UK_APPLICATION">
             <unique-column name="APP_NAME"/>
         </unique>
@@ -275,5 +277,68 @@
             <reference foreign="APPLICATION_ID" local="APPLICATION_ID"/>
         </foreign-key>        
     </table>
-                         
+
+    <table name="EVENT_DEFINITION">
+    	<column name="ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="APPLICATION_ID" required="true" type="INTEGER"/>  
+        <column name="LOCAL_PART" required="true" size="80" type="VARCHAR"/>
+        <column name="NAMESPACE" required="false" size="80" type="VARCHAR"/>
+        <column name="PREFIX" required="false" size="20" type="VARCHAR"/>        
+        <column name="VALUE_TYPE" required="true" size="120" type="VARCHAR"/>
+        <foreign-key foreignTable="PORTLET_APPLICATION" name="FK_EVENT_DEFINITION_1" onDelete="cascade">
                       
+            <reference foreign="APPLICATION_ID" local="APPLICATION_ID"/>          
 
+        </foreign-key>    	
+    </table>             
+
+    <!-- 
+	    PORTLET_QNAME       
+    -->
+    <table name="PORTLET_QNAME">
+        <column name="ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="OWNER_ID" required="true" type="INTEGER"/>
+        <column name="OWNER_CLASS_NAME" required="true" size="255" type="VARCHAR"/>
+        <column name="LOCAL_PART" required="true" size="80" type="VARCHAR"/>
+        <column name="NAMESPACE" required="false" size="80" type="VARCHAR"/>
+        <column name="PREFIX" required="false" size="20" type="VARCHAR"/>        
+    </table>
+    
+   <!--                                                                   
+	   SUPPORTED RENDER PARAMETERS                                                        
+    -->                                                                     
+    <table name="NAMED_PARAMETER">                                            
+        <column name="ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="OWNER_ID" required="true" type="INTEGER"/>
+        <column name="OWNER_CLASS_NAME" required="true" size="255" type="VARCHAR"/>
+        <column name="NAME" required="true" size="150" type="VARCHAR"/>
+    </table> 
+       
+   <!--                                                                   
+	   RUNTIME OPTIONS                                                        
+    -->                                                                     
+    <table name="RUNTIME_OPTION">                                            
+        <column name="ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="OWNER_ID" required="true" type="INTEGER"/>
+        <column name="OWNER_CLASS_NAME" required="true" size="255" type="VARCHAR"/>
+        <column name="NAME" required="true" size="150" type="VARCHAR"/>
+    </table> 
+    
+    <table name="RUNTIME_VALUE">                                            
+        <column name="ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="OWNER_ID" required="true" type="INTEGER"/>
+        <column name="OWNER_CLASS_NAME" required="true" size="255" type="VARCHAR"/>
+        <column name="RVALUE" required="true" size="200" type="VARCHAR"/>
+    </table> 
+
+   <!--                                                                   
+	   PUBLIC RENDER PARAMETERS                                                        
+    -->                                                                     
+    <table name="PUBLIC_PARAMETER">                                            
+        <column name="ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="APPLICATION_ID" required="true" type="INTEGER"/>  
+        <column name="LOCAL_PART" required="true" size="80" type="VARCHAR"/>
+        <column name="NAMESPACE" required="false" size="80" type="VARCHAR"/>
+        <column name="PREFIX" required="false" size="20" type="VARCHAR"/>        
+        <column name="IDENTIFIER" required="true" size="150" type="VARCHAR"/>
+    </table> 
+                   
 </database>

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml?rev=743646&r1=743645&r2=743646&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
Thu Feb 12 08:02:18 2009
@@ -72,9 +72,9 @@
        <constructor-arg><ref bean="org.apache.pluto.services.ResourceURLProviderImpl"/></constructor-arg>
(currently doing a 'new')
 -->
 		<constructor-arg><ref bean="org.apache.pluto.services.PropertyManager"/></constructor-arg>
-		<constructor-arg><ref bean="org.apache.pluto.services.EventProvider"/></constructor-arg>
 		<constructor-arg><ref bean="org.apache.pluto.services.FilterManager"/></constructor-arg>
 		<constructor-arg><ref bean="org.apache.pluto.services.PortletURLListener"/></constructor-arg>
+		<constructor-arg><ref bean="org.apache.jetspeed.container.window.PortletWindowAccessor"/></constructor-arg>
	
     </bean>
 
 



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