org.ikasan.connector.basefiletransfer.net
Class ClientFilenameFilter

java.lang.Object
  extended by org.ikasan.connector.basefiletransfer.net.ClientFilenameFilter
All Implemented Interfaces:
ClientFilter

public class ClientFilenameFilter
extends java.lang.Object
implements ClientFilter

Author:
Ikasan Development Team

Constructor Summary
ClientFilenameFilter(java.lang.String patternString)
          Constructor
 
Method Summary
 java.util.List<ClientListEntry> filter(java.util.List<ClientListEntry> entries)
          Method to filter out unmatched ClientListEntry objects from an List.
 java.util.List<java.lang.String> filter(java.lang.String[] entries)
          Utility method for filtering local directories as returned by dir.list()
 boolean match(ClientListEntry entry)
          Method to match ClientListEntry objects based on whether they the regular expression provided when the object is instantiated.
 boolean match(java.lang.String entry)
          Return true if the entry matches the pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientFilenameFilter

public ClientFilenameFilter(java.lang.String patternString)
Constructor

Parameters:
patternString - The filename pattern to match. This could be any regular expression. Some examples are:
  • "filename.java"
  • "[Ff]ilename.java"
  • "filename.+"
Method Detail

match

public boolean match(ClientListEntry entry)
Method to match ClientListEntry objects based on whether they the regular expression provided when the object is instantiated.

Specified by:
match in interface ClientFilter
Parameters:
entry - The ClientListEntry to match.
Returns:
true if ClientListEntry's filename matches the pattern, false otherwise.

match

public boolean match(java.lang.String entry)
Return true if the entry matches the pattern

Parameters:
entry -
Returns:
true if the entry matches the pattern else false

filter

public java.util.List<ClientListEntry> filter(java.util.List<ClientListEntry> entries)
Method to filter out unmatched ClientListEntry objects from an List.

Specified by:
filter in interface ClientFilter
Parameters:
entries - The List of ClientListEntries to filter.
Returns:
A AList of all ClientListEntries matching this filter's criteria

filter

public java.util.List<java.lang.String> filter(java.lang.String[] entries)
Utility method for filtering local directories as returned by dir.list()

Parameters:
entries -
Returns:
List of filtered directories


Copyright © 2007-2010 Ikasan. All Rights Reserved.