Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.webapp.documentsLists
Interface DocumentsListsManager

All Known Implementing Classes:
DocumentsListsManagerBean

public interface DocumentsListsManager

Seam component used to manage named lists of documents.

Managing the DM lists into this component insteed of directly inside the Seam context offers the following advantages:

Author:
tiry

Field Summary
static java.lang.String CLIPBOARD
          List identifier: Clipboard list.
static java.lang.String CURRENT_DOCUMENT_SECTION_SELECTION
          List identifier: Stores the current selection of published documents.
static java.lang.String CURRENT_DOCUMENT_SELECTION
          List identifier: Stores the current selection of documents.
static java.lang.String CURRENT_DOCUMENT_TRASH_SELECTION
          List identifier: Stores the current selection of deleted documents.
static java.lang.String DEFAULT_WORKING_LIST
          List identifier: Default working list.
 
Method Summary
 java.util.List<DocumentModel> addToWorkingList(DocumentModel doc)
          Adds one document to the default list.
 java.util.List<DocumentModel> addToWorkingList(java.util.List<DocumentModel> docList)
          Adds a list of DocumentModels to the default list.
 java.util.List<DocumentModel> addToWorkingList(java.lang.String listName, DocumentModel doc)
          Adds one document to the list listName.
 java.util.List<DocumentModel> addToWorkingList(java.lang.String listName, java.util.List<DocumentModel> docList)
          Adds a list of DocumentModels to the list ListName.
 java.util.List<DocumentModel> addToWorkingList(java.lang.String listName, java.util.List<DocumentModel> docList, java.lang.Boolean forceAppend)
          Adds a list of DocumentModels to the list ListName.
 void createWorkingList(java.lang.String listName, DocumentsListDescriptor descriptor)
          Creates (declares) a new named list of documents.
 void destroy()
           
 java.util.List<DocumentModel> getWorkingList()
          Returns the default list.
 java.util.List<DocumentModel> getWorkingList(java.lang.String listName)
          Returns the list listName.
 DocumentsListDescriptor getWorkingListDescriptor()
          Gets the descriptor (meta-data) of a default list.
 DocumentsListDescriptor getWorkingListDescriptor(java.lang.String listName)
          Gets the descriptor (meta-data) of a given list.
 java.util.List<java.lang.String> getWorkingListNamesForCategory(java.lang.String categoryName)
          Returns the availables lists names for a given category.
 java.util.List<java.lang.String> getWorkingListTypes()
          Returns the list of document types contained in the default list.
 java.util.List<java.lang.String> getWorkingListTypes(java.lang.String listName)
          Returns the list of document types contained into the list ListName.
 void initListManager()
          Init Method (replaces for now Registry initialization that will be done by the extension point and the Runtime).
 boolean isWorkingListEmpty()
          Checks if default list is empty.
 boolean isWorkingListEmpty(java.lang.String listName)
          Check is list listName is empty.
 void refreshLists(DocumentModel currentDocument)
          Method called by Seam event service to reset lists.
 void removeFromAllLists(java.util.List<DocumentModel> documentsToRemove)
          Removes documentsToRemove from all lists.
 java.util.List<DocumentModel> removeFromWorkingList(DocumentModel doc)
          Removes one DocumentModel from the default list.
 java.util.List<DocumentModel> removeFromWorkingList(java.lang.String listName, DocumentModel doc)
          Removes one DocumentModel from the list ListName.
 java.util.List<DocumentModel> removeFromWorkingList(java.lang.String listName, java.util.List<DocumentModel> lst)
           
 java.util.List<DocumentModel> resetWorkingList()
          Removes DocumentModels from the default list.
 java.util.List<DocumentModel> resetWorkingList(java.util.List<DocumentModel> newDocList)
          Resets default list and fills it with newDocList.
 java.util.List<DocumentModel> resetWorkingList(java.lang.String listName)
          Removes DocumentModels from the list ListName.
 java.util.List<DocumentModel> resetWorkingList(java.lang.String listName, java.util.List<DocumentModel> newDocList)
          Resets list listName and fill it with newDocList.
 void setWorkingList(java.util.List<DocumentModel> docList)
          Updates the default list.
 void setWorkingList(java.lang.String listName, java.util.List<DocumentModel> docList)
          Updates the list listName.
 

Field Detail

DEFAULT_WORKING_LIST

static final java.lang.String DEFAULT_WORKING_LIST
List identifier: Default working list.

See Also:
Constant Field Values

CLIPBOARD

static final java.lang.String CLIPBOARD
List identifier: Clipboard list.

See Also:
Constant Field Values

CURRENT_DOCUMENT_SELECTION

static final java.lang.String CURRENT_DOCUMENT_SELECTION
List identifier: Stores the current selection of documents.

See Also:
Constant Field Values

CURRENT_DOCUMENT_TRASH_SELECTION

static final java.lang.String CURRENT_DOCUMENT_TRASH_SELECTION
List identifier: Stores the current selection of deleted documents.

See Also:
Constant Field Values

CURRENT_DOCUMENT_SECTION_SELECTION

static final java.lang.String CURRENT_DOCUMENT_SECTION_SELECTION
List identifier: Stores the current selection of published documents.

See Also:
Constant Field Values
Method Detail

createWorkingList

void createWorkingList(java.lang.String listName,
                       DocumentsListDescriptor descriptor)
Creates (declares) a new named list of documents.

Parameters:
listName - Name of the list

getWorkingList

java.util.List<DocumentModel> getWorkingList(java.lang.String listName)
Returns the list listName.

Parameters:
listName - Name of the list
Returns:

getWorkingList

java.util.List<DocumentModel> getWorkingList()
Returns the default list.

Returns:

getWorkingListTypes

java.util.List<java.lang.String> getWorkingListTypes(java.lang.String listName)
Returns the list of document types contained into the list ListName.

Parameters:
listName - Name of the list to retrieve
Returns:
the DocumentModel List or null if the ListName is unknown

getWorkingListTypes

java.util.List<java.lang.String> getWorkingListTypes()
Returns the list of document types contained in the default list.

Returns:
the DocumentModel List

setWorkingList

void setWorkingList(java.lang.String listName,
                    java.util.List<DocumentModel> docList)
Updates the list listName.

Parameters:
listName - Name of the list to update
docList - the DocumentModel list to store in the list ListName

setWorkingList

void setWorkingList(java.util.List<DocumentModel> docList)
Updates the default list.

Parameters:
docList - the DocumentModel list to store in the default list

addToWorkingList

java.util.List<DocumentModel> addToWorkingList(java.lang.String listName,
                                               DocumentModel doc)
Adds one document to the list listName.

Parameters:
listName - the name of the list to update
doc - the doc to append
Returns:
the updated list of DocumentModels

addToWorkingList

java.util.List<DocumentModel> addToWorkingList(DocumentModel doc)
Adds one document to the default list.

Parameters:
doc -
Returns:
the updated list of DocumentModels

addToWorkingList

java.util.List<DocumentModel> addToWorkingList(java.lang.String listName,
                                               java.util.List<DocumentModel> docList)
Adds a list of DocumentModels to the list ListName.

Parameters:
listName - the name of the list to update
docList - the DocumentModels list to append
Returns:
the updated list of DocumentModels

addToWorkingList

java.util.List<DocumentModel> addToWorkingList(java.lang.String listName,
                                               java.util.List<DocumentModel> docList,
                                               java.lang.Boolean forceAppend)
Adds a list of DocumentModels to the list ListName.

Parameters:
listName - the name of the list to update
docList - the DocumentModels list to append
forceAppend - force the new elements to be appened even if the list default behaviour is reset
Returns:
the updated list of DocumentModels

addToWorkingList

java.util.List<DocumentModel> addToWorkingList(java.util.List<DocumentModel> docList)
Adds a list of DocumentModels to the default list.

Parameters:
docList -
Returns:
the updated list of DocumentModels

removeFromWorkingList

java.util.List<DocumentModel> removeFromWorkingList(java.lang.String listName,
                                                    DocumentModel doc)
Removes one DocumentModel from the list ListName.

Parameters:
listName -
doc -
Returns:
the updated list of DocumentModels

removeFromWorkingList

java.util.List<DocumentModel> removeFromWorkingList(java.lang.String listName,
                                                    java.util.List<DocumentModel> lst)

removeFromWorkingList

java.util.List<DocumentModel> removeFromWorkingList(DocumentModel doc)
Removes one DocumentModel from the default list.

Parameters:
doc -
Returns:
the updated list of DocumentModels

resetWorkingList

java.util.List<DocumentModel> resetWorkingList(java.lang.String listName)
Removes DocumentModels from the list ListName.

Parameters:
listName -
Returns:
the updated list of DocumentModels

resetWorkingList

java.util.List<DocumentModel> resetWorkingList()
Removes DocumentModels from the default list.

Returns:
the updated list of DocumentModels

resetWorkingList

java.util.List<DocumentModel> resetWorkingList(java.lang.String listName,
                                               java.util.List<DocumentModel> newDocList)
Resets list listName and fill it with newDocList.

Parameters:
listName -
newDocList -
Returns:

resetWorkingList

java.util.List<DocumentModel> resetWorkingList(java.util.List<DocumentModel> newDocList)
Resets default list and fills it with newDocList.

Parameters:
newDocList -
Returns:
the updated list of DocumentModels

isWorkingListEmpty

boolean isWorkingListEmpty(java.lang.String listName)
Check is list listName is empty.

Parameters:
listName -
Returns:
true if the list is Empty

isWorkingListEmpty

boolean isWorkingListEmpty()
Checks if default list is empty.

Returns:
true if the list is Empty

refreshLists

@Observer(value="documentSelectionChanged",
          create=false)
void refreshLists(DocumentModel currentDocument)
Method called by Seam event service to reset lists.


removeFromAllLists

void removeFromAllLists(java.util.List<DocumentModel> documentsToRemove)
Removes documentsToRemove from all lists.

Parameters:
documentsToRemove -

initListManager

void initListManager()
Init Method (replaces for now Registry initialization that will be done by the extension point and the Runtime).


getWorkingListNamesForCategory

java.util.List<java.lang.String> getWorkingListNamesForCategory(java.lang.String categoryName)
Returns the availables lists names for a given category.

Parameters:
categoryName -
Returns:
the names of the available lists

getWorkingListDescriptor

DocumentsListDescriptor getWorkingListDescriptor(java.lang.String listName)
Gets the descriptor (meta-data) of a given list.

Parameters:
listName -
Returns:
the Descriptor of the DocumentModel list

getWorkingListDescriptor

DocumentsListDescriptor getWorkingListDescriptor()
Gets the descriptor (meta-data) of a default list.

Returns:
the Descriptor of the DocumentModel list

destroy

@Destroy
void destroy()

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.