Package org.apache.wicket.util.resource
Class ResourceUtils
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.PathLocale
getLocaleFromFilename
(String path) Extract the locale from the filename taking into account possible minimized resource name.static String
getMinifiedName
(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.js
will correctly determine a locale ofus_EN
by stripping the.min
from the filename, the filename returned will befile.min.js
, if you want the.min
to be removed as well, usegetLocaleFromFilename(String)
instead.- Parameters:
path
- The file path- Returns:
- The updated path, without the locale
-