public class MediaFilterServiceImpl extends Object implements MediaFilterService, org.springframework.beans.factory.InitializingBean
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected BitstreamFormatService |
bitstreamFormatService |
protected BitstreamService |
bitstreamService |
protected BundleService |
bundleService |
protected CollectionService |
collectionService |
protected CommunityService |
communityService |
protected ConfigurationService |
configurationService |
protected Item |
currentItem |
protected List<FormatFilter> |
filterClasses |
protected Map<String,List<String>> |
filterFormats |
protected GroupService |
groupService |
protected boolean |
isForce |
protected boolean |
isQuiet |
protected boolean |
isVerbose |
protected ItemService |
itemService |
protected int |
max2Process |
protected int |
processed |
protected List<String> |
publicFiltersClasses |
protected List<String> |
skipList |
FILTER_PLUGIN_SEPARATOR| Modifier | Constructor and Description |
|---|---|
protected |
MediaFilterServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
applyFiltersAllItems(Context context) |
void |
applyFiltersCollection(Context context,
Collection collection) |
void |
applyFiltersCommunity(Context context,
Community community) |
void |
applyFiltersItem(Context c,
Item item) |
boolean |
filterBitstream(Context context,
Item myItem,
Bitstream myBitstream)
Attempt to filter a bitstream.
|
boolean |
filterItem(Context context,
Item myItem)
Iterate through the item's bitstreams in the ORIGINAL bundle, applying
filters if possible.
|
Item |
getCurrentItem()
Return the item that is currently being processed/filtered
by the MediaFilterManager.
|
boolean |
inSkipList(String identifier)
Check whether or not to skip processing the given identifier.
|
boolean |
processBitstream(Context context,
Item item,
Bitstream source,
FormatFilter formatFilter)
A utility class that calls the virtual methods
from the current MediaFilter class.
|
void |
setFilterClasses(List<FormatFilter> filterClasses) |
void |
setFilterFormats(Map<String,List<String>> filterFormats) |
void |
setForce(boolean isForce) |
void |
setMax2Process(int max2Process) |
void |
setQuiet(boolean isQuiet) |
void |
setSkipList(List<String> skipList) |
void |
setVerbose(boolean isVerbose) |
@Autowired(required=true) protected AuthorizeService authorizeService
@Autowired(required=true) protected BitstreamFormatService bitstreamFormatService
@Autowired(required=true) protected BitstreamService bitstreamService
@Autowired(required=true) protected BundleService bundleService
@Autowired(required=true) protected CollectionService collectionService
@Autowired(required=true) protected CommunityService communityService
@Autowired(required=true) protected GroupService groupService
@Autowired(required=true) protected ItemService itemService
@Autowired(required=true) protected ConfigurationService configurationService
protected int max2Process
protected int processed
protected Item currentItem
protected List<FormatFilter> filterClasses
protected boolean isVerbose
protected boolean isQuiet
protected boolean isForce
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void applyFiltersAllItems(Context context) throws Exception
applyFiltersAllItems in interface MediaFilterServiceExceptionpublic void applyFiltersCommunity(Context context, Community community) throws Exception
applyFiltersCommunity in interface MediaFilterServiceExceptionpublic void applyFiltersCollection(Context context, Collection collection) throws Exception
applyFiltersCollection in interface MediaFilterServiceExceptionpublic void applyFiltersItem(Context c, Item item) throws Exception
applyFiltersItem in interface MediaFilterServiceExceptionpublic boolean filterItem(Context context, Item myItem) throws Exception
MediaFilterServicefilterItem in interface MediaFilterServicecontext - contextmyItem - itemException - if errorpublic boolean filterBitstream(Context context, Item myItem, Bitstream myBitstream) throws Exception
MediaFilterServicefilterBitstream in interface MediaFilterServicecontext - contextmyItem - itemmyBitstream - bitstreamException - if errorpublic boolean processBitstream(Context context, Item item, Bitstream source, FormatFilter formatFilter) throws Exception
MediaFilterServiceprocessBitstream in interface MediaFilterServicecontext - contextitem - item containing bitstream to processsource - source bitstream to processformatFilter - FormatFilter to perform filteringException - if error occurspublic Item getCurrentItem()
MediaFilterServiceThis allows FormatFilters to retrieve the Item object in case they need access to item-level information for their format transformations/conversions.
getCurrentItem in interface MediaFilterServicepublic boolean inSkipList(String identifier)
MediaFilterServiceinSkipList in interface MediaFilterServiceidentifier - identifier (handle) of a community, collection or itempublic void setVerbose(boolean isVerbose)
setVerbose in interface MediaFilterServicepublic void setQuiet(boolean isQuiet)
setQuiet in interface MediaFilterServicepublic void setForce(boolean isForce)
setForce in interface MediaFilterServicepublic void setMax2Process(int max2Process)
setMax2Process in interface MediaFilterServicepublic void setFilterClasses(List<FormatFilter> filterClasses)
setFilterClasses in interface MediaFilterServicepublic void setSkipList(List<String> skipList)
setSkipList in interface MediaFilterServicepublic void setFilterFormats(Map<String,List<String>> filterFormats)
setFilterFormats in interface MediaFilterServiceCopyright © 2016 DuraSpace. All rights reserved.