Examples of FederatingPortletInvoker


Examples of org.gatein.pc.federation.FederatingPortletInvoker

   private List<Application> createApplicationsFromPortlets(boolean remote) throws PortletInvokerException
   {
      ExoContainer manager = ExoContainerContext.getCurrentContainer();

      FederatingPortletInvoker portletInvoker =
         (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
      Set<Portlet> portlets = remote ? portletInvoker.getRemotePortlets() : portletInvoker.getLocalPortlets();
      List<Application> applications = new ArrayList<Application>(portlets.size());
      for (Portlet portlet : portlets)
      {
         PortletInfo info = portlet.getInfo();
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

   }

   private void startConsumers()
   {
      // retrieve federating portlet invoker from container
      FederatingPortletInvoker federatingPortletInvoker =
         (FederatingPortletInvoker)container.getComponentInstanceOfType(PortletInvoker.class);

      try
      {
         consumerRegistry = new JCRConsumerRegistry(container);
         consumerRegistry.setFederatingPortletInvoker(federatingPortletInvoker);
         consumerRegistry.setSessionEventBroadcaster(new SimpleSessionEventBroadcaster());
         consumerRegistry.start();

         // set up a NullInvokerHandler so that when a remote producer is queried, we can start it if needed
         ActivatingNullInvokerHandler handler = new ActivatingNullInvokerHandler();
         handler.setConsumerRegistry(consumerRegistry);
         federatingPortletInvoker.setNullInvokerHandler(handler);
      }
      catch (Exception e)
      {
         throw new RuntimeException("Couldn't start WSRP consumers registry.", e);
      }
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

        portletApplicationRegistry.setSchemaValidated(validated);

        // Container Stack
        ContainerPortletDispatcher portletContainerDispatcher = new ContainerPortletDispatcher();

        FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();

        EventPayloadInterceptor eventPayloadInterceptor = new EventPayloadInterceptor();
        eventPayloadInterceptor.setNext(portletContainerDispatcher);
        RequestAttributeConversationInterceptor requestAttributeConversationInterceptor = new RequestAttributeConversationInterceptor();
        requestAttributeConversationInterceptor.setNext(eventPayloadInterceptor);
        CCPPInterceptor ccppInterceptor = new CCPPInterceptor();
        ccppInterceptor.setNext(requestAttributeConversationInterceptor);
        BridgeInterceptor bridgepInterceptor = new BridgeInterceptor();
        bridgepInterceptor.setNext(ccppInterceptor);
        ProducerCacheInterceptor producerCacheInterceptor = new ProducerCacheInterceptor();
        producerCacheInterceptor.setNext(bridgepInterceptor);

        // SessionInvalidatorInterceptor is not needed as we have cross-context logout at WCI level
        // SessionInvalidatorInterceptor sessionInvalidatorInterceptor = new SessionInvalidatorInterceptor();
        // sessionInvalidatorInterceptor.setNext(producerCacheInterceptor);
        ContextDispatcherInterceptor contextDispatcherInterceptor = new ContextDispatcherInterceptor();
        contextDispatcherInterceptor.setNext(producerCacheInterceptor);
        PortletLifecyclePhaseInterceptor portletLifecyclePhaseInterceptor = new PortletLifecyclePhaseInterceptor();
        portletLifecyclePhaseInterceptor.setNext(contextDispatcherInterceptor);
        SecureTransportInterceptor secureTransportInterceptor = new SecureTransportInterceptor();
        secureTransportInterceptor.setNext(portletLifecyclePhaseInterceptor);
        ValveInterceptor valveInterceptor = new ValveInterceptor();
        valveInterceptor.setPortletApplicationRegistry(portletApplicationRegistry);
        valveInterceptor.setNext(secureTransportInterceptor);

        // The portlet container invoker continued
        containerPortletInvoker.setNext(valveInterceptor);

        // register container invoker so that WSRP can use it, WSRP uses its own ProducerPortletInvoker
        container.registerComponentInstance(ContainerPortletInvoker.class, containerPortletInvoker);

        // The producer persistence manager
        PortletStatePersistenceManagerService producerPersistenceManager = new PortletStatePersistenceManagerService();

        // The producer state management policy
        StateManagementPolicyService producerStateManagementPolicy = new StateManagementPolicyService();
        producerStateManagementPolicy.setPersistLocally(false);

        // The producer state converter
        StateConverter producerStateConverter = new ExoStateConverter();

        // The producer portlet invoker
        ProducerPortletInvoker producerPortletInvoker = new ProducerPortletInvoker();
        producerPortletInvoker.setNext(containerPortletInvoker);
        producerPortletInvoker.setPersistenceManager(producerPersistenceManager);
        producerPortletInvoker.setStateManagementPolicy(producerStateManagementPolicy);
        producerPortletInvoker.setStateConverter(producerStateConverter);

        // register the producer portlet invoker if it hasn't been already
        if (!federatingPortletInvoker.isResolved(PortletInvoker.LOCAL_PORTLET_INVOKER_ID)) {
            federatingPortletInvoker.registerInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, producerPortletInvoker);
            producerPortletInvokerSet = true;
        }

        // The consumer portlet invoker
        PortletCustomizationInterceptor portletCustomizationInterceptor = new PortletCustomizationInterceptor();
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

           // The current instance did not register the producerPortletInvoker so we have nothing to do or we are not in
           // developing mode
           return;
        }
        final ExoContainer topContainer = ExoContainerContext.getTopContainer();
        FederatingPortletInvoker federatingPortletInvoker = (FederatingPortletInvoker) topContainer
                .getComponentInstanceOfType(FederatingPortletInvoker.class);
        if (federatingPortletInvoker != null && federatingPortletInvoker.isResolved(PortletInvoker.LOCAL_PORTLET_INVOKER_ID)) {
           // The current instance registered the producerPortletInvoker so we have to unregister it
           federatingPortletInvoker.unregisterInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID);
        }
    }
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

{
   private transient ConsumerRegistrySPI consumerRegistry;

   public FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException
   {
      FederatingPortletInvoker registryInvoker = consumerRegistry.getFederatingPortletInvoker();
      if (registryInvoker != callingInvoker)
      {
         throw new IllegalArgumentException("Trying to use a ConsumerRegistry already linked to a different FederatingPortletInvoker ("
            + registryInvoker + ") than the specified one (" + callingInvoker + ")");
      }
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

    }

    @Override
    public UIPortletManagement.PortletExtra read(PortletContext output) throws Exception {
        ExoContainer manager = ExoContainerContext.getCurrentContainer();
        FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker) manager
                .getComponentInstance(FederatingPortletInvoker.class);
        Portlet portlet = portletInvoker.getPortlet(output);
        return new UIPortletManagement.PortletExtra(portlet);
    }
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

    private void initWebApps(String type) throws Exception {
        webApps = new LinkedList<WebApp>(); // LinkedList is more appropriate here since we add lots of elements and sort
        // julien : who said that LinkedList is appropriate for sorting ?
        ExoContainer manager = ExoContainerContext.getCurrentContainer();

        FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker) manager
                .getComponentInstance(FederatingPortletInvoker.class);
        boolean remote = REMOTE.equals(type);

        Set<Portlet> portlets;
        if (!remote) {
            portlets = portletInvoker.getLocalPortlets();
        } else {
            portlets = portletInvoker.getRemotePortlets();
        }

        if (portlets == null || portlets.isEmpty()) {
            return;
        }
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

    }

    private List<Application> createApplicationsFromPortlets(boolean remote) throws PortletInvokerException {
        ExoContainer manager = ExoContainerContext.getCurrentContainer();

        FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker) manager
                .getComponentInstance(FederatingPortletInvoker.class);
        Set<Portlet> portlets = remote ? portletInvoker.getRemotePortlets() : portletInvoker.getLocalPortlets();
        List<Application> applications = new ArrayList<Application>(portlets.size());
        for (Portlet portlet : portlets) {
            PortletInfo info = portlet.getInfo();

            LocalizedString descriptionLS = info.getMeta().getMetaValue(MetaInfo.DESCRIPTION);
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

   @Override
   public UIPortletManagement.PortletExtra read(PortletContext output) throws Exception
   {
      ExoContainer manager = ExoContainerContext.getCurrentContainer();
      FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
      Portlet portlet = portletInvoker.getPortlet(output);
      return new UIPortletManagement.PortletExtra(portlet);
   }
View Full Code Here

Examples of org.gatein.pc.federation.FederatingPortletInvoker

   {
      webApps = new LinkedList<WebApp>(); // LinkedList is more appropriate here since we add lots of elements and sort
      // julien : who said that LinkedList is appropriate for sorting ?
      ExoContainer manager = ExoContainerContext.getCurrentContainer();

      FederatingPortletInvoker portletInvoker =
         (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
      boolean remote = REMOTE.equals(type);

      Set<Portlet> portlets;
      if (!remote)
      {
         portlets = portletInvoker.getLocalPortlets();
      }
      else
      {
         portlets = portletInvoker.getRemotePortlets();
      }

      if (portlets == null || portlets.isEmpty())
      {
         return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.