Class AbstractSimplePatternFileListFilter<F>
java.lang.Object
org.springframework.integration.file.filters.AbstractFileListFilter<F>
org.springframework.integration.file.filters.AbstractDirectoryAwareFileListFilter<F>
org.springframework.integration.file.filters.AbstractSimplePatternFileListFilter<F>
- All Implemented Interfaces:
FileListFilter<F>
- Direct Known Subclasses:
SimplePatternFileListFilter
public abstract class AbstractSimplePatternFileListFilter<F> extends AbstractDirectoryAwareFileListFilter<F>
Base class for filters that support ant style path expressions, which are less powerful
but more readable than regular expressions. This filter only filters on the name of the
file, the rest of the path is ignored.
- Since:
- 2.0
- See Also:
AntPathMatcher,AbstractRegexPatternFileListFilter
-
Constructor Summary
Constructors Constructor Description AbstractSimplePatternFileListFilter(java.lang.String path) -
Method Summary
Modifier and Type Method Description booleanaccept(F file)Accepts the given file if its name matches the pattern.protected abstract java.lang.StringgetFilename(F file)Subclasses must implement this method to extract the file's name.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
-
AbstractSimplePatternFileListFilter
public AbstractSimplePatternFileListFilter(java.lang.String path)
-
-
Method Details
-
accept
Accepts the given file if its name matches the pattern.- 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.
-