Class ResourceUtils

java.lang.Object
org.apache.wicket.util.resource.ResourceUtils

public class ResourceUtils extends Object
Author:
Juergen Donnerstag
  • Field Details

  • Constructor Details

  • Method Details

    • 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'
      Parameters:
      name - The original resource name
      minPostfix - The postfix to use for minified name
      Returns:
      The minified resource name
    • getLocaleFromFilename

      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.
      Parameters:
      path - The file path
      Returns:
      The updated path, without the locale