incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r771578 - in /incubator/sling/whiteboard/portal/container: ./ src/main/java/org/apache/sling/portal/container/internal/ src/main/java/org/apache/sling/portal/container/internal/impl/ src/main/java/org/apache/sling/portal/container/internal/...
Date Tue, 05 May 2009 06:21:18 GMT
Author: cziegeler
Date: Tue May  5 06:21:18 2009
New Revision: 771578

URL: http://svn.apache.org/viewvc?rev=771578&view=rev
Log:
Use latest Pluto (new group id, changed services, changed logger)

Modified:
    incubator/sling/whiteboard/portal/container/pom.xml
    incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ContainerServicesImpl.java
    incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletConfigImpl.java
    incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletContextImpl.java
    incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
    incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java

Modified: incubator/sling/whiteboard/portal/container/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/portal/container/pom.xml?rev=771578&r1=771577&r2=771578&view=diff
==============================================================================
--- incubator/sling/whiteboard/portal/container/pom.xml (original)
+++ incubator/sling/whiteboard/portal/container/pom.xml Tue May  5 06:21:18 2009
@@ -163,13 +163,13 @@
         </dependency>
         
         <dependency>
-            <groupId>org.apache.pluto</groupId>
+            <groupId>org.apache.portals.pluto</groupId>
             <artifactId>pluto-container-api</artifactId>
             <version>2.0.0-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.pluto</groupId>
+            <groupId>org.apache.portals.pluto</groupId>
             <artifactId>pluto-container</artifactId>
             <version>2.0.0-SNAPSHOT</version>
             <scope>provided</scope>

Modified: incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ContainerServicesImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ContainerServicesImpl.java?rev=771578&r1=771577&r2=771578&view=diff
==============================================================================
--- incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ContainerServicesImpl.java
(original)
+++ incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ContainerServicesImpl.java
Tue May  5 06:21:18 2009
@@ -28,8 +28,10 @@
 import org.apache.pluto.container.PortletPreferencesService;
 import org.apache.pluto.container.PortletRequestContextService;
 import org.apache.pluto.container.PortletURLListenerService;
+import org.apache.pluto.container.RequestDispatcherService;
 import org.apache.pluto.container.UserInfoService;
 import org.apache.pluto.container.impl.PortletEnvironmentServiceImpl;
+import org.apache.pluto.container.impl.RequestDispatcherServiceImpl;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.portal.container.PortletRegistryService;
 import org.apache.sling.portal.container.PortletWindowManager;
@@ -56,6 +58,7 @@
     private final PortletEnvironmentService portletEnvironmentService;
     private final UserInfoService userInfoService;
     private final NamespaceMapper namespaceMapper;
+    private final RequestDispatcherService rds = new RequestDispatcherServiceImpl(2);
 
     /**
      * Sling container services
@@ -71,7 +74,7 @@
         boolean noErrors = false;
         try {
             this.context = context;
-            this.registry = new DefaultPortletRegistryService(info);
+            this.registry = new DefaultPortletRegistryService(info, this.rds);
             this.eventCoordinationService = new EventCoordinationServiceImpl();
             this.portletRequestContextService = new PortletRequestContextServiceImpl();
             this.filterManagerService = new FilterManagerServiceImpl(this.registry);
@@ -190,4 +193,8 @@
     public PortletWindowManager getPortletWindowManager() {
         return this.windowManager;
     }
+
+    public RequestDispatcherService getRequestDispatcherService() {
+        return this.rds;
+    }
 }

Modified: incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletConfigImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletConfigImpl.java?rev=771578&r1=771577&r2=771578&view=diff
==============================================================================
--- incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletConfigImpl.java
(original)
+++ incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletConfigImpl.java
Tue May  5 06:21:18 2009
@@ -21,12 +21,12 @@
 
 import javax.portlet.PortletContext;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.container.impl.AbstractPortletConfigImpl;
 import org.apache.pluto.container.om.portlet.PortletDefinition;
 import org.apache.sling.portal.container.SlingPortletConfig;
 import org.apache.sling.portal.container.internal.ResourceBundleFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Implementation of the portlet config.
@@ -35,7 +35,7 @@
     extends AbstractPortletConfigImpl
     implements SlingPortletConfig {
 
-    private static final Log LOG = LogFactory.getLog(SlingPortletConfigImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SlingPortletConfigImpl.class);
 
     protected ResourceBundleFactory bundles;
 

Modified: incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletContextImpl.java?rev=771578&r1=771577&r2=771578&view=diff
==============================================================================
--- incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletContextImpl.java
(original)
+++ incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletContextImpl.java
Tue May  5 06:21:18 2009
@@ -21,6 +21,7 @@
 import javax.servlet.ServletContext;
 
 import org.apache.pluto.container.ContainerInfo;
+import org.apache.pluto.container.RequestDispatcherService;
 import org.apache.pluto.container.impl.PortletContextImpl;
 import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
 import org.apache.sling.portal.container.SlingPortletContext;
@@ -43,8 +44,9 @@
     public SlingPortletContextImpl(ServletContext servletContext,
                                    PortletApplicationDefinition portletApp,
                                    ClassLoader contextClassLoader,
-                                   ContainerInfo info) {
-        super(servletContext, portletApp, info, new ArrayList<String>());
+                                   ContainerInfo info,
+                                   RequestDispatcherService rds) {
+        super(servletContext, portletApp, info, new ArrayList<String>(), rds);
         this.contextClassLoader = contextClassLoader;
     }
 

Modified: incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java?rev=771578&r1=771577&r2=771578&view=diff
==============================================================================
--- incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
(original)
+++ incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
Tue May  5 06:21:18 2009
@@ -30,6 +30,7 @@
 import org.apache.pluto.container.ContainerInfo;
 import org.apache.pluto.container.PortletAppDescriptorService;
 import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.RequestDispatcherService;
 import org.apache.pluto.container.impl.PortletAppDescriptorServiceImpl;
 import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
 import org.apache.pluto.container.om.portlet.PortletDefinition;
@@ -84,10 +85,15 @@
      */
     private final Map<PortletEntityId, PortletInfoImpl> portlets = new HashMap<PortletEntityId,
PortletInfoImpl>();
 
+    /** The container info. */
     private final ContainerInfo containerInfo;
 
-    public DefaultPortletRegistryService(final ContainerInfo info) {
+    /** The request dispatcher service. */
+    private final RequestDispatcherService requestDispatcherService;
+
+    public DefaultPortletRegistryService(final ContainerInfo info, final RequestDispatcherService
rds) {
         this.containerInfo = info;
+        this.requestDispatcherService = rds;
     }
 
 	/**
@@ -103,7 +109,7 @@
                 final PortletApplicationDefinition portletApp = this.createDefinition(servletContext,
applicationName, contextPath);
 
                 // create portlet context
-                final SlingPortletContext portletContext = new SlingPortletContextImpl(servletContext,
portletApp, callback.getClassLoader(), this.containerInfo);
+                final SlingPortletContext portletContext = new SlingPortletContextImpl(servletContext,
portletApp, callback.getClassLoader(), this.containerInfo, this.requestDispatcherService);
                 final String appName = portletContext.getApplicationName();
                 if (appName == null) {
                     throw new PortletContainerException("Portlet application name should
not be null.");

Modified: incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java?rev=771578&r1=771577&r2=771578&view=diff
==============================================================================
--- incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java
(original)
+++ incubator/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java
Tue May  5 06:21:18 2009
@@ -26,6 +26,7 @@
 
 import org.apache.pluto.container.FilterManager;
 import org.apache.pluto.container.FilterManagerService;
+import org.apache.pluto.container.PortletWindow;
 import org.apache.pluto.container.om.portlet.Filter;
 import org.apache.pluto.container.om.portlet.FilterMapping;
 import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
@@ -65,11 +66,12 @@
     }
 
     /**
-     * @see org.apache.pluto.container.FilterManagerService#getFilterManager(org.apache.pluto.container.om.portlet.PortletApplicationDefinition,
java.lang.String, java.lang.String)
+     * @see org.apache.pluto.container.FilterManagerService#getFilterManager(org.apache.pluto.container.PortletWindow,
java.lang.String)
      */
-    public FilterManager getFilterManager(final PortletApplicationDefinition portletApp,
-                                          final String portletName,
+    public FilterManager getFilterManager(final PortletWindow portletWindow,
                                           final String lifeCycle) {
+        final PortletApplicationDefinition portletApp = portletWindow.getPortletEntity().getPortletDefinition().getApplication();
+        final String portletName = portletWindow.getPortletEntity().getPortletDefinition().getPortletName();
         final List<? extends FilterMapping> filterMappingList = portletApp.getFilterMappings();
         if (filterMappingList != null && filterMappingList.size() > 0 ) {
             final Map<String, PortletFilter> appFilters = filters.get(portletApp.getName());



Mime
View raw message