Class ResourceUtil


  • public class ResourceUtil
    extends Object

    ResourceUtil class.

    Version:
    $Id: $
    Author:
    Sven Diedrichsen
    • Field Detail

      • UNDEFINED

        public static final String UNDEFINED
        Unknown constant will be returned when there is no description configured.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResourceUtil

        public ResourceUtil()
    • Method Detail

      • getHolidayDescription

        public String getHolidayDescription​(String key)
        The description read with the default locale.
        Parameters:
        key - a String object.
        Returns:
        holiday description using default locale.
      • getHolidayDescription

        public String getHolidayDescription​(Locale locale,
                                            String key)
        The description read with the provided locale.
        Parameters:
        locale - a Locale object.
        key - a String object.
        Returns:
        holiday description using the provided locale.
      • getCountryDescription

        public String getCountryDescription​(String key)

        getCountryDescription.

        Parameters:
        key - a String object.
        Returns:
        the description
      • getCountryDescription

        public String getCountryDescription​(Locale l,
                                            String key)
        Returns the hierarchies description text from the resource bundle.
        Parameters:
        l - Locale to return the description text for.
        key - a String object.
        Returns:
        Description text
      • getISOCodes

        public Set<String> getISOCodes()
        Returns a list of ISO codes.
        Returns:
        2-digit ISO codes.
      • getResource

        public URL getResource​(String resourceName)
        Returns the resource by URL.
        Parameters:
        resourceName - the name/path of the resource to load
        Returns:
        the URL to the resource