Package net.feed_the_beast.launcher.json.assets

Examples of net.feed_the_beast.launcher.json.assets.AssetIndex$Asset


        return true;
    }

    private Asset findAssetInsideWebapp(Resource resource)
    {
        Asset asset;
        asset = findAssetFromClasspath(resource);
        if (asset == null)
        {
            asset = findAssetFromContext(resource);
        }
View Full Code Here


        return asset;
    }

    private Asset findAssetFromContext(Resource resource)
    {
        Asset asset = null;
        try
        {
            asset = contextAssetFactory.createAsset(resource);
        }
        catch (RuntimeException e)
View Full Code Here

        return asset;
    }

    private Asset findAssetFromClasspath(Resource resource)
    {
        Asset asset = null;
        try
        {
            asset = classpathAssetFactory.createAsset(resource);
        }
        catch (RuntimeException e)
View Full Code Here

    {
        // There's some possibility this isn't quite right when it appears in a base class and a
        // sub-class gets instantiated, because relative path for the asset should be relative to the
        // base class, but will instead by relative to the subclass.

        Asset asset = source.getComponentAsset(container, expression, container.getComponentModel().getLibraryName());

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

        javascriptSupport.importStylesheet(new StylesheetLink(ieOnly, new StylesheetOptions(null, "IE")));
        javascriptSupport.importJavaScriptLibrary(getAssetWithWrongChecksumUrl());
    }
   
    public String getAssetWithWrongChecksumUrl() {
        final Asset asset = getAssetWithCorrectChecksum();
        return asset.toClientURL().replaceAll("[0-9a-f]{8}", "00000000");
    }
View Full Code Here

        JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
        trainForEmptyCoreStack(linker, stackSource, pathConstructor);

        trainForNoStackNames(stackSource);

        Asset library = mockAsset("mylib.js");

        linker.addScriptLink("mylib.js");

        replay();
View Full Code Here

        DocumentLinker linker = mockDocumentLinker();
        JavaScriptStackSource stackSource = mockJavaScriptStackSource();
        JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
        trainForEmptyCoreStack(linker, stackSource, pathConstructor);

        Asset library1 = mockAsset("mylib1.js");
        Asset library2 = mockAsset("mylib2.js");

        JavaScriptStack mystack = mockJavaScriptStack();

        expect(stackSource.getStackNames()).andReturn(Arrays.asList("mystack"));
        expect(stackSource.getStack("mystack")).andReturn(mystack).atLeastOnce();
View Full Code Here

        JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
        trainForEmptyCoreStack(linker, stackSource, pathConstructor);

        trainForNoStackNames(stackSource);

        Asset library1 = mockAsset("mylib1.js");
        Asset library2 = mockAsset("mylib2.js");

        linker.addScriptLink("mylib1.js");
        linker.addScriptLink("mylib2.js");

        replay();
View Full Code Here

    @Test
    public void import_stylesheet_as_asset()
    {
        DocumentLinker linker = mockDocumentLinker();
        Asset stylesheet = mockAsset("style.css");

        StylesheetLink link = new StylesheetLink("style.css");
        linker.addStylesheetLink(link);

        replay();
View Full Code Here

        return expand(path, locale);
    }

    public List<Asset> getJavaScriptLibraries()
    {
        Asset messages = assetSource.getAsset(null, ROOT + "/tapestry-messages.js", threadLocale.getLocale());

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

TOP

Related Classes of net.feed_the_beast.launcher.json.assets.AssetIndex$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.