Nuxeo Enterprise Platform 5.1

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

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractPlugin, NotePlugin

public interface Plugin
extends Serializable

FileManagerServiceCommon plugin default interface.

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

Author:
Andreas Kalogeropoulos

Method Summary
 DocumentModel create(CoreSession documentManager, Blob content, String path, boolean overwrite, String filename, TypeManager typeService)
          Creates the document.
 List<String> getFilters()
          Gets filters.
 String getName()
          Gets the plugin name.
 boolean matches(String mimeType)
          Tests whether plugin is suitable for the given mimetype.
 void setFileManagerService(FileManagerService fileManagerService)
          Embed 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.
 

Method Detail

getName

String getName()
Gets the plugin name.

Returns:
a string holding the plugin name

getFilters

List<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(String name)
Sets plugin name.

Parameters:
name - a string holding the name

setFilters

void setFilters(List<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)
Embed 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(String mimeType)
Tests whether plugin is suitable for the given mimetype.

Parameters:
mimeType - the mimetype to test

create

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

Parameters:
documentManager - the manager used to create the Document
content - the content of the File
path - the path were to create the 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
IOException

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.