Class ItemDeletion

All Implemented Interfaces:
ExtensionPoint

@Extension public class ItemDeletion extends Queue.QueueDecisionHandler
A Queue.QueueDecisionHandler that blocks items being deleted from entering the queue.
Since:
2.55
  • Constructor Details

    • ItemDeletion

      public ItemDeletion()
  • Method Details

    • contains

      public static boolean contains(@NonNull Item item)
      Checks if the supplied Item or any of its Item.getParent() are being deleted.
      Parameters:
      item - the item.
      Returns:
      true if the Item or any of its Item.getParent() are being deleted.
    • isRegistered

      public static boolean isRegistered(@NonNull Item item)
      Checks if the supplied Item is explicitly registered for deletion.
      Parameters:
      item - the item.
      Returns:
      true if and only if the supplied Item has been register(Item)ed for deletion.
    • register

      public static boolean register(@NonNull Item item)
      Register the supplied Item for deletion.
      Parameters:
      item - the Item that is to be deleted.
      Returns:
      true if and only if the Item was registered and the caller is now responsible to call deregister(Item).
    • deregister

      public static void deregister(@NonNull Item item)
      Deregister the supplied Item for deletion.
      Parameters:
      item - the Item that was to be deleted and is now either deleted or the delete was aborted.
    • shouldSchedule

      public boolean shouldSchedule(Queue.Task p, List<Action> actions)
      Description copied from class: Queue.QueueDecisionHandler
      Returns whether the new item should be scheduled.
      Specified by:
      shouldSchedule in class Queue.QueueDecisionHandler
      actions - List of actions that are to be made available as Actionable.getActions() upon the start of the build. This list is live, and can be mutated.