Package com.volantis.mcs.runtime.packagers

Examples of com.volantis.mcs.runtime.packagers.PackageResources$Asset


        return expand(path, locale);
    }

    public List<Asset> getJavascriptStack()
    {
        Asset messages = assetSource.getAsset(null, "org/apache/tapestry5/tapestry-messages.js", threadLocale
                .getLocale());

        return createStack(javaScriptStack, messages, consoleJavaScript);
    }
View Full Code Here


            {
                Locale locale = resources.getLocale();

                for (String assetPath : paths)
                {
                    Asset asset = assetSource.getAsset(baseResource, assetPath, locale);

                    handleAsset(asset);
                }
            }
        };
View Full Code Here

    }

    public Binding newBinding(String description, ComponentResources container, ComponentResources component,
                              String expression, Location location)
    {
        Asset asset = source.getContextAsset(expression, container.getLocale());

        return new AssetBinding(location, description, asset);
    }
View Full Code Here

    public Binding newBinding(String description, ComponentResources container, ComponentResources component,
                              String expression, Location location)
    {
        Resource baseResource = container.getBaseResource();

        Asset asset = source.getAsset(baseResource, expression, container.getLocale());

        return new AssetBinding(location, description, asset);
    }
View Full Code Here

        replay();

        AssetFactory factory = new ContextAssetFactory(request, context, "4.5.6", new IdentityAssetPathConverter());

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), "/context/assets/ctx/4.5.6/foo/Bar.txt");

        // In real life, toString() is the same as toClientURL(), but we're testing
        // that the optimize method is getting called, basically.

        assertEquals(asset.toString(), "/context/assets/ctx/4.5.6/foo/Bar.txt");

        verify();
    }
View Full Code Here

        replay();

        ClasspathAssetFactory factory = new ClasspathAssetFactory(cache, aliasManager,
                                                                  converter);

        Asset asset = factory.createAsset(r);

        assertEquals(asset.toClientURL(), expectedClientURL);

        // Now, to check the cache:

        assertEquals(asset.toClientURL(), expectedClientURL);

        verify();

        // Now, to test cache clearing:
        train_requiresDigest(cache, r, false);

        train_toClientURL(aliasManager, "foo/Bar.txt", expectedClientURL);

        replay();

        factory.objectWasInvalidated();

        assertEquals(asset.toClientURL(), expectedClientURL);

        verify();
    }
View Full Code Here

        replay();

        AssetFactory factory = new ClasspathAssetFactory(cache, aliasManager, new IdentityAssetPathConverter());

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), expectedClientURL);
        assertEquals(asset.toString(), expectedClientURL);

        verify();
    }
View Full Code Here

        replay();

        AssetFactory factory = new ClasspathAssetFactory(cache, aliasManager, new IdentityAssetPathConverter());

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), expectedClientURL);
        assertEquals(asset.toString(), expectedClientURL);

        verify();
    }
View Full Code Here

    private void addScriptLinkFromClasspath(String path)
    {
        String expanded = symbolSource.expandSymbols(path);

        Asset asset = assetSource.getAsset(null, expanded, null);

        linker.addScriptLink(asset.toClientURL());
    }
View Full Code Here

    @Test
    public void add_script_link_by_asset()
    {
        DocumentLinker linker = mockDocumentLinker();
        Asset asset = mockAsset();

        train_toClientURL(asset, ASSET_URL);
        linker.addScriptLink(ASSET_URL);

        replay();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.packagers.PackageResources$Asset

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.