Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.ui.web.util
Class DocumentsListsUtils

java.lang.Object
  extended by org.nuxeo.ecm.platform.ui.web.util.DocumentsListsUtils

public final class DocumentsListsUtils
extends Object

Simple utility class to provide DocumentList related functions.

Author:
tiry

Method Summary
static List<DocumentRef> getDocRefs(List<DocumentModel> documentsList)
          Returns list of DocumentRef corresponding to the list of documents.
static List<DocumentRef> getParentRefFromDocumentList(List<DocumentModel> documentList)
          Returns the list of parents documentRef.
static List<String> getTypesInList(List<DocumentModel> documentsList)
          Returns list of the document types contained in the list of document.
static boolean isDocumentInList(DocumentModel doc, List<DocumentModel> list)
           
static boolean removeDocumentFromList(List<DocumentModel> documentList, DocumentModel documentToRemove)
          Removes one document from a list.
static void removeDocumentsFromList(List<DocumentModel> documentList, List<DocumentModel> documentsToRemove)
          Removes some documents from a list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypesInList

public static List<String> getTypesInList(List<DocumentModel> documentsList)
Returns list of the document types contained in the list of document.


getDocRefs

public static List<DocumentRef> getDocRefs(List<DocumentModel> documentsList)
Returns list of DocumentRef corresponding to the list of documents.


removeDocumentFromList

public static boolean removeDocumentFromList(List<DocumentModel> documentList,
                                             DocumentModel documentToRemove)
Removes one document from a list.

Removal is based on DocumentRef.

Returns:
true if the given list contains specified document and it has been removed

removeDocumentsFromList

public static void removeDocumentsFromList(List<DocumentModel> documentList,
                                           List<DocumentModel> documentsToRemove)
Removes some documents from a list.

Removal is based on DocumentRef.


getParentRefFromDocumentList

public static List<DocumentRef> getParentRefFromDocumentList(List<DocumentModel> documentList)
Returns the list of parents documentRef.


isDocumentInList

public static boolean isDocumentInList(DocumentModel doc,
                                       List<DocumentModel> list)

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.