Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.filemanager.service
Class FileManagerService

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.filemanager.service.FileManagerService
All Implemented Interfaces:
FileManager, Adaptable, Component, Extensible

public class FileManagerService
extends DefaultComponent
implements FileManager

FileManager registry service.

This is the component to request to perform transformations. See API.

Author:
Andreas Kalogeropoulos

Field Summary
static String DEFAULT_FOLDER_TYPE_NAME
           
static String DEFAULT_TYPE_NAME
           
static ComponentName NAME
           
 
Constructor Summary
FileManagerService()
           
 
Method Summary
 DocumentModel createDocumentFromBlob(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullName)
          Returns an initialized doc based on a given blob.
 DocumentModel createFolder(CoreSession documentManager, String fullname, String path)
          Creates a Folder.
 DocumentModel defaultCreate(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullname)
           
 DocumentModel defaultCreate(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullname, String typeName)
           
 DocumentModel defaultCreate(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullname, String typeName, boolean checkAllowedSubTypes)
           
 DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path)
           
 DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes)
           
 Plugin getPluginByName(String name)
           
 void registerExtension(Extension extension)
          Registers the given extension.
 void unregisterExtension(Extension extension)
          Unregisters the given extension.
 DocumentModel updateDocumentFromBlob(CoreSession documentManager, Blob input, String path, String fullName)
          Just applies the same actions as creation but does not changes the doc type.
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, deactivate, getAdapter, registerContribution, unregisterContribution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final ComponentName NAME

DEFAULT_TYPE_NAME

public static final String DEFAULT_TYPE_NAME
See Also:
Constant Field Values

DEFAULT_FOLDER_TYPE_NAME

public static final String DEFAULT_FOLDER_TYPE_NAME
See Also:
Constant Field Values
Constructor Detail

FileManagerService

public FileManagerService()
Method Detail

createFolder

public DocumentModel createFolder(CoreSession documentManager,
                                  String fullname,
                                  String path)
                           throws ClientException,
                                  IOException
Description copied from interface: FileManager
Creates a Folder.

Specified by:
createFolder in interface FileManager
fullname - teh full Name of the folder
path - the path were to create the folder
Returns:
teh Folder Created
Throws:
ClientException
IOException

defaultCreateFolder

public DocumentModel defaultCreateFolder(CoreSession documentManager,
                                         String fullname,
                                         String path)
                                  throws ClientException
Throws:
ClientException

defaultCreateFolder

public DocumentModel defaultCreateFolder(CoreSession documentManager,
                                         String fullname,
                                         String path,
                                         String containerTypeName,
                                         boolean checkAllowedSubTypes)
                                  throws ClientException
Throws:
ClientException

createDocumentFromBlob

public DocumentModel createDocumentFromBlob(CoreSession documentManager,
                                            Blob input,
                                            String path,
                                            boolean overwrite,
                                            String fullName)
                                     throws IOException,
                                            ClientException
Description copied from interface: FileManager
Returns an initialized doc based on a given blob.

Specified by:
createDocumentFromBlob in interface FileManager
input - the blob containing the content and the mime/type
path - the path were to create the document
overwrite - boolean how decide to overwrite or not
fullName - the fullname that containes the filename
Returns:
the created Document
Throws:
IOException
ClientException

defaultCreate

public DocumentModel defaultCreate(CoreSession documentManager,
                                   Blob input,
                                   String path,
                                   boolean overwrite,
                                   String fullname,
                                   String typeName)
                            throws IOException,
                                   ClientException
Throws:
IOException
ClientException

defaultCreate

public DocumentModel defaultCreate(CoreSession documentManager,
                                   Blob input,
                                   String path,
                                   boolean overwrite,
                                   String fullname,
                                   String typeName,
                                   boolean checkAllowedSubTypes)
                            throws IOException,
                                   ClientException
Throws:
IOException
ClientException

defaultCreate

public DocumentModel defaultCreate(CoreSession documentManager,
                                   Blob input,
                                   String path,
                                   boolean overwrite,
                                   String fullname)
                            throws IOException,
                                   ClientException
Throws:
IOException
ClientException

updateDocumentFromBlob

public DocumentModel updateDocumentFromBlob(CoreSession documentManager,
                                            Blob input,
                                            String path,
                                            String fullName)
                                     throws ClientException
Description copied from interface: FileManager
Just applies the same actions as creation but does not changes the doc type.

Specified by:
updateDocumentFromBlob in interface FileManager
input - the blob containing the content and the mime/type
path - the path to the file to update
fullName - the fullname that containes the filename
Returns:
the updated Document
Throws:
ClientException

getPluginByName

public Plugin getPluginByName(String name)

registerExtension

public void registerExtension(Extension extension)
                       throws Exception
Description copied from interface: Extensible
Registers the given extension.

Specified by:
registerExtension in interface Extensible
Overrides:
registerExtension in class DefaultComponent
Parameters:
extension - the extension to register
Throws:
Exception - if any error occurs

unregisterExtension

public void unregisterExtension(Extension extension)
Description copied from interface: Extensible
Unregisters the given extension.

Specified by:
unregisterExtension in interface Extensible
Overrides:
unregisterExtension in class DefaultComponent
Parameters:
extension - the extension to unregister

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.