You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by at...@apache.org on 2009/03/10 16:42:16 UTC
svn commit: r752145 - in /portals/pluto/trunk:
pluto-container-api/src/main/java/org/apache/pluto/container/
pluto-container-api/src/main/java/org/apache/pluto/container/driver/
pluto-container/src/main/java/org/apache/pluto/core/ pluto-container/src/m...
Author: ate
Date: Tue Mar 10 15:42:05 2009
New Revision: 752145
URL: http://svn.apache.org/viewvc?rev=752145&view=rev
Log:
PLUTO-537: Cleaning up Pluto packages
See: https://issues.apache.org/jira/browse/PLUTO-537
- adding new PortletFilterService to RequiredContainerServices
- moving all PortalCallbackService out to better/more appropriate locations
- dropping PortalCallbackService
Added:
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java (with props)
Removed:
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortalCallbackService.java
portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
Modified:
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletMimeResponseContext.java
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResponseContext.java
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java
portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/StateAwareResponseImpl.java
portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java
portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java
portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java
Added: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java?rev=752145&view=auto
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java (added)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java Tue Mar 10 15:42:05 2009
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.pluto.container;
+
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
+
+/**
+ * Service to retrieve a FilterManager for a specific Portlet in a lifecycle
+ * @version $Id$
+ *
+ */
+public interface FilterManagerService
+{
+ /**
+ * Returns the FilterManager, this is used to process the filter.
+ * @return FilterManager
+ */
+ public FilterManager getFilterManager(PortletApplicationDefinition portletAppDD, String portletName, String lifeCycle);
+}
Propchange: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/FilterManagerService.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/OptionalContainerServices.java Tue Mar 10 15:42:05 2009
@@ -39,13 +39,6 @@
PortletPreferencesService getPortletPreferencesService();
/**
- * Returns the portlet request context service implementation
- * used by the container
- * @return
- */
- PortletRequestContextService getPortletRequestContextService();
-
- /**
* Returns the environment services implementation
* used by the container.
*
@@ -74,4 +67,10 @@
* of PortletWindow parameters in a PortalURL
*/
NamespaceMapper getNamespaceMapper();
+
+ /**
+ * Returns the CC/PP profile service implementation
+ * @return a CCPPProfileServiceImplementation
+ */
+ CCPPProfileService getCCPPProfileService();
}
Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletMimeResponseContext.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletMimeResponseContext.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletMimeResponseContext.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletMimeResponseContext.java Tue Mar 10 15:42:05 2009
@@ -30,6 +30,7 @@
public interface PortletMimeResponseContext extends PortletResponseContext
{
CacheControl getCacheControl();
+ PortletURLProvider getPortletURLProvider();
Locale getLocale();
String getContentType();
void setContentType(String contentType);
Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResponseContext.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResponseContext.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResponseContext.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResponseContext.java Tue Mar 10 15:42:05 2009
@@ -32,8 +32,9 @@
PortletContainer getContainer();
HttpServletRequest getServletRequest();
HttpServletResponse getServletResponse();
-
PortletWindow getPortletWindow();
+
+ ResourceURLProvider getResourceURLProvider();
void addProperty(Cookie cookie);
void addProperty(String key, Element element);
void addProperty(String key, String value);
Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java Tue Mar 10 15:42:05 2009
@@ -37,5 +37,6 @@
void setWindowState(WindowState windowState);
Map<String, String[]> getRenderParameters();
Set<String> getRemovedPublicRenderParameters();
+ EventProvider getEventProvider();
List<Event> getEvents();
}
Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/RequiredContainerServices.java Tue Mar 10 15:42:05 2009
@@ -33,18 +33,23 @@
*/
PortalContext getPortalContext();
+ EventCoordinationService getEventCoordinationService();
+
/**
- * Returns the portal callback service implementation instance associated
- * with this group of portlet container services.
- * @return a PortalCallbackService implementation.
+ * Returns the portlet request context service implementation
+ * used by the container
+ * @return
*/
- PortalCallbackService getPortalCallbackService();
-
+ PortletRequestContextService getPortletRequestContextService();
+
/**
- * Returns the CC/PP profile service implementation
- * @return a CCPPProfileServiceImplementation
+ * Returns the FilterManagerService
*/
- CCPPProfileService getCCPPProfileService();
+ public FilterManagerService getFilterManagerService();
- EventCoordinationService getEventCoordinationService();
+ /**
+ * Returns the PortletURLListener which calls the Filter for the URL.
+ * @return
+ */
+ public PortletURLListener getPortletURLListener();
}
Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java (original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/driver/PlutoServices.java Tue Mar 10 15:42:05 2009
@@ -21,12 +21,13 @@
import org.apache.pluto.container.CCPPProfileService;
import org.apache.pluto.container.ContainerServices;
import org.apache.pluto.container.EventCoordinationService;
+import org.apache.pluto.container.FilterManagerService;
import org.apache.pluto.container.NamespaceMapper;
-import org.apache.pluto.container.PortalCallbackService;
import org.apache.pluto.container.PortletEnvironmentService;
import org.apache.pluto.container.PortletInvokerService;
import org.apache.pluto.container.PortletPreferencesService;
import org.apache.pluto.container.PortletRequestContextService;
+import org.apache.pluto.container.PortletURLListener;
import org.apache.pluto.container.UserInfoService;
@@ -54,11 +55,6 @@
return containerServices.getCCPPProfileService();
}
- public PortalCallbackService getPortalCallbackService()
- {
- return containerServices.getPortalCallbackService();
- }
-
public PortalContext getPortalContext()
{
return containerServices.getPortalContext();
@@ -113,4 +109,14 @@
{
return containerServices.getEventCoordinationService();
}
+
+ public FilterManagerService getFilterManagerService()
+ {
+ return containerServices.getFilterManagerService();
+ }
+
+ public PortletURLListener getPortletURLListener()
+ {
+ return containerServices.getPortletURLListener();
+ }
}
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java Tue Mar 10 15:42:05 2009
@@ -16,13 +16,13 @@
*/
package org.apache.pluto.core;
+import org.apache.pluto.container.CCPPProfileService;
import org.apache.pluto.container.NamespaceMapper;
import org.apache.pluto.container.OptionalContainerServices;
import org.apache.pluto.container.PortletAppDescriptorService;
import org.apache.pluto.container.PortletEnvironmentService;
import org.apache.pluto.container.PortletInvokerService;
import org.apache.pluto.container.PortletPreferencesService;
-import org.apache.pluto.container.PortletRequestContextService;
import org.apache.pluto.container.UserInfoService;
import org.apache.pluto.container.driver.PortalAdministrationService;
import org.apache.pluto.container.driver.PortalDriverServices;
@@ -42,12 +42,12 @@
private PortletRegistryService portletRegistryService;
private PortletContextService portletContextService;
private PortletInvokerService portletInvokerService;
- private PortletRequestContextService portletRequestContextService;
private PortletEnvironmentService portletEnvironmentService;
private PortalAdministrationService portalAdministrationService;
private UserInfoService userInfoService;
private NamespaceMapper namespaceMapper;
private PortletAppDescriptorService descriptorService;
+ private CCPPProfileService ccppProfileService;
/**
* Constructs an instance using the default portlet preferences service
@@ -58,12 +58,12 @@
portletRegistryService = new PortletContextManager();
portletContextService = (PortletContextManager)portletRegistryService;
portletInvokerService = new DefaultPortletInvokerService(portletContextService);
- portletRequestContextService = new DefaultPortletRequestContextService();
portletEnvironmentService = new DefaultPortletEnvironmentService();
portalAdministrationService = new DefaultPortalAdministrationService();
userInfoService = new DefaultUserInfoService();
namespaceMapper = new DefaultNamespaceMapper();
descriptorService = new PortletAppDescriptorServiceImpl();
+ ccppProfileService = new DummyCCPPProfileServiceImpl();
}
/**
@@ -94,10 +94,6 @@
portletInvokerService = root.getPortletInvokerService();
}
- if(root.getPortletRequestContextService() != null) {
- portletRequestContextService = root.getPortletRequestContextService();
- }
-
if(root.getPortletEnvironmentService() != null) {
portletEnvironmentService = root.getPortletEnvironmentService();
}
@@ -118,6 +114,11 @@
{
descriptorService = new PortletAppDescriptorServiceImpl();
}
+
+ if (root.getCCPPProfileService() != null)
+ {
+ ccppProfileService = root.getCCPPProfileService();
+ }
}
@@ -136,10 +137,6 @@
return portletContextService;
}
- public PortletRequestContextService getPortletRequestContextService() {
- return portletRequestContextService;
- }
-
public PortletEnvironmentService getPortletEnvironmentService() {
return portletEnvironmentService;
}
@@ -164,5 +161,10 @@
{
return this.descriptorService;
}
+
+ public CCPPProfileService getCCPPProfileService()
+ {
+ return ccppProfileService;
+ }
}
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PlutoContainerServices.java Tue Mar 10 15:42:05 2009
@@ -21,13 +21,14 @@
import org.apache.pluto.container.CCPPProfileService;
import org.apache.pluto.container.ContainerServices;
import org.apache.pluto.container.EventCoordinationService;
+import org.apache.pluto.container.FilterManagerService;
import org.apache.pluto.container.NamespaceMapper;
import org.apache.pluto.container.OptionalContainerServices;
-import org.apache.pluto.container.PortalCallbackService;
import org.apache.pluto.container.PortletEnvironmentService;
import org.apache.pluto.container.PortletInvokerService;
import org.apache.pluto.container.PortletPreferencesService;
import org.apache.pluto.container.PortletRequestContextService;
+import org.apache.pluto.container.PortletURLListener;
import org.apache.pluto.container.RequiredContainerServices;
import org.apache.pluto.container.UserInfoService;
import org.apache.pluto.container.driver.PortalAdministrationService;
@@ -43,7 +44,6 @@
*/
private PortalContext context;
private CCPPProfileService ccppProfileService;
- private PortalCallbackService callbackService;
/*
* optional services
@@ -58,6 +58,9 @@
private UserInfoService userInfoService;
private NamespaceMapper namespaceMapper;
private EventCoordinationService eventCoordinationService;
+ private FilterManagerService filterManagerService;
+ private PortletURLListener portletURLListener;
+
public PlutoContainerServices()
{
@@ -68,33 +71,39 @@
public PlutoContainerServices(RequiredContainerServices required, OptionalContainerServices optional)
{
- this(required.getPortalContext(), required.getCCPPProfileService(),
- required.getPortalCallbackService(), required.getEventCoordinationService(), optional,
+ this(required.getPortalContext(), required.getPortletRequestContextService(),
+ required.getEventCoordinationService(), required.getFilterManagerService(),
+ required.getPortletURLListener(), optional,
optional instanceof PortalDriverServices ? (PortalDriverServices) optional : null);
}
public PlutoContainerServices(PortalContext context,
- CCPPProfileService ccppProfileService,
- PortalCallbackService callbackService,
+ PortletRequestContextService portletRequestContextService,
+ FilterManagerService filterManagerService,
+ PortletURLListener portletURLListener,
EventCoordinationService eventCoordinationService)
{
this.context = context;
- this.ccppProfileService = ccppProfileService;
- this.callbackService = callbackService;
this.eventCoordinationService = eventCoordinationService;
this.createDefaultPortalDriverServices();
this.createDefaultOptionalServices();
}
public PlutoContainerServices(PortalContext context,
- CCPPProfileService ccppProfileService,
- PortalCallbackService callbackService,
+ PortletRequestContextService portletRequestContextService,
EventCoordinationService eventCoordinationService,
+ FilterManagerService filterManagerService,
+ PortletURLListener portletURLListener,
OptionalContainerServices optionalServices,
PortalDriverServices portalDriverServices)
{
this.context = context;
- this.ccppProfileService = ccppProfileService;
+ this.portletRequestContextService = portletRequestContextService;
+ this.filterManagerService = filterManagerService;
+ this.portletURLListener = portletURLListener;
+ ccppProfileService = optionalServices.getCCPPProfileService();
+ if (ccppProfileService == null)
+ ccppProfileService = new DummyCCPPProfileServiceImpl();
this.eventCoordinationService = eventCoordinationService;
portletPreferencesService = optionalServices.getPortletPreferencesService();
@@ -111,9 +120,6 @@
portletInvokerService = optionalServices.getPortletInvokerService();
if (portletInvokerService == null)
portletInvokerService = new DefaultPortletInvokerService(portletContextService);
- portletRequestContextService = optionalServices.getPortletRequestContextService();
- if (portletRequestContextService == null)
- portletRequestContextService = new DefaultPortletRequestContextService();
portletEnvironmentService = optionalServices.getPortletEnvironmentService();
if (portletEnvironmentService == null)
portletEnvironmentService = new DefaultPortletEnvironmentService();
@@ -137,9 +143,9 @@
protected void createDefaultOptionalServices()
{
+ ccppProfileService = new DummyCCPPProfileServiceImpl();
portletPreferencesService = new DefaultPortletPreferencesService();
portletInvokerService = new DefaultPortletInvokerService(portletContextService);
- portletRequestContextService = new DefaultPortletRequestContextService();
portletEnvironmentService = new DefaultPortletEnvironmentService();
userInfoService = new DefaultUserInfoService();
namespaceMapper = new DefaultNamespaceMapper();
@@ -147,10 +153,11 @@
protected void createDefaultRequiredServices()
{
- context = null; // TODO
- ccppProfileService = new DummyCCPPProfileServiceImpl();
- callbackService = null; // TODO
- eventCoordinationService = null; // TODO
+ this.context = null; // TODO
+ this.portletRequestContextService = null; // TODO
+ this.eventCoordinationService = null; // TODO
+ this.filterManagerService = null; // TODO
+ this.portletURLListener = null; // TODO
}
public PortalContext getPortalContext()
@@ -169,17 +176,6 @@
}
/**
- * The PortalCallbackService allows the container to communicate
- * actions back to the portal.
- * @return a PortalCallbackService implementation.
- */
- public PortalCallbackService getPortalCallbackService()
- {
- return callbackService;
- }
-
-
- /**
* Returns null to use pluto's default
* @return
*/
@@ -233,13 +229,18 @@
return ccppProfileService;
}
- public PortalCallbackService getCallbackService()
+ public EventCoordinationService getEventCoordinationService()
{
- return callbackService;
+ return eventCoordinationService;
}
- public EventCoordinationService getEventCoordinationService()
+ public FilterManagerService getFilterManagerService()
{
- return eventCoordinationService;
+ return filterManagerService;
}
+
+ public PortletURLListener getPortletURLListener()
+ {
+ return portletURLListener;
+ }
}
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java Tue Mar 10 15:42:05 2009
@@ -157,7 +157,7 @@
debugWithName("Render request received for portlet: "
+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
- PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+ PortletRequestContextService rcService = getRequiredContainerServices().getPortletRequestContextService();
PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
@@ -203,7 +203,7 @@
debugWithName("Resource request received for portlet: "
+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
- PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+ PortletRequestContextService rcService = getRequiredContainerServices().getPortletRequestContextService();
PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
@@ -249,7 +249,7 @@
debugWithName("Action request received for portlet: "
+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
- PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+ PortletRequestContextService rcService = getRequiredContainerServices().getPortletRequestContextService();
PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
@@ -321,7 +321,7 @@
debugWithName("Load request received for portlet: "
+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
- PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+ PortletRequestContextService rcService = getRequiredContainerServices().getPortletRequestContextService();
PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
@@ -355,7 +355,7 @@
debugWithName("Admin request received for portlet: "
+portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
- PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+ PortletRequestContextService rcService = getRequiredContainerServices().getPortletRequestContextService();
PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
@@ -419,7 +419,7 @@
debugWithName("Event: "+event.getName()+" received for portlet: "
+ portletWindow.getPortletEntity().getPortletDefinition().getPortletName());
- PortletRequestContextService rcService = getOptionalContainerServices().getPortletRequestContextService();
+ PortletRequestContextService rcService = getRequiredContainerServices().getPortletRequestContextService();
PortletEnvironmentService envService = getOptionalContainerServices().getPortletEnvironmentService();
PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
@@ -525,7 +525,7 @@
*/
private FilterManager filterInitialisation(PortletWindow portletWindow,String lifeCycle) throws PortletContainerException{
PortletEntity pe = portletWindow.getPortletEntity();
- return requiredContainerServices.getPortalCallbackService().getFilterManager(pe.getPortletDefinition().getApplication(),pe.getPortletDefinition().getPortletName(),lifeCycle);
+ return requiredContainerServices.getFilterManagerService().getFilterManager(pe.getPortletDefinition().getApplication(),pe.getPortletDefinition().getPortletName(),lifeCycle);
}
}
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java Tue Mar 10 15:42:05 2009
@@ -20,7 +20,6 @@
import javax.portlet.ActionResponse;
-import org.apache.pluto.container.PortalCallbackService;
import org.apache.pluto.container.PortletActionResponseContext;
import org.apache.pluto.container.ResourceURLProvider;
import org.apache.pluto.util.ArgumentUtility;
@@ -60,8 +59,7 @@
protected String getRedirectLocation(String location)
{
ArgumentUtility.validateNotEmpty("location", location);
- PortalCallbackService callback = getPortletContainer().getRequiredContainerServices().getPortalCallbackService();
- ResourceURLProvider provider = callback.getResourceURLProvider(getServletRequest(),getPortletWindow());
+ ResourceURLProvider provider = getResponseContext().getResourceURLProvider();
if (location.indexOf("://") != -1)
{
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java Tue Mar 10 15:42:05 2009
@@ -53,7 +53,6 @@
import org.apache.pluto.container.om.portlet.SecurityRoleRef;
import org.apache.pluto.container.om.portlet.Supports;
import org.apache.pluto.util.ArgumentUtility;
-import org.apache.pluto.util.Enumerator;
import org.apache.pluto.util.StringManager;
@@ -289,7 +288,7 @@
{
if (ccppProfile == null)
{
- ccppProfile = getPortletContainer().getRequiredContainerServices().getCCPPProfileService().getCCPPProfile(getServletRequest());
+ ccppProfile = getPortletContainer().getOptionalContainerServices().getCCPPProfileService().getCCPPProfile(getServletRequest());
}
return ccppProfile;
}
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java Tue Mar 10 15:42:05 2009
@@ -172,11 +172,8 @@
{
throw new IllegalArgumentException("only absolute URLs or full path URIs are allowed");
}
-
- ResourceURLProvider provider = getPortletContainer()
- .getRequiredContainerServices()
- .getPortalCallbackService()
- .getResourceURLProvider(getServletRequest(), getPortletWindow());
+
+ ResourceURLProvider provider = responseContext.getResourceURLProvider();
if (path.indexOf("://") != -1) {
provider.setAbsoluteURL(path);
} else {
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java Tue Mar 10 15:42:05 2009
@@ -34,7 +34,7 @@
import javax.portlet.WindowState;
import javax.portlet.WindowStateException;
-import org.apache.pluto.container.PortletResponseContext;
+import org.apache.pluto.container.PortletMimeResponseContext;
import org.apache.pluto.container.PortletURLListener;
import org.apache.pluto.container.PortletURLProvider;
import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
@@ -49,21 +49,21 @@
*/
public class PortletURLImpl implements PortletURL, ResourceURL {
- private PortletResponseContext responseContext;
+ private PortletMimeResponseContext responseContext;
private PortalContext portalContext;
private PortletURLProvider urlProvider;
private String cacheLevel;
private boolean filtering;
- public PortletURLImpl(PortletResponseContext responseContext, boolean actionURL, boolean resourceURL)
+ public PortletURLImpl(PortletMimeResponseContext responseContext, boolean actionURL, boolean resourceURL)
{
this.responseContext = responseContext;
this.portalContext = responseContext.getContainer().getRequiredContainerServices().getPortalContext();
// TODO: actionURL/resourceURL parameters
- urlProvider = responseContext.getContainer().getRequiredContainerServices().getPortalCallbackService().getPortletURLProvider(responseContext.getServletRequest(), responseContext.getPortletWindow());
+ urlProvider = responseContext.getPortletURLProvider();
}
- public PortletURLImpl(PortletResponseContext responseContext, boolean actionURL, boolean resourceURL, String cacheLevel)
+ public PortletURLImpl(PortletMimeResponseContext responseContext, boolean actionURL, boolean resourceURL, String cacheLevel)
{
this(responseContext, actionURL, resourceURL);
this.cacheLevel = cacheLevel == null ? ResourceURL.PAGE : cacheLevel;
@@ -164,9 +164,7 @@
filtering = true;
try
{
- PortletURLListener portletURLFilterListener = responseContext.getContainer()
- .getRequiredContainerServices()
- .getPortalCallbackService().getPortletURLListener();
+ PortletURLListener portletURLFilterListener = responseContext.getContainer().getRequiredContainerServices().getPortletURLListener();
PortletApplicationDefinition portletApp = responseContext.getPortletWindow().getPortletEntity().getPortletDefinition().getApplication();
portletURLFilterListener.callListener(portletApp, this, urlProvider.isActionURL(), urlProvider.isResourceURL());
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/StateAwareResponseImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/StateAwareResponseImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/StateAwareResponseImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/StateAwareResponseImpl.java Tue Mar 10 15:42:05 2009
@@ -21,7 +21,6 @@
import java.util.HashMap;
import java.util.Map;
-import javax.portlet.Event;
import javax.portlet.PortletMode;
import javax.portlet.PortletModeException;
import javax.portlet.StateAwareResponse;
@@ -29,7 +28,6 @@
import javax.portlet.WindowStateException;
import javax.xml.namespace.QName;
-import org.apache.pluto.container.PortalCallbackService;
import org.apache.pluto.container.PortletStateAwareResponseContext;
import org.apache.pluto.container.PortletWindow;
import org.apache.pluto.util.ArgumentUtility;
@@ -127,9 +125,7 @@
public void setEvent(QName qname, Serializable value)
{
ArgumentUtility.validateNotNull("qname", qname);
- PortalCallbackService callback = getPortletContainer().getRequiredContainerServices().getPortalCallbackService();
- Event event = callback.getEventProvider(getServletRequest(),getPortletWindow()).createEvent(qname, value);
- responseContext.getEvents().add(event);
+ responseContext.getEvents().add(responseContext.getEventProvider().createEvent(qname, value));
}
public void setEvent(String name, Serializable value)
Modified: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java (original)
+++ portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/PortletRequestImplTest.java Tue Mar 10 15:42:05 2009
@@ -24,7 +24,6 @@
import org.apache.pluto.container.CCPPProfileService;
import org.apache.pluto.container.ContainerPortletContext;
import org.apache.pluto.container.OptionalContainerServices;
-import org.apache.pluto.container.PortalCallbackService;
import org.apache.pluto.container.PortletContainer;
import org.apache.pluto.container.PortletEnvironmentService;
import org.apache.pluto.container.PortletURLProvider;
@@ -51,7 +50,6 @@
private Mock mockPortalContext = null;
private Mock mockPortletContext = null;
private Mock mockHttpServletRequest = null;
- private Mock mockPortalCallbackService = null;
private Mock mockPortletURLProvider = null;
private PortletWindow window = null;
@@ -74,7 +72,6 @@
new Object[] { "Mock Pluto Container", (RequiredContainerServices) mockServices.proxy(), (OptionalContainerServices) mockOptionalServices.proxy() } );
window = (PortletWindow) mock( PortletWindow.class ).proxy();
mockHttpServletRequest = mock( HttpServletRequest.class );
- mockPortalCallbackService = mock (PortalCallbackService.class);
// Constructor expectations for RenderRequestImpl
mockContainer.expects( atLeastOnce() ).method( "getRequiredContainerServices" ).will( returnValue( mockServices.proxy() ) );
@@ -102,8 +99,6 @@
mockCCPPProfileService.expects(once()).method("getCCPPProfile").will(returnValue( null ));
mockServices.expects(once()).method("getCCPPProfileService").will(returnValue( mockCCPPProfileService.proxy() ));
- mockServices.expects(once()).method("getPortalCallbackService").will(returnValue( mockPortalCallbackService.proxy() ));
- mockPortalCallbackService.expects(once()).method("getPortletURLProvider").will(returnValue( mockPortletURLProvider.proxy() ));
mockContainer.expects(once()).method("getRequiredContainerServices").will(returnValue( mockServices.proxy() ));
mockContainer.expects(atLeastOnce()).method("getOptionalContainerServices").will(returnValue( mockOptionalServices.proxy() ));
Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java Tue Mar 10 15:42:05 2009
@@ -23,7 +23,6 @@
import javax.portlet.PortletMode;
import javax.servlet.ServletContext;
-import org.apache.pluto.container.PortalCallbackService;
import org.apache.pluto.container.PortletContainerException;
import org.apache.pluto.container.PortletPreferencesService;
import org.apache.pluto.container.driver.PortletRegistryService;
@@ -51,7 +50,6 @@
private SupportedWindowStateService supportedWindowStateService;
// Container Services
- private PortalCallbackService portalCallbackService;
private PortletPreferencesService portletPreferencesService;
private PortletRegistryService registryService;
@@ -59,13 +57,11 @@
PropertyConfigService propertyService,
RenderConfigService renderService,
SupportedModesService supportedModesService,
- SupportedWindowStateService supportedWindowStateService,
- PortalCallbackService portalCallback) {
+ SupportedWindowStateService supportedWindowStateService) {
this.portalUrlParser = portalUrlParser;
this.propertyService = propertyService;
this.renderService = renderService;
- this.portalCallbackService = portalCallback;
this.supportedModesService = supportedModesService;
this.supportedWindowStateService = supportedWindowStateService;
}
@@ -170,14 +166,6 @@
//
// Container Services
//
- public PortalCallbackService getPortalCallbackService() {
- return portalCallbackService;
- }
-
- public void setPortalCallbackService(PortalCallbackService portalCallbackService) {
- this.portalCallbackService = portalCallbackService;
- }
-
public PortletPreferencesService getPortletPreferencesService() {
return portletPreferencesService;
}
Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java Tue Mar 10 15:42:05 2009
@@ -18,11 +18,8 @@
import javax.portlet.PortalContext;
-import org.apache.pluto.container.CCPPProfileService;
import org.apache.pluto.container.EventCoordinationService;
-import org.apache.pluto.container.OptionalContainerServices;
-import org.apache.pluto.container.PortalCallbackService;
-import org.apache.pluto.container.RequiredContainerServices;
+import org.apache.pluto.container.PortletRequestContextService;
import org.apache.pluto.core.PlutoContainerServices;
import org.apache.pluto.driver.config.DriverConfiguration;
@@ -33,7 +30,7 @@
* @version 1.0
* @since Sep 21, 2004
*/
-public class ContainerServicesImpl extends PlutoContainerServices implements RequiredContainerServices, OptionalContainerServices
+public class ContainerServicesImpl extends PlutoContainerServices
{
private DriverConfiguration driverConfig;
@@ -42,10 +39,10 @@
*/
public ContainerServicesImpl(PortalContext context,
DriverConfiguration driverConfig,
- CCPPProfileService ccppProfileService,
+ PortletRequestContextService portletRequestContextService,
EventCoordinationService eventCoordinationService)
{
- super(context, ccppProfileService, driverConfig.getPortalCallbackService(), eventCoordinationService);
+ super(context, portletRequestContextService, eventCoordinationService);
this.driverConfig = driverConfig;
}
@@ -60,15 +57,5 @@
// return driverConfig.getPortletPreferencesService();
// }
- /**
- * The PortalCallbackService allows the container to communicate
- * actions back to the portal.
- * @return a PortalCallbackService implementation.
- */
- public PortalCallbackService getPortalCallbackService()
- {
- return driverConfig.getPortalCallbackService();
- }
-
}
Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java?rev=752145&r1=752144&r2=752145&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java Tue Mar 10 15:42:05 2009
@@ -22,7 +22,6 @@
import javax.portlet.PortletMode;
import javax.servlet.ServletContext;
-import org.apache.pluto.container.PortalCallbackService;
import org.apache.pluto.container.PortletContainerException;
import org.apache.pluto.container.PortletPreferencesService;
import org.apache.pluto.driver.services.portal.PageConfig;
@@ -113,8 +112,6 @@
//
// Utility methods for the container
//
- PortalCallbackService getPortalCallbackService();
-
PortletPreferencesService getPortletPreferencesService();
PortalURLParser getPortalUrlParser();