public abstract class AbstractFileImporter extends Object implements FileImporter
Default file importer behavior.
FileImporter
,
Serialized FormConstructor and Description |
---|
AbstractFileImporter() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FileImporter other) |
DocumentModel |
create(CoreSession documentManager,
File file,
String path,
boolean overwrite,
String mimeType,
TypeManager typService) |
String |
getDocType()
Returns the document type configured for this
FileImporter ,
null if no document type is configured. |
FileManagerService |
getFileManagerService() |
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public List<String> getFilters()
FileImporter
The filters are all the mime/type this plugin can deal with.
getFilters
in interface FileImporter
public void setFilters(List<String> filters)
FileImporter
The filters are all the mime/types this plugin can deal with.
setFilters
in interface FileImporter
filters
- a list of strings representing each filterpublic boolean matches(String mimeType)
FileImporter
matches
in interface FileImporter
mimeType
- the mimetype to testpublic String getName()
FileImporter
getName
in interface FileImporter
public void setName(String name)
FileImporter
setName
in interface FileImporter
name
- a string holding the namepublic String getDocType()
FileImporter
FileImporter
,
null
if no document type is configured.getDocType
in interface FileImporter
public void setDocType(String docType)
FileImporter
setDocType
in interface FileImporter
public DocumentModel create(CoreSession documentManager, File file, String path, boolean overwrite, String mimeType, TypeManager typService)
public FileManagerService getFileManagerService()
public void setFileManagerService(FileManagerService fileManagerService)
FileImporter
setFileManagerService
in interface FileImporter
fileManagerService
- instance where the Plugin is registered as a
contributionpublic void setEnabled(boolean enabled)
setEnabled
in interface FileImporter
public boolean isEnabled()
isEnabled
in interface FileImporter
public Integer getOrder()
FileImporter
getOrder
in interface FileImporter
public void setOrder(Integer order)
FileImporter
setOrder
in interface FileImporter
public int compareTo(FileImporter other)
compareTo
in interface Comparable<FileImporter>
Copyright © 2011 Nuxeo SA. All Rights Reserved.