[jboss-cvs] jboss-portal/wsrp/src/main/org/jboss/portal/wsrp/consumer ...
Chris Laprun
chris.laprun at jboss.com
Fri Aug 18 23:24:32 EDT 2006
User: claprun
Date: 06/08/18 23:24:32
Modified: wsrp/src/main/org/jboss/portal/wsrp/consumer
SessionHandler.java WSRPConsumerImpl.java
Log:
getPortletInfo now takes an invocation as parameter since that's how it was solely used.
Revision Changes Path
1.6 +4 -3 jboss-portal/wsrp/src/main/org/jboss/portal/wsrp/consumer/SessionHandler.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SessionHandler.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/wsrp/src/main/org/jboss/portal/wsrp/consumer/SessionHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- SessionHandler.java 10 Aug 2006 19:56:47 -0000 1.5
+++ SessionHandler.java 19 Aug 2006 03:24:32 -0000 1.6
@@ -44,7 +44,7 @@
* Manages session informations on behalf of a consumer.
*
* @author <a href="mailto:chris.laprun at jboss.com">Chris Laprun</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @since 2.4 (May 31, 2006)
*/
public class SessionHandler
@@ -54,6 +54,7 @@
/** Cookie protocol required by the producer with the consumer */
private CookieProtocol requiresInitCookie;
+
/** The prefix used to isolate WSRP-related session information in the actual session object. */
private static final String SESSION_ID_PREFIX = "org.jboss.portal.wsrp.session.";
private static final String SESSION_ID = "session id";
@@ -83,12 +84,12 @@
this.requiresInitCookie = requiresInitCookie;
}
- public void initPortletGroupIdIfNeeded(PortletInvocation invocation)
+ void initPortletGroupIdIfNeeded(PortletInvocation invocation)
{
// if we need cookies, set the current group id
if (requiresGroupInitCookie())
{
- WSRPPortletInfo info = consumer.getPortletInfo(WSRPConsumerImpl.getPortletHandle(invocation));
+ WSRPPortletInfo info = consumer.getPortletInfo(invocation);
RequestHeaderClientHandler.setCurrentGroupId(info.getGroupId());
}
}
1.53 +6 -6 jboss-portal/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: WSRPConsumerImpl.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- WSRPConsumerImpl.java 19 Aug 2006 01:49:31 -0000 1.52
+++ WSRPConsumerImpl.java 19 Aug 2006 03:24:32 -0000 1.53
@@ -68,7 +68,7 @@
/**
* @author <a href="mailto:boleslaw.dawidowicz at jboss.org">Boleslaw Dawidowicz</a>
* @author <a href="mailto:chris.laprun at jboss.com">Chris Laprun</a>
- * @version $Revision: 1.52 $
+ * @version $Revision: 1.53 $
* @since 2.4
*/
public class WSRPConsumerImpl extends AbstractJBossService implements WSRPConsumer
@@ -249,15 +249,15 @@
return (String)invocation.getAttribute(PortletInvocation.PORTLET_ID_ATTRIBUTE);
}
- WSRPPortletInfo getPortletInfo(String portletHandle)
+ WSRPPortletInfo getPortletInfo(PortletInvocation invocation)
{
try
{
- return (WSRPPortletInfo)getWSRPPortlet(portletHandle).getInfo();
+ return (WSRPPortletInfo)getWSRPPortlet(getPortletHandle(invocation)).getInfo();
}
catch (PortletInvokerException e)
{
- log.debug("Couldn't retrieve portlet info for portlet: '" + portletHandle + "'", e);
+ log.debug("Couldn't retrieve portlet info for portlet: '" + getPortletHandle(invocation) + "'", e);
return null;
}
}
@@ -622,7 +622,7 @@
org.jboss.portal.wsrp.core.UserContext getUserContextFrom(PortletInvocation invocation, RuntimeContext runtimeContext)
{
// first decide if we need to pass the user context...
- WSRPPortletInfo info = getPortletInfo(getPortletHandle(invocation));
+ WSRPPortletInfo info = getPortletInfo(invocation);
if (info != null && info.isUserContextStoredInSession() && runtimeContext.getSessionID() != null)
{
@@ -647,7 +647,7 @@
void setTemplatesIfNeeded(PortletInvocation invocation, RuntimeContext runtimeContext)
{
// todo: could store templates in producer session info to avoid to re-generate them all the time?
- WSRPPortletInfo info = getPortletInfo(getPortletHandle(invocation));
+ WSRPPortletInfo info = getPortletInfo(invocation);
if (info != null && info.isDoesUrlTemplateProcessing()
&& (!info.isTemplatesStoredInSession() || runtimeContext.getSessionID() == null))
More information about the jboss-cvs-commits
mailing list