Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.Resource.forFile()


        if (colonx < 0)
        {
            Resource root = baseResource != null ? baseResource : prefixToRootResource.get(AssetConstants.CLASSPATH);

            return root.forFile(path);
        }

        String prefix = path.substring(0, colonx);

        Resource root = prefixToRootResource.get(prefix);
View Full Code Here


        Resource root = prefixToRootResource.get(prefix);

        if (root == null)
            throw new IllegalArgumentException(ServicesMessages.unknownAssetPrefix(path));

        return root.forFile(path.substring(colonx + 1));
    }

    private Asset getLocalizedAssetFromResource(Resource unlocalized, Locale locale)
    {
        Resource localized = locale == null ? unlocalized : unlocalized.forLocale(locale);
View Full Code Here

        if (colonx < 0)
        {
            Resource root = baseResource != null ? baseResource : prefixToRootResource.get(AssetConstants.CLASSPATH);

            return root.forFile(path);
        }

        String prefix = path.substring(0, colonx);

        Resource root = prefixToRootResource.get(prefix);
View Full Code Here

        Resource root = prefixToRootResource.get(prefix);

        if (root == null)
            throw new IllegalArgumentException(String.format("Unknown prefix for asset path '%s'.", path));

        return root.forFile(path.substring(colonx + 1));
    }

    /**
     * Finds a localized resource.
     *
 
View Full Code Here

        if (colonx < 0)
        {
            Resource root = baseResource != null ? baseResource : prefixToRootResource.get(AssetConstants.CLASSPATH);

            return root.forFile(path);
        }

        String prefix = path.substring(0, colonx);

        Resource root = prefixToRootResource.get(prefix);
View Full Code Here

        Resource root = prefixToRootResource.get(prefix);

        if (root == null)
            throw new IllegalArgumentException(ServicesMessages.unknownAssetPrefix(path));

        return root.forFile(path.substring(colonx + 1));
    }

    private Asset getLocalizedAssetFromResource(Resource unlocalized, Locale locale)
    {
        Resource localized = locale == null ? unlocalized : unlocalized.forLocale(locale);
View Full Code Here

        if (colonx < 0)
        {
            Resource root = baseResource != null ? baseResource : prefixToRootResource.get(CLASSPATH);

            return root.forFile(path);
        }

        String prefix = path.substring(0, colonx);

        Resource root = prefixToRootResource.get(prefix);
View Full Code Here

        if (root == null)
            throw new IllegalArgumentException(ServicesMessages.unknownAssetPrefix(path));


        return root.forFile(path.substring(colonx + 1));
    }


    private Asset getLocalizedAssetFromResource(Resource unlocalized, Locale locale)
    {
View Full Code Here

        if (colonx < 0)
        {
            Resource root = baseResource != null ? baseResource : prefixToRootResource.get(AssetConstants.CLASSPATH);

            return root.forFile(path);
        }

        String prefix = path.substring(0, colonx);

        Resource root = prefixToRootResource.get(prefix);
View Full Code Here

        Resource root = prefixToRootResource.get(prefix);

        if (root == null)
            throw new IllegalArgumentException(String.format("Unknown prefix for asset path '%s'.", path));

        return root.forFile(path.substring(colonx + 1));
    }

    /**
     * Finds a localized resource.
     *
 
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.