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 2007/10/10 15:07:03 UTC
svn commit: r583462 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3:
components/portal/src/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java
src/webapp/WEB-INF/assembly/pipelines.xml
Author: ate
Date: Wed Oct 10 06:07:00 2007
New Revision: 583462
URL: http://svn.apache.org/viewvc?rev=583462&view=rev
Log:
JS2-279: Preliminary Portlet API 2.0 ResourceURL support allowing full response control like for cookies and compressed output streams
- adding resourceURL handling for /desktop
See: https://issues.apache.org/jira/browse/JS2-729#action_12533731
Modified:
portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java
portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml
Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java?rev=583462&r1=583461&r2=583462&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/container/url/impl/DesktopEncodingPortalURL.java Wed Oct 10 06:07:00 2007
@@ -25,6 +25,7 @@
import javax.servlet.http.HttpServletRequest;
import org.apache.jetspeed.PortalContext;
+import org.apache.jetspeed.PortalReservedParameters;
import org.apache.jetspeed.container.state.NavigationalState;
import org.apache.jetspeed.container.url.BasePortalURL;
import org.apache.jetspeed.desktop.JetspeedDesktop;
@@ -156,6 +157,11 @@
protected String createPortletURL(String encodedNavState, boolean secure, PortletWindow window, boolean action)
{
+ return createPortletURL(encodedNavState, secure, window, action, false);
+ }
+
+ protected String createPortletURL(String encodedNavState, boolean secure, PortletWindow window, boolean action, boolean resource)
+ {
StringBuffer buffer = new StringBuffer("");
buffer.append(getBaseURL(secure));
if (action)
@@ -177,13 +183,22 @@
{
buffer.append(getPath());
}
- PortletEntity pe = window.getPortletEntity();
- buffer.append( "?entity=" ).append( pe.getId() );
- PortletDefinition portlet = pe.getPortletDefinition();
- MutablePortletApplication app = (MutablePortletApplication)portlet.getPortletApplicationDefinition();
- String uniqueName = app.getName() + "::" + portlet.getName();
- buffer.append( "&portlet=" ).append( uniqueName );
+ if ( !resource )
+ {
+ PortletEntity pe = window.getPortletEntity();
+ buffer.append( "?entity=" ).append( pe.getId() );
+
+ PortletDefinition portlet = pe.getPortletDefinition();
+ MutablePortletApplication app = (MutablePortletApplication)portlet.getPortletApplicationDefinition();
+ String uniqueName = app.getName() + "::" + portlet.getName();
+ buffer.append( "&portlet=" ).append( uniqueName );
+
+ }
+ else
+ {
+ buffer.append("?encoder=desktop");
+ }
return buffer.toString();
}
@@ -192,7 +207,8 @@
{
try
{
- return createPortletURL(this.getNavigationalState().encode(window,parameters,mode,state,action), secure, window, action);
+ boolean resource = !action && parameters.containsKey(PortalReservedParameters.PORTLET_RESOURCE_URL_REQUEST_PARAMETER);
+ return createPortletURL(this.getNavigationalState().encode(window,parameters,mode,state,action), secure, window, action, resource);
}
catch (UnsupportedEncodingException e)
{
Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml?rev=583462&r1=583461&r2=583462&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/assembly/pipelines.xml Wed Oct 10 06:07:00 2007
@@ -479,6 +479,7 @@
<ref bean="localizationValve"/>
<ref bean="profilerValve"/>
<ref bean="containerValve"/>
+ <ref bean="resourceValve"/>
<ref bean="portletValveTitleInHeader"/>
</list>
</constructor-arg>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org