Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.filemanager.service.extension
Interface CreationContainerListProvider

All Known Implementing Classes:
AbstractCreationContainerListProvider, DefaultCreationContainerListProvider

public interface CreationContainerListProvider

Interface to implement for contributions to the FileManagerService creationContainerListProvider extension point.

The provider should tell for a given (handled) document type the list of candidate container the user can create new document in.

Author:
Olivier Grisel

Method Summary
 boolean accept(java.lang.String docType)
          Tell whether docType is handled by the provider.
 DocumentModelList getCreationContainerList(CoreSession documentManager, java.lang.String docType)
          Build the list of candidate containers for the given document type and session.
 java.lang.String[] getDocTypes()
          Arrays of the document types accepted by the CreationContainerListProvider instance. null or empty array mean any document type is accepted.
 java.lang.String getName()
          Unique name of the CreationContainerListProvider.
 void setDocTypes(java.lang.String[] docTypes)
           
 void setName(java.lang.String name)
           
 

Method Detail

getName

java.lang.String getName()
Unique name of the CreationContainerListProvider. The name of a provider should be used for the equals.

Returns:
the name

setName

void setName(java.lang.String name)

getDocTypes

java.lang.String[] getDocTypes()
Arrays of the document types accepted by the CreationContainerListProvider instance. null or empty array mean any document type is accepted.

Returns:
arrays of document types

setDocTypes

void setDocTypes(java.lang.String[] docTypes)

accept

boolean accept(java.lang.String docType)
Tell whether docType is handled by the provider.

Parameters:
docType - name of the document core type
Returns:
true is the docType is accepted

getCreationContainerList

DocumentModelList getCreationContainerList(CoreSession documentManager,
                                           java.lang.String docType)
                                           throws java.lang.Exception
Build the list of candidate containers for the given document type and session.

Parameters:
documentManager - the current session context
docType - the type of document to create
Returns:
the list of candidate containers
Throws:
java.lang.Exception

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.