Package org.gatein.registration.spi

Examples of org.gatein.registration.spi.RegistrationSPI


   public PortletContext importPortlet(PortletStateType stateType, PortletContext originalPortletContext)
      throws PortletInvokerException, IllegalArgumentException
   {
      // The original portletcontext is the non cloned version and should be one the PC available from the getPortlets operation
      RegistrationSPI registration = getRegistrationAsSPI();

      if (registration != null)
      {
         checkOperationIsAllowed(originalPortletContext, registration, "importPortlet");

         PortletContext newPortletContext = super.importPortlet(stateType, originalPortletContext);

         if (!newPortletContext.getId().equals(originalPortletContext.getId()))
         {
            try
            {
               registration.addPortletContext(newPortletContext);
            }
            catch (RegistrationException e)
            {
               throw new PortletInvokerException("Couldn't add portlet context '" + newPortletContext + "' to registration '" + registration.getRegistrationHandle() + "'", e);
            }
         }

         return newPortletContext;
      }
View Full Code Here

TOP

Related Classes of org.gatein.registration.spi.RegistrationSPI

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.