org.springframework.integration.file.filters
Class AbstractRegexPatternFileListFilter<F>
java.lang.Object
org.springframework.integration.file.filters.AbstractFileListFilter<F>
org.springframework.integration.file.filters.AbstractRegexPatternFileListFilter<F>
- Type Parameters:
F
- the type of file entry
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, FileListFilter<F>
- Direct Known Subclasses:
- FtpRegexPatternFileListFilter, RegexPatternFileListFilter, SftpRegexPatternFileListFilter
public abstract class AbstractRegexPatternFileListFilter<F>
- extends AbstractFileListFilter<F>
- implements org.springframework.beans.factory.InitializingBean
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
Method Summary |
boolean |
accept(F file)
Subclasses must implement this method. |
void |
afterPropertiesSet()
|
protected abstract java.lang.String |
getFilename(F file)
Subclasses must implement this method to extract the file's name. |
void |
setPattern(java.util.regex.Pattern pattern)
|
void |
setPattern(java.lang.String pattern)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRegexPatternFileListFilter
public AbstractRegexPatternFileListFilter(java.lang.String pattern)
AbstractRegexPatternFileListFilter
public AbstractRegexPatternFileListFilter(java.util.regex.Pattern pattern)
setPattern
public void setPattern(java.util.regex.Pattern pattern)
setPattern
public void setPattern(java.lang.String pattern)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
accept
public boolean accept(F file)
- Description copied from class:
AbstractFileListFilter
- Subclasses must implement this method.
- Specified by:
accept
in class AbstractFileListFilter<F>
getFilename
protected abstract java.lang.String getFilename(F file)
- Subclasses must implement this method to extract the file's name.