public class JobOrFolderConfigurationEntityMatcher extends PatternsEntityMatcher
ConfigurationEntityMatcher
for job and Cloudbees Folders plugin folder configuration files.
Matches config.xml located in jobs/project/config.xml (normal Jenkins), but also in nested directories
below that as long as the path has the pattern (jobs/someName/)+config.xml (Cloudbees directory structure).Constructor and Description |
---|
JobOrFolderConfigurationEntityMatcher() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getIncludes()
All patterns this matcher matches; used only for informational purposes in the UI.
|
boolean |
matches(hudson.model.Saveable saveable,
File file)
Determines whether the matcher matches a given combination of saveable and file.
|
boolean |
matches(hudson.model.Saveable saveable,
String pathRelativeToRoot,
boolean isDirectory)
Determines whether the matcher would have matched a deleted file, of which we know only its path and possibly whether it was directory.
|
String[] |
matchingFilesFrom(File rootDirectory,
org.apache.tools.ant.types.selectors.FileSelector selector)
Collects all files under the given rootDirectory that match, restricted by the given
link FileSelector . |
public JobOrFolderConfigurationEntityMatcher()
public boolean matches(hudson.model.Saveable saveable, File file)
ConfigurationEntityMatcher
matches
in interface ConfigurationEntityMatcher
matches
in class PatternsEntityMatcher
saveable
- the file belongs tofile
- that is to be matchedtrue
on match, false
otherwisepublic boolean matches(hudson.model.Saveable saveable, String pathRelativeToRoot, boolean isDirectory)
ConfigurationEntityMatcher
matches
in interface ConfigurationEntityMatcher
matches
in class PatternsEntityMatcher
saveable
- the file belonged topathRelativeToRoot
- of the file or directory (which Jenkins has already deleted)isDirectory
- true
if it's known that the path referred to a directory, false
otherwisetrue
on match, false
otherwisepublic List<String> getIncludes()
ConfigurationEntityMatcher
getIncludes
in interface ConfigurationEntityMatcher
getIncludes
in class PatternsEntityMatcher
public String[] matchingFilesFrom(File rootDirectory, org.apache.tools.ant.types.selectors.FileSelector selector)
ConfigurationEntityMatcher
link FileSelector
.matchingFilesFrom
in interface ConfigurationEntityMatcher
matchingFilesFrom
in class PatternsEntityMatcher
rootDirectory
- to traverseselector
- restricting the traversalCopyright © 2004-2016. All Rights Reserved.