You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2009/04/08 19:09:15 UTC
svn commit: r763319 - in /portals/jetspeed-2/portal/trunk:
components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/
components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/
jetspeed-portal-resources/src/main/resou...
Author: ate
Date: Wed Apr 8 17:09:15 2009
New Revision: 763319
URL: http://svn.apache.org/viewvc?rev=763319&view=rev
Log:
Adjusting Jetspeed configuration and Pluto API implementation for the PLUTO-545 changes.
Added:
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPlutoServices.java (contents, props changed)
- copied, changed from r763298, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java
Removed:
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedOptionalPlutoServices.java
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/desktop.xml
portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml
portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java?rev=763319&r1=763318&r2=763319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/DesktopPortletContainerImpl.java Wed Apr 8 17:09:15 2009
@@ -22,9 +22,7 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.jetspeed.desktop.JetspeedDesktop;
-import org.apache.pluto.container.OptionalContainerServices;
-import org.apache.pluto.container.PortletContainer;
-import org.apache.pluto.container.RequiredContainerServices;
+import org.apache.pluto.container.ContainerServices;
import org.apache.pluto.container.impl.PortletContainerImpl;
/**
@@ -36,17 +34,17 @@
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id: $
*/
-public class DesktopPortletContainerImpl extends PortletContainerImpl implements PortletContainer
+public class DesktopPortletContainerImpl extends PortletContainerImpl
{
private String desktopPipelinePath = null;
private String desktopActionPipelinePath = null;
private String desktopRenderPipelinePath = null;
public DesktopPortletContainerImpl(String containerName,
- RequiredContainerServices requiredServices, OptionalContainerServices optionalServices,
+ ContainerServices containerServices,
String desktopPipelinePath, String desktopActionPipelinePath, String desktopRenderPipelinePath)
{
- super(containerName, requiredServices, optionalServices);
+ super(containerName, containerServices);
if ( desktopPipelinePath == null || desktopPipelinePath.length() == 0 )
desktopPipelinePath = JetspeedDesktop.DEFAULT_DESKTOP_PIPELINE_PATH;
if ( desktopPipelinePath.charAt( 0 ) != '/' )
@@ -106,7 +104,7 @@
location = location.replaceAll( this.desktopRenderPipelinePath, this.desktopPipelinePath);
redirectResponse.sendRedirect(location);
}
- System.out.println("+++ >>>> DESKTOP REDIRECT: location is " + location);
+// System.out.println("+++ >>>> DESKTOP REDIRECT: location is " + location);
}
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java?rev=763319&r1=763318&r2=763319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java Wed Apr 8 17:09:15 2009
@@ -25,11 +25,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.container.OptionalContainerServices;
+import org.apache.pluto.container.ContainerServices;
import org.apache.pluto.container.PortletContainer;
import org.apache.pluto.container.PortletContainerException;
import org.apache.pluto.container.PortletWindow;
-import org.apache.pluto.container.RequiredContainerServices;
/**
* Portlet Container Wrapper to secure access to portlet container.
@@ -105,14 +104,9 @@
return this.containerId;
}
- public OptionalContainerServices getOptionalContainerServices()
+ public ContainerServices getContainerServices()
{
- return pluto.getOptionalContainerServices();
- }
-
- public RequiredContainerServices getRequiredContainerServices()
- {
- return pluto.getRequiredContainerServices();
+ return pluto.getContainerServices();
}
public boolean isInitialized()
Copied: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPlutoServices.java (from r763298, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java)
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPlutoServices.java?p2=portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPlutoServices.java&p1=portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java&r1=763298&r2=763319&rev=763319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedRequiredPlutoServices.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPlutoServices.java Wed Apr 8 17:09:15 2009
@@ -16,13 +16,26 @@
*/
package org.apache.jetspeed.container.services;
+import java.util.Set;
+
+import javax.ccpp.Attribute;
+import javax.ccpp.Component;
+import javax.ccpp.Profile;
+import javax.ccpp.ProfileDescription;
import javax.portlet.PortalContext;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.pluto.container.CCPPProfileService;
import org.apache.pluto.container.EventCoordinationService;
import org.apache.pluto.container.FilterManagerService;
+import org.apache.pluto.container.NamespaceMapper;
+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.PortletURLListenerService;
-import org.apache.pluto.container.RequiredContainerServices;
+import org.apache.pluto.container.ContainerServices;
+import org.apache.pluto.container.UserInfoService;
/**
* Service accessor for all Pluto *required* container services and callbacks
@@ -30,23 +43,41 @@
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id: $
*/
-public class JetspeedRequiredPlutoServices implements RequiredContainerServices
+public class JetspeedPlutoServices implements ContainerServices
{
private PortalContext portalContext;
private EventCoordinationService eventCoordinationService;
private PortletRequestContextService portletRequestContextService;
private FilterManagerService filterManagerService;
private PortletURLListenerService portletURLListenerService;
-
- public JetspeedRequiredPlutoServices(PortalContext portalContext, EventCoordinationService eventCoordinationService,
- PortletRequestContextService portletRequestContextService, FilterManagerService filterManagerService,
- PortletURLListenerService portletURLListenerService)
+ protected NamespaceMapper namespaceMapper;
+ protected PortletEnvironmentService environmentService;
+ protected UserInfoService userInfoService;
+ protected PortletInvokerService invokerService;
+ protected PortletPreferencesService preferencesService;
+ private CCPPProfileService profileService = new DummyCCPPProfileServiceImpl();
+
+ public JetspeedPlutoServices(PortalContext portalContext,
+ EventCoordinationService eventCoordinationService,
+ PortletRequestContextService portletRequestContextService,
+ FilterManagerService filterManagerService,
+ PortletURLListenerService portletURLListenerService,
+ NamespaceMapper namespaceMapper,
+ PortletEnvironmentService environmentService,
+ UserInfoService userInfoService,
+ PortletInvokerService invokerService,
+ PortletPreferencesService preferencesService)
{
this.portalContext = portalContext;
this.eventCoordinationService = eventCoordinationService;
this.portletRequestContextService = portletRequestContextService;
this.filterManagerService = filterManagerService;
this.portletURLListenerService = portletURLListenerService;
+ this.namespaceMapper = namespaceMapper;
+ this.environmentService = environmentService;
+ this.userInfoService = userInfoService;
+ this.invokerService = invokerService;
+ this.preferencesService = preferencesService;
}
public PortalContext getPortalContext()
@@ -73,4 +104,105 @@
{
return this.portletURLListenerService;
}
+
+ public CCPPProfileService getCCPPProfileService()
+ {
+ return this.profileService;
+ }
+
+ public NamespaceMapper getNamespaceMapper()
+ {
+ return namespaceMapper;
+ }
+
+ public PortletEnvironmentService getPortletEnvironmentService()
+ {
+ return environmentService;
+ }
+
+ public PortletInvokerService getPortletInvokerService()
+ {
+ return invokerService;
+ }
+
+ public PortletPreferencesService getPortletPreferencesService()
+ {
+ return preferencesService;
+ }
+
+ public UserInfoService getUserInfoService()
+ {
+ return userInfoService;
+ }
+
+ class DummyCCPPProfileServiceImpl implements CCPPProfileService
+ {
+
+ /* (non-Javadoc)
+ * @see org.apache.pluto.spi.CCPPProfileService#getCCPPProfile()
+ */
+ public Profile getCCPPProfile(HttpServletRequest httpServletRequest)
+ {
+ return new DummyProfile();
+ // FIXME: Here we have to return a "real" javax.ccpp.Profile
+ }
+
+ }
+
+ // FIXME: Here we have to return a "real" javax.ccpp.Profile
+ class DummyProfile implements Profile
+ {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.ccpp.Profile#getAttribute(java.lang.String)
+ */
+ public Attribute getAttribute(String arg0)
+ {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.ccpp.Profile#getAttributes()
+ */
+ @SuppressWarnings("unchecked")
+ public Set getAttributes()
+ {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.ccpp.Profile#getComponent(java.lang.String)
+ */
+ public Component getComponent(String arg0)
+ {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.ccpp.Profile#getComponents()
+ */
+ @SuppressWarnings("unchecked")
+ public Set getComponents()
+ {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.ccpp.Profile#getDescription()
+ */
+ public ProfileDescription getDescription()
+ {
+ return null;
+ }
+ }
}
Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/services/JetspeedPlutoServices.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/desktop.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/desktop.xml?rev=763319&r1=763318&r2=763319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/desktop.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/desktop.xml Wed Apr 8 17:09:15 2009
@@ -59,11 +59,10 @@
<bean id="DesktopPluto" class="org.apache.jetspeed.container.DesktopPortletContainerImpl">
<meta key="j2:cat" value="default" />
<constructor-arg index='0'><value>${portal.name}</value></constructor-arg>
- <constructor-arg index='1'><ref bean="org.apache.pluto.services.RequiredPlutoServices"/></constructor-arg>
- <constructor-arg index='2'><ref bean="org.apache.pluto.services.OptionalPlutoServices"/></constructor-arg>
- <constructor-arg index='3'><value>/desktop</value></constructor-arg>
- <constructor-arg index='4'><value>/action</value></constructor-arg>
- <constructor-arg index='5'><value>/portlet</value></constructor-arg>
+ <constructor-arg index='1'><ref bean="org.apache.pluto.services.PlutoServices"/></constructor-arg>
+ <constructor-arg index='2'><value>/desktop</value></constructor-arg>
+ <constructor-arg index='3'><value>/action</value></constructor-arg>
+ <constructor-arg index='4'><value>/portlet</value></constructor-arg>
</bean>
<!-- Jetspeed 2's wrapper around Desktop Pluto container -->
Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml?rev=763319&r1=763318&r2=763319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-spring.xml Wed Apr 8 17:09:15 2009
@@ -83,8 +83,7 @@
<bean id="Pluto" class="org.apache.pluto.container.impl.PortletContainerImpl">
<meta key="j2:cat" value="default" />
<constructor-arg><value>${portal.name}</value></constructor-arg>
- <constructor-arg><ref bean="org.apache.pluto.services.RequiredPlutoServices"/></constructor-arg>
- <constructor-arg><ref bean="org.apache.pluto.services.OptionalPlutoServices"/></constructor-arg>
+ <constructor-arg><ref bean="org.apache.pluto.services.PlutoServices"/></constructor-arg>
</bean>
<!-- Jetspeed 2's wrapper around Pluto -->
Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml?rev=763319&r1=763318&r2=763319&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pluto-services.xml Wed Apr 8 17:09:15 2009
@@ -21,24 +21,24 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!-- ====================================================== -->
- <!-- Declare Pluto Service Accessors, Required -->
+ <!-- Declare Pluto Service Accessors -->
<!-- ====================================================== -->
- <bean id="org.apache.pluto.services.RequiredPlutoServices"
- class="org.apache.jetspeed.container.services.JetspeedRequiredPlutoServices">
+ <bean id="org.apache.pluto.services.PlutoServices"
+ class="org.apache.jetspeed.container.services.JetspeedPlutoServices">
<meta key="j2:cat" value="default" />
<constructor-arg><ref bean="PortalContext"/></constructor-arg>
<constructor-arg><ref bean="org.apache.pluto.services.EventCoordinationService"/></constructor-arg>
<constructor-arg><ref bean="org.apache.pluto.container.PortletRequestContextService"/></constructor-arg>
<constructor-arg><ref bean="org.apache.pluto.container.FilterManagerService"/></constructor-arg>
<constructor-arg><ref bean="org.apache.pluto.container.PortletURLListenerService"/></constructor-arg>
+ <constructor-arg><ref bean="org.apache.pluto.services.NamespaceMapper"/></constructor-arg>
+ <constructor-arg><ref bean="org.apache.pluto.services.PortletEnvironmentService"/></constructor-arg>
+ <constructor-arg><ref bean="org.apache.pluto.services.UserInfoService"/></constructor-arg>
+ <constructor-arg><ref bean="org.apache.pluto.services.PortletInvokerService"/></constructor-arg>
+ <constructor-arg><ref bean="org.apache.jetspeed.components.portletpreferences.PortletPreferencesProvider"/></constructor-arg>
</bean>
- <bean id="org.apache.pluto.services.CCPPProfileService"
- class="org.apache.pluto.container.driver.impl.DummyCCPPProfileServiceImpl">
- <meta key="j2:cat" value="default" />
- </bean>
-
<bean id='org.apache.jetspeed.events.PortletEventQueue'
class='org.apache.jetspeed.events.PortletEventQueueImpl'>
<meta key="j2:cat" value="default" />
@@ -74,21 +74,6 @@
<constructor-arg><ref bean="portletFactory" /></constructor-arg>
</bean>
-
- <!-- ====================================================== -->
- <!-- Declare Pluto Service Accessors, Optional -->
- <!-- ====================================================== -->
-
- <bean id="org.apache.pluto.services.OptionalPlutoServices"
- class="org.apache.jetspeed.container.services.JetspeedOptionalPlutoServices">
- <meta key="j2:cat" value="default" />
- <constructor-arg><ref bean="org.apache.pluto.services.NamespaceMapper"/></constructor-arg>
- <constructor-arg><ref bean="org.apache.pluto.services.PortletEnvironmentService"/></constructor-arg>
- <constructor-arg><ref bean="org.apache.pluto.services.UserInfoService"/></constructor-arg>
- <constructor-arg><ref bean="org.apache.pluto.services.PortletInvokerService"/></constructor-arg>
- <constructor-arg><ref bean="org.apache.jetspeed.components.portletpreferences.PortletPreferencesProvider"/></constructor-arg>
- </bean>
-
<bean id="org.apache.pluto.services.NamespaceMapper"
class="org.apache.jetspeed.container.namespace.JetspeedNamespaceMapperImpl">
<meta key="j2:cat" value="default" />
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org