Class BuildCancellationPolicy

    • Constructor Detail

      • BuildCancellationPolicy

        @DataBoundConstructor
        public BuildCancellationPolicy​(boolean abortNewPatchsets,
                                       boolean abortManualPatchsets,
                                       boolean abortSameTopic,
                                       boolean abortAbandonedPatchsets)
        Default databound constructor.
        Parameters:
        abortNewPatchsets - abort new patch sets
        abortManualPatchsets - abort manual patch sets
        abortSameTopic - abort same topic
        abortAbandonedPatchsets - abort abandoned patchsets
      • BuildCancellationPolicy

        public BuildCancellationPolicy()
        Default constructor.
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Getter for if build cancellation is turned off or on.
        Returns:
        whether build cancellation is turned off or on.
      • setEnabled

        public void setEnabled​(boolean enabled)
        Turns on/off the build cancellation.
        Parameters:
        enabled - whether build cancellation should be turned off or on.
      • isAbortNewPatchsets

        public boolean isAbortNewPatchsets()
        Standard getter for the abortNewPatchsets value.
        Returns:
        the abortNewPatchsets value.
      • setAbortNewPatchsets

        public void setAbortNewPatchsets​(boolean abortNewPatchsets)
        Standard setter for the abortNewPatchsets value.
        Parameters:
        abortNewPatchsets - true if new patchsets should be cancelled by older.
      • isAbortManualPatchsets

        public boolean isAbortManualPatchsets()
        Standard getter for the abortManualPatchsets value.
        Returns:
        the abortManualPatchsets value.
      • setAbortManualPatchsets

        public void setAbortManualPatchsets​(boolean abortManualPatchsets)
        Standard setter for the abortManualPatchsets value.
        Parameters:
        abortManualPatchsets - true if manual patchsets should be cancelled.
      • isAbortSameTopic

        public boolean isAbortSameTopic()
        Standard getter for the abortSameTopic value.
        Returns:
        the abortSameTopic value.
      • setAbortSameTopic

        public void setAbortSameTopic​(boolean abortSameTopic)
        Standard setter for the abortSameTopic value.
        Parameters:
        abortSameTopic - true if patchsets with same topic should be cancelled.
      • isAbortAbandonedPatchsets

        public boolean isAbortAbandonedPatchsets()
        True if running builds should be aborted by abandoned patchsets, otherwise false.
        Returns:
        abortAbandonedPatchsets
      • setAbortAbandonedPatchsets

        public void setAbortAbandonedPatchsets​(boolean abortAbandonedPatchsets)
        Standard seter for abortAbandonedPatchsets.
        Parameters:
        abortAbandonedPatchsets - true if abandoned patchsets should abort build.
      • createPolicyFromJSON

        public static BuildCancellationPolicy createPolicyFromJSON​(net.sf.json.JSONObject obj)
        Creates a new BuildCancellationPolicy object from JSON.
        Parameters:
        obj - the JSONObject.
        Returns:
        a new BuildCancellationPolicy object.