Author: chris.laprun(a)jboss.com
Date: 2010-02-16 07:43:47 -0500 (Tue, 16 Feb 2010)
New Revision: 1742
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
Log:
- Added callingInvoker parameter to NullInvokerHandler.resolvePortletInvokerFor method so
that the handler can call back to the calling invoker if needed.
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java
===================================================================
---
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java 2010-02-16
12:28:36 UTC (rev 1741)
+++
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java 2010-02-16
12:43:47 UTC (rev 1742)
@@ -36,11 +36,13 @@
{
NullInvokerHandler DEFAULT_HANDLER = new NullInvokerHandler()
{
- public FederatedPortletInvoker resolvePortletInvokerFor(String compoundPortletId,
String invokerId) throws NoSuchPortletException
+ public FederatedPortletInvoker resolvePortletInvokerFor(String compoundPortletId,
String invokerId,
+ FederatingPortletInvoker
callingInvoker) throws NoSuchPortletException
{
throw new NoSuchPortletException(compoundPortletId);
}
};
- FederatedPortletInvoker resolvePortletInvokerFor(String compoundPortletId, String
invokerId) throws NoSuchPortletException;
+ FederatedPortletInvoker resolvePortletInvokerFor(String compoundPortletId, String
invokerId,
+ FederatingPortletInvoker
callingInvoker) throws NoSuchPortletException;
}
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
===================================================================
---
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2010-02-16
12:28:36 UTC (rev 1741)
+++
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2010-02-16
12:43:47 UTC (rev 1742)
@@ -274,7 +274,7 @@
FederatedPortletInvoker federated = registry.get(invokerId);
if (federated == null)
{
- return nullHandler.resolvePortletInvokerFor(compoundPortletId, invokerId);
+ return nullHandler.resolvePortletInvokerFor(compoundPortletId, invokerId,
this);
}
//
Modified:
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
===================================================================
---
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2010-02-16
12:28:36 UTC (rev 1741)
+++
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2010-02-16
12:43:47 UTC (rev 1742)
@@ -205,8 +205,9 @@
federatingInvoker.setNullInvokerHandler(new NullInvokerHandler()
{
- public FederatedPortletInvoker resolvePortletInvokerFor(String
compoundPortletId, String invokerId) throws NoSuchPortletException
+ public FederatedPortletInvoker resolvePortletInvokerFor(String
compoundPortletId, String invokerId, FederatingPortletInvoker callingInvoker) throws
NoSuchPortletException
{
+ assertEquals(federatingInvoker, callingInvoker);
return remote;
}
});
Show replies by date