org.silverpeas.attachment.util
Class SimpleDocumentList<SIMPLE_DOCUMENT extends SimpleDocument>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<SIMPLE_DOCUMENT>
org.silverpeas.attachment.util.SimpleDocumentList<SIMPLE_DOCUMENT>
- Type Parameters:
SIMPLE_DOCUMENT
- the type of simple document that the list contains.
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<SIMPLE_DOCUMENT>, Collection<SIMPLE_DOCUMENT>, List<SIMPLE_DOCUMENT>, RandomAccess
public class SimpleDocumentList<SIMPLE_DOCUMENT extends SimpleDocument>
- extends ArrayList<SIMPLE_DOCUMENT>
This list provides some additional useful behaviors around simple documents.
- See Also:
- Serialized Form
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
SimpleDocumentList
public SimpleDocumentList(int initialCapacity)
SimpleDocumentList
public SimpleDocumentList()
SimpleDocumentList
public SimpleDocumentList(Collection<? extends SIMPLE_DOCUMENT> c)
getQueryLanguage
public String getQueryLanguage()
- Gets the language used to perform the JCR query in order to load the current list.
- Returns:
- the language is defined, null value otherwise.
setQueryLanguage
public SimpleDocumentList<SIMPLE_DOCUMENT> setQueryLanguage(String queryLanguage)
- Sets the language used to perform the JCR query in order to load the current list.
- Parameters:
queryLanguage
- the language used to perform the JCR query in order to load the list.
- Returns:
- itself.
removeLanguageFallbacks
public SimpleDocumentList<SIMPLE_DOCUMENT> removeLanguageFallbacks()
- Removes from the current list all documents which content is in an other language than the one
returned by
getQueryLanguage()
.
If getQueryLanguage()
returns null or an unknown languague, nothing is done.
- Returns:
- itself.
orderByLanguageAndLastUpdate
public SimpleDocumentList<SIMPLE_DOCUMENT> orderByLanguageAndLastUpdate(String... languageOrderedByPriority)
- Orders the list by descending priority of the language and descending last update date.
By default, if no language priority is given, then the language priority of the platform is
taken into account. If a language priority is specified, then the language priorities of the
platform are overridden.
- Parameters:
languageOrderedByPriority
- manual language priority definition from the highest to the
lowest.
- Returns:
- itself.
Copyright © 2016 Silverpeas. All Rights Reserved.