Package org.jboss.portal.portlet.info

Examples of org.jboss.portal.portlet.info.PortletInfo


   public MimeResponseImpl(PortletInvocation invocation, PortletRequestImpl preq)
   {
      super(invocation, preq);

      // Configure expiration value
      PortletInfo info = preq.container.getInfo();

      // 0 means no buffering - we say no buffering
      this.bufferSize = 0;
      this.contentTypeSet = false;
      this.responseContent = new ContentBuffer();
View Full Code Here


            cacheControl.isPublicScope() ? CacheScope.PUBLIC : CacheScope.PRIVATE,
            cacheControl.getETag());
      }
      else
      {
         PortletInfo info = preq.container.getInfo();
         CacheInfo cacheInfo = info.getCache();
         cc = new org.jboss.portal.portlet.cache.CacheControl(cacheInfo.getExpirationSecs(), CacheScope.PRIVATE, null);
      }

      //
      if (cacheControl != null && cacheControl.useCachedContent())
View Full Code Here

   public CacheControl getCacheControl()
   {
      if (cacheControl == null)
      {
         PortletInfo info = preq.container.getInfo();
         CacheInfo cacheInfo = info.getCache();
         cacheControl = new CacheControlImpl(cacheInfo.getExpirationSecs(), CacheScope.PRIVATE);
      }
      return cacheControl;
   }
View Full Code Here

            EventProduction eventProduction = phaseContext.producedEvents.removeFirst();
            PortletWindowEvent producedEvent = eventProduction.getProducedEvent();

            //
            String producerId = producedEvent.getWindowId();
            PortletInfo producerPortletInfo = context.getPortletInfo(producerId);

            //
            if (producerPortletInfo == null)
            {
               log.trace("Cannot deliver event " + producedEvent +" because the producer does not have portlet info");
               safeInvoker.eventDiscarded(eventCC, phaseContext, producedEvent, EventControllerContext.EVENT_PRODUCER_INFO_NOT_AVAILABLE);
               continue;
            }

            //
            if (!controller.getDistributeNonProduceableEvents())
            {
               if (!producerPortletInfo.getEventing().getProducedEvents().containsKey(producedEvent.getName()))
               {
                  log.trace("Cannot deliver event " + producedEvent +" because the producer of the event does not produce the event name");
                  safeInvoker.eventDiscarded(eventCC, phaseContext, producedEvent, EventControllerContext.PORTLET_DOES_NOT_CONSUME_EVENT);
                  continue;
               }
            }

            // Apply produced event quota if necessary
            int producedEventThreshold = controller.getProducedEventThreshold();
            if (producedEventThreshold >= 0)
            {
               if (phaseContext.producedEventSize + 1 > producedEventThreshold)
               {
                  log.trace("Event distribution interrupted because the maximum number of produced event is reached");
                  eventDistributionStatus = PortletResponse.PRODUCED_EVENT_FLOODED;
                  safeInvoker.eventDiscarded(eventCC, phaseContext, producedEvent, EventControllerContext.PRODUCED_EVENT_FLOODED);
                  break;
               }
            }

            // Give control to the event context
            phaseContext.mode = EventPhaseContextImpl.READ_WRITE_MODE;
            if (!safeInvoker.eventProduced(eventCC, phaseContext, eventProduction.getConsumedEvent(), producedEvent))
            {
               continue;
            }

            // Perform flow control
            if (phaseContext.mode == EventPhaseContextImpl.INTERRUPTED_MODE)
            {
               log.trace("Event distribution interrupted by controller context");
               eventDistributionStatus = PortletResponse.INTERRUPTED;
               break;
            }

            //
            while (phaseContext.toConsumeEvents.size() > 0)
            {
               PortletWindowEvent toConsumeEvent = phaseContext.toConsumeEvents.removeFirst();
               String consumedId = toConsumeEvent.getWindowId();

               //
               PortletInfo consumerPortletInfo = context.getPortletInfo(consumedId);
               if (consumerPortletInfo == null)
               {
                  log.trace("Cannot deliver event " + producedEvent +" because the consumer of the event does not have a portlet info");
                  safeInvoker.eventDiscarded(eventCC, phaseContext, toConsumeEvent, EventControllerContext.EVENT_CONSUMER_INFO_NOT_AVAILABLE);
                  continue;
               }

               //
               if (!controller.getDistributeNonConsumableEvents())
               {
                  if (!consumerPortletInfo.getEventing().getConsumedEvents().containsKey(toConsumeEvent.getName()))
                  {
                     log.trace("Cannot deliver event " + producedEvent +" because the consumer of the event does not accept the event name");
                     safeInvoker.eventDiscarded(eventCC, phaseContext, toConsumeEvent, EventControllerContext.PORTLET_DOES_NOT_CONSUME_EVENT);
                     continue;
                  }
View Full Code Here

      return windows.get(portletWindowId);
   }

   public Map<String, String[]> getPortletPublicNavigationalState(String portletWindowId)
   {
      PortletInfo info = context.portletControllerContext.getPortletInfo(portletWindowId);

      //
      if (info != null)
      {
         ParameterMap publicNavigationalState = new ParameterMap();
         for (ParameterInfo parameterInfo : info.getNavigation().getPublicParameters())
         {
            String[] parameterValue = page.get(parameterInfo.getName());

            //
            if (parameterValue != null)
View Full Code Here

            QName eventName = eventInvocation.getName();
            String containerId = container.getId();
            String applicationId = application.getId();

            //
            PortletInfo info = container.getInfo();
            EventingInfo eventingInfo = info.getEventing();
            Map<QName, ? extends EventInfo> consumedEventInfos = eventingInfo.getConsumedEvents();
            EventInfo eventInfo = consumedEventInfos.get(eventName);

            //
            if (trace)
View Full Code Here

   public MimeResponseImpl(PortletInvocation invocation, PortletRequestImpl preq)
   {
      super(invocation, preq);

      // Configure expiration value
      PortletInfo info = preq.container.getInfo();

      // 0 means no buffering - we say no buffering
      this.bufferSize = 0;
      this.contentTypeSet = false;
      this.responseContent = new ContentBuffer();
View Full Code Here

            cacheControl.isPublicScope() ? CacheScope.PUBLIC : CacheScope.PRIVATE,
            cacheControl.getETag());
      }
      else
      {
         PortletInfo info = preq.container.getInfo();
         CacheInfo cacheInfo = info.getCache();
         cc = new org.jboss.portal.portlet.cache.CacheControl(cacheInfo.getExpirationSecs(), CacheScope.PRIVATE, null);
      }

      //
      if (cacheControl != null && cacheControl.useCachedContent())
View Full Code Here

   public CacheControl getCacheControl()
   {
      if (cacheControl == null)
      {
         PortletInfo info = preq.container.getInfo();
         CacheInfo cacheInfo = info.getCache();
         cacheControl = new CacheControlImpl(cacheInfo.getExpirationSecs(), CacheScope.PRIVATE);
      }
      return cacheControl;
   }
View Full Code Here

      {
         throw new IllegalStateException("The page navigational state is not modifiable");
      }

      //
      PortletInfo info = context.portletControllerContext.getPortletInfo(portletWindowId);

      //
      if (info != null)
      {
         NavigationInfo navigationInfo = info.getNavigation();
         for (Map.Entry<String, String[]> entry : update.entrySet())
         {
            String id = entry.getKey();

            //
View Full Code Here

TOP

Related Classes of org.jboss.portal.portlet.info.PortletInfo

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.