Package org.gatein.pc.api

Examples of org.gatein.pc.api.Portlet


    * @throws PortletInvokerException any portlet invoker exception
    */
   private void getPropertiesFromMetaData(PortletContext portletContext, PropertyMap props) throws PortletInvokerException
   {
      //
      Portlet portlet = super.getPortlet(portletContext);

      // The prefs info
      PreferencesInfo prefs = portlet.getInfo().getPreferences();

      // Collect missing or read only properties from the referenced portlet
      Set<String> keys = new HashSet<String>();
      for (String key : prefs.getKeys())
      {
View Full Code Here


      public Portlet getPortlet() throws PortletInvokerException
      {
         if (portlet == null)
         {
            Portlet producerPortlet = ConsumerPortletInvoker.super.getPortlet(producerPortletContext);

            //
            if (stateId == null)
            {
               portlet = producerPortlet;
View Full Code Here

   public Portlet getPortlet(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "PortletContext");

      Portlet portlet = producerInfo.getPortlet(portletContext);

      if (portlet == null)
      {
         throw new NoSuchPortletException(portletContext.getId());
      }
View Full Code Here

      // check if we need to refresh
      boolean justRefreshed = refresh(false);

      // First try caches if caches are still valid or we just refreshed
      Portlet portlet = getPortletFromCaches(portletHandle, justRefreshed);

      if (portlet != null) // we had a match in cache, return it
      {
         log.debug("Portlet was cached");
         return portlet;
View Full Code Here

      }
   }

   private Portlet getPortletFromCaches(String portletHandle, boolean justRefreshed)
   {
      Portlet portlet = null;

      if (justRefreshed || (useCache() && !isCacheExpired()))
      {
         log.debug("Trying cached POPs");
View Full Code Here

               if (registration.knows(pcContext))
               {
                  try
                  {
                     // retrieve initial context from portlet info and get description from it
                     Portlet portlet = producer.getPortletWith(pcContext, registration);
                     PortletInfo info = portlet.getInfo();
                     org.gatein.pc.api.PortletContext original = org.gatein.pc.api.PortletContext.createPortletContext(info.getApplicationName(), info.getName());
                     return getPortletDescription(original.getId(), desiredLocales);
                  }
                  catch (Exception e)
                  {
View Full Code Here

         RegistrationLocal.setRegistration(registration);

         UserContext userContext = getPortletPropertyDescription.getUserContext();
         checkUserAuthorization(userContext);

         Portlet portlet = getPortletFrom(portletContext, registration);
         PortletInfo info = portlet.getInfo();
         PreferencesInfo prefsInfo = info.getPreferences();

         List<PropertyDescription> descs = Collections.emptyList();
         if (prefsInfo != null)
         {
View Full Code Here

         {
            properties = producer.getPortletInvoker().getProperties(jbpContext);
         }

         //todo: we need to check that the user can actually modify the properties
         Portlet portlet = getPortletFrom(portletContext, registration);
         PortletInfo info = portlet.getInfo();

         PropertyList result = WSRPTypeFactory.createPropertyList();
         int propertyNb = properties.size();

         if (propertyNb > 0)
View Full Code Here

      }
   }

   private Portlet getPortletFrom(PortletContext portletContext, Registration registration) throws InvalidHandle
   {
      Portlet portlet;
      try
      {
         RegistrationLocal.setRegistration(registration);
         portlet = producer.getPortletInvoker().getPortlet(WSRPUtils.convertToPortalPortletContext(portletContext));
         return portlet;
View Full Code Here

      {
         for (String involvedPortletId : tckPageNavigationalState.getWindowIds())
         {
            try
            {
               Portlet involvedPortlet = portletControllerContext.getPortlet(involvedPortletId);
               involvedPortlets.add(involvedPortlet);
            }
            catch (NoSuchPortletException e)
            {
               // It happen when a portlet becomes unavailable and
View Full Code Here

TOP

Related Classes of org.gatein.pc.api.Portlet

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.