Author: chris.laprun(a)jboss.com
Date: 2010-09-14 17:52:06 -0400 (Tue, 14 Sep 2010)
New Revision: 4197
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/trunk/pom.xml
Log:
- GTNWSRP-61: Minor improvements, mostly synchronization commit.
+ Updated to use PC 2.2.0-Beta02-SNAPSHOT to access reference method.
+ Reference portlet contexts (so that the portal can find the proper PortletInvoker).
Not sure this is actually needed seeing it doesn't seem to improve the problem of
portal not finding the portlet state when displaying an imported portlet. Need to
investigate more.
+ Sort portlet displays.
+ Do not show error message if there are no failed portlets.
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-09-14
21:28:47 UTC (rev 4196)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-09-14
21:52:06 UTC (rev 4197)
@@ -526,6 +526,7 @@
selectableHandles.add(new
SelectablePortletHandle(portlet.getContext().getId(),
consumer.getMigrationService().getStructureProvider()));
}
}
+ Collections.sort(selectableHandles);
portletHandles = new ListDataModel(selectableHandles);
}
@@ -627,7 +628,11 @@
}
beanContext.createLocalizedMessage(BeanContext.STATUS, IMPORT_SUCCESS,
beanContext.getInfoSeverity(), importCount);
- beanContext.createErrorMessage(FAILED_PORTLETS,
info.getErrorCodesToFailedPortletHandlesMapping());
+ SortedMap<QName, List<String>>
errorCodesToFailedPortletHandlesMapping =
info.getErrorCodesToFailedPortletHandlesMapping();
+ if (!errorCodesToFailedPortletHandlesMapping.isEmpty())
+ {
+ beanContext.createErrorMessage(FAILED_PORTLETS,
errorCodesToFailedPortletHandlesMapping);
+ }
return ConsumerManagerBean.CONSUMERS;
}
@@ -671,7 +676,7 @@
return consumer.getMigrationService().isAvailableExportInfosEmpty();
}
- public static class SelectablePortletHandle
+ public static class SelectablePortletHandle implements
Comparable<SelectablePortletHandle>
{
private String handle;
private boolean selected;
@@ -753,6 +758,11 @@
{
selected = (Boolean)event.getNewValue();
}
+
+ public int compareTo(SelectablePortletHandle o)
+ {
+ return handle.compareTo(o.handle);
+ }
}
public static class ExportInfoDisplay
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-09-14
21:28:47 UTC (rev 4196)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-09-14
21:52:06 UTC (rev 4197)
@@ -38,6 +38,7 @@
import org.gatein.pc.api.state.DestroyCloneFailure;
import org.gatein.pc.api.state.PropertyChange;
import org.gatein.pc.api.state.PropertyMap;
+import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
import org.gatein.pc.portlet.impl.spi.AbstractPortletInvocationContext;
import org.gatein.pc.portlet.state.SimplePropertyMap;
import org.gatein.wsrp.UserContextConverter;
@@ -917,8 +918,9 @@
for (ImportedPortlet importedPortlet : importedPortlets)
{
org.oasis.wsrp.v2.PortletContext portletContext =
importedPortlet.getNewPortletContext();
- importIdToPortletContext.put(importedPortlet.getImportID(),
-
PortletContext.createPortletContext(portletContext.getPortletHandle(),
portletContext.getPortletState()));
+ PortletContext apiPC =
PortletContext.createPortletContext(portletContext.getPortletHandle(),
portletContext.getPortletState());
+ // we need to reference the resulting PortletContext so that it can
then be used properly
+ importIdToPortletContext.put(importedPortlet.getImportID(),
FederatingPortletInvokerService.reference(apiPC, getProducerId()));
}
}
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-09-14 21:28:47 UTC (rev 4196)
+++ components/wsrp/trunk/pom.xml 2010-09-14 21:52:06 UTC (rev 4197)
@@ -47,7 +47,7 @@
</scm>
<properties>
- <version.gatein.pc>2.2.0-Beta01</version.gatein.pc>
+ <version.gatein.pc>2.2.0-Beta02-SNAPSHOT</version.gatein.pc>
<version.gatein.common>2.0.3-GA</version.gatein.common>
<version.gatein.wci>2.0.1-GA</version.gatein.wci>
Show replies by date