///////////////////////////////////////////////////////////////
// INCLUDE-EXCLUDE processing
///////////////////////////////////////////////////////////////
/**
* Look if the file should be processed by the task.
* Don't process it if it fits no include filters or if
* it fits an exclude filter.
*
* @param pName the item name to look for being included.
*
* @return whether the file should be processed or not.
*/
/**
* Look if the file should be checked out. Don't check it out if It fits
* no include filters and It fits an exclude filter.
*
* @param pName the item name to look for being included.
* @return whether the file should be checked out or not.
*/
protected boolean [[#variable13182c20]](String pName) {
boolean includeIt = matchPatterns(getIncludes(), pName);
boolean excludeIt = matchPatterns(getExcludes(), pName);
return (includeIt && !excludeIt);
}
/**
* Convenience method to see if a string match a one pattern
* in given set of space-separated patterns.
* @param patterns the space-separated list of patterns.
* @param pName the name to look for matching.
* @return whether the name match at least one pattern.
*/
/**
* Convenient method to see if a string match a one pattern in given set
* of space-separated patterns.
*
* @param patterns the space-separated list of patterns.
* @param pName the name to look for matching.
* @return whether the name match at least one pattern.
*/
protected boolean matchPatterns(String patterns, String pName) {
if (patterns == null) {
return false;
}
StringTokenizer exStr = new StringTokenizer(patterns, [[#variable111db920]]);
while (exStr.hasMoreTokens()) {
if (DirectoryScanner.match(exStr.nextToken(), pName)) {
return true;
}
}
return false;
}
|