public class PresentSelector extends BaseSelector
| Modifier and Type | Class and Description |
|---|---|
static class |
PresentSelector.FilePresence |
| Constructor and Description |
|---|
PresentSelector()
Creates a new
PresentSelector instance. |
| Modifier and Type | Method and Description |
|---|---|
Mapper |
createMapper()
Defines the FileNameMapper to use (nested mapper element).
|
boolean |
isSelected(InstallData idata,
File basedir,
String filename,
File file)
The heart of the matter.
|
void |
setPresent(PresentSelector.FilePresence fp)
This sets whether to select a file if its dest file is present.
|
void |
setTargetdir(File targetdir)
The name of the file or directory which is checked for matching
files.
|
String |
toString() |
void |
verifySettings()
Checks to make sure all settings are kosher.
|
getError, setError, validategetDescription, isChecked, noChildrenAllowed, setChecked, setDescription, tooManyAttributespublic String toString()
public void setTargetdir(File targetdir)
targetdir - the directory to scan looking for matching files.public Mapper createMapper() throws Exception
Exception - if more that one mapper definedpublic void setPresent(PresentSelector.FilePresence fp)
negate boolean, but by doing things
this way, we get some documentation on how the system works.
A user looking at the documentation should clearly understand
that the ONLY files whose presence is being tested are those
that already exist in the source directory, hence the lack of
a destonly option.fp - An attribute set to either srconlyboth.public void verifySettings()
throws Exception
verifySettings in class BaseSelectorExceptionpublic boolean isSelected(InstallData idata, File basedir, String filename, File file) throws Exception
isSelected in interface FileSelectorisSelected in class BaseSelectorbasedir - the base directory the scan is being done fromfilename - is the name of the file to checkfile - is a java.io.File object the selector can useException - if the selector was not configured correctlyCopyright © 2001–2025. All rights reserved.