public class Tasks extends Object
Queue.Task
and SubTask
.Constructor and Description |
---|
Tasks() |
Modifier and Type | Method and Description |
---|---|
static org.acegisecurity.Authentication |
getAuthenticationOf(Queue.Task t)
Finds what authentication a task is likely to be run under when scheduled.
|
static org.acegisecurity.Authentication |
getDefaultAuthenticationOf(Queue.Task t)
Helper method to safely invoke
Queue.Task.getDefaultAuthentication() on classes that may come
from plugins compiled against an earlier version of Jenkins. |
static org.acegisecurity.Authentication |
getDefaultAuthenticationOf(Queue.Task t,
Queue.Item item)
Helper method to safely invoke
Task#getDefaultAuthentication(Item) on classes that may come
from plugins compiled against an earlier version of Jenkins. |
static Queue.Task |
getOwnerTaskOf(SubTask t) |
static Object |
getSameNodeConstraintOf(SubTask t) |
static Collection<? extends SubTask> |
getSubTasksOf(Queue.Task task) |
public static Collection<? extends SubTask> getSubTasksOf(Queue.Task task)
@Nonnull public static Queue.Task getOwnerTaskOf(@Nonnull SubTask t)
@Nonnull public static org.acegisecurity.Authentication getDefaultAuthenticationOf(Queue.Task t)
Queue.Task.getDefaultAuthentication()
on classes that may come
from plugins compiled against an earlier version of Jenkins.t
- the taskQueue.Task.getDefaultAuthentication()
, or ACL.SYSTEM
@Nonnull public static org.acegisecurity.Authentication getDefaultAuthenticationOf(Queue.Task t, Queue.Item item)
Task#getDefaultAuthentication(Item)
on classes that may come
from plugins compiled against an earlier version of Jenkins.t
- the taskitem
- the itemQueue.Task.getDefaultAuthentication(hudson.model.Queue.Item)
,
or Queue.Task.getDefaultAuthentication()
, or ACL.SYSTEM
@Nonnull public static org.acegisecurity.Authentication getAuthenticationOf(@Nonnull Queue.Task t)
Queue.Item.authenticate()
) might differ,
in case some QueueItemAuthenticator.authenticate(hudson.model.Queue.Item)
takes (for example) actions into consideration.t
- a taskQueueItemAuthenticator.authenticate(hudson.model.Queue.Task)
; else getDefaultAuthenticationOf(hudson.model.Queue.Task)
Copyright © 2017. All rights reserved.