java.lang.Object
org.apache.wicket.util.resource.ResourceUtils
- Author:
- Juergen Donnerstag
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceUtils.PathLocalegetLocaleFromFilename(String path) Extract the locale from the filename taking into account possible minimized resource name.static StringgetMinifiedName(String name, String minPostfix) Return the minified version for a given resource name.
-
Field Details
-
MIN_POSTFIX_DEFAULT
The default postfix for minified names (ex: /css/mystyle.min.css)- See Also:
-
MIN_POSTFIX_DEFAULT_AS_EXTENSION
The default postfix for minified names (ex: /css/mystyle.min.css)- See Also:
-
-
Constructor Details
-
ResourceUtils
public ResourceUtils()
-
-
Method Details
-
getMinifiedName
Return the minified version for a given resource name. For example '/css/coolTheme.css' becomes '/css/coolTheme.min.css'- Parameters:
name- The original resource nameminPostfix- 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.jswill correctly determine a locale ofus_ENby stripping the.minfrom the filename, the filename returned will befile.min.js, if you want the.minto be removed as well, usegetLocaleFromFilename(String)instead.- Parameters:
path- The file path- Returns:
- The updated path, without the locale
-