}
final WSRPConsumer consumer = getConsumer();
ImportInfo info = consumer.importPortlets(currentExport.getExport(), WSRPUtils.transform(portletsToImport, SELECTABLE_TO_HANDLE));
ConsumerStructureProvider structureProvider = consumer.getMigrationService().getStructureProvider();
int importCount = 0;
for (SelectablePortletHandle importedPortlet : portletsToImport)
{
String handle = importedPortlet.getHandle();
PortletContext portletContext = info.getPortletContextFor(handle);
if (portletContext != null)
{
structureProvider.assignPortletToWindow(portletContext, importedPortlet.getWindow(), importedPortlet.getPage(), handle);
importCount++;
}
}
// only display success message if we have imported at least one portlet successfully