Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ApplicationGlobals


        // This is temporary, since most of the code still gets the
        // specification from the servlet --- in fact, has to downcase
        // RequestContext.getServlet() to do so.

        __CLOVER_3_0.S[503]++;ApplicationGlobals ag =
            (ApplicationGlobals) _registry.getService(
                "tapestry.globals.ApplicationGlobals",
                ApplicationGlobals.class);

        __CLOVER_3_0.S[504]++;_specification = ag.getSpecification();

        __CLOVER_3_0.S[505]++;_requestServicer =
            (RequestServicer) _registry.getService(
                "tapestry.request.RequestServicerPipeline",
                RequestServicer.class);
View Full Code Here


        _localizationSetter = _registry.getService("LocalizationSetter", LocalizationSetter.class);

        _invocationMap = _registry.getObject(ComponentInvocationMap.class, null);

        ApplicationGlobals globals = _registry.getObject(ApplicationGlobals.class, null);

        globals.store(new PageTesterContext(contextPath));

        Map<Class, ComponentInvoker> map = newMap();
        map.put(PageLinkTarget.class, new PageLinkInvoker(_registry));
        map.put(ActionLinkTarget.class, new ActionLinkInvoker(_registry, this, _invocationMap));
View Full Code Here

        _localizationSetter = _registry.getService(
                "tapestry.internal.LocalizationSetter",
                LocalizationSetter.class);

        ApplicationGlobals globals = _registry.getObject(
                "infrastructure:ApplicationGlobals",
                ApplicationGlobals.class);

        globals.store(new ContextForPageTester(_contextPath));

        buildInvokersRegistry();
    }
View Full Code Here

        Resource expectedResource = new WebContextResource(context,
                "/WEB-INF/myportlet/myportlet.application");

        ISpecificationParser parser = newParser(expectedResource, specification);

        ApplicationGlobals globals = newGlobals();

        globals.storeSpecification(specification);

        replay();

        PortletApplicationSpecificationInitializer init = new PortletApplicationSpecificationInitializer();
        init.setContext(context);
View Full Code Here

        Resource expectedResource = new WebContextResource(context,
                "/WEB-INF/myportlet.application");

        ISpecificationParser parser = newParser(expectedResource, specification);

        ApplicationGlobals globals = newGlobals();

        globals.storeSpecification(specification);

        replay();

        PortletApplicationSpecificationInitializer init = new PortletApplicationSpecificationInitializer();
        init.setContext(context);
View Full Code Here

       
        expect(context.getResource("/WEB-INF/myportlet.application")).andReturn(null);
       
        replay();

        ApplicationGlobals globals = new ApplicationGlobalsImpl();

        PortletApplicationSpecificationInitializer init = new PortletApplicationSpecificationInitializer();
        init.setContext(context);
        init.setGlobals(globals);

        init.initialize(config);

        verify();

        IApplicationSpecification spec = globals.getSpecification();

        assertEquals("myportlet", spec.getName());
        assertEquals(new WebContextResource(context, "/WEB-INF/myportlet.application"), spec
                .getSpecificationLocation());
    }
View Full Code Here

       
        replay();
       
        servlet.init(config);
       
        ApplicationGlobals globals = new ApplicationGlobalsImpl();
       
        WebContextInitializer initializer = new WebContextInitializer();
       
        initializer.setGlobals(globals);
       
        initializer.initialize(servlet);
       
        verify();
       
        assertSame(servletContext, globals.getServletContext());
        assertNotNull(globals.getWebContext());
    }
View Full Code Here

        expect(config.getInitParameter(ApplicationSpecificationInitializer.APP_SPEC_PATH_PARAM))
        .andReturn(appSpecResource.getPath());
       
        expect(parser.parseApplicationSpecification(appSpecResource)).andReturn(as);
       
        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replay();

        servlet.init(config);

        // The real ApplicationServlet will build a Registry and, indirectly, invoke this.

        i.initialize(servlet);

        assertNotNull(ag.getActivator());
        assertSame(as, ag.getSpecification());

        verify();
    }
View Full Code Here

       
        expect(context.getResource(r.getPath())).andReturn(null);
       
        expect(parser.parseApplicationSpecification(appSpecResource)).andReturn(as);
       
        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replay();
       
        servlet.init(config);
       
        // The real ApplicationServlet will build a Registry and, indirectly, invoke this.
       
        i.initialize(servlet);
       
        assertNotNull(ag.getActivator());
        assertSame(as, ag.getSpecification());

        verify();
    }
View Full Code Here

        i.setParser(parser);

        expect(parser.parseApplicationSpecification(r)).andReturn(as);

        ApplicationGlobals ag = new ApplicationGlobalsImpl();

        i.setGlobals(ag);

        replay();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.ApplicationGlobals

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.