portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r707572 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade: components/jetspeed-portal/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/inv...
Date Fri, 24 Oct 2008 07:15:57 GMT
Author: taylor
Date: Fri Oct 24 00:15:55 2008
New Revision: 707572

URL: http://svn.apache.org/viewvc?rev=707572&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-871
removal of pluto factory references, start of cleanup of components/jetspeed-portal

Added:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml
  (contents, props changed)
      - copied, changed from r707546, portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-factories.xml
Removed:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/PortalContextFactoryImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/PortletInvokerFactoryImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/namespace/JetspeedNamespaceMapperFactory.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/url/impl/JetspeedPortletURL.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/url/impl/PortletURLFactoryImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/core/
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/NamespaceEncodedSession.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/servlet/ServletObjectAccess.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/messaging/
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/information/
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-factories.xml
Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/pom.xml
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/test/java/org/apache/jetspeed/engine/TestSpringEngine.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/engine/MockJetspeedEngine.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/pom.xml?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/pom.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/pom.xml
Fri Oct 24 00:15:55 2008
@@ -70,6 +70,14 @@
             <groupId>${pom.groupId}</groupId>
             <artifactId>jetspeed-security</artifactId>
         </dependency>
+	    <dependency>
+	        <groupId>org.apache.pluto</groupId>
+	        <artifactId>pluto-container-api</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>org.apache.pluto</groupId>
+	        <artifactId>pluto-container</artifactId>
+	    </dependency>        
         <dependency>
             <groupId>velocity</groupId>
             <artifactId>velocity</artifactId>

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvokerService.java
Fri Oct 24 00:15:55 2008
@@ -42,7 +42,23 @@
 import org.apache.pluto.spi.optional.PortletInvokerService;
 
 /**
- * Implements Pluto's portlet invoker service interface.
+ * <p>
+ * Implements Pluto's portlet invoker service interfacem creating portlet invokers based
on the servlet context.
+ * This class is part of the contract between Pluto and the Jetspeed Portal 
+ * The Pluto container uses portlet invokers to abstract access to portlets.
+ * An invoker interfaces defines which actions are performed between the portal and container,
+ * namely action, render and optionally load. 
+ * </p>
+ * <p>
+ * The Jetspeed portlet invoker services supports two kinds of invokers: local and servlet.
+ * Local portlet invokers call portlets located in the same web applications.
+ * With local invokers, a simple java method invocation is called on the portlet.
+ * Servlet portlet invokers call portlets located in another web application.
+ * With servlet invokers, the servlet request dispatcher is used to call methods on the portlet.

+ * </p>
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: PortletInvokerFactoryImpl.java 706843 2008-10-22 01:34:10Z taylor $
  *
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: $

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/providers/PortletURLProviderImpl.java
Fri Oct 24 00:15:55 2008
@@ -22,9 +22,9 @@
 import javax.portlet.WindowState;
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.jetspeed.container.PortletWindow;
 import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.PortletWindow;
 import org.apache.pluto.spi.PortletURLProvider;
 
 /**

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPortalCallbackServices.java
Fri Oct 24 00:15:55 2008
@@ -24,7 +24,6 @@
 import org.apache.jetspeed.container.providers.PortletURLProviderImpl;
 import org.apache.jetspeed.container.providers.ResourceURLProviderImpl;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.PortletWindow;
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 import org.apache.pluto.spi.EventProvider;
 import org.apache.pluto.spi.FilterManager;
@@ -58,15 +57,15 @@
     }
 
     public PortletURLProvider getPortletURLProvider(HttpServletRequest request,
-            PortletWindow portletWindow)
+            org.apache.pluto.PortletWindow portletWindow)
     {
         RequestContext rc = (RequestContext) request
                 .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        return new PortletURLProviderImpl(rc, portletWindow);
+        return new PortletURLProviderImpl(rc, (org.apache.jetspeed.container.PortletWindow)portletWindow);
     }
 
     public ResourceURLProvider getResourceURLProvider(
-            HttpServletRequest request, PortletWindow portletWindow)
+            HttpServletRequest request, org.apache.pluto.PortletWindow portletWindow)
     {
         RequestContext rc = (RequestContext) request
                 .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
@@ -80,7 +79,7 @@
         
 
     public EventProvider getEventProvider(HttpServletRequest request,
-            PortletWindow portletWindow)
+            org.apache.pluto.PortletWindow portletWindow)
     {   
         return eventProvider;
     }
@@ -113,7 +112,7 @@
      * use.
      */
     public void setTitle(HttpServletRequest request,
-            PortletWindow portletWindow, String titleArg)
+            org.apache.pluto.PortletWindow portletWindow, String titleArg)
     {
         // TODO: 2.2 jetspeed uses a title service        
         String title = null;
@@ -130,7 +129,7 @@
                         + "::window.id::" + portletWindow.getId(), title);        
     }
 
-    protected final String getTitleFromPortletDefinition(PortletWindow window,
+    protected final String getTitleFromPortletDefinition(org.apache.pluto.PortletWindow window,
             HttpServletRequest request)
     {
         String title = null;

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
Fri Oct 24 00:15:55 2008
@@ -39,9 +39,6 @@
 import org.apache.ojb.broker.util.ClassHelper;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.factory.Factory;
-import org.apache.pluto.services.ContainerService;
-import org.apache.pluto.services.factory.FactoryManagerService;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 
 
@@ -176,7 +173,7 @@
                     .getComponent(PortletContainer.class);
             if (container != null)
             {
-                container.shutdown();
+                container.destroy();
             }
     
             componentManager.stop();
@@ -295,44 +292,4 @@
     {
         return this.componentManager;
     }
-    /**
-     * <p>
-     * getFactory
-     * </p>
-     *
-     * @see org.apache.pluto.services.factory.FactoryManagerService#getFactory(java.lang.Class)
-     * @param theClass
-     * @return
-     */
-    public Factory getFactory( Class theClass )
-    {        
-        return (Factory) getComponentManager().getComponent(theClass);
-    }
-    /**
-     * <p>
-     * getContainerService
-     * </p>
-     *
-     * @see org.apache.pluto.services.PortletContainerEnvironment#getContainerService(java.lang.Class)
-     * @param service
-     * @return
-     */
-    public ContainerService getContainerService( Class service )
-    {
-        if(service.equals(FactoryManagerService.class))
-        {
-            return this;
-        }
-
-        try
-        {
-            return (ContainerService) getComponentManager().getComponent(service);
-        }
-        catch (NoSuchBeanDefinitionException e)
-        {
-            log.warn("No ContainerService defined for "+service.getName());
-            return null;
-        }
-    }
-
 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
Fri Oct 24 00:15:55 2008
@@ -30,8 +30,10 @@
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.cache.ContentCacheKey;
 import org.apache.jetspeed.cache.JetspeedContentCache;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
+import org.apache.jetspeed.container.PortletEntity;
+import org.apache.jetspeed.container.PortletWindow;
 import org.apache.jetspeed.container.state.MutableNavigationalState;
+import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.exception.JetspeedException;
 import org.apache.jetspeed.om.page.ContentFragment;
 import org.apache.jetspeed.om.page.ContentFragmentImpl;
@@ -46,8 +48,6 @@
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.PortletContainerException;
-import org.apache.jetspeed.container.PortletEntity;
-import org.apache.jetspeed.container.PortletWindow;
 
 /**
  * <p>
@@ -144,7 +144,7 @@
                 //PortletMessagingImpl msg = new PortletMessagingImpl(windowAccessor);
                 
                 requestForWindow.setAttribute("JETSPEED_ACTION", request);
-                container.processPortletAction(
+                container.doAction(
                     actionWindow,
                     requestForWindow,
                     response);

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
Fri Oct 24 00:15:55 2008
@@ -18,13 +18,21 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Iterator;
+import java.util.Map;
+
+import javax.portlet.PortletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.om.portlet.UserAttribute;
 import org.apache.jetspeed.om.impl.UserAttributeRefImpl;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.PortletWindow;
 
 /**
  * <p> Common user info management support
@@ -98,4 +106,20 @@
         return linkedUserAttributes;
     }
 
+    /**
+     * For Pluto 2.0
+     */
+    public Map<String, String> getUserInfo(PortletRequest request, PortletWindow window)
throws PortletContainerException
+    {
+        String remoteUser = request.getRemoteUser(); 
+        if ( remoteUser != null ) 
+        {
+            return Collections.EMPTY_MAP;
+        }
+        RequestContext requestContext=(RequestContext)request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+        return this.getUserInfoMap(window.getPortletEntity().getPortletDefinition().getApplication().getName(),
requestContext);        
+    }
+
+    public abstract Map getUserInfoMap(String appName, RequestContext context);
+    
 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/MultiSourceUserInfoManagerImpl.java
Fri Oct 24 00:15:55 2008
@@ -16,25 +16,23 @@
  */
 package org.apache.jetspeed.userinfo.impl;
 
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.portlet.PortletRequest;
-import javax.security.auth.Subject;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.components.portletregistry.PortletRegistry;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.portlet.PortletRequest;
+import javax.security.auth.Subject;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.om.portlet.PortletApplication;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.userinfo.UserAttributeRetrievalException;
-import org.apache.jetspeed.userinfo.UserAttributeSource;
-import org.apache.jetspeed.userinfo.UserInfoManager;
-import org.apache.jetspeed.userinfo.impl.AbstractUserInfoManagerImpl;
-import org.apache.pluto.om.portlet.ObjectID;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.userinfo.UserAttributeRetrievalException;
+import org.apache.jetspeed.userinfo.UserAttributeSource;
+import org.apache.jetspeed.userinfo.UserInfoManager;
 
 /**
  * Multisource User Information manager
@@ -55,23 +53,15 @@
     private List sources;
 
     private PortletRegistry portletRegistry;
-   
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.userinfo.UserInfoManager#getUserInfoMap(org.apache.pluto.om.common.ObjectID,
-     *      org.apache.jetspeed.request.RequestContext)
-     */
-    public Map getUserInfoMap(ObjectID oid, RequestContext context)
+   
+    public Map getUserInfoMap(String appName, RequestContext context)
     {
 
         try
         {
             Map userInfoMap = new HashMap();
             Subject subject = context.getSubject();
-            PortletApplication pa = portletRegistry
-                    .getPortletApplication(oid);
-//System.out.println("*** PA = " + pa);            
+            PortletApplication pa = portletRegistry.getPortletApplication(appName);
             if (null == pa)
             {
                 log.debug(PortletRequest.USER_INFO + " is set to null");
@@ -115,5 +105,6 @@
     public void setPortletRegistry(PortletRegistry portletRegistry)
     {
         this.portletRegistry = portletRegistry;
-    }
+    }
+
 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/UserInfoManagerImpl.java
Fri Oct 24 00:15:55 2008
@@ -28,7 +28,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
@@ -38,8 +37,6 @@
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.userinfo.UserInfoManager;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.PortletWindow;
 
 /**
  * <p>
@@ -227,18 +224,4 @@
         }
     }
 
-    /**
-     * For Pluto 2.0
-     */
-    public Map<String, String> getUserInfo(PortletRequest request, PortletWindow window)
throws PortletContainerException
-    {
-        String remoteUser = request.getRemoteUser(); 
-        if ( remoteUser != null ) 
-        {
-            return Collections.EMPTY_MAP;
-        }
-        RequestContext requestContext=(RequestContext)request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        return this.getUserInfoMap(window.getPortletEntity().getPortletDefinition().getApplication().getName(),
requestContext);        
-    }
-
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/test/java/org/apache/jetspeed/engine/TestSpringEngine.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/test/java/org/apache/jetspeed/engine/TestSpringEngine.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/test/java/org/apache/jetspeed/engine/TestSpringEngine.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/test/java/org/apache/jetspeed/engine/TestSpringEngine.java
Fri Oct 24 00:15:55 2008
@@ -43,7 +43,6 @@
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.security.impl.RdbmsPolicy;
 import org.apache.jetspeed.userinfo.UserInfoManager;
-import org.apache.pluto.services.information.StaticInformationProvider;
 
 /**
  * <p>
@@ -68,7 +67,7 @@
                                      UserInfoManager.class, RequestContextComponent.class,
PortletWindowAccessor.class,
                                      PortletRenderer.class, PageAggregator.class, PortletAggregator.class,
"PAM",
                                      "deploymentManager", "portletFactory", ServletConfig.class,

-                                     StaticInformationProvider.class, "NavigationalStateCodec",
"PortalURL", "NavigationalStateComponent"};
+                                      "NavigationalStateCodec", "PortalURL", "NavigationalStateComponent"};
     }
     
     public static Test suite()

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/engine/MockJetspeedEngine.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/engine/MockJetspeedEngine.java?rev=707572&r1=707571&r2=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/engine/MockJetspeedEngine.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/engine/MockJetspeedEngine.java
Fri Oct 24 00:15:55 2008
@@ -24,8 +24,6 @@
 import org.apache.jetspeed.exception.JetspeedException;
 import org.apache.jetspeed.pipeline.Pipeline;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.factory.Factory;
-import org.apache.pluto.services.ContainerService;
 
 /**
  * @version $Id$
@@ -86,14 +84,4 @@
     public void start() throws JetspeedException
     {
     }
-
-    public Factory getFactory(Class theClass)
-    {
-        return null;
-    }
-
-    public ContainerService getContainerService(Class service)
-    {
-        return null;
-    }
 }

Copied: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml
(from r707546, portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-factories.xml)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml?p2=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml&p1=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-factories.xml&r1=707546&r2=707572&rev=707572&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-factories.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml
Fri Oct 24 00:15:55 2008
@@ -15,10 +15,13 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!-- 
+    2008-10-23: DST: this is the 1.0 pluto-factories configuration along with comments about
how the old services were migrated to new services
+ -->
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
-<!-- DST:  moved to pluto-services.xml -->
+<!-- DST-2.0:  moved to pluto-services.xml -->
   <bean id="JetspeedNamespaceMapper" class="org.apache.jetspeed.container.namespace.JetspeedNamespaceMapperImpl">
     <meta key="j2:cat" value="default" />
     <constructor-arg index="0">
@@ -26,12 +29,12 @@
     </constructor-arg>
   </bean>
 
-<!-- DST:  replaced by org.apache.pluto.services.PortletInvokerService -->
+<!-- DST-2.0:  replaced by org.apache.pluto.services.PortletInvokerService -->
   <bean id="LocalPortletInvokerFactory" class="org.apache.jetspeed.container.invoker.LocalPortletInvokerFactory">
     <meta key="j2:cat" value="default" />
   </bean>
 
-<!-- DST:  replaced by org.apache.pluto.services.PortletInvokerService -->
+<!-- DST-2.0:  replaced by org.apache.pluto.services.PortletInvokerService -->
   <bean id="ServletPortletInvokerFactory" class="org.apache.jetspeed.container.invoker.ServletPortletInvokerFactory">
     <meta key="j2:cat" value="default" />
     <constructor-arg index="0">
@@ -44,11 +47,13 @@
     Third-party module can provide an implementation to decorate the real request or response
object of a servlet container.
     For example, the real request object of a servlet container can be decorated because
it is not thread-safe under Jetspeed parallel rendering mode.
   -->
+  <!-- DST-2.0: still in use: moved to servlet-api.xml -->
   <bean id="PortletRequestResponseUnwrapper"
     class="org.apache.jetspeed.container.invoker.DefaultPortletRequestResponseUnwrapper">
     <meta key="j2:cat" value="default" />
   </bean>
 
+  <!--  DST-2.0:, provided by PortletEnvironmentService - so we are not creating our own
wrappers at this time -->
   <bean id="javax.portlet.ActionRequest" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -59,6 +64,7 @@
     </property>
   </bean>
 
+  <!--  DST-2.0:, provided by PortletEnvironmentService - so we are not creating our own
wrappers at this time -->
   <bean id="javax.portlet.RenderRequest" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -76,6 +82,7 @@
     </property>
   </bean>
 
+  <!--  DST-2.0:, provided by PortletEnvironmentService - so we are not creating our own
wrappers at this time -->
   <bean id="javax.portlet.RenderResponse" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -86,6 +93,7 @@
     </property>
   </bean>
 
+  <!--  DST-2.0:, this is coming in with PortletRequestImpl.java in the Pluto Container
Impl, a hard coded new PortletSessionImpl TODO: 2.2  -->
   <bean id="javax.portlet.PortletSession" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -96,6 +104,7 @@
     </property>
   </bean>
 
+  <!-- DST-2.0:, now being created Jetspeed PortletFactory: TODO: better factoring/alignment
with Pluto Registry/ContextManager, or create a new factory service in jetspeed -->
   <bean id="javax.portlet.PortletConfig" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -106,6 +115,7 @@
     </property>
   </bean>
 
+  <!-- DST-2.0:, now being created Jetspeed PortletFactory: TODO: better factoring/alignment
with Pluto Registry/ContextManager, or create a new factory service in jetspeed -->
   <bean id="javax.portlet.PortletContext" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -116,6 +126,7 @@
     </property>
   </bean>
 
+  <!--  DST-2.0: deleted PortalContextFactoryImpl. The PortalContext is now a required
pluto service. Implementation: JetspeedPortalContext - same class as provided by old 1.0 factory
-->
   <bean id="javax.portlet.PortalContext" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -126,6 +137,7 @@
     </property>
   </bean>
 
+  <!-- DST-2.0:, provided by PortletEnvironmentService - so we are not creating our own
wrappers at this time -->
   <bean id="javax.portlet.ActionResponse" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -136,6 +148,7 @@
     </property>
   </bean>
 
+  <!-- DST-2.0:, JetspeedPortalCallbackServices, provided with a "new" TODO: 2.2 may want
to configure this further -->
   <bean id="javax.portlet.PortletURL" class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
     <property name="className">
@@ -146,6 +159,7 @@
     </property>
   </bean>
 
+  <!-- DST-2.0: implemented in new Pluto PortletPreferences service -->
   <bean id="javax.portlet.PortletPreferences"
     class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
@@ -157,6 +171,7 @@
     </property>
   </bean>
 
+  <!-- DST-2.0: implemented in new Pluto PortletPreferences service -->
   <!-- Problem???
     <bean id="javax.portlet.PreferencesValidator"
     class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean"
@@ -166,6 +181,7 @@
     </bean>
   -->
 
+  <!-- DST-2.0: implemented in new Pluto PortletInvokerService, org.apache.jetspeed.container.invoker.JetspeedPortletInvokerService
-->
   <bean id="org.apache.pluto.invoker.PortletInvoker"
     class="org.apache.jetspeed.container.invoker.PortletInvokerFactoryImpl">
     <meta key="j2:cat" value="default" />
@@ -186,6 +202,7 @@
     </constructor-arg>
   </bean>
 
+  <!-- DST-2.0: implemented in new Pluto Namespace Mapper service, org.apache.jetspeed.container.namespace.JetspeedNamespaceMapperImpl"
-->
   <bean id="org.apache.pluto.util.NamespaceMapper"
     class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
@@ -204,6 +221,7 @@
     </property>
   </bean>
 
+  <!-- DST-2.0: odd collection of 1.0 services, implemented in various areas in 2.0 -->
   <bean id="StaticInformationProvider" class="org.apache.jetspeed.services.information.StaticInformationProviderImpl">
     <meta key="j2:cat" value="default" />
     <constructor-arg>
@@ -211,7 +229,8 @@
     </constructor-arg>
   </bean>
 
-  <bean id="org.apache.pluto.services.information.InformationProviderService"
+	<!-- DST-2.0: odd collection of 1.0 services, implemented in various areas in 2.0 -->
+    <bean id="org.apache.pluto.services.information.InformationProviderService"
     class="org.apache.jetspeed.services.information.InformationProviderServiceImpl"
     name="org.apache.pluto.services.information.StaticInformationProvider,org.apache.pluto.services.information.DynamicInformationProvider,org.apache.pluto.services.information.PortletActionProvider,org.apache.pluto.services.information.PortalContextProvider">
     <meta key="j2:cat" value="default" />
@@ -223,17 +242,19 @@
     </constructor-arg>
   </bean>
 
-
+  <!-- DST-2.0: still in use: moved to servlet-api.xml -->
   <bean id="ServletRequestFactory" name="javax.servlet.http.HttpServletRequest"
     class="org.apache.jetspeed.engine.servlet.ServletRequestFactoryImpl">
     <meta key="j2:cat" value="default" />
   </bean>
 
+  <!-- DST-2.0: still in use: moved to servlet-api.xml -->
   <bean id="ServletResponseFactory" name="javax.servlet.http.HttpServletResponse"
     class="org.apache.jetspeed.engine.servlet.ServletResponseFactoryImpl">
     <meta key="j2:cat" value="default" />
   </bean>
 
+  <!-- DST-2.0: deprecated in 2.0 -->
   <bean id="org.apache.pluto.om.ControllerFactory"
     class="org.apache.jetspeed.components.factorybeans.PlutoFactoryFactoryBean">
     <meta key="j2:cat" value="default" />
@@ -245,11 +266,13 @@
     </property>
   </bean>
 
+  <!-- DST-2.0: deprecated in 2.0 -->
   <bean id="org.apache.pluto.services.log.LogService"
     class="org.apache.jetspeed.container.services.log.PlutoLogService">
     <meta key="j2:cat" value="default" />
   </bean>
 
+  <!-- DST-2.0: still in use: moved to jetspeed-spring.xml -->
   <bean id="org.apache.pluto.services.title.DynamicTitleService" name="DynamicTitleService"
     class="org.apache.jetspeed.services.title.DynamicTitleServiceImpl">
     <meta key="j2:cat" value="default" />

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.7

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/docs/pluto/2.0-upgrade/pluto-factories.xml
------------------------------------------------------------------------------
    svn:mergeinfo = 



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