Class WarningsPluginConfiguration
- java.lang.Object
-
- hudson.model.Descriptor<GlobalConfiguration>
-
- jenkins.model.GlobalConfiguration
-
- io.jenkins.plugins.util.GlobalConfigurationItem
-
- io.jenkins.plugins.analysis.core.model.WarningsPluginConfiguration
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,OnMaster
@Extension @Symbol("warningsPlugin") public class WarningsPluginConfiguration extends io.jenkins.plugins.util.GlobalConfigurationItem
Global system configuration of the warnings plugin. These configuration options are used globally for all jobs and require administrator permissions.- Author:
- Ullrich Hafner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description WarningsPluginConfiguration()
Creates the global configuration for the warnings plugins.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clearRepeatableProperties()
static WarningsPluginConfiguration
getInstance()
Returns the singleton instance of thisWarningsPluginConfiguration
.FilePath
getPermittedSourceDirectory(FilePath workspace, String sourceDirectory)
Filters the specified collection of additional directories so that only permitted source directories will be returned.List<SourceDirectory>
getSourceDirectories()
Returns the list of source directories that contain the affected files..void
setSourceDirectories(List<SourceDirectory> sourceDirectories)
Sets the list of source directories to the specified elements.-
Methods inherited from class io.jenkins.plugins.util.GlobalConfigurationItem
configure, load, readResolve, save
-
Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
clearRepeatableProperties
protected void clearRepeatableProperties()
- Overrides:
clearRepeatableProperties
in classio.jenkins.plugins.util.GlobalConfigurationItem
-
getInstance
public static WarningsPluginConfiguration getInstance()
Returns the singleton instance of thisWarningsPluginConfiguration
.- Returns:
- the singleton instance
-
getSourceDirectories
public List<SourceDirectory> getSourceDirectories()
Returns the list of source directories that contain the affected files..- Returns:
- the source root folders
-
setSourceDirectories
@DataBoundSetter public void setSourceDirectories(List<SourceDirectory> sourceDirectories)
Sets the list of source directories to the specified elements. Previously set directories will be removed.- Parameters:
sourceDirectories
- the source directories that contain the affected files
-
getPermittedSourceDirectory
public FilePath getPermittedSourceDirectory(FilePath workspace, String sourceDirectory)
Filters the specified collection of additional directories so that only permitted source directories will be returned. Permitted source directories are absolute paths that have been registered usingsetSourceDirectories(List)
or relative paths in the workspace.- Parameters:
workspace
- the workspace containing the affected filessourceDirectory
- additional source directly (might be empty): a relative path in the workspace or an absolute path- Returns:
- the permitted source directory - or as a fallback the the workspace path
-
-