public class FindForm extends FARForm implements FindFilter
LB_REGEX, regexPattern
BD_PROPERTY_NAME_SEARCH_STRING, groupReference, PROPERTY_NAME_BASEDIR
Constructor and Description |
---|
FindForm() |
Modifier and Type | Method and Description |
---|---|
void |
addBaseDirectoryListener(java.beans.PropertyChangeListener pcl)
Adds a PropertyChangeListener for the BaseDirectory property.
|
FindForm |
clone()
Returns a copy of this object.
|
PatternFilter |
createPatternFilter()
Returns a PatternFilter for this FindForm.
|
boolean |
equals(java.lang.Object o)
Only the base directory is taken into account for equals!
|
java.util.Date |
getAfter()
May return a non null Date to request files modified after
the specified date.
|
java.util.Date |
getBefore()
May return a non null Date to request files modified before
the specified date.
|
FileNamePattern |
getDirectoryPattern()
Returns the directory search pattern currently set or null.
|
FileNamePattern |
getFileNamePattern()
Returns the file name pattern that should be used to filter files.
|
int |
getMaxDepth()
Returns the maximal search depth.
|
int |
hashCode()
Only the base directory is taken into account for the hash code!
|
boolean |
isExcludeMatchingDirectories()
Returns the value of the exclude-matching-directories flag.
|
boolean |
isIncludeSubDirs()
Should the file search include subdirectories.
|
boolean |
isInvertContentFilter()
Returns false if the content pattern is applied as an inclusion filter
(the default).
|
void |
removeBaseDirectoryListener(java.beans.PropertyChangeListener pcl)
Removes a PropertyChangeListener.
|
boolean |
sameBaseSearch(FindForm otherForm)
Returns true if the properties "baseDirectory" and "filePattern" of both FindForm instances
are non null and equal, together with their respective flags.
|
void |
setAfter(java.util.Date after)
Sets the minimum modified time stamp.
|
void |
setBaseDirectory(java.io.File baseDirectory)
Sets the base directory.
|
void |
setBefore(java.util.Date before)
Sets the maximum modified time stamp.
|
void |
setDirectoryPattern(FileNamePattern pattern)
Sets the directory search pattern as a regular expression.
|
void |
setExcludeMatchingDirectories(boolean excludeMatchingDirectories)
Control flag for the
directory pattern . |
void |
setFileNamePattern(FileNamePattern filePattern)
Sets the file name pattern that should be used to filter files.
|
void |
setIncludeSubDirs(boolean includeSubDirs)
Set to false to exclude files in subdirectories.
|
void |
setInvertContentFilter(boolean invertContentFilter)
Set this flag to true to exclude files that match the content pattern
from the file list.
|
void |
setMaxDepth(int max)
Sets the maximal search depth for find operations.
|
void |
update(FindForm form)
Updates this form with the data from the "form" parameter.
|
getContentPatternAsRegex, getSearchStringContent, isIgnoreCase, isRegexContentPattern, reset, setIgnoreCase, setRegexContentPattern, setSearchStringContent, update
addFormUpdateListener, addPropertyChangeListener, firePropertyChangeEvent, getBaseDirectory, getGroupReference, getType, removeFormUpdateListener, removePropertyChangeListener, setGroupReference, update
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getBaseDirectory
getContentPatternAsRegex, getSearchStringContent
public FileNamePattern getFileNamePattern()
getFileNamePattern
in interface FileNameFilter
public void setFileNamePattern(FileNamePattern filePattern)
filePattern
- file name patternpublic boolean isIncludeSubDirs()
isIncludeSubDirs
in interface DirectoryFilter
public void setIncludeSubDirs(boolean includeSubDirs)
includeSubDirs
- include subdirectories in file searchpublic void setMaxDepth(int max)
max
- maximal search depthpublic FileNamePattern getDirectoryPattern()
exclude-matching-directories flag
,
matching directories will be excluded from search, or only files with matching ancestor directories
will be included.getDirectoryPattern
in interface DirectoryFilter
public void setDirectoryPattern(FileNamePattern pattern)
exclude-matching-directories flag
,
matching directories will be excluded from search, or only files with matching ancestor directories
will be included.pattern
- directory search patternpublic boolean isExcludeMatchingDirectories()
isExcludeMatchingDirectories
in interface DirectoryFilter
setExcludeMatchingDirectories(boolean)
public void setExcludeMatchingDirectories(boolean excludeMatchingDirectories)
directory pattern
. If this flag is set,
directories matching the directory pattern will be excluded from the search. Otherwise, only files
in or under a matching directory (i.e. with matching ancestor directory) will be included in the
search result. If the directory pattern is not set (null), this flag has no effect.excludeMatchingDirectories
- true to exclude, false to restrict.public boolean isInvertContentFilter()
isInvertContentFilter
in interface FindFilter
public void setInvertContentFilter(boolean invertContentFilter)
invertContentFilter
- set to false to make content pattern an exclusion filterpublic java.util.Date getBefore()
getBefore
in interface FileFilter
public void setBefore(java.util.Date before)
before
- maximum modified time stamp or nullpublic java.util.Date getAfter()
getAfter
in interface FileFilter
public void setAfter(java.util.Date after)
after
- minimum modified time stamp or nullpublic void setBaseDirectory(java.io.File baseDirectory)
setBaseDirectory
in class OperationForm
baseDirectory
- base directory for file operationsFileMatcher.getBaseDirectory()
public void update(FindForm form)
form
- data to replace the content of this formpublic void addBaseDirectoryListener(java.beans.PropertyChangeListener pcl)
pcl
- PropertyChangeListener to be addedpublic void removeBaseDirectoryListener(java.beans.PropertyChangeListener pcl)
pcl
- PropertyChangeListener to be removedpublic boolean sameBaseSearch(FindForm otherForm)
public PatternFilter createPatternFilter()
createPatternFilter
in interface FileNameFilter
public int getMaxDepth()
getMaxDepth
in interface DirectoryFilter
public FindForm clone()
clone
in interface ContentFilter
clone
in interface FileNameFilter
clone
in interface FindFilter
clone
in class OperationForm
Object.clone()
public boolean equals(java.lang.Object o)