Package org.gatein.pc.portlet.container

Examples of org.gatein.pc.portlet.container.ContainerPortletInvoker


         * is now.
         */
        container.registerComponentInstance(PortletConfigRegistry.class, new PortletConfigRegistry());

        // The portlet container invoker used by producer to dispatch to portlets
        ContainerPortletInvoker containerPortletInvoker = new ContainerPortletInvoker();

        // The portlet application deployer
        portletApplicationRegistry = new ExoPortletApplicationDeployer();
        portletApplicationRegistry.setContainerPortletInvoker(containerPortletInvoker);

        // activate schema validation for portlet.xml if needed
        String validation = PropertyManager.getProperty("gatein.portlet.validation");
        boolean validated = validation == null || "true".equals(validation.trim().toLowerCase());
        log.debug("portlet xml validation is " + (validated ? "enabled" : " disabled"));
        portletApplicationRegistry.setSchemaValidated(validated);

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

        // Check if we already have a federating portlet invoker
        final ExoContainer topContainer = ExoContainerContext.getTopContainer();
        FederatingPortletInvoker federatingPortletInvoker = (FederatingPortletInvoker) topContainer
                .getComponentInstanceOfType(FederatingPortletInvoker.class);
        if (federatingPortletInvoker == null) {
            federatingPortletInvoker = new FederatingPortletInvokerService();
            topContainer.registerComponentInstance(FederatingPortletInvoker.class, federatingPortletInvoker);
        }

        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 sessionInvalidatorInterceptor = new SessionInvalidatorInterceptor();
        sessionInvalidatorInterceptor.setNext(producerCacheInterceptor);
        ContextDispatcherInterceptor contextDispatcherInterceptor = new ContextDispatcherInterceptor();
        contextDispatcherInterceptor.setNext(sessionInvalidatorInterceptor);
        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
View Full Code Here

TOP

Related Classes of org.gatein.pc.portlet.container.ContainerPortletInvoker

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.