Nuxeo ECM Projects 5.4.3-SNAPSHOT

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 String CLIPBOARD
          List identifier: Clipboard list.
static String CURRENT_DOCUMENT_SECTION_SELECTION
          List identifier: Stores the current selection of published documents.
static String CURRENT_DOCUMENT_SELECTION
          List identifier: Stores the current selection of documents.
static String CURRENT_DOCUMENT_TRASH_SELECTION
          List identifier: Stores the current selection of deleted documents.
static String DEFAULT_WORKING_LIST
          List identifier: Default working list.
 
Method Summary
 List<DocumentModel> addToWorkingList(DocumentModel doc)
          Adds one document to the default list.
 List<DocumentModel> addToWorkingList(List<DocumentModel> docList)
          Adds a list of DocumentModels to the default list.
 List<DocumentModel> addToWorkingList(String listName, DocumentModel doc)
          Adds one document to the list listName.
 List<DocumentModel> addToWorkingList(String listName, List<DocumentModel> docList)
          Adds a list of DocumentModels to the list ListName.
 List<DocumentModel> addToWorkingList(String listName, List<DocumentModel> docList, Boolean forceAppend)
          Adds a list of DocumentModels to the list ListName.
 void createWorkingList(String listName, DocumentsListDescriptor descriptor)
          Creates (declares) a new named list of documents.
 List<DocumentModel> getWorkingList()
          Returns the default list.
 List<DocumentModel> getWorkingList(String listName)
          Returns the list listName.
 DocumentsListDescriptor getWorkingListDescriptor()
          Gets the descriptor (meta-data) of a default list.
 DocumentsListDescriptor getWorkingListDescriptor(String listName)
          Gets the descriptor (meta-data) of a given list.
 List<String> getWorkingListNamesForCategory(String categoryName)
          Returns the availables lists names for a given category.
 List<String> getWorkingListTypes()
          Returns the list of document types contained in the default list.
 List<String> getWorkingListTypes(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(String listName)
          Check is list listName is empty.
 void refreshLists(DocumentModel currentDocument)
          Method called by Seam event service to reset lists.
 void removeFromAllLists(List<DocumentModel> documentsToRemove)
          Removes documentsToRemove from all lists.
 List<DocumentModel> removeFromWorkingList(DocumentModel doc)
          Removes one DocumentModel from the default list.
 List<DocumentModel> removeFromWorkingList(String listName, DocumentModel doc)
          Removes one DocumentModel from the list ListName.
 List<DocumentModel> removeFromWorkingList(String listName, List<DocumentModel> lst)
           
 List<DocumentModel> resetWorkingList()
          Removes DocumentModels from the default list.
 List<DocumentModel> resetWorkingList(List<DocumentModel> newDocList)
          Resets default list and fills it with newDocList.
 List<DocumentModel> resetWorkingList(String listName)
          Removes DocumentModels from the list ListName.
 List<DocumentModel> resetWorkingList(String listName, List<DocumentModel> newDocList)
          Resets list listName and fill it with newDocList.
 void setWorkingList(List<DocumentModel> docList)
          Updates the default list.
 void setWorkingList(String listName, List<DocumentModel> docList)
          Updates the list listName.
 

Field Detail

DEFAULT_WORKING_LIST

static final String DEFAULT_WORKING_LIST
List identifier: Default working list.

See Also:
Constant Field Values

CLIPBOARD

static final String CLIPBOARD
List identifier: Clipboard list.

See Also:
Constant Field Values

CURRENT_DOCUMENT_SELECTION

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

See Also:
Constant Field Values

CURRENT_DOCUMENT_TRASH_SELECTION

static final 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 String CURRENT_DOCUMENT_SECTION_SELECTION
List identifier: Stores the current selection of published documents.

See Also:
Constant Field Values
Method Detail

createWorkingList

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

Parameters:
listName - Name of the list

getWorkingList

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

Parameters:
listName - Name of the list
Returns:

getWorkingList

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

Returns:

getWorkingListTypes

List<String> getWorkingListTypes(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

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

Returns:
the DocumentModel List

setWorkingList

void setWorkingList(String listName,
                    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(List<DocumentModel> docList)
Updates the default list.

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

addToWorkingList

List<DocumentModel> addToWorkingList(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

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

Parameters:
doc -
Returns:
the updated list of DocumentModels

addToWorkingList

List<DocumentModel> addToWorkingList(String listName,
                                     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

List<DocumentModel> addToWorkingList(String listName,
                                     List<DocumentModel> docList,
                                     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

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

Parameters:
docList -
Returns:
the updated list of DocumentModels

removeFromWorkingList

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

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

removeFromWorkingList

List<DocumentModel> removeFromWorkingList(String listName,
                                          List<DocumentModel> lst)

removeFromWorkingList

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

Parameters:
doc -
Returns:
the updated list of DocumentModels

resetWorkingList

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

Parameters:
listName -
Returns:
the updated list of DocumentModels

resetWorkingList

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

Returns:
the updated list of DocumentModels

resetWorkingList

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

Parameters:
listName -
newDocList -
Returns:

resetWorkingList

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

Parameters:
newDocList -
Returns:
the updated list of DocumentModels

isWorkingListEmpty

boolean isWorkingListEmpty(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(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

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

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

getWorkingListDescriptor

DocumentsListDescriptor getWorkingListDescriptor(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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.