Class AbstractRegexPatternFileListFilter<F>
java.lang.Object
org.springframework.integration.file.filters.AbstractFileListFilter<F>
org.springframework.integration.file.filters.AbstractDirectoryAwareFileListFilter<F>
org.springframework.integration.file.filters.AbstractRegexPatternFileListFilter<F>
- Type Parameters:
F- the type of file entry
- All Implemented Interfaces:
FileListFilter<F>
- Direct Known Subclasses:
FtpRegexPatternFileListFilter,RegexPatternFileListFilter,SftpRegexPatternFileListFilter
public abstract class AbstractRegexPatternFileListFilter<F> extends AbstractDirectoryAwareFileListFilter<F>
Filters a listing of files by qualifying their 'name'
against a regular expression (an instance of
Pattern)- Since:
- 2.0
- Author:
- Iwein Fuld, Josh Long, Artem Bilan
-
Constructor Summary
Constructors Constructor Description AbstractRegexPatternFileListFilter(String pattern)AbstractRegexPatternFileListFilter(Pattern pattern) -
Method Summary
Modifier and Type Method Description booleanaccept(F file)Subclasses must implement this method.protected abstract StringgetFilename(F file)Subclasses must implement this method to extract the file's name.voidsetPattern(String pattern)voidsetPattern(Pattern pattern)Methods inherited from class org.springframework.integration.file.filters.AbstractDirectoryAwareFileListFilter
alwaysAccept, isDirectory, setAlwaysAcceptDirectoriesMethods inherited from class org.springframework.integration.file.filters.AbstractFileListFilter
filterFiles, supportsSingleFileFiltering
-
Constructor Details
-
Method Details
-
setPattern
-
setPattern
-
accept
Description copied from class:AbstractFileListFilterSubclasses must implement this method.- Specified by:
acceptin interfaceFileListFilter<F>- Specified by:
acceptin classAbstractFileListFilter<F>- Parameters:
file- The file.- Returns:
- true if the file passes the filter.
- See Also:
FileListFilter.supportsSingleFileFiltering()
-
getFilename
Subclasses must implement this method to extract the file's name.- Parameters:
file- The file.- Returns:
- The file name.
-