Class FileSorterUtil
java.lang.Object
fr.paris.lutece.portal.service.util.FileSorterUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSorts the list of file paths based on extension priority.sortByPathPriority(List<String> set) Sorts the list of file paths in descending order based on path priority.Sorts the list of file paths based on path priority.Sorts the list of file paths by both path priority and extension priority.
-
Field Details
-
PATH_CONF
- See Also:
-
PATH_PLUGINS
- See Also:
-
PATH_THEMES
- See Also:
-
PATH_OVERRIDE_CORE
- See Also:
-
PATH_OVERRIDE_PLUGINS
- See Also:
-
-
Constructor Details
-
FileSorterUtil
public FileSorterUtil()
-
-
Method Details
-
sortedByPathAndExtensionList
Sorts the list of file paths by both path priority and extension priority. First, the list is sorted by path priority, and then by extension priority.- Parameters:
set- The list of file paths to be sorted- Returns:
- The sorted list of file paths
-
sortByPathPriority
Sorts the list of file paths in descending order based on path priority. Paths with higher priority values will appear later in the list.- Parameters:
set- The list of file paths to sort in descending path priority- Returns:
- The list of file paths sorted in descending path priority
-
sortByPathPriorityDescending
Sorts the list of file paths based on path priority. Paths are prioritized based on specific prefixes (e.g., PATH_OVERRIDE_PLUGINS, PATH_OVERRIDE_CORE, etc.).- Parameters:
set- The list of file paths to sort by path priority- Returns:
- The list of file paths sorted by path priority
-
sortByExtensionPriority
Sorts the list of file paths based on extension priority. Extensions are prioritized (e.g., .xml, .json, .properties, etc.). If two files have the same extension priority, they are sorted alphabetically.- Parameters:
set- The list of file paths to sort by extension priority- Returns:
- The list of file paths sorted by extension priority
-