Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.filemanager.service.extension
Interface FileImporter

All Superinterfaces:
java.lang.Comparable<FileImporter>, java.io.Serializable
All Known Subinterfaces:
Plugin
All Known Implementing Classes:
AbstractFileImporter, AbstractPlugin, CSVZipImporter, DefaultFileImporter, ExportedZipImporter, ImagePlugin, NoteImporter

public interface FileImporter
extends java.io.Serializable, java.lang.Comparable<FileImporter>

FileManagerServiceCommon plugin default interface.

Responsible for converting given sources to a given type of Document using default.

Author:
Andreas Kalogeropoulos, Anahide Tchertchian

Method Summary
 DocumentModel create(CoreSession documentManager, Blob content, java.lang.String path, boolean overwrite, java.lang.String filename, TypeManager typeService)
          Creates the document.
 java.util.List<java.lang.String> getFilters()
          Gets filters.
 java.lang.String getName()
          Gets the plugin name.
 java.lang.Integer getOrder()
          Returns the plugin order for sorting.
 boolean isEnabled()
           
 boolean matches(java.lang.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(java.util.List<java.lang.String> filters)
          Sets filters.
 void setName(java.lang.String name)
          Sets plugin name.
 void setOrder(java.lang.Integer order)
          Sets the plugin order for sorting.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getName

java.lang.String getName()
Gets the plugin name.

Returns:
a string holding the plugin name

getFilters

java.util.List<java.lang.String> getFilters()
Gets filters.

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

Returns:
list of string holding each filters.

setName

void setName(java.lang.String name)
Sets plugin name.

Parameters:
name - a string holding the name

setFilters

void setFilters(java.util.List<java.lang.String> filters)
Sets filters.

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

Parameters:
filters - a list of strings representing each filter

setFileManagerService

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.

Parameters:
fileManagerService - instance where the Plugin is registered as a contribution

matches

boolean matches(java.lang.String mimeType)
Tests whether plugin is suitable for the given mimetype.

Parameters:
mimeType - the mimetype to test

create

DocumentModel create(CoreSession documentManager,
                     Blob content,
                     java.lang.String path,
                     boolean overwrite,
                     java.lang.String filename,
                     TypeManager typeService)
                     throws ClientException,
                            java.io.IOException
Creates the document.

Parameters:
documentManager - the manager used to create the Document
content - 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
filename - the filename of the File
Throws:
ClientException
java.io.IOException

isEnabled

boolean isEnabled()

setEnabled

void setEnabled(boolean enabled)

getOrder

java.lang.Integer getOrder()
Returns the plugin order for sorting.


setOrder

void setOrder(java.lang.Integer order)
Sets the plugin order for sorting.


Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.