RSE
Release 1.0

org.eclipse.rse.dstore.universal.miners.filesystem
Class UniversalFileSystemFilter

java.lang.Object
  extended byorg.eclipse.rse.dstore.universal.miners.filesystem.UniversalFileSystemFilter
All Implemented Interfaces:
FilenameFilter, IClientServerConstants, IServiceConstants, IUniversalDataStoreConstants

public class UniversalFileSystemFilter
extends Object
implements FilenameFilter, IUniversalDataStoreConstants, IClientServerConstants


Field Summary
protected  boolean allowDirs
           
protected  boolean allowFiles
           
protected  boolean caseSensitive
           
protected  String filter
           
protected  NamePatternMatcher folderNameMatcher
           
protected  int includeFilesOrFolders
           
protected  IMatcher matcher
           
 
Fields inherited from interface org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants
BINARY_MODE, BUFFER_SIZE, C_COPY, C_COPY_BATCH, C_CREATE_FILE, C_CREATE_FOLDER, C_DELETE, C_DELETE_BATCH, C_DOWNLOAD_FILE, C_QUERY_GET_REMOTE_OBJECT, C_QUERY_QUALIFIED_CLASSNAME, C_QUERY_ROOTS, C_QUERY_UNUSED_PORT, C_QUERY_VIEW_ALL, C_QUERY_VIEW_FILES, C_QUERY_VIEW_FOLDERS, C_RENAME, C_SYSTEM_ENCODING, DOWNLOAD_RESULT_EXCEPTION, DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION, DOWNLOAD_RESULT_IO_EXCEPTION, DOWNLOAD_RESULT_SUCCESS_MESSAGE, DOWNLOAD_RESULT_SUCCESS_TYPE, DOWNLOAD_RESULT_UNEXPECTED_ERROR, DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION, KB_IN_BYTES, MESSAGE_DESCRIPTOR, NUM_OF_KB, TEXT_MODE, TYPE_QUALIFIED_CLASSNAME, UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR, UNIVERSAL_FILE_DESCRIPTOR, UNIVERSAL_FILESYSTEM_MINER, UNIVERSAL_FILTER_DESCRIPTOR, UNIVERSAL_FOLDER_DESCRIPTOR, UNIVERSAL_NODE_DESCRIPTOR, UNIVERSAL_TEMP_DESCRIPTOR, UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR, UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR
 
Fields inherited from interface org.eclipse.rse.services.clientserver.IServiceConstants
FAILED, FAILED_TO_DELETE_DIR, FAILED_WITH_DOES_NOT_EXIST, FAILED_WITH_EXCEPTION, FAILED_WITH_EXIST, FAILED_WITH_SECURITY, SUCCESS, TOKEN_SEPARATOR, UNEXPECTED_ERROR, VERSION_1
 
Fields inherited from interface org.eclipse.rse.services.clientserver.IClientServerConstants
FILEMSG_ARCHIVE_CORRUPTED, FILEMSG_COPY_FILE_FAILED, FILEMSG_CREATE_FILE_FAILED, FILEMSG_CREATE_FILE_FAILED_EXIST, FILEMSG_CREATE_FOLDER_FAILED, FILEMSG_CREATE_FOLDER_FAILED_EXIST, FILEMSG_CREATE_RESOURCE_NOTVISIBLE, FILEMSG_DELETE_FILE_FAILED, FILEMSG_ERROR_NOFILETYPES, FILEMSG_MOVE_FILE_FAILED, FILEMSG_MOVE_TARGET_EQUALS_SOURCE, FILEMSG_NO_PERMISSION, FILEMSG_REMOTE_SAVE_FAILED, FILEMSG_RENAME_FILE_FAILED, FILEMSG_RENAME_RESOURCE_NOTVISIBLE, INCLUDE_ALL, INCLUDE_FILES_ONLY, INCLUDE_FOLDERS_ONLY, MSG_EXCEPTION_DELETING, MSG_EXCEPTION_MOVING, MSG_EXCEPTION_OCCURRED, MSG_EXCEPTION_RENAMING
 
Constructor Summary
UniversalFileSystemFilter(String fString, boolean files, boolean folders, boolean caseSensitive)
          Insert the method's description here.
 
Method Summary
 boolean accept(File dir, String nameFilter)
          Tests if a specified file should be included in a file list.
protected  void setListValues(int includeFilesOrFolders, String nameFilter)
           
protected  void setListValues(int includeFilesOrFolders, String folderNameFilter, String fileNameFilter)
          Overloaded method to set variables to affect the folder content subsetting, when there is separate filters for both folder names and filter names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filter

protected String filter

allowDirs

protected boolean allowDirs

allowFiles

protected boolean allowFiles

caseSensitive

protected boolean caseSensitive

matcher

protected IMatcher matcher

folderNameMatcher

protected NamePatternMatcher folderNameMatcher

includeFilesOrFolders

protected int includeFilesOrFolders
Constructor Detail

UniversalFileSystemFilter

public UniversalFileSystemFilter(String fString,
                                 boolean files,
                                 boolean folders,
                                 boolean caseSensitive)
Insert the method's description here. Creation date: (2/22/01 1:15:54 PM)

Method Detail

accept

public boolean accept(File dir,
                      String nameFilter)
Tests if a specified file should be included in a file list.

Specified by:
accept in interface FilenameFilter
Parameters:
dir - the directory in which the file was found.
Returns:
true if and only if the name should be included in the file list; false otherwise.

setListValues

protected void setListValues(int includeFilesOrFolders,
                             String nameFilter)

setListValues

protected void setListValues(int includeFilesOrFolders,
                             String folderNameFilter,
                             String fileNameFilter)
Overloaded method to set variables to affect the folder content subsetting, when there is separate filters for both folder names and filter names.

Parameters:
includeFilesOrFolders - A constant from {IFileConstants}
folderNameFilter - The pattern to filter the folder names by. Can be null to include all folders

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.