Package org.apache.tapestry.ioc

Examples of org.apache.tapestry.ioc.Resource.toURL()


        byte[] downloaded = readContent(url);

        Resource classpathResource = new ClasspathResource(
                "org/apache/tapestry/integration/app1/pages/tapestry-button.png");

        byte[] actual = readContent(classpathResource.toURL());

        assertEquals(downloaded, actual);
    }

    @Test
View Full Code Here


        replay();

        Resource r = new ContextResource(context, "foo/Bar.txt");

        assertSame(r.toURL(), url);

        verify();
    }

    @Test
View Full Code Here

        byte[] downloaded = readContent(url);

        Resource classpathResource = new ClasspathResource(
                "org/apache/tapestry/integration/app1/pages/nested/tapestry-button.png");

        byte[] actual = readContent(classpathResource.toURL());

        assertEquals(downloaded, actual);
    }

    /**
 
View Full Code Here

        byte[] downloaded = readContent(url);

        Resource classpathResource = new ClasspathResource(
                "org/apache/tapestry/integration/app1/pages/tapestry-button.png");

        byte[] actual = readContent(classpathResource.toURL());

        assertEquals(downloaded, actual);
    }

    @Test
View Full Code Here

        // No line number? then nothing more to render.

        if (line <= 0)
            return;

        URL url = r.toURL();

        if (url == null)
            return;

        int start = line - RANGE;
View Full Code Here

        // No line number? then nothing more to render.

        if (line <= 0)
            return;

        URL url = r.toURL();

        if (url == null)
            return;

        int start = line - RANGE;
View Full Code Here

        Resource resource = findResourceAndValidateDigest(response, resourcePath);

        if (resource == null)
            return true;

        URL url = resource.toURL();

        if (url == null)
        {
            response.sendError(HttpServletResponse.SC_NOT_FOUND, ServicesMessages
                    .assetDoesNotExist(resource));
View Full Code Here

        replay();

        Resource r = new ContextResource(context, "foo/Bar.txt");

        assertSame(r.toURL(), url);

        verify();
    }

    @Test
View Full Code Here

        replay();

        Resource r = new ContextResource(context, "foo/Bar.txt");

        assertEquals(r.toURL(), f.toURL());

        verify();
    }

    @Test
View Full Code Here

    {
        final Resource appCatalogResource = _rootResource.forFile(_appCatalog);

        // If the application catalog exists, set it up as the root, otherwise use null.

        MessagesBundle appCatalogBundle = appCatalogResource.toURL() == null ? null
                                          : new MessagesBundle()
        {
            public Resource getBaseResource()
            {
                return appCatalogResource;
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.