org.hyperic.util.file.match
Class MatcherConfig
java.lang.Object
org.hyperic.util.file.match.MatcherConfig
public class MatcherConfig
- extends java.lang.Object
Constructor Summary |
MatcherConfig()
Default constructor. |
MatcherConfig(java.util.List dirs,
java.util.List matchSelectors,
java.util.List excludePatterns,
boolean followSymlinks,
boolean allowMultipleMatches,
int fsTypes,
int maxDepth,
MatcherInterruptCallback icb,
MatcherProgressCallback pcb,
org.apache.commons.logging.Log log)
Construct an Matcher with initial data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEPTH_INFINITE
public static final int DEPTH_INFINITE
- See Also:
- Constant Field Values
FS_ALL
public static final int FS_ALL
- See Also:
- Constant Field Values
FS_LOCAL
public static final int FS_LOCAL
- See Also:
- Constant Field Values
FS_NETWORK
public static final int FS_NETWORK
- See Also:
- Constant Field Values
MatcherConfig
public MatcherConfig()
- Default constructor. You've got to manually set everything up
with the setXXX and addXXX methods.
MatcherConfig
public MatcherConfig(java.util.List dirs,
java.util.List matchSelectors,
java.util.List excludePatterns,
boolean followSymlinks,
boolean allowMultipleMatches,
int fsTypes,
int maxDepth,
MatcherInterruptCallback icb,
MatcherProgressCallback pcb,
org.apache.commons.logging.Log log)
- Construct an Matcher with initial data.
- Parameters:
dirs
- The dirs to search.matchSelectors
- A List of MatchSelector objects to use to
determine what are matches.excludePatterns
- The patterns to exclude.followSymlinks
- If true, symlinks will be followed. If false,
symlinks will not be followed.allowMultipleMatches
- If true, multiple selectors will be allowe
to match a single path. If false, a MultipleMatchesException will be
thrown when multiple matchselectors match a single path.fsTypes
- What filesystems to scan. Use one of the FS_XXX
constants.maxDepth
- How many directory levels below each search dir will
be recursively searched. Must be a nonnegative number.icb
- The interrupt callback class to use. This class
is used to tell the Matcher when it should stop early and bail out
because an interrupt has occurred.pcb
- The progress callback class to use. This class
is notified about each directory that is being scanned.log
- the logging context to use. This can be null, in which
case it is ignored and no log messages are generated.
addSearchDir
public void addSearchDir(java.lang.String dir)
getSearchDirs
public java.util.List getSearchDirs()
setSearchDirs
public void setSearchDirs(java.util.List dirs)
addMatchSelector
public void addMatchSelector(MatchSelector ms)
getMatchSelectors
public java.util.List getMatchSelectors()
setMatchSelectors
public void setMatchSelectors(java.util.List ms)
addExcludePattern
public void addExcludePattern(java.lang.String pattern)
getExcludePatterns
public java.util.List getExcludePatterns()
setExcludePatterns
public void setExcludePatterns(java.util.List patterns)
getFSTypes
public int getFSTypes()
setFSTypes
public void setFSTypes(int fs)
getFollowSymlinks
public boolean getFollowSymlinks()
setFollowSymlinks
public void setFollowSymlinks(boolean fsm)
getAllowMultipleMatches
public boolean getAllowMultipleMatches()
setAllowMultipleMatches
public void setAllowMultipleMatches(boolean amm)
getLog
public org.apache.commons.logging.Log getLog()
setLog
public void setLog(org.apache.commons.logging.Log log)
getMaxDepth
public int getMaxDepth()
setMaxDepth
public void setMaxDepth(int max)
getMatcherInterruptCB
public MatcherInterruptCallback getMatcherInterruptCB()
setMatcherInterruptCB
public void setMatcherInterruptCB(MatcherInterruptCallback icb)
getMatcherProgressCB
public MatcherProgressCallback getMatcherProgressCB()
setMatcherProgressCB
public void setMatcherProgressCB(MatcherProgressCallback pcb)
Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.