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
Document s per the requirements
of the 2.0 specification. |
static DocumentOrderingWrapper[] |
sort(DocumentOrderingWrapper[] documents,
List<String> absoluteOrder)
Sort the provided array of
Document s per the order specified
in the List represented by absoluteOrder. |
String |
toString() |
public DocumentOrderingWrapper(DocumentInfo document)
DocumentOrderingWrapper
for the specified
Document.
public DocumentInfo getDocument()
Document
public String getDocumentId()
Document
's ID, if anypublic String[] getBeforeIds()
Document's before IDs, if any
public String[] getAfterIds()
Document
's after IDs, if anypublic boolean isBeforeOrdered()
true
if any before IDs are present, otherwise
false
public boolean isAfterOrdered()
true
if any after IDs are present, otherwise,
false
public boolean isOrdered()
true
if this document has any before or after IDs,
otherwise false
public boolean isBefore(String id)
true
if this document is before the specified
id
, otherwise false
public boolean isAfter(String id)
true
if this document is after the specified
id
, otherwise false
public boolean isAfterOthers()
true
if this document is after others, otherwise
false
public boolean isBeforeOthers()
true
if this document is before others, otherwise
false
public static DocumentOrderingWrapper[] sort(DocumentOrderingWrapper[] documents, List<String> absoluteOrder)
Document
s 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)
Document
s 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–2019 JBoss by Red Hat. All rights reserved.