Class AbstractReportAction

    • Constructor Detail

      • AbstractReportAction

        public AbstractReportAction​(boolean projectLevel)
        Instantiates a new AbstractReportAction.
        Parameters:
        projectLevel - specifies whether archiving is restricted to project level only
    • Method Detail

      • isProjectLevel

        public boolean isProjectLevel()
        Returns whether archiving is restricted to project level only.
        Returns:
        true if archiving is restricted to project level, false otherwise
      • getBuild

        public Run<?,​?> getBuild​(org.kohsuke.stapler.StaplerRequest req)
        Description copied from class: AbstractRequestHandler
        Gets the build that have report artifacts this action handles.

        If called in a project context, returns the last build that contains report artifacts.

        Specified by:
        getBuild in class AbstractRequestHandler
        Parameters:
        req - the StaplerRequest used for access this action
        Returns:
        the build with report artifacts to handle or null if no proper build exists
      • getLastReportBuild

        @CheckForNull
        protected abstract Run<?,​?> getLastReportBuild​(Job<?,​?> project)
        Gets the last build with report artifacts in a project.
        Parameters:
        project - the project
        Returns:
        the last build with report artifacts or null if no proper build exists