Class SimplePatternFileListFilter
java.lang.Object
org.springframework.integration.file.filters.AbstractFileListFilter<F>
org.springframework.integration.file.filters.AbstractDirectoryAwareFileListFilter<F>
org.springframework.integration.file.filters.AbstractSimplePatternFileListFilter<java.io.File>
org.springframework.integration.file.filters.SimplePatternFileListFilter
- All Implemented Interfaces:
FileListFilter<java.io.File>
public class SimplePatternFileListFilter extends AbstractSimplePatternFileListFilter<java.io.File>
Filter that supports 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
-
Constructor Summary
Constructors Constructor Description SimplePatternFileListFilter(java.lang.String path) -
Method Summary
Modifier and Type Method Description protected java.lang.StringgetFilename(java.io.File file)Subclasses must implement this method to extract the file's name.protected booleanisDirectory(java.io.File file)Subclasses must implement this method to indicate whether the file is a directory or not.Methods inherited from class org.springframework.integration.file.filters.AbstractSimplePatternFileListFilter
acceptMethods inherited from class org.springframework.integration.file.filters.AbstractDirectoryAwareFileListFilter
alwaysAccept, setAlwaysAcceptDirectoriesMethods inherited from class org.springframework.integration.file.filters.AbstractFileListFilter
filterFiles, supportsSingleFileFiltering
-
Constructor Details
-
SimplePatternFileListFilter
public SimplePatternFileListFilter(java.lang.String path)
-
-
Method Details
-
getFilename
protected java.lang.String getFilename(java.io.File file)Description copied from class:AbstractSimplePatternFileListFilterSubclasses must implement this method to extract the file's name.- Specified by:
getFilenamein classAbstractSimplePatternFileListFilter<java.io.File>- Parameters:
file- The file.- Returns:
- The file name.
-
isDirectory
protected boolean isDirectory(java.io.File file)Description copied from class:AbstractDirectoryAwareFileListFilterSubclasses must implement this method to indicate whether the file is a directory or not.- Specified by:
isDirectoryin classAbstractDirectoryAwareFileListFilter<java.io.File>- Parameters:
file- the file.- Returns:
- true if it's a directory.
-