Package org.apache.tapestry.util

Examples of org.apache.tapestry.util.MultiKey


        Properties result = parent;

        if (!StringUtils.isEmpty(language))
        {
            Locale l = new Locale(language, "");
            MultiKey key = buildKey(baseResourceLocation, l);

            result = (Properties) _cache.get(key);

            if (result == null)
                result = readProperties(baseResourceLocation, baseName, l, parent);

            _cache.put(key, result);

            parent = result;
        }
        else
            language = "";

        if (!StringUtils.isEmpty(country))
        {
            Locale l = new Locale(language, country);
            MultiKey key = buildKey(baseResourceLocation, l);

            result = (Properties) _cache.get(key);

            if (result == null)
                result = readProperties(baseResourceLocation, baseName, l, parent);

            _cache.put(key, result);

            parent = result;
        }
        else
            country = "";

        if (!StringUtils.isEmpty(variant))
        {
            Locale l = new Locale(language, country, variant);
            MultiKey key = buildKey(baseResourceLocation, l);

            result = (Properties) _cache.get(key);

            if (result == null)
                result = readProperties(baseResourceLocation, baseName, l, parent);
View Full Code Here


        return result;
    }

    private MultiKey buildKey(IResourceLocation location, Locale locale)
    {
        return new MultiKey(new Object[] { location, locale.toString()}, false);
    }
View Full Code Here

        IComponentSpecification specification = component.getSpecification();
        IResourceLocation specificationLocation = specification.getSpecificationLocation();

        Locale locale = component.getPage().getLocale();

        Object key = new MultiKey(new Object[] { specificationLocation, locale }, false);

        ComponentTemplate result = searchCache(key);
        if (result != null)
            return result;
View Full Code Here

        __CLOVER_195_0.S[4689]++;keys = new Object[] { pageName, engine.getLocale()};

        // Don't make a copy, this array is just for the MultiKey.

        __CLOVER_195_0.S[4690]++;return new MultiKey(keys, false);
    } finally { }}
View Full Code Here

        __CLOVER_195_0.S[4692]++;keys = new Object[] { page.getPageName(), page.getLocale()};

        // Don't make a copy, this array is just for the MultiKey.

        __CLOVER_195_0.S[4693]++;return new MultiKey(keys, false);
    } finally { }}
View Full Code Here

    {
        Object[] keys = new Object[] { pageName, engine.getLocale() };
       
        // Don't make a copy, this array is just for the MultiKey.
       
        return new MultiKey(keys, false);
    }
View Full Code Here

    {
        Object[] keys = new Object[] { page.getPageName(), page.getLocale() };
       
        // Don't make a copy, this array is just for the MultiKey.

        return new MultiKey(keys, false);
    }
View Full Code Here

        keys = new Object[] { pageName, engine.getLocale()};

        // Don't make a copy, this array is just for the MultiKey.

        return new MultiKey(keys, false);
    }
View Full Code Here

        keys = new Object[] { page.getPageName(), page.getLocale()};

        // Don't make a copy, this array is just for the MultiKey.

        return new MultiKey(keys, false);
    }
View Full Code Here

        IComponentSpecification specification = component.getSpecification();
        IResourceLocation specificationLocation = specification.getSpecificationLocation();

        Locale locale = component.getPage().getLocale();

        Object key = new MultiKey(new Object[] { specificationLocation, locale }, false);

        ComponentTemplate result = searchCache(key);
        if (result != null)
            return result;
View Full Code Here

TOP

Related Classes of org.apache.tapestry.util.MultiKey

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.