We have many requirements for file sources which filter based on a regular expression against the file name. Typically we have many of these in a single integration context, so it would be great if we could write:
Code:
<file-source id="fileSource" type="text" directory="/input" filename-regex="rental*"/>
<file-source id="fileSource" type="text" directory="/input" filename-regex="sale*"/>
<file-source id="fileSource" type="text" directory="/input" filename-regex="disposal*"/>
ORO, which is already an SI dependency, provides three pre-baked FilenameFilter implementations in org.apache.oro.io which take their regex from a String: AwkFilenameFilter, GlobFilenameFilter and Perl5FilenameFilter.
What do you think of providing a regex attribute to file-source, and would it be reasonable to implement it with one of the ORO filters? I'll volunteer to code it as long as it's not a misguided idea :-).
Thanks,
Jerry Gaines