Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.Resource


        return this.getService(TemplateParser.class);
    }

    private synchronized ComponentTemplate parse(String file)
    {
        Resource resource = getResource(file);

        return getParser().parseTemplate(resource);
    }
View Full Code Here


    }

    @Test
    public void just_HTML()
    {
        Resource resource = getResource("justHTML.tml");

        ComponentTemplate template = getParser().parseTemplate(resource);

        assertSame(template.getResource(), resource);
View Full Code Here

    }

    @Test
    public void namespaced_element()
    {
        Resource resource = getResource("namespaced_element.tml");

        ComponentTemplate template = getParser().parseTemplate(resource);

        assertSame(template.getResource(), resource);
View Full Code Here

        this.assetSource = assetSource;
    }

    public Resource findClasspathResourceForPath(String path) throws IOException
    {
        Resource resource = assetSource.resourceForPath(path);

        if (!digestManager.requiresDigest(resource))
            return resource;

        return validateChecksumOfClasspathResource(resource);
View Full Code Here

        // Somehow this code got real ugly, but it's all about preventing NPEs when a resource
        // that should have a digest doesn't.

        boolean valid = false;
        Resource result = resource;

        int lastdotx = file.lastIndexOf('.');

        if (lastdotx > 0)
        {
View Full Code Here

                        // Plastic
                        // doesn't care, and we don't have the tools to dig that information out.

                        Logger logger = loggerSource.getLogger(className);

                        Resource baseResource = new ClasspathResource(parent, PlasticInternalUtils
                                .toClassPath(className));

                        changeTracker.add(baseResource.toURL());

                        if (isRoot)
                        {
                            implementComponentInterface(plasticClass);
                        }
View Full Code Here

    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();

        long lastUpdated = f.lastModified();
        lastUpdated -= lastUpdated % 1000;

        train_getPath(r, PATH);
View Full Code Here

    @Test
    public void properties_for_missing_resource() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        Resource r = mockResource();

        train_getPath(r, PATH);
        train_toURL(r, null);

        train_requiresDigest(generator, PATH, true);
View Full Code Here

    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();

        long lastUpdated = f.lastModified();
        lastUpdated -= lastUpdated % 1000;

        train_getPath(r, PATH);
View Full Code Here

        // Alas, mixing and matching live code with mocks
        ResourceDigestGenerator generator = mockResourceDigestGenerator();
        InvalidationListener listener = mockInvalidationListener();
        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();

        long lastUpdated = f.lastModified();
        lastUpdated -= lastUpdated % 1000;

        train_getPath(r, PATH);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.Resource

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.