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 java.lang.Object

Simple utility class to provide DocumentList related functions.

Author:
tiry

Method Summary
static java.util.List<DocumentRef> getDocRefs(java.util.List<DocumentModel> documentsList)
          Returns list of DocumentRef corresponding to the list of documents.
static java.util.List<DocumentRef> getParentRefFromDocumentList(java.util.List<DocumentModel> documentList)
          Returns the list of parents documentRef.
static java.util.List<java.lang.String> getTypesInList(java.util.List<DocumentModel> documentsList)
          Returns list of the document types contained in the list of document.
static boolean isDocumentInList(DocumentModel doc, java.util.List<DocumentModel> list)
           
static boolean removeDocumentFromList(java.util.List<DocumentModel> documentList, DocumentModel documentToRemove)
          Removes one document from a list.
static void removeDocumentsFromList(java.util.List<DocumentModel> documentList, java.util.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 java.util.List<java.lang.String> getTypesInList(java.util.List<DocumentModel> documentsList)
Returns list of the document types contained in the list of document.


getDocRefs

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


removeDocumentFromList

public static boolean removeDocumentFromList(java.util.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(java.util.List<DocumentModel> documentList,
                                           java.util.List<DocumentModel> documentsToRemove)
Removes some documents from a list.

Removal is based on DocumentRef.


getParentRefFromDocumentList

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


isDocumentInList

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.