Nuxeo ECM Projects 5.4.3-SNAPSHOT

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

java.lang.Object
  extended by org.nuxeo.ecm.platform.filemanager.service.extension.AbstractFileImporter
All Implemented Interfaces:
Serializable, Comparable<FileImporter>, FileImporter
Direct Known Subclasses:
AbstractPlugin, CSVZipImporter, DefaultFileImporter, ExportedZipImporter, ImagePlugin, NoteImporter

public abstract class AbstractFileImporter
extends Object
implements FileImporter

File importer abstract class.

Default file importer behavior.

Author:
Andreas Kalogeropolos
See Also:
FileImporter, Serialized Form

Constructor Summary
AbstractFileImporter()
           
 
Method Summary
 int compareTo(FileImporter other)
           
 DocumentModel create(CoreSession documentManager, File file, String path, boolean overwrite, String mimeType, TypeManager typService)
           
 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 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.platform.filemanager.service.extension.FileImporter
create
 

Constructor Detail

AbstractFileImporter

public AbstractFileImporter()
Method Detail

getFilters

public List<String> getFilters()
Description copied from interface: FileImporter
Gets filters.

The filters are all the mime/type this plugin can deal with.

Specified by:
getFilters in interface FileImporter
Returns:
list of string holding each filters.

setFilters

public void setFilters(List<String> filters)
Description copied from interface: FileImporter
Sets filters.

The filters are all the mime/types this plugin can deal with.

Specified by:
setFilters in interface FileImporter
Parameters:
filters - a list of strings representing each filter

matches

public boolean matches(String mimeType)
Description copied from interface: FileImporter
Tests whether plugin is suitable for the given mimetype.

Specified by:
matches in interface FileImporter
Parameters:
mimeType - the mimetype to test

getName

public String getName()
Description copied from interface: FileImporter
Gets the plugin name.

Specified by:
getName in interface FileImporter
Returns:
a string holding the plugin name

setName

public void setName(String name)
Description copied from interface: FileImporter
Sets plugin name.

Specified by:
setName in interface FileImporter
Parameters:
name - a string holding the name

create

public DocumentModel create(CoreSession documentManager,
                            File file,
                            String path,
                            boolean overwrite,
                            String mimeType,
                            TypeManager typService)

getFileManagerService

public FileManagerService getFileManagerService()

setFileManagerService

public void setFileManagerService(FileManagerService fileManagerService)
Description copied from interface: FileImporter
Embeds a reference to the holding FileManagerService instance to be able to reuse generic file creation utility methods in specific plugin implementations.

Specified by:
setFileManagerService in interface FileImporter
Parameters:
fileManagerService - instance where the Plugin is registered as a contribution

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface FileImporter

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface FileImporter

getOrder

public Integer getOrder()
Description copied from interface: FileImporter
Returns the plugin order for sorting.

Specified by:
getOrder in interface FileImporter

setOrder

public void setOrder(Integer order)
Description copied from interface: FileImporter
Sets the plugin order for sorting.

Specified by:
setOrder in interface FileImporter

compareTo

public int compareTo(FileImporter other)
Specified by:
compareTo in interface Comparable<FileImporter>

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.