Interface FileImporter
- All Superinterfaces:
Comparable<FileImporter>
,Serializable
- All Known Implementing Classes:
AbstractFileImporter
,AudioImporter
,CSVZipImporter
,DefaultFileImporter
,ExportedZipImporter
,ImagePlugin
,NoteImporter
,RouteModelsZipImporter
,ThreeDImporter
,VideoImporter
FileManagerServiceCommon plugin default interface.
Responsible for converting given sources to a given type of Document using default.
- Author:
- Andreas Kalogeropoulos, Anahide Tchertchian
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(CoreSession documentManager, Blob content, String path, boolean overwrite, String filename, TypeManager typeService) Deprecated.since 10.10.createOrUpdate
(FileImporterContext fileImporterContext) Returns a created or updated document based on the givencontext
.Returns the document type configured for thisFileImporter
,null
if no document type is configured.Gets filters.getName()
Gets the plugin name.getOrder()
Returns the plugin order for sorting.boolean
boolean
Returnstrue
ifcreateOrUpdate(FileImporterContext)
creates more than one document for the given blob,false
otherwise.boolean
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) Deprecated.since 10.3, useFramework.getService(Class)
instead if neededvoid
setFilters
(List<String> filters) Sets filters.void
Sets plugin name.void
Sets the plugin order for sorting.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getName
String getName()Gets the plugin name.- Returns:
- a string holding the plugin name
-
getDocType
String getDocType()Returns the document type configured for thisFileImporter
,null
if no document type is configured.- Since:
- 5.5
-
setDocType
Sets the document type configured for this importer.- Since:
- 5.5
-
getFilters
Gets filters.The filters are all the mime/type this plugin can deal with.
- Returns:
- list of string holding each filters.
-
setName
Sets plugin name.- Parameters:
name
- a string holding the name
-
setFilters
Sets filters.The filters are all the mime/types this plugin can deal with.
- Parameters:
filters
- a list of strings representing each filter
-
setFileManagerService
Deprecated.since 10.3, useFramework.getService(Class)
instead if neededEmbeds a reference to the holding FileManagerService instance to be able to reuse generic file creation utility methods in specific plugin implementations.- Parameters:
fileManagerService
- instance where the Plugin is registered as a contribution
-
matches
Tests whether plugin is suitable for the given mimetype.- Parameters:
mimeType
- the mimetype to test
-
create
@Deprecated DocumentModel create(CoreSession documentManager, Blob content, String path, boolean overwrite, String filename, TypeManager typeService) throws IOException Deprecated.since 10.10. UsecreateOrUpdate(FileImporterContext)
instead.Creates the document.- Parameters:
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 File- Throws:
IOException
-
createOrUpdate
Returns a created or updated document based on the givencontext
.- Throws:
IOException
- Since:
- 10.10
- See Also:
-
isEnabled
boolean isEnabled() -
setEnabled
void setEnabled(boolean enabled) -
getOrder
Integer getOrder()Returns the plugin order for sorting. -
setOrder
Sets the plugin order for sorting. -
isOneToMany
boolean isOneToMany()Returnstrue
ifcreateOrUpdate(FileImporterContext)
creates more than one document for the given blob,false
otherwise.- Since:
- 10.3
-