org.springframework.integration.file.filters
Class AbstractRegexPatternFileListFilter<F>

java.lang.Object
  extended by org.springframework.integration.file.filters.AbstractFileListFilter<F>
      extended by org.springframework.integration.file.filters.AbstractRegexPatternFileListFilter<F>
Type Parameters:
F - the type of file entry
All Implemented Interfaces:
InitializingBean, FileListFilter<F>
Direct Known Subclasses:
FtpRegexPatternFileListFilter, RegexPatternFileListFilter, SftpRegexPatternFileListFilter

public abstract class AbstractRegexPatternFileListFilter<F>
extends AbstractFileListFilter<F>
implements InitializingBean

Filters a listing of files by qualifying their 'name' against a regular expression (an instance of Pattern)

Since:
2.0

Constructor Summary
AbstractRegexPatternFileListFilter(java.util.regex.Pattern pattern)
           
AbstractRegexPatternFileListFilter(java.lang.String pattern)
           
 
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 org.springframework.integration.file.filters.AbstractFileListFilter
filterFiles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRegexPatternFileListFilter

public AbstractRegexPatternFileListFilter(java.lang.String pattern)

AbstractRegexPatternFileListFilter

public AbstractRegexPatternFileListFilter(java.util.regex.Pattern pattern)
Method Detail

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 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.