Class ParserConfiguration

    • Constructor Detail

      • ParserConfiguration

        public ParserConfiguration()
        Creates the Groovy parser configuration for the warnings plugins.
    • Method Detail

      • clearRepeatableProperties

        protected void clearRepeatableProperties()
        Overrides:
        clearRepeatableProperties in class io.jenkins.plugins.util.GlobalConfigurationItem
      • getParsers

        public List<GroovyParser> getParsers()
        Returns the list of available Groovy parsers.
        Returns:
        the Groovy parsers
      • setParsers

        @DataBoundSetter
        public void setParsers​(List<GroovyParser> parsers)
        Sets the list of available Groovy parsers to the specified elements. Previously set parsers will be removed.
        Parameters:
        parsers - the new Groovy parsers
      • isConsoleLogScanningPermitted

        public boolean isConsoleLogScanningPermitted()
        Says if the admin has permitted groovy parsers to scan a build's console log.
        Returns:
        true if groovy parsers can scan the console, false if they are limited to only scanning files on the build node.
      • setConsoleLogScanningPermitted

        @DataBoundSetter
        public void setConsoleLogScanningPermitted​(boolean consoleLogScanningPermitted)
        Sets whether or not the admin has permitted groovy parsers to scan a build's console log.
        Parameters:
        consoleLogScanningPermitted - true if groovy parsers can scan the console, false if they are limited to only scanning files on the build node.
      • canEditParsers

        public boolean canEditParsers()
        Returns whether the current user has the permission to edit the available Groovy parsers.
        Returns:
        true if the user has the right, false otherwise
      • getParser

        public GroovyParser getParser​(String id)
        Returns the parser (wrapped into a AnalysisModelParser instance) with the specified ID.
        Parameters:
        id - the ID of the parser
        Returns:
        the parser
        Throws:
        edu.hm.hafner.util.NoSuchElementException - if there is no such parser with the given ID
      • contains

        public boolean contains​(String id)
        Returns whether a parser with the specified ID does already exist. Parser IDs are unique in a Jenkins instance.
        Parameters:
        id - the ID of the parser
        Returns:
        true if there is already a parser with the ID, false otherwise
      • asListBoxModel

        public ListBoxModel asListBoxModel()
        Returns all registered Groovy parsers. These are packed into a ListBoxModel in order to show them in the list box of the config.jelly view part.
        Returns:
        the model of the list box