Class ResourceUtils

    • Method Detail

      • getMinifiedName

        public static String getMinifiedName​(String name,
                                             String minPostfix)
        Return the minified version for a given resource name. For example '/css/coolTheme.css' becomes '/css/coolTheme.min.css'
        name - The original resource name
        minPostfix - The postfix to use for minified name
        The minified resource name
      • getLocaleFromFilename

        public static ResourceUtils.PathLocale getLocaleFromFilename​(String path)
        Extract the locale from the filename taking into account possible minimized resource name. E.g. file_us_EN.min.js will correctly determine a locale of us_EN by stripping the .min from the filename, the filename returned will be file.min.js, if you want the .min to be removed as well, use getLocaleFromFilename(String) instead.
        path - The file path
        The updated path, without the locale