org.springframework.integration.file
Class CompositeFileListFilter
java.lang.Object
org.springframework.integration.file.CompositeFileListFilter
- All Implemented Interfaces:
- FileListFilter
public class CompositeFileListFilter
- extends java.lang.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(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(java.util.Collection<FileListFilter> fileFilters)
filterFiles
public java.util.List<java.io.File> filterFiles(java.io.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(java.util.Collection<FileListFilter> filtersToAdd)
- 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