Class RebuildAction

    • Constructor Detail

      • RebuildAction

        public RebuildAction()
        RebuildAction constructor.
    • Method Detail

      • getBuild

        public Run<?,​?> getBuild()
        Getter method for build.
        Returns:
        build.
      • getP

        public String getP()
        Getter method for p.
        Returns:
        p.
      • getParameters

        public String getParameters()
        Getter method for parameters.
        Returns:
        parameters.
      • getRebuildurl

        public String getRebuildurl()
        Getter method for rebuildurl.
        Returns:
        rebuildurl.
      • isRememberPasswordEnabled

        public boolean isRememberPasswordEnabled()
        True if the password fields should be pre-filled.
        Returns:
        True if the password fields should be pre-filled.
      • getProject

        public Job getProject()
        Method will return current project.
        Returns:
        currentProject.
      • doIndex

        public void doIndex​(org.kohsuke.stapler.StaplerRequest request,
                            org.kohsuke.stapler.StaplerResponse response)
                     throws IOException,
                            javax.servlet.ServletException,
                            InterruptedException
        Handles the rebuild request and redirects to parameterized and non parameterized build when needed.
        Parameters:
        request - StaplerRequest the request.
        response - StaplerResponse the response handler.
        Throws:
        IOException - in case of Stapler issues
        javax.servlet.ServletException - if something unfortunate happens.
        InterruptedException - if something unfortunate happens.
      • parameterizedRebuild

        public void parameterizedRebuild​(Run currentBuild,
                                         org.kohsuke.stapler.StaplerResponse response)
                                  throws IOException
        Handles the rebuild request with parameter.
        Parameters:
        currentBuild - the build.
        response - StaplerResponse the response handler.
        Throws:
        IOException - in case of Stapler issues
      • nonParameterizedRebuild

        public void nonParameterizedRebuild​(Run currentBuild,
                                            org.kohsuke.stapler.StaplerResponse response)
                                     throws javax.servlet.ServletException,
                                            IOException,
                                            InterruptedException
        Call this method while rebuilding non parameterized build. .
        Parameters:
        currentBuild - current build.
        response - current response object.
        Throws:
        javax.servlet.ServletException - if something unfortunate happens.
        IOException - if something unfortunate happens.
        InterruptedException - if something unfortunate happens.
      • doConfigSubmit

        public void doConfigSubmit​(org.kohsuke.stapler.StaplerRequest req,
                                   org.kohsuke.stapler.StaplerResponse rsp)
                            throws javax.servlet.ServletException,
                                   IOException,
                                   InterruptedException
        Saves the form to the configuration and disk.
        Parameters:
        req - StaplerRequest
        rsp - StaplerResponse
        Throws:
        javax.servlet.ServletException - if something unfortunate happens.
        IOException - if something unfortunate happens.
        InterruptedException - if something unfortunate happens.
      • isMatrixRun

        public boolean isMatrixRun()
        Method for checking whether current build is sub job(MatrixRun) of Matrix build.
        Returns:
        boolean
      • isRebuildAvailable

        public boolean isRebuildAvailable()
        Method for checking,whether the rebuild functionality would be available for build.
        Returns:
        boolean
      • getParameterValue

        public ParameterValue getParameterValue​(ParametersDefinitionProperty paramDefProp,
                                                String parameterName,
                                                ParametersAction paramAction,
                                                org.kohsuke.stapler.StaplerRequest req,
                                                net.sf.json.JSONObject jo)
        Method for getting the ParameterValue instance from ParameterDefinition or ParamterAction.
        Parameters:
        paramDefProp - ParametersDefinitionProperty
        parameterName - Name of the Parameter.
        paramAction - ParametersAction
        req - StaplerRequest
        jo - JSONObject
        Returns:
        ParameterValue instance of subclass of ParameterValue
      • getRebuildParameterPage

        public RebuildParameterPage getRebuildParameterPage​(ParameterValue value)
        Parameters:
        value - the parameter value to show to rebuild.
        Returns:
        page for the parameter value, or null if no suitable option found.