Class DefaultServlet.SortManager
java.lang.Object
org.apache.catalina.servlets.DefaultServlet.SortManager
- Enclosing class:
- DefaultServlet
A class encapsulating the sorting of resources.
- Author:
- Craig R. McClanahan, Remy Maucherat
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Comparator<WebResource> The default sort.protected Comparator<WebResource> Comparator to use when sorting resources by last-modified date.protected Comparator<WebResource> Comparator to use when sorting files by last-modified date, ascending (reverse).protected Comparator<WebResource> Comparator to use when sorting resources by name.protected Comparator<WebResource> Comparator to use when sorting files by name, ascending (reverse).protected Comparator<WebResource> Comparator to use when sorting resources by size.protected Comparator<WebResource> Comparator to use when sorting files by size, ascending (reverse).
- 
Method SummaryModifier and TypeMethodDescriptiongetComparator(String order) Gets the Order to apply given an ordering-string.voidsort(WebResource[] resources, String order) Sorts an array of resources according to an ordering string.
- 
Field Details- 
defaultResourceComparatorThe default sort.
- 
resourceNameComparatorComparator to use when sorting resources by name.
- 
resourceNameComparatorAscComparator to use when sorting files by name, ascending (reverse).
- 
resourceSizeComparatorComparator to use when sorting resources by size.
- 
resourceSizeComparatorAscComparator to use when sorting files by size, ascending (reverse).
- 
resourceLastModifiedComparatorComparator to use when sorting resources by last-modified date.
- 
resourceLastModifiedComparatorAscComparator to use when sorting files by last-modified date, ascending (reverse).
 
- 
- 
Method Details- 
sortSorts an array of resources according to an ordering string.- Parameters:
- resources- The array to sort.
- order- The ordering string.
- See Also:
 
- 
getComparator
- 
getComparator
- 
getOrderGets the Order to apply given an ordering-string. This ordering-string matches a subset of the ordering-strings supported by Apache httpd.- Parameters:
- order- The ordering-string provided by the client.
- Returns:
- An Order specifying the column and ascending/descending to be applied to resources.
 
 
-