Author: chris.laprun(a)jboss.com
Date: 2008-10-17 09:41:25 -0400 (Fri, 17 Oct 2008)
New Revision: 12082
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
Log:
- JBPORTAL-2201: Remove extra separator: rewrite token should be replaced by the namespace
and nothing else!
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java 2008-10-17
02:08:44 UTC (rev 12081)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/RenderHandler.java 2008-10-17
13:41:25 UTC (rev 12082)
@@ -86,7 +86,7 @@
// process the response
consumer.getSessionHandler().updateSessionIfNeeded(markupResponse.getSessionContext(),
invocation,
- requestPrecursor.getPortletHandle());
+ requestPrecursor.getPortletHandle());
MarkupContext markupContext = markupResponse.getMarkupContext();
String markup = markupContext.getMarkupString();
@@ -94,7 +94,7 @@
if (markup != null && binary != null)
{
return new ErrorResponse(new IllegalArgumentException("Markup response
cannot contain both string and binary " +
- "markup. Per Section 6.1.10 of the WSRP specification, this is a
Producer error."));
+ "markup. Per Section 6.1.10 of the WSRP specification, this is a
Producer error."));
}
if (markup == null && binary == null)
@@ -106,7 +106,7 @@
else
{
return new ErrorResponse(new IllegalArgumentException("Markup response
must contain at least string or binary" +
- " markup. Per Section 6.1.10 of the WSRP specification, this is
a Producer error."));
+ " markup. Per Section 6.1.10 of the WSRP specification, this is a
Producer error."));
}
}
@@ -129,7 +129,7 @@
org.jboss.portal.portlet.cache.CacheControl cacheControl =
createCacheControl(markupContext);
FragmentResponse result = new FragmentResponse(null, null, mimeType, null, markup,
- markupContext.getPreferredTitle(), cacheControl,
invocation.getPortalContext().getModes());
+ markupContext.getPreferredTitle(), cacheControl,
invocation.getPortalContext().getModes());
log.debug("Response processed");
return result;
@@ -170,14 +170,14 @@
private String processMarkup(String markup, PortletInvocation invocation, boolean
rewriteURLs)
{
// fix-me: how to deal with fragment header? => interceptor?
- String prefix = getNamespaceFrom(invocation.getWindowContext()) + SEPARATOR;
+ String prefix = getNamespaceFrom(invocation.getWindowContext());
markup = Tools.replace(markup, WSRPRewritingConstants.WSRP_REWRITE_TOKEN, prefix);
if (rewriteURLs)
{
URLFormat format = new URLFormat(invocation.getSecurityContext().isSecure(),
- invocation.getSecurityContext().isAuthenticated(), true, true);
+ invocation.getSecurityContext().isAuthenticated(), true, true);
WSRPURLRewriter rewriter = new WSRPURLRewriter(invocation.getContext(), format,
consumer);
markup = URLTools.replaceURLsBy(markup, rewriter);
}
@@ -244,11 +244,11 @@
if (urlAsString.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
{
WSRPPortletURL portletURL = WSRPPortletURL.create(urlAsString,
- info.getSupportedCustomModes(),
info.getSupportedCustomWindowStates());
+ info.getSupportedCustomModes(), info.getSupportedCustomWindowStates());
if (portletURL instanceof WSRPResourceURL)
{
log.debug("URL '" + urlAsString + "' seems to refer
to a resource which are not currently supported. " +
- "Trying to use the raw URL but this probably won't
work...");
+ "Trying to use the raw URL but this probably won't
work...");
return portletURL.toString();
}
Show replies by date