Package org.gatein.exports.data

Examples of org.gatein.exports.data.ExportPortletData


   }

   public ExportPortletData createExportPortletData(ExportContext exportContextData, String portletHandle,
                                                    byte[] portletState) throws UnsupportedEncodingException
   {
      return new ExportPortletData(portletHandle, portletState);
   }
View Full Code Here


      {
         return exportPortletData.encodeAsBytes();
      }
      else
      {
         final ExportPortletData portletData = exportPersistenceManager.storeExportPortletData(exportContextData, exportPortletData);
         return portletData.encodeAsBytes();
      }
   }
View Full Code Here

               }

               byte[] portletState = WSRPUtils.getStateOrNullFor(exportedPortalPC);

               //get the exportPortletData
               ExportPortletData exportPortletData = exportManager.createExportPortletData(exportContext, portletHandle, portletState);

               //Create the exportedPortlet
               byte[] exportPortletBytes = exportManager.encodeExportPortletData(exportContext, exportPortletData);
               ExportedPortlet exportedPortlet = WSRPTypeFactory.createExportedPortlet(portletHandle, exportPortletBytes);
               exportedPortlets.add(exportedPortlet);
View Full Code Here

         {
            try
            {
               byte[] portletData = importPortlet.getExportData();

               ExportPortletData exportPortletData;
               if (lifeTime != null)
               {
                  long currentTime = toLongDate(lifeTime.getCurrentTime());
                  long terminationTime = toLongDate(lifeTime.getTerminationTime());
                  long refreshDuration = lifeTime.getRefreshDuration().getTimeInMillis(lifeTime.getCurrentTime().toGregorianCalendar());
                  exportPortletData = exportManager.createExportPortletData(exportContext, currentTime, terminationTime, refreshDuration, portletData);
               }
               else
               {
                  exportPortletData = exportManager.createExportPortletData(exportContext, -1, -1, -1, portletData);
               }

               String portletHandle = exportPortletData.getPortletHandle();
               byte[] portletState = exportPortletData.getPortletState();

               PortletContext pc = WSRPTypeFactory.createPortletContext(portletHandle, portletState);
               org.gatein.pc.api.PortletContext pcPortletContext = WSRPUtils.convertToPortalPortletContext(pc);

               org.gatein.pc.api.PortletContext cpc = producer.getPortletInvoker().importPortlet(PortletStateType.OPAQUE, pcPortletContext);
View Full Code Here

               {
                  WSRP2ExceptionFactory.throwWSException(InvalidHandle.class, "Could not find a portlet with handle " + portletHandle + " in the producer", null);
               }

               //get the exportPortletData
               ExportPortletData exportPortletData = producer.getExportManager().createExportPortletData(exportContext, portletHandle, portletState);

               //Create the exportedPortlet
               byte[] exportPortletBytes = producer.getExportManager().encodeExportPortletData(exportContext, exportPortletData);
               ExportedPortlet exportedPortlet = WSRPTypeFactory.createExportedPortlet(portletHandle, exportPortletData.encodeAsBytes());
               exportedPortlets.add(exportedPortlet);
            }

            catch (Exception e)
            {
View Full Code Here

         {
            try
            {
               byte[] portletData = importPortlet.getExportData();

               ExportPortletData exportPortletData;
               if (lifeTime != null)
               {
                  long currentTime = toLongDate(lifeTime.getCurrentTime());
                  long terminationTime = toLongDate(lifeTime.getTerminationTime());
                  long refreshDuration = lifeTime.getRefreshDuration().getTimeInMillis(lifeTime.getCurrentTime().toGregorianCalendar());
                  exportPortletData = producer.getExportManager().createExportPortletData(exportContext, currentTime, terminationTime, refreshDuration, portletData);
               }
               else
               {
                  exportPortletData = producer.getExportManager().createExportPortletData(exportContext, -1, -1, -1, portletData);
               }

               String portletHandle = exportPortletData.getPortletHandle();
               byte[] portletState = exportPortletData.getPortletState();

               PortletContext pc = WSRPTypeFactory.createPortletContext(portletHandle, portletState);
               org.gatein.pc.api.PortletContext pcPortletContext = WSRPUtils.convertToPortalPortletContext(pc);

               org.gatein.pc.api.PortletContext cpc = producer.getPortletInvoker().importPortlet(PortletStateType.OPAQUE, pcPortletContext);
View Full Code Here

   }

   public ExportPortletData createExportPortletData(ExportContext exportContextData, String portletHandle,
                                                    byte[] portletState) throws UnsupportedEncodingException
   {
      return new ExportPortletData(portletHandle, portletState);
   }
View Full Code Here

TOP

Related Classes of org.gatein.exports.data.ExportPortletData

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.