Package org.gatein.wsrp.consumer.migration

Examples of org.gatein.wsrp.consumer.migration.ImportInfo


                  {
                     errorCodeToHandle.put(failedPortletsForReason.getErrorCode(), failedPortletsForReason.getImportID());
                  }
               }

               return new ImportInfo(System.currentTimeMillis(), errorCodeToHandle, importIdToPortletContext);
            }
            catch (OperationNotSupported operationNotSupported)
            {
               throw new UnsupportedOperationException(operationNotSupported);
            }
View Full Code Here


               portletsToImport.add(exportedPortlet);
            }
         }

         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
         if (importCount > 0)
         {
            beanContext.createLocalizedMessage(BeanContext.STATUS, IMPORT_SUCCESS, beanContext.getInfoSeverity(), importCount);
         }

         Map<QName, List<String>> errorCodesToFailedPortletHandlesMapping = info.getErrorCodesToFailedPortletHandlesMapping();
         if (!errorCodesToFailedPortletHandlesMapping.isEmpty())
         {
            for (Map.Entry<QName, List<String>> entry : errorCodesToFailedPortletHandlesMapping.entrySet())
            {
               QName errorCode = entry.getKey();
View Full Code Here

                  {
                     errorCodeToHandle.put(failedPortletsForReason.getErrorCode(), failedPortletsForReason.getImportID());
                  }
               }

               return new ImportInfo(System.currentTimeMillis(), errorCodeToHandle, importIdToPortletContext);
            }
            catch (OperationNotSupported operationNotSupported)
            {
               throw new UnsupportedOperationException(operationNotSupported);
            }
View Full Code Here

               portletsToImport.add(exportedPortlet);
            }
         }

         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
         if (importCount > 0)
         {
            beanContext.createLocalizedMessage(BeanContext.STATUS, IMPORT_SUCCESS, beanContext.getInfoSeverity(), importCount);
         }

         SortedMap<QName, List<String>> errorCodesToFailedPortletHandlesMapping = info.getErrorCodesToFailedPortletHandlesMapping();
         if (!errorCodesToFailedPortletHandlesMapping.isEmpty())
         {
            for (Map.Entry<QName, List<String>> entry : errorCodesToFailedPortletHandlesMapping.entrySet())
            {
               QName errorCode = entry.getKey();
View Full Code Here

               {
                  errorCodeToHandle.put(failedPortletsForReason.getErrorCode(), failedPortletsForReason.getImportID());
               }
            }

            return new ImportInfo(System.currentTimeMillis(), errorCodeToHandle, importIdToPortletContext);
         }
         catch (OperationNotSupported operationNotSupported)
         {
            throw new UnsupportedOperationException(operationNotSupported);
         }
View Full Code Here

                  {
                     errorCodeToHandle.put(failedPortletsForReason.getErrorCode(), failedPortletsForReason.getImportID());
                  }
               }

               return new ImportInfo(System.currentTimeMillis(), errorCodeToHandle, importIdToPortletContext);
            }
            catch (OperationNotSupported operationNotSupported)
            {
               throw new UnsupportedOperationException(operationNotSupported);
            }
View Full Code Here

TOP

Related Classes of org.gatein.wsrp.consumer.migration.ImportInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.