public interface FileImporter extends Serializable, Comparable<FileImporter>
Responsible for converting given sources to a given type of Document using default.
Modifier and Type | Method and Description |
---|---|
DocumentModel |
create(CoreSession documentManager,
Blob content,
String path,
boolean overwrite,
String filename,
TypeManager typeService)
Creates the document.
|
String |
getDocType()
Returns the document type configured for this
FileImporter , null if no document type is
configured. |
List<String> |
getFilters()
Gets filters.
|
String |
getName()
Gets the plugin name.
|
Integer |
getOrder()
Returns the plugin order for sorting.
|
boolean |
isEnabled() |
boolean |
matches(String mimeType)
Tests whether plugin is suitable for the given mimetype.
|
void |
setDocType(String docType)
Sets the document type configured for this importer.
|
void |
setEnabled(boolean enabled) |
void |
setFileManagerService(FileManagerService fileManagerService)
Embeds a reference to the holding FileManagerService instance to be able to reuse generic file creation utility
methods in specific plugin implementations.
|
void |
setFilters(List<String> filters)
Sets filters.
|
void |
setName(String name)
Sets plugin name.
|
void |
setOrder(Integer order)
Sets the plugin order for sorting.
|
compareTo
String getDocType()
FileImporter
, null
if no document type is
configured.void setDocType(String docType)
List<String> getFilters()
The filters are all the mime/type this plugin can deal with.
void setFilters(List<String> filters)
The filters are all the mime/types this plugin can deal with.
filters
- a list of strings representing each filtervoid setFileManagerService(FileManagerService fileManagerService)
fileManagerService
- instance where the Plugin is registered as a contributionboolean matches(String mimeType)
mimeType
- the mimetype to testDocumentModel create(CoreSession documentManager, Blob content, String path, boolean overwrite, String filename, TypeManager typeService) throws IOException
documentManager
- the manager used to create the Documentcontent
- the content of the Filepath
- the path of current documentoverwrite
- a boolean deciding whether to create or update if we find a document with the same fileNamefilename
- the filename of the FileIOException
boolean isEnabled()
void setEnabled(boolean enabled)
Copyright © 2018 Nuxeo. All rights reserved.