Nuxeo Enterprise Platform 5.1

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

java.lang.Object
  extended by org.nuxeo.ecm.platform.filemanager.service.extension.AbstractPlugin
All Implemented Interfaces:
Serializable, Plugin
Direct Known Subclasses:
NotePlugin

public abstract class AbstractPlugin
extends Object
implements Plugin

Plugin abstract class.

Default plugin behavior.

Author:
Andreas Kalogeropolos
See Also:
Plugin, Serialized Form

Field Summary
protected  FileManagerService fileManagerService
           
protected  List<String> filters
           
protected  String name
           
protected  List<Pattern> patterns
           
 
Constructor Summary
AbstractPlugin()
           
 
Method Summary
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.platform.filemanager.service.extension.Plugin
create
 

Field Detail

name

protected String name

filters

protected List<String> filters

patterns

protected List<Pattern> patterns

fileManagerService

protected FileManagerService fileManagerService
Constructor Detail

AbstractPlugin

public AbstractPlugin()
Method Detail

getFilters

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

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

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

setFilters

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

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

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

matches

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

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

getName

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

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

setName

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

Specified by:
setName in interface Plugin
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: Plugin
Embed 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 Plugin
Parameters:
fileManagerService - instance where the Plugin is registered as a contribution

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.