public class DocumentOrderingWrapper extends Object
faces-config documents found on the classpath or
configured explicitly via the javax.faces.CONFIG_FILES context init parameter.| Constructor and Description |
|---|
DocumentOrderingWrapper(DocumentInfo document)
Constructs a new
DocumentOrderingWrapper for the specified Document |
| Modifier and Type | Method and Description |
|---|---|
static <K,V extends Comparable<? super V>> |
descendingByValue(Map<K,V> map) |
static boolean |
done(DocumentOrderingWrapper[] documents,
LinkedList<String> ids) |
String[] |
getAfterIds() |
String[] |
getBeforeIds() |
DocumentInfo |
getDocument() |
static HashMap<String,DocumentOrderingWrapper> |
getDocumentHashMap(DocumentOrderingWrapper[] documents) |
String |
getDocumentId() |
static LinkedList<String> |
getIds(DocumentOrderingWrapper[] documents) |
static int |
innerSort(DocumentOrderingWrapper[] documents) |
boolean |
isAfter(String id) |
boolean |
isAfterOrdered() |
boolean |
isAfterOthers() |
boolean |
isBefore(String id) |
boolean |
isBeforeOrdered() |
boolean |
isBeforeOthers() |
boolean |
isOrdered() |
static void |
preSort(DocumentOrderingWrapper[] documents) |
static void |
sort(DocumentOrderingWrapper[] documents)
Sort the provided array of
Documents per the requirements of the 2.0 specification. |
static DocumentOrderingWrapper[] |
sort(DocumentOrderingWrapper[] documents,
List<String> absoluteOrder)
Sort the provided array of
Documents per the order specified in the List represented by absoluteOrder. |
String |
toString() |
public DocumentOrderingWrapper(DocumentInfo document)
DocumentOrderingWrapper for the specified Document.public DocumentInfo getDocument()
Documentpublic String getDocumentId()
Document's ID, if anypublic String[] getBeforeIds()
Document's before IDs, if anypublic String[] getAfterIds()
Document's after IDs, if anypublic boolean isBeforeOrdered()
true if any before IDs are present, otherwise falsepublic boolean isAfterOrdered()
true if any after IDs are present, otherwise, falsepublic boolean isOrdered()
true if this document has any before or after IDs, otherwise falsepublic boolean isBefore(String id)
true if this document is before the specified id, otherwise falsepublic boolean isAfter(String id)
true if this document is after the specified id, otherwise falsepublic boolean isAfterOthers()
true if this document is after others, otherwise falsepublic boolean isBeforeOthers()
true if this document is before others, otherwise falsepublic static DocumentOrderingWrapper[] sort(DocumentOrderingWrapper[] documents, List<String> absoluteOrder)
Documents per the order specified in the List represented by absoluteOrder.documents - Documents to sortabsoluteOrder - the absolute order as specified in the /WEB-INF/faces-config.xmlpublic static void sort(DocumentOrderingWrapper[] documents)
Documents per the requirements of the 2.0 specification. Note, that this
method only provides partial ordering and not absolute ordering.public static boolean done(DocumentOrderingWrapper[] documents, LinkedList<String> ids)
public static LinkedList<String> getIds(DocumentOrderingWrapper[] documents)
public static int innerSort(DocumentOrderingWrapper[] documents)
public static HashMap<String,DocumentOrderingWrapper> getDocumentHashMap(DocumentOrderingWrapper[] documents)
public static void preSort(DocumentOrderingWrapper[] documents)
public static <K,V extends Comparable<? super V>> Map<K,V> descendingByValue(Map<K,V> map)
Copyright © 2010–2024 JBoss by Red Hat. All rights reserved.