Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.filemanager.service.extension
Class DefaultFileImporter

java.lang.Object
  extended by org.nuxeo.ecm.platform.filemanager.service.extension.AbstractFileImporter
      extended by org.nuxeo.ecm.platform.filemanager.service.extension.DefaultFileImporter
All Implemented Interfaces:
Serializable, Comparable<FileImporter>, FileImporter

public class DefaultFileImporter
extends AbstractFileImporter

Author:
Anahide Tchertchian
See Also:
Serialized Form

Field Summary
static String TYPE_NAME
           
 
Constructor Summary
DefaultFileImporter()
           
 
Method Summary
 DocumentModel create(CoreSession documentManager, Blob input, String path, boolean overwrite, String fullname, TypeManager typeService)
          Creates a file in nearest container.
static String getTypeName(DocumentModel currentDoc)
           
 
Methods inherited from class org.nuxeo.ecm.platform.filemanager.service.extension.AbstractFileImporter
compareTo, create, getFileManagerService, getFilters, getName, getOrder, isEnabled, matches, setEnabled, setFileManagerService, setFilters, setName, setOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

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

DefaultFileImporter

public DefaultFileImporter()
Method Detail

getTypeName

public static String getTypeName(DocumentModel currentDoc)

create

public DocumentModel create(CoreSession documentManager,
                            Blob input,
                            String path,
                            boolean overwrite,
                            String fullname,
                            TypeManager typeService)
                     throws ClientException,
                            IOException
Creates a file in nearest container.

If a document with same title already exists, creates a new version.

Parameters:
documentManager - the manager used to create the Document
input - the content of the File
path - the path of current document
overwrite - a boolean deciding whether to create or update if we find a document with the same fileName
fullname - the filename of the File
Throws:
ClientException
IOException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.