Package io.jenkins.plugins.prism
Class SourceDirectoryFilter
java.lang.Object
io.jenkins.plugins.prism.SourceDirectoryFilter
Filters source code directories that are not approved in Jenkins' global configuration. A directory is considered
safe if it is a sub-folder in the agent workspace. Directories outside the workspace need to be approved by an
administrator in Jenkins global configuration page.
- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPermittedSourceDirectories
(String workspacePath, Set<String> allowedSourceDirectories, Set<String> requestedSourceDirectories, edu.hm.hafner.util.FilteredLog log) Filters the specified collection of additional source code directories so that only permitted source directories will be returned.
-
Constructor Details
-
SourceDirectoryFilter
public SourceDirectoryFilter()
-
-
Method Details
-
getPermittedSourceDirectories
public Set<String> getPermittedSourceDirectories(String workspacePath, Set<String> allowedSourceDirectories, Set<String> requestedSourceDirectories, edu.hm.hafner.util.FilteredLog log) Filters the specified collection of additional source code directories so that only permitted source directories will be returned. Permitted source directories are absolute paths that have been registered usingPrismConfiguration.setSourceDirectories(java.util.List)
or relative paths in the workspace.- Parameters:
workspacePath
- the path to the workspace containing the affected filesallowedSourceDirectories
- the approved source directories from the system configuration sectionrequestedSourceDirectories
- source directories either as a relative path in the agent workspace or as an absolute path on the agentlog
- logger- Returns:
- the permitted source directories
-