Class 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
    • Constructor Detail

      • WarningsPluginConfiguration

        public WarningsPluginConfiguration()
        Creates the global configuration for the warnings plugins.
    • Method Detail

      • clearRepeatableProperties

        protected void clearRepeatableProperties()
        Overrides:
        clearRepeatableProperties in class io.jenkins.plugins.util.GlobalConfigurationItem
      • 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 using setSourceDirectories(List) or relative paths in the workspace.
        Parameters:
        workspace - the workspace containing the affected files
        sourceDirectory - 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