org.springframework.integration.file
Class CompositeFileListFilter
java.lang.Object
org.springframework.integration.file.CompositeFileListFilter
- All Implemented Interfaces:
- FileListFilter
public class CompositeFileListFilter
- extends Object
- implements FileListFilter
Composition that delegates to multiple FileFilter
s. The composition is AND based, meaning that a file must
pass through each filter's filterFiles(java.io.File[])
method in order to be accepted by the composite.
- Author:
- Iwein Fuld, Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompositeFileListFilter
public CompositeFileListFilter(FileListFilter... fileFilters)
CompositeFileListFilter
public CompositeFileListFilter(Collection<FileListFilter> fileFilters)
filterFiles
public List<File> filterFiles(File[] files)
- Filters out files and returns the files that are left in a list, or an
empty list when a null is passed in.
This implementation delegates to a collection of filters and returns only files that pass all the filters.
- Specified by:
filterFiles
in interface FileListFilter
addFilter
public CompositeFileListFilter addFilter(FileListFilter... filters)
- Parameters:
filters
- one or more new filters to add
- Returns:
- this CompositeFileFilter instance with the added filters
- See Also:
addFilters(Collection)
addFilters
public CompositeFileListFilter addFilters(Collection<FileListFilter> filtersToAdd)
- Not thread safe. Only a single thread may add filters at a time.
Add the new filters to this CompositeFileFilter while maintaining the existing filters.
- Parameters:
filtersToAdd
- a list of filters to add
- Returns:
- this CompositeFileFilter instance with the added filters
Copyright © 2010. All Rights Reserved.