@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension
public class ItemDeletion
extends hudson.model.Queue.QueueDecisionHandler
Queue.QueueDecisionHandler that blocks items being deleted from entering the queue.| Constructor and Description |
|---|
ItemDeletion() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(hudson.model.Item item)
Checks if the supplied
Item or any of its Item.getParent() are being deleted. |
static void |
deregister(hudson.model.Item item)
Deregister the supplied
Item for deletion. |
static hudson.model.Item |
getItemOf(hudson.model.queue.SubTask t)
Gets the
Item most closely associated with the supplied SubTask. |
static boolean |
isRegistered(hudson.model.Item item)
Checks if the supplied
Item is explicitly registered for deletion. |
static boolean |
register(hudson.model.Item item)
Register the supplied
Item for deletion. |
boolean |
shouldSchedule(hudson.model.Queue.Task p,
List<hudson.model.Action> actions) |
public static boolean contains(@Nonnull hudson.model.Item item)
Item or any of its Item.getParent() are being deleted.item - the item.true if the Item or any of its Item.getParent() are being deleted.public static boolean isRegistered(@Nonnull hudson.model.Item item)
Item is explicitly registered for deletion.item - the item.true if and only if the supplied Item has been register(Item)ed for
deletion.public static boolean register(@Nonnull hudson.model.Item item)
Item for deletion.item - the Item that is to be deleted.true if and only if the Item was registered and the caller is now responsible to call
deregister(Item).public static void deregister(@Nonnull hudson.model.Item item)
Item for deletion.item - the Item that was to be deleted and is now either deleted or the delete was aborted.public boolean shouldSchedule(hudson.model.Queue.Task p,
List<hudson.model.Action> actions)
shouldSchedule in class hudson.model.Queue.QueueDecisionHandler@CheckForNull public static hudson.model.Item getItemOf(@Nonnull hudson.model.queue.SubTask t)
Item most closely associated with the supplied SubTask.t - the SubTask.Item associated with the SubTask or null if this
SubTask is not associated with an ItemCopyright © 2016–2017. All rights reserved.