Package org.sf.bee.commons.i18n.resourcebundle

Examples of org.sf.bee.commons.i18n.resourcebundle.IResourceBundle


    private static String getResourceString(final String baseName,
            final String resourceKey, final Locale locale,
            final String defaultValue, final ClassLoader classloader) {
        try {
            // retrieve a resource bundle
            IResourceBundle rb = ResourceBundleFactory.getBundle(baseName,
                    locale,
                    classloader);

            final String result = rb.getString(resourceKey);
            return result != null ? result : defaultValue;
        } catch (Exception ex) {
            getLogger().log(Level.FINE,
                    String.format("Resource not found. BaseName='%s'; "
                    + "Key='%s'; Locale='%s'",
View Full Code Here


    }

    private static Properties getAllProperties(final String baseName,
            final Locale locale, final ClassLoader classloader) throws Exception {
        // retrieve a resource bundle
        final IResourceBundle rb = ResourceBundleFactory.getBundle(baseName,
                locale,
                classloader);

        return rb != null
                ? rb.getProperties()
                : null;
    }
View Full Code Here

        super.finalize();
    }
   
    public String getResourceFromCache(String cachekey, String resourceKey){
        synchronized (_resourceBunbleCache ){
            IResourceBundle rb = _resourceBunbleCache.get(cachekey);
            if (null==rb)
                return null;
           
            return rb.getString(resourceKey);
        }
    }
View Full Code Here

TOP

Related Classes of org.sf.bee.commons.i18n.resourcebundle.IResourceBundle

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.