com.myjavaworld.ftp
Class RemoteFileFilter

java.lang.Object
  extended by com.myjavaworld.ftp.RemoteFileFilter
All Implemented Interfaces:
Filter

public class RemoteFileFilter
extends Object
implements Filter

An implementation of Filter to filter files on the FTP host. This filter supports the following:

Version:
1.0
Author:
Sai Pullabhotla, psai [at] jMethods [dot] com

Constructor Summary
RemoteFileFilter(RegexFilter regexFilter, DateFilter dateFilter)
          Creates an instance of RemoteFileFilter.
RemoteFileFilter(RegexFilter regexFilter, DateFilter dateFilter, boolean exclusionFilter)
           
 
Method Summary
 boolean accept(Object obj)
          Whether or not the given object will pass through this filter.
 DateFilter getDateFilter()
          Returns the date filter.
 RegexFilter getRegexFilter()
          Returns the name filter.
 boolean isExclusionFilter()
           
 void setDateFilter(DateFilter dateFilter)
          Sets the date filter to the given filter.
 void setExclusionFilter(boolean exclusionFilter)
           
 void setRegexFilter(RegexFilter regexFilter)
          Sets the name filter to the given filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteFileFilter

public RemoteFileFilter(RegexFilter regexFilter,
                        DateFilter dateFilter)
Creates an instance of RemoteFileFilter.

Parameters:
regexFilter -
dateFilter -

RemoteFileFilter

public RemoteFileFilter(RegexFilter regexFilter,
                        DateFilter dateFilter,
                        boolean exclusionFilter)
Method Detail

getDateFilter

public DateFilter getDateFilter()
Returns the date filter.

Returns:
Returns the dateFilter.May return null if a date filter is not set.

setDateFilter

public void setDateFilter(DateFilter dateFilter)
Sets the date filter to the given filter.

Parameters:
dateFilter - The dateFilter to set.

getRegexFilter

public RegexFilter getRegexFilter()
Returns the name filter.

Returns:
Returns the regexFilter. May return null if a name filter is not set.

setRegexFilter

public void setRegexFilter(RegexFilter regexFilter)
Sets the name filter to the given filter.

Parameters:
regexFilter - The regexFilter to set.

setExclusionFilter

public void setExclusionFilter(boolean exclusionFilter)

isExclusionFilter

public boolean isExclusionFilter()

accept

public boolean accept(Object obj)
Description copied from interface: Filter
Whether or not the given object will pass through this filter.

Specified by:
accept in interface Filter
Parameters:
obj - The object to test.
Returns:
true, if the object will pass through this filter. false otherwise.


Copyright © 2000-2012 jMethods, Inc.. All Rights Reserved.