portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r709610 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade: applications/jetspeed-demo/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/im...
Date Sat, 01 Nov 2008 00:06:16 GMT
Author: ate
Date: Fri Oct 31 17:06:16 2008
New Revision: 709610

URL: http://svn.apache.org/viewvc?rev=709610&view=rev
Log:
JS2-871 - Upgrade Pluto container to version 2.0
See:  http://issues.apache.org/jira/browse/JS2-871
- big jump to align to the latest changes in Pluto: now we no longer need to implement/provide
the runtime registry features Pluto Portal Driver uses.
- also some small assembly and OJB mapping fixes
- also updated the demo deployment configuration
- building and demo deploy now work again!
- startup yet is failing currently (some outstanding assembly configuration issues) 

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
    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/services/JetspeedOptionalPlutoServices.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-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PlutoRegistryAdaptor.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/PortalContext.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/factory/PortletFactory.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/registry.xml

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
Fri Oct 31 17:06:16 2008
@@ -248,7 +248,7 @@
                   <deployments>
                     <!-- shared/lib -->
                     <deployment>
-                      <artifact>portlet-api:portlet-api:jar</artifact>
+                      <artifact>javax.portlet:portlet-api:jar</artifact>
                     </deployment>
                     <deployment>
                       <artifact>org.apache.portals.jetspeed-2:jetspeed-api:jar</artifact>
@@ -257,7 +257,10 @@
                       <artifact>org.apache.portals.jetspeed-2:jetspeed-commons:jar</artifact>
                     </deployment>
                     <deployment>
-                      <artifact>org.apache.pluto:pluto:jar</artifact>
+                      <artifact>org.apache.pluto:pluto-container-api:jar</artifact>
+                    </deployment>
+                    <deployment>
+                      <artifact>org.apache.pluto:pluto-taglib:jar</artifact>
                     </deployment>
                     <deployment>
                       <artifact>org.apache.portals.bridges:portals-bridges-common:jar</artifact>
@@ -311,7 +314,7 @@
             <dependencies>
               <!-- shared/lib deps -->
               <dependency>
-                <groupId>portlet-api</groupId>
+                <groupId>javax.portlet</groupId>
                 <artifactId>portlet-api</artifactId>
                 <version>${portlet-api.version}</version>
               </dependency>
@@ -328,7 +331,12 @@
               </dependency>
               <dependency>
                 <groupId>org.apache.pluto</groupId>
-                <artifactId>pluto</artifactId>
+                <artifactId>pluto-container-api</artifactId>
+                <version>${org.apache.pluto.version}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.pluto</groupId>
+                <artifactId>pluto-taglib</artifactId>
                 <version>${org.apache.pluto.version}</version>
               </dependency>
               <dependency>

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.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/JetspeedPortalContext.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java
Fri Oct 31 17:06:16 2008
@@ -68,8 +68,9 @@
     {
     }
     
-    public JetspeedPortalContext(PortalConfiguration configuration, String applicationRoot)
+    public JetspeedPortalContext(Engine engine, PortalConfiguration configuration, String
applicationRoot)
     {
+        this.engine = engine;
         this.configuration = configuration;
         this.applicationRoot = applicationRoot;
         initialize();
@@ -150,11 +151,6 @@
         return this.engine;
     }
     
-    public void setEngine(Engine engine)
-    {
-        this.engine = engine;
-    }
-
     /**
      * Returns the engine attribute with the given name, or null if there is no attribute
by that name.
      *

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.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/aggregator/impl/PortletHeaderRequestImpl.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletHeaderRequestImpl.java
Fri Oct 31 17:06:16 2008
@@ -22,7 +22,6 @@
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.portlet.PortletHeaderRequest;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.core.impl.PortletPreferencesImpl;
 import org.apache.jetspeed.container.PortletWindow;
 
 
@@ -47,7 +46,8 @@
     
     public PortletPreferences getPreferences()
     {
-        return new PortletPreferencesImpl(org.apache.pluto.Constants.METHOD_NOOP, this.portletWindow.getPortletEntity());
+        return null;
+//        return new PortletPreferencesImpl(org.apache.pluto.Constants.METHOD_NOOP, this.portletWindow.getPortletEntity());
     }
     
     public String getInitParameter( String name )

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=709610&r1=709609&r2=709610&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 31 17:06:16 2008
@@ -30,7 +30,6 @@
 import javax.portlet.ResourceRequest;
 import javax.portlet.ResourceResponse;
 import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
 
 import org.apache.jetspeed.PortalContext;
 import org.apache.jetspeed.container.ContainerConstants;
@@ -82,7 +81,7 @@
         this.servletMappingName = portalContext.getConfigurationProperty(INVOKER_SERVLET_MAPPING_NAME,
DEFAULT_MAPPING_NAME);                                
     }
    
-    public void action(ServletContext context, ActionRequest request,
+    public void action(ActionRequest request,
             ActionResponse response, PortletWindow window, FilterManager filter)
             throws IOException, PortletException
     {
@@ -90,7 +89,7 @@
         invoker.invoke(request, response, ContainerConstants.METHOD_ACTION, filter);
     }
 
-    public void admin(ServletContext context, PortletRequest request,
+    public void admin(PortletRequest request,
             PortletResponse response, PortletWindow window) throws IOException,
             PortletException
     {
@@ -98,7 +97,7 @@
         invoker.invoke(request, response, ContainerConstants.METHOD_ADMIN, null);       

     }
 
-    public void event(ServletContext context, EventRequest request,
+    public void event(EventRequest request,
             EventResponse response, PortletWindow window, FilterManager filter)
             throws IOException, PortletException
     {
@@ -106,7 +105,7 @@
         invoker.invoke(request, response, ContainerConstants.METHOD_EVENT, filter);
     }
 
-    public void load(ServletContext context, PortletRequest request,
+    public void load(PortletRequest request,
             PortletResponse response, PortletWindow window) throws IOException,
             PortletException
     {
@@ -114,7 +113,7 @@
         invoker.invoke(request, response, ContainerConstants.METHOD_NOOP, null);
     }   
     
-    public void render(ServletContext context, RenderRequest request,
+    public void render(RenderRequest request,
             RenderResponse response, PortletWindow window, FilterManager filter)
             throws IOException, PortletException
     {
@@ -122,7 +121,7 @@
         invoker.invoke(request, response, ContainerConstants.METHOD_RENDER, filter);
     }
 
-    public void serveResource(ServletContext context, ResourceRequest request,
+    public void serveResource(ResourceRequest request,
             ResourceResponse response, PortletWindow window, FilterManager filter)
             throws IOException, PortletException
     {

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.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/JetspeedOptionalPlutoServices.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java
Fri Oct 31 17:06:16 2008
@@ -19,6 +19,7 @@
 import org.apache.pluto.NamespaceMapper;
 import org.apache.pluto.OptionalContainerServices;
 import org.apache.pluto.spi.optional.PortalAdministrationService;
+import org.apache.pluto.spi.optional.PortletContextService;
 import org.apache.pluto.spi.optional.PortletEnvironmentService;
 import org.apache.pluto.spi.optional.PortletInfoService;
 import org.apache.pluto.spi.optional.PortletInvokerService;
@@ -96,6 +97,11 @@
         return registryService;
     }
 
+    public PortletContextService getPortletContextService()
+    {
+        return null;
+    }
+
     public RequestAttributeService getRequestAttributeService()
     {
         return this.requestAttributeService;

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=709610&r1=709609&r2=709610&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 31 17:06:16 2008
@@ -25,6 +25,7 @@
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.JetspeedPortalContext;
 import org.apache.jetspeed.PortalContext;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.administration.PortalConfiguration;
@@ -71,10 +72,7 @@
     public JetspeedEngine(PortalConfiguration configuration, String applicationRoot, ServletConfig
config, ComponentManager componentManager )
     {
         this.componentManager = componentManager;
-        this.context = (PortalContext)componentManager.getComponent("PortalContext");
-        this.context.setEngine(this);
-        this.context.setConfiguration(configuration);
-        this.context.setApplicationRoot(applicationRoot);
+        this.context = new JetspeedPortalContext(this, configuration, applicationRoot);
         this.config = config;
         context.setApplicationRoot(applicationRoot);
         context.setConfiguration(configuration);           
@@ -84,6 +82,7 @@
         
         // Make these availble as beans to Spring
         componentManager.addComponent("Engine", this);
+        componentManager.addComponent("PortalContext", context);
         componentManager.addComponent("PortalConfiguration", configuration);
     }  
     

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
Fri Oct 31 17:06:16 2008
@@ -23,7 +23,6 @@
 
 import javax.portlet.PortletConfig;
 import javax.portlet.PortletContext;
-import javax.servlet.ServletConfig;
 
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.pluto.internal.impl.PortletConfigImpl;
@@ -39,9 +38,9 @@
 public class JetspeedPortletConfig extends PortletConfigImpl implements PortletConfig, InternalPortletConfig
 {
     
-    public JetspeedPortletConfig(ServletConfig servletConfig, PortletContext portletContext,
PortletDefinition portlet)
+    public JetspeedPortletConfig(PortletContext portletContext, PortletDefinition portlet)
     {
-        super(servletConfig, portletContext, portlet, portlet.getApplication());
+        super(portletContext, portlet, portlet.getApplication());
     }
 
     public void setPortletDefinition(PortletDefinition pd)

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portlet-factory/src/main/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
Fri Oct 31 17:06:16 2008
@@ -28,19 +28,15 @@
 import javax.portlet.PreferencesValidator;
 import javax.portlet.UnavailableException;
 import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.container.InternalPortletConfig;
-import org.apache.jetspeed.container.InternalPortletContext;
 import org.apache.jetspeed.container.JetspeedPortletConfig;
 import org.apache.jetspeed.container.JetspeedPortletContext;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.portlet.PortletObjectProxy;
-import org.apache.pluto.PortletContainerException;
 import org.apache.pluto.internal.impl.PortletRequestDispatcherImpl;
 
 /**
@@ -83,12 +79,9 @@
 
     private String customConfigModePortletUniqueName;
 
-    private ServletConfig jetspeedConfig;
-    
-    public JetspeedPortletFactory(ServletConfig jetspeedConfig, boolean autoSwitchConfigMode,
+    public JetspeedPortletFactory(boolean autoSwitchConfigMode,
             boolean autoSwitchEditDefaultsModeToEditMode)
     {
-        this.jetspeedConfig = jetspeedConfig;
         this.portletCache = Collections.synchronizedMap(new HashMap<String, Map<String,
PortletInstance>>());
         this.validatorCache = Collections.synchronizedMap(new HashMap<String, Map<String,
PreferencesValidator>>());
         this.classLoaderMap = Collections.synchronizedMap(new HashMap<String, PortletFactoryInfo>());
@@ -122,10 +115,7 @@
         synchronized (classLoaderMap)
         {
             unregisterPortletApplication(pa);            
-            ServletContext servletContext = jetspeedConfig.getServletContext();
-            ServletContext portletAppContext = servletContext.getContext(pa.getName());
-            InternalPortletContext context = this.createPortletContext(portletAppContext,
pa);      
-            classLoaderMap.put(pa.getName(), new PortletFactoryInfo(cl, context)); // //
TODO: 2.2 need to get servletConfig in registration process
+            classLoaderMap.put(pa.getName(), new PortletFactoryInfo(cl, null)); // TODO 2.2:
determine if PortletFactoryInfo is still needed
         }
     }
 
@@ -189,7 +179,7 @@
                             ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader();
                             try
                             {
-                                Class clazz = paCl.loadClass(className);
+                                Class<?> clazz = paCl.loadClass(className);
                                 try
                                 {
                                     Thread.currentThread().setContextClassLoader(paCl);
@@ -260,7 +250,7 @@
                     ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader();
                     try
                     {
-                        Class clazz = paCl.loadClass(pd.getPortletClass());
+                        Class<?> clazz = paCl.loadClass(pd.getPortletClass());
                         try
                         {
                             Thread.currentThread().setContextClassLoader(paCl);
@@ -297,8 +287,8 @@
                         log.error(msg, e);
                         throw new UnavailableException(msg);
                     }
-                    PortletContext portletContext = this.createPortletContext(servletContext,
pa);
-                    PortletConfig portletConfig = this.createPortletConfig(null, portletContext,
pd); // TODO: 2.2 need to get servletConfig in registration process
+                    PortletContext portletContext = new JetspeedPortletContext(servletContext,
pa, this);                    
+                    PortletConfig portletConfig = new JetspeedPortletConfig(portletContext,
pd); 
                     try
                     {
                         try
@@ -373,27 +363,6 @@
         return getPortletApplicationClassLoader(pa) != null;
     }
 
-    public org.apache.pluto.internal.InternalPortletContext getPortletContext(PortletApplication
pad)
-        throws PortletContainerException
-    {
-        PortletFactoryInfo info = classLoaderMap.get(pad.getName());
-        if (info != null)
-        {
-            return info.getContext();
-        }
-        throw new PortletContainerException("App context not found for application " + pad.getName());
-    }
-
-    public InternalPortletContext createPortletContext(ServletContext servletContext, PortletApplication
application)
-    {
-        return new JetspeedPortletContext(servletContext, application, this);        
-    }
-    
-    public InternalPortletConfig createPortletConfig(ServletConfig servletConfig, PortletContext
portletContext, PortletDefinition pd)
-    {
-        return new JetspeedPortletConfig(servletConfig, portletContext, pd);        
-    }
-    
     public PortletRequestDispatcher createRequestDispatcher(RequestDispatcher requestDispatcher)
     {
         // return new JetspeedRequestDispatcher(requestDispatcher);

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
Fri Oct 31 17:06:16 2008
@@ -438,7 +438,7 @@
    - L A N G U A G E
 -->
    <class-descriptor
-      class="org.apache.jetspeed.om.impl.LanguageImpl"
+      class="org.apache.jetspeed.om.portlet.impl.LanguageImpl"
       table="LANGUAGE"
    >
       <field-descriptor

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PlutoRegistryAdaptor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PlutoRegistryAdaptor.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PlutoRegistryAdaptor.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PlutoRegistryAdaptor.java
Fri Oct 31 17:06:16 2008
@@ -20,32 +20,26 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import javax.servlet.ServletConfig;
-
 import org.apache.jetspeed.factory.PortletFactory;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.internal.InternalPortletConfig;
-import org.apache.pluto.internal.InternalPortletContext;
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 import org.apache.pluto.om.portlet.PortletDefinition;
 import org.apache.pluto.spi.optional.PortletRegistryListener;
 import org.apache.pluto.spi.optional.PortletRegistryService;
 
 /**
- * The Pluto Registry is a hybrid of a factory and actua
+ * The PlutoRegistryAdaptor is a hybrid of a factory and actua
  * @author dtaylor
  *
  */
 public class PlutoRegistryAdaptor implements PortletRegistryService
 {
     private PortletRegistry registry;
-    private PortletFactory factory;
     
-    public PlutoRegistryAdaptor(PortletRegistry registry, PortletFactory factory)
+    public PlutoRegistryAdaptor(PortletRegistry registry)
     {
         this.registry = registry;
-        this.factory = factory;
     }
     
     public void addPortletRegistryListener(PortletRegistryListener arg0)
@@ -54,12 +48,6 @@
         throw new UnsupportedOperationException();
     }
 
-    public ClassLoader getClassLoader(String applicationName)
-            throws PortletContainerException
-    {
-        return factory.getPortletApplicationClassLoader(registry.getPortletApplication(applicationName));
-    }
-
     public PortletDefinition getPortlet(String applicationName, String portletName)
             throws PortletContainerException
     {
@@ -72,31 +60,6 @@
         return registry.getPortletApplication(name);
     }
 
-    public InternalPortletConfig getPortletConfig(String applicationName, String portletName)
-            throws PortletContainerException
-    {
-        PortletDefinition pd = registry.getPortletDefinitionByUniqueName(applicationName
+ "::" + portletName);
-        if (pd != null)
-        {
-//            factory.getPortletInstance(servletContext, pd)
-        }
-        // TODO: 2.2 not sure how to implement this
-        throw new UnsupportedOperationException();        
-    }
-
-    public InternalPortletContext getPortletContext(String applicationName)
-            throws PortletContainerException
-    {
-        // required method by Pluto 2.0
-        return factory.getPortletContext(registry.getPortletApplication(applicationName));
-    }
-
-    public Iterator<InternalPortletContext> getPortletContexts()
-    {
-        // TODO: 2.2
-        throw new UnsupportedOperationException();        
-    }
-
     public Iterator<String> getRegisteredPortletApplicationNames()
     {
         List<String> result = new LinkedList<String>();
@@ -107,18 +70,6 @@
         return result.iterator(); // TODO: 2.2 why an iterator?
     }
 
-    public String register(ServletConfig servletConfig) throws PortletContainerException
-    {
-        // TODO: 2.2
-        throw new UnsupportedOperationException();
-    }
-
-    public void unregister(InternalPortletContext context)
-    {
-        // TODO: 2.2
-        throw new UnsupportedOperationException();        
-    }
-
     public void removePortletRegistryListener(PortletRegistryListener arg0)
     {
         // TODO: 2.2

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/PortalContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/PortalContext.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/PortalContext.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/PortalContext.java
Fri Oct 31 17:06:16 2008
@@ -31,7 +31,6 @@
 public interface PortalContext extends javax.portlet.PortalContext
 {
     public Engine getEngine();
-    public void setEngine(Engine engine);
 
     public PortalConfiguration getConfiguration();
     public void setConfiguration(PortalConfiguration configuration);

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/factory/PortletFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/factory/PortletFactory.java?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/factory/PortletFactory.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/factory/PortletFactory.java
Fri Oct 31 17:06:16 2008
@@ -16,19 +16,14 @@
  */
 package org.apache.jetspeed.factory;
 
-import javax.portlet.PortletContext;
 import javax.portlet.PortletException;
 import javax.portlet.PortletRequestDispatcher;
 import javax.portlet.PreferencesValidator;
 import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 
-import org.apache.jetspeed.container.InternalPortletConfig;
-import org.apache.jetspeed.container.InternalPortletContext;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.pluto.PortletContainerException;
 
 /**
  * <p>
@@ -52,9 +47,5 @@
     PortletInstance getPortletInstance( ServletContext servletContext, PortletDefinition
pd ) throws PortletException;
     PreferencesValidator getPreferencesValidator(PortletDefinition pd);
     void updatePortletConfig(PortletDefinition pd);
-    org.apache.pluto.internal.InternalPortletContext getPortletContext(PortletApplication
pa)  throws PortletContainerException;
-    // TODO: 2.2 refactor following 3 interfaces to a more common factory interface
-    InternalPortletContext createPortletContext(ServletContext servletContext, PortletApplication
application);
-    InternalPortletConfig createPortletConfig(ServletConfig config, PortletContext portletContext,
PortletDefinition pd);    
     PortletRequestDispatcher createRequestDispatcher(RequestDispatcher requestDispatcher);
 }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
Fri Oct 31 17:06:16 2008
@@ -47,7 +47,7 @@
       <constructor-arg><ref bean="org.apache.pluto.services.CCPPProfileService"/></constructor-arg>
       <constructor-arg><ref bean="org.apache.pluto.services.ContainerInvocationService"/></constructor-arg>
       <constructor-arg><ref bean="org.apache.pluto.services.ContainerCallbackProviders"/></constructor-arg>
-      <constructor-arg><ref bean="org.apache.pluto.services.PortalContext"/></constructor-arg>
+      <constructor-arg><ref bean="PortalContext"/></constructor-arg>
     </bean>
     
     <bean id="CCPPProfileService"
@@ -60,12 +60,6 @@
       <meta key="j2:cat" value="default" />	      
 	</bean>
 
-    <bean id="org.apache.pluto.services.PortalContext" name="PortalContext"
-          class="org.apache.jetspeed.JetspeedPortalContext">
-      <meta key="j2:cat" value="default" />          
-    </bean>
-	
-
     <!-- ====================================================== -->
     <!-- Pluto Container Callbacks                              -->
     <!-- ====================================================== -->
@@ -154,7 +148,7 @@
           class="org.apache.jetspeed.container.invoker.JetspeedPortletInvokerService">
         
 	    <meta key="j2:cat" value="default" />
 	    <constructor-arg index="0"><ref bean="javax.servlet.ServletConfig" /></constructor-arg>
-	    <constructor-arg index="1"><ref bean="org.apache.pluto.services.PortalContext"
/></constructor-arg>
+	    <constructor-arg index="1"><ref bean="PortalContext" /></constructor-arg>
 	    <constructor-arg index="2"><ref bean="portletFactory" /></constructor-arg>
        
         <constructor-arg index="3"><ref bean="PortletRequestResponseUnwrapper"/></constructor-arg>
     </bean>
@@ -162,8 +156,7 @@
     <bean id="org.apache.pluto.services.PlutoRegistryServiceAdaptor"
           class="org.apache.jetspeed.components.portletregistry.PlutoRegistryAdaptor">
         
 	    <meta key="j2:cat" value="default" />
-	    <constructor-arg index="0"><ref bean="portletFactory" /></constructor-arg>
        
-        <constructor-arg index="1"><ref bean="portletRegistry"/></constructor-arg>
+        <constructor-arg><ref bean="portletRegistry"/></constructor-arg>
     </bean>
     
 </beans>
\ No newline at end of file

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/registry.xml?rev=709610&r1=709609&r2=709610&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
Fri Oct 31 17:06:16 2008
@@ -21,15 +21,14 @@
   <!-- Portlet Factory -->
   <bean id="portletFactory" class="org.apache.jetspeed.factory.JetspeedPortletFactory">
     <meta key="j2:cat" value="default,registry" />
-    <constructor-arg index='0'><ref bean='ServletConfig'/></constructor-arg>
     <!-- If the following constructor-arg is set to true, 
       proxy instances will switch config mode to built-in custom config mode portlet. -->
-    <constructor-arg index="1">
+    <constructor-arg index="0">
       <value>${supported.portletmode.autoswitch.config}</value>
     </constructor-arg>
     <!-- If the following constructor-arg is set to true, 
       proxy instances will switch edit_defaults mode to edit mode automatically for portlets
not supporting edit_defaults mode. -->
-    <constructor-arg index="2">
+    <constructor-arg index="1">
       <value>${supported.portletmode.autoswitch.edit_defaults}</value>
     </constructor-arg>
     <!-- Surrogate portlet for config modes. -->



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