Class DefaultOrphanedItemStrategy

    • Constructor Detail

      • DefaultOrphanedItemStrategy

        @DataBoundConstructor
        public DefaultOrphanedItemStrategy​(boolean pruneDeadBranches,
                                           @CheckForNull
                                           String daysToKeepStr,
                                           @CheckForNull
                                           String numToKeepStr)
        Stapler's constructor.
        Parameters:
        pruneDeadBranches - remove dead branches.
        daysToKeepStr - how old a branch must be to remove.
        numToKeepStr - how many branches to keep.
      • DefaultOrphanedItemStrategy

        public DefaultOrphanedItemStrategy​(boolean pruneDeadBranches,
                                           int daysToKeep,
                                           int numToKeep)
        Programmatic constructor.
        Parameters:
        pruneDeadBranches - remove dead branches.
        daysToKeep - how old a branch must be to remove.
        numToKeep - how many branches to keep.
    • Method Detail

      • getDaysToKeep

        public int getDaysToKeep()
        Gets the number of days to keep dead branches.
        Returns:
        the number of days to keep dead branches.
      • getNumToKeep

        public int getNumToKeep()
        Gets the number of dead branches to keep.
        Returns:
        the number of dead branches to keep.
      • isPruneDeadBranches

        public boolean isPruneDeadBranches()
        Returns true if dead branches should be removed.
        Returns:
        true if dead branches should be removed.
      • isAbortBuilds

        public boolean isAbortBuilds()
        Returns true if pending or ongoing should be aborted.
        Returns:
        true if pending or ongoing should be aborted.
      • setAbortBuilds

        @DataBoundSetter
        public void setAbortBuilds​(boolean abortBuilds)
      • getDaysToKeepStr

        @NonNull
        public String getDaysToKeepStr()
        Returns the number of days to keep dead branches.
        Returns:
        the number of days to keep dead branches.
      • getNumToKeepStr

        @NonNull
        public String getNumToKeepStr()
        Gets the number of dead branches to keep.
        Returns:
        the number of dead branches to keep.