org.codehaus.mojo.appassembler.util
Class FileFilterHelper

java.lang.Object
  extended by org.codehaus.mojo.appassembler.util.FileFilterHelper

public class FileFilterHelper
extends Object

This is helper class to summarize all filters.

Author:
Karl Heinz Marbaise

Constructor Summary
FileFilterHelper()
           
 
Method Summary
static org.apache.commons.io.filefilter.IOFileFilter createDefaultFilter()
          This will create a FileFilter which is the same as in plexus-utils (DirectoryScanner.DEFAULTEXCLUDES).
static org.apache.commons.io.filefilter.IOFileFilter makeDirectoryAware(org.apache.commons.io.filefilter.IOFileFilter filter, String directoryName)
          Make the given IOFileFilter aware of directories.
static org.apache.commons.io.filefilter.IOFileFilter makeFileNameAware(org.apache.commons.io.filefilter.IOFileFilter filter, String fileName)
          Make the given IOFileFilter aware of files.
static org.apache.commons.io.filefilter.IOFileFilter makePatternFileNameAware(org.apache.commons.io.filefilter.IOFileFilter filter, String pattern)
          Make the given IOFileFilter aware of the given pattern.
static org.apache.commons.io.filefilter.IOFileFilter makeSuffixAware(org.apache.commons.io.filefilter.IOFileFilter filter, String suffixFileName)
          Make the given IOFileFilter aware of an suffix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFilterHelper

public FileFilterHelper()
Method Detail

makeDirectoryAware

public static org.apache.commons.io.filefilter.IOFileFilter makeDirectoryAware(org.apache.commons.io.filefilter.IOFileFilter filter,
                                                                               String directoryName)
Make the given IOFileFilter aware of directories.

Parameters:
filter - The filter to make aware of directories.
directoryName - The directory name which should be payed attention to.
Returns:
The new generated filter.

makeFileNameAware

public static org.apache.commons.io.filefilter.IOFileFilter makeFileNameAware(org.apache.commons.io.filefilter.IOFileFilter filter,
                                                                              String fileName)
Make the given IOFileFilter aware of files.

Parameters:
filter - The filter to make aware of files.
fileName - The file name which should be payed attention to.
Returns:
The new generated filter.

makeSuffixAware

public static org.apache.commons.io.filefilter.IOFileFilter makeSuffixAware(org.apache.commons.io.filefilter.IOFileFilter filter,
                                                                            String suffixFileName)
Make the given IOFileFilter aware of an suffix.

Parameters:
filter - The filter to make aware of an suffix.
suffixFileName - The suffix name which should be payed attention to.
Returns:
The new generated filter.

makePatternFileNameAware

public static org.apache.commons.io.filefilter.IOFileFilter makePatternFileNameAware(org.apache.commons.io.filefilter.IOFileFilter filter,
                                                                                     String pattern)
Make the given IOFileFilter aware of the given pattern.

Parameters:
filter - The filter to make aware of the pattern.
pattern - The pattern which should be payed attention to.
Returns:
The new generated filter.

createDefaultFilter

public static org.apache.commons.io.filefilter.IOFileFilter createDefaultFilter()
This will create a FileFilter which is the same as in plexus-utils (DirectoryScanner.DEFAULTEXCLUDES).

Returns:
The initialized filter.


Copyright © 2006-2013 Codehaus. All Rights Reserved.