Package org.apache.tapestry.asset

Examples of org.apache.tapestry.asset.AssetFactory


        IRequestCycle cycle = newMock(IRequestCycle.class);
        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);

        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();

        List errorPages = new ArrayList();

        List parts = new ArrayList();
View Full Code Here


        ILink link = newMock(ILink.class);

        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();

        List errorPages = new ArrayList();

        List parts = new ArrayList();
View Full Code Here

        Location l = newLocation();

        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();

        List errorPages = new ArrayList();

        List parts = new ArrayList();
View Full Code Here

        IComponentSpecification spec = new ComponentSpecification();
        ClasspathResource base = new ClasspathResource(new DefaultClassResolver(), "/org/apache/tapestry/resolver/MyComponent.jwc");
        spec.setSpecificationLocation(base);
        spec.setComponentClassName("org.apache.tapestry.resolver.MyComponent");

        AssetFactory classpathFactory = newMock(AssetFactory.class);
        AssetFactory contextFactory = newMock(AssetFactory.class);
        Resource contextRoot = newMock(Resource.class);
        Resource webinfLocation = newMock(Resource.class);
        Resource webinfAppLocation = newMock(Resource.class);

        ComponentResourceResolverImpl resolver = new ComponentResourceResolverImpl();
        resolver.setApplicationId("foo");
        resolver.setClasspathAssetFactory(classpathFactory);
        resolver.setContextAssetFactory(contextFactory);
        resolver.setContextRoot(contextRoot);
       
        expect(contextRoot.getRelativeResource("WEB-INF/")).andReturn(webinfLocation);
        expect(webinfLocation.getRelativeResource("foo/")).andReturn(webinfAppLocation);

        expect(comp.getSpecification()).andReturn(spec).anyTimes();
        expect(comp.getNamespace()).andReturn(namespace);
        expect(namespace.getPropertyValue("org.apache.tapestry.component-class-packages")).andReturn("org.apache.tapestry.resolver");

        Location l = newMock(Location.class);
        IAsset asset = newMock(IAsset.class);
        Resource resource = newMock(Resource.class);
       
        expect(contextFactory.assetExists(spec, webinfAppLocation, "MyComponent.html", null)).andReturn(true);
        expect(comp.getLocation()).andReturn(l);
        expect(contextFactory.createAsset(webinfAppLocation, spec, "MyComponent.html", null, l)).andReturn(asset);
        expect(asset.getResourceLocation()).andReturn(resource);

        replay();

        resolver.initializeService();
View Full Code Here

        IComponentSpecification spec = new ComponentSpecification();
        ClasspathResource base = new ClasspathResource(new DefaultClassResolver(), "/org/apache/tapestry/resolver/MyComponent.jwc");
        spec.setSpecificationLocation(base);
        spec.setComponentClassName("org.apache.tapestry.resolver.MyComponent");

        AssetFactory classpathFactory = newMock(AssetFactory.class);
        AssetFactory contextFactory = newMock(AssetFactory.class);
        Resource contextRoot = newMock(Resource.class);
        Resource webinfLocation = newMock(Resource.class);
        Resource webinfAppLocation = newMock(Resource.class);

        ComponentResourceResolverImpl resolver = new ComponentResourceResolverImpl();
        resolver.setApplicationId("foo");
        resolver.setClasspathAssetFactory(classpathFactory);
        resolver.setContextAssetFactory(contextFactory);
        resolver.setContextRoot(contextRoot);

        expect(contextRoot.getRelativeResource("WEB-INF/")).andReturn(webinfLocation);
        expect(webinfLocation.getRelativeResource("foo/")).andReturn(webinfAppLocation);

        expect(comp.getSpecification()).andReturn(spec).anyTimes();
        expect(comp.getNamespace()).andReturn(namespace);
        expect(namespace.getPropertyValue("org.apache.tapestry.component-class-packages")).andReturn("org.apache.tapestry.resolver");

        Location l = newMock(Location.class);
        IAsset asset = newMock(IAsset.class);
        Resource resource = newMock(Resource.class);

        expect(contextFactory.assetExists(spec, webinfAppLocation, "MyComponent.html", null)).andReturn(false);
        expect(contextFactory.assetExists(spec, webinfLocation, "MyComponent.html", null)).andReturn(true);
        expect(comp.getLocation()).andReturn(l);
        expect(contextFactory.createAsset(webinfLocation, spec, "MyComponent.html", null, l)).andReturn(asset);
        expect(asset.getResourceLocation()).andReturn(resource);

        replay();

        resolver.initializeService();
View Full Code Here

        IComponentSpecification spec = new ComponentSpecification();
        ClasspathResource base = new ClasspathResource(new DefaultClassResolver(), "/org/apache/tapestry/resolver/MyComponent.jwc");
        spec.setSpecificationLocation(base);
        spec.setComponentClassName("org.apache.tapestry.resolver.MyComponent");

        AssetFactory classpathFactory = newMock(AssetFactory.class);
        AssetFactory contextFactory = newMock(AssetFactory.class);
        Resource contextRoot = newMock(Resource.class);
        Resource webinfLocation = newMock(Resource.class);
        Resource webinfAppLocation = newMock(Resource.class);

        ComponentResourceResolverImpl resolver = new ComponentResourceResolverImpl();
        resolver.setApplicationId("foo");
        resolver.setClasspathAssetFactory(classpathFactory);
        resolver.setContextAssetFactory(contextFactory);
        resolver.setContextRoot(contextRoot);

        expect(contextRoot.getRelativeResource("WEB-INF/")).andReturn(webinfLocation);
        expect(webinfLocation.getRelativeResource("foo/")).andReturn(webinfAppLocation);

        expect(comp.getSpecification()).andReturn(spec).anyTimes();
        expect(comp.getNamespace()).andReturn(namespace);
        expect(namespace.getPropertyValue("org.apache.tapestry.component-class-packages")).andReturn("org.apache.tapestry.resolver");

        Location l = newMock(Location.class);
        IAsset asset = newMock(IAsset.class);
        Resource resource = newMock(Resource.class);

        expect(contextFactory.assetExists(spec, webinfAppLocation, "MyComponent.html", null)).andReturn(false);
        expect(contextFactory.assetExists(spec, webinfLocation, "MyComponent.html", null)).andReturn(false);
        expect(classpathFactory.assetExists(spec, base, "MyComponent.html", null)).andReturn(true);

        expect(comp.getLocation()).andReturn(l);
        expect(classpathFactory.createAsset(base, spec, "MyComponent.html", null, l)).andReturn(asset);
        expect(asset.getResourceLocation()).andReturn(resource);
View Full Code Here

        IRequestCycle cycle = newMock(IRequestCycle.class);
        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);

        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();

        List errorPages = new ArrayList();

        List parts = new ArrayList();
View Full Code Here

        ILink link = newMock(ILink.class);

        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();

        List errorPages = new ArrayList();

        List parts = new ArrayList();
View Full Code Here

        Location l = newLocation();
       
        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();

        List errorPages = new ArrayList();

        List parts = new ArrayList();
View Full Code Here

        _writer.reset();
    }

    public void testGetLocation()
    {
        AssetFactory factory = newAssetFactory();
        Location l = newLocation();

        replay();

        PageRenderSupportImpl prs = new PageRenderSupportImpl(factory, "", l, newBuilder(null));
View Full Code Here

TOP

Related Classes of org.apache.tapestry.asset.AssetFactory

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.