faces-config documents found on the classpath or
configured explicitly via the javax.faces.CONFIG_FILES context init parameter.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | AFTER
Constant for the |
| private String[] | afterIds
The wrapped Document's before IDs. |
| private static final String | BEFORE
Constant for the |
| private String[] | beforeIds
The wrapped Document's before IDs. |
| private static Comparator | COMPARATOR
|
| private static final int | DO_NOT_SWAP
Return code indicating that no swap needs to occur for the elements being compared. |
| private DocumentInfo | documentInfo
The wrapped Document. |
| private String | id
The wrapped Document's ID. |
| private static final Logger | LOGGER
Logger for this class. |
| private static final int | MAX_SORT_PASSED
This is the limit on the number of attempts made to sort the documents. |
| private static final String | NAME
Constant for the |
| private static final String | ORDERING
Constant for the |
| private static final String | OTHERS
Constant for the |
| private static final String | OTHERS_KEY
Others keyword for sorting. |
| private static final int | SWAP
Return code indicating that element |
| Access | Constructor and Description |
|---|---|
| public | DocumentOrderingWrapper(DocumentInfo document)
Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| private void | checkDuplicates(String[] source, String[] searchTarget)
Ensure the IDs in |
| public static <K, V extends Comparable | |
| public static boolean | |
| private static void | enhanceOrderingData(DocumentOrderingWrapper[] wrappers)
Update before/after knowledge of all nodes in the array. |
| private Set | extractIds(Node n, String nodeName)
Extract and return a |
| public String[] | |
| public String[] | |
| public DocumentInfo | |
| public static HashMap | |
| public String | |
| private String | |
| public static LinkedList | |
| private String | |
| private void | |
| public static int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static void | |
| private static boolean | |
| public static DocumentOrderingWrapper[] | Returns: an array of DocumentOrderingWrappers that may be smaller than the input array of wrappers.Documents to sort documents, List<String> the absolute order as specified in the /WEB-INF/faces-config.xml absoluteOrder)Sort the provided array of |
| public static void | sort(DocumentOrderingWrapper[] documents)
Sort the provided array of |
| public String |
| AFTER | back to summary |
|---|---|
| private static final String AFTER Constant for the | |
| afterIds | back to summary |
|---|---|
| private String[] afterIds The wrapped Document's before IDs. | |
| BEFORE | back to summary |
|---|---|
| private static final String BEFORE Constant for the | |
| beforeIds | back to summary |
|---|---|
| private String[] beforeIds The wrapped Document's before IDs. | |
| COMPARATOR | back to summary |
|---|---|
| private static Comparator<DocumentOrderingWrapper> COMPARATOR
| |
| DO_NOT_SWAP | back to summary |
|---|---|
| private static final int DO_NOT_SWAP Return code indicating that no swap needs to occur for the elements being compared. | |
| documentInfo | back to summary |
|---|---|
| private DocumentInfo documentInfo The wrapped Document. | |
| id | back to summary |
|---|---|
| private String id The wrapped Document's ID. | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER Logger for this class. | |
| MAX_SORT_PASSED | back to summary |
|---|---|
| private static final int MAX_SORT_PASSED This is the limit on the number of attempts made to sort the documents. Any attempt to exceed this limit will result in an Exception being thrown. | |
| NAME | back to summary |
|---|---|
| private static final String NAME Constant for the | |
| ORDERING | back to summary |
|---|---|
| private static final String ORDERING Constant for the | |
| OTHERS | back to summary |
|---|---|
| private static final String OTHERS Constant for the | |
| OTHERS_KEY | back to summary |
|---|---|
| private static final String OTHERS_KEY Others keyword for sorting. | |
| SWAP | back to summary |
|---|---|
| private static final int SWAP Return code indicating that element | |
| DocumentOrderingWrapper | back to summary |
|---|---|
| public DocumentOrderingWrapper(DocumentInfo document) Constructs a new | |
| checkDuplicates | back to summary |
|---|---|
| private void checkDuplicates(String[] source, String[] searchTarget) Ensure the IDs in | |
| descendingByValue | back to summary |
|---|---|
| public static <K, V extends Comparable | |
| done | back to summary |
|---|---|
| public static boolean done(DocumentOrderingWrapper[] documents, LinkedList<String> ids) | |
| enhanceOrderingData | back to summary |
|---|---|
| private static void enhanceOrderingData(DocumentOrderingWrapper[] wrappers) throws CircularDependencyException Update before/after knowledge of all nodes in the array. Consider the case of A after B, B after C, C after D, and D with no ordering characteristics. When the code below executes, the before/after of specific nodes will be updated so that in the case of the example above we'd have: A -> after B B -> before A, after C C -> before B, A after D D -> before C, B, A So when an attempt is made to sort [A, B, C, D] the end result is [D, C, B, A] No extra enhancement of after ID information is necessary outside of the single node information due to the way the algorithm processes the array. This method also performs cyclic detection. If, after updating the before/after information, the before/after information contains a reference to the document ID we're currently processing, throw an exception. | |
| extractIds | back to summary |
|---|---|
| private Set Extract and return a | |
| getAfterIds | back to summary |
|---|---|
public String[] getAfterIds()
| |
| getBeforeIds | back to summary |
|---|---|
public String[] getBeforeIds()
| |
| getDocument | back to summary |
|---|---|
public DocumentInfo getDocument()
| |
| getDocumentHashMap | back to summary |
|---|---|
| public static HashMap | |
| getDocumentId | back to summary |
|---|---|
public String getDocumentId()
| |
| getDocumentName | back to summary |
|---|---|
| private String getDocumentName(Element documentElement) | |
| getIds | back to summary |
|---|---|
| public static LinkedList | |
| getNodeText | back to summary |
|---|---|
| private String getNodeText(Node node) Return the textual content, if any, of the provided | |
| init | back to summary |
|---|---|
| private void init()
Performs the initialization necessary to allow sorting of | |
| innerSort | back to summary |
|---|---|
| public static int innerSort(DocumentOrderingWrapper[] documents) | |
| isAfter | back to summary |
|---|---|
public boolean isAfter(String id)
| |
| isAfterOrdered | back to summary |
|---|---|
public boolean isAfterOrdered()
| |
| isAfterOthers | back to summary |
|---|---|
public boolean isAfterOthers()
| |
| isBefore | back to summary |
|---|---|
public boolean isBefore(String id)
| |
| isBeforeOrdered | back to summary |
|---|---|
public boolean isBeforeOrdered()
| |
| isBeforeOthers | back to summary |
|---|---|
public boolean isBeforeOthers()
| |
| isOrdered | back to summary |
|---|---|
public boolean isOrdered()
| |
| preSort | back to summary |
|---|---|
| public static void preSort(DocumentOrderingWrapper[] documents) | |
| search | back to summary |
|---|---|
| private static boolean search(String[] ids, String id) Simple helper method around | |
| sort | back to summary |
|---|---|
| public static DocumentOrderingWrapper[] sort(DocumentOrderingWrapper[] documents, List<String> absoluteOrder) Sort the provided array of
| |
| sort | back to summary |
|---|---|
| public static void sort(DocumentOrderingWrapper[] documents) Sort the provided array of | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| public |
| CircularDependencyException | back to summary |
|---|---|
| public CircularDependencyException() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(DocumentOrderingWrapper
the first object to be compared. wrapper1, DocumentOrderingWrapper the second object to be compared. wrapper2)Implements java. |
| DocumentOrderingComparator | back to summary |
|---|---|
| private DocumentOrderingComparator() | |
| compare | back to summary |
|---|---|
| public int compare(DocumentOrderingWrapper wrapper1, DocumentOrderingWrapper wrapper2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |