Page History
...
Refactoring MediaFilterManager for greater reuse and flexibility
This tutorial will cover the refactoring of the MediaFilter framework for DSpace, freeing Mediafilter configuration to be reused on other parts of the codebase.
...
- List of Classnames are in "filter.plugins" property in DSpace configuration
List of Input BitstreamFormats that are supported by the filter are configured as a lookup of individual filter property lists lists "filter.\[~mdiggory:FILTER-PLUGIN-CLASS\]inputFormats";Wiki Markup
List of Format Strings is maintained separately from the fitleres themselves, thus we have two in memory "lookup lists" to deal with in mediafilter manager
...
Code Block |
---|
//key (in dspace.cfg) which lists all enabled filters by name
public static final String MEDIA_FILTER_PLUGINS_KEY = "filter.plugins";
//prefix (in dspace.cfg) for all filter properties
public static final String FILTER_PREFIX = "filter";
//suffix (in dspace.cfg) for input formats supported by each filter
public static final String INPUT_FORMATS_SUFFIX = "inputFormats";
...
//separator in filterFormats Map between a filter class name and a plugin name,
//for MediaFilters which extend SelfNamedPlugin (\034 is "file separator" char)
public static final String FILTER_PLUGIN_SEPARATOR = "\034";
|
Overview
Content Tools